• Welcome to SC4 Devotion Forum Archives.

Industrial Resource CAP and CAP Relief

Started by RippleJet, August 28, 2009, 09:41:02 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

RippleJet

A while back, when I was writing the tutorial Demand Simulator: Demand, Supply and CAPs,
I started to think about a way to display the IR CAP in the Census Repository Facility's query.

After double-checking first the Prima guide:

Quote from: Prima's Official Strategy Guide, SimCity 4 DeLuxe Edition
Generally, every job offered by developer type counts against it's own demand cap.   Agriculture is different.  Jobs from all other businesses count against the Agriculture Demand Cap.  The effect of this is that as other businesses grow, Agriculture is forced to stagnate.   Connections keep raising the cap, but the influx of non-agricultural businesses should outpace relief.  At some point you have to decide whether you want farms in your city.  If so, you must curtail all other business forms and put nearly all of your resources into farming.  Only then will Agriculture grow to large scale.  When you city begins to thrive, start a neightboring city, connect it, and commit it to Agriculture.   The Residentail population of your main city will fedd the demand for Ag jobs and the farms' isolation will let them go unimpeded.   Plus you won't have to worry about their water pollution output affecting your Residents.

...and then the RCI exemplars in SimCity_1.dat, it is clear that the following count against the I-R CAP:
R§, R§§, R§§§, CO§§, CO§§§, CS§§, CS§§§, ID, IM and IHT.

In other words, all RCI types except CS§ and IR itself.

From the RCI exemplar "Industrial Connection" (TGI 0x6534284A, 0xC7BB4816, 0x00004800),
it's also evident that industrial connections provide ID, IM and IHT CAP relieves, but not for IR.

Thus, as it's always been said that there's no way to provide IR CAP relief,
I thought I could simply compare the sum (R§+R§§+R§§§+CO§§+CO§§§+CS§§+CS§§§+ID+IM+IHT)
to the initial IR CAP of 30,000, and thus get a measure for the IR CAP.

This turned out to work pretty well. Off to test it in a city...
When the IR CAP surpassed 80%:



...IR (I-Ag) Demand phased out (as we all know it does sooner or later):






However, now I started to wonder why the IR CAP is said to be static.
After all, nothing stops us from entering 0x4900 (I-R CAP) in the property Demand Satisfied:

Quote from: RippleJet on October 26, 2008, 05:53:32 AM
Demand Satisfied

At some stage there will be so much demand for jobs,
that the accumulated Capacity Satisfied will reach the initial CAP (maximum capacity).
At this stage that specific RCI type is said to be capped, and growth will stagnate.

To circumvent this, the player will have to Satisfy the need for Demand.
Or, in other words, he needs to increase the initial maximum capacity (CAP).

CAP Relief can be provided by plopping certain rewards and parks, having the property Demand Satisfied:


ID
Demand Satisfied    Relieves CAP for
1810    Amenities §1010  R§
1820Amenities §§1020  R§§
1830Amenities §§§1030  R§§§
3B20CO§§ CAP3320  CO§§
3B30CO§§§ CAP3320  CO§§§
4900I-R CAP4100  IR
4A00I-D CAP4200  ID
4B00I-M CAP4300  IM
4C00I-HT CAP4400  IH

Thus, to test this I modded the Census Repository Vault to provide an IR CAP Relief of 30,000.
Plopped it in the same city, right after the situation shown above, and: ()stsfd()



IR CAP Relief is fully functional and thus it would make it fully possible to have farms amidst skyscrapers...

In order to get the Census Repository to accurately show the new IR CAP,
it needs to be able to count all buildings providing IR CAP relief though
(since there is no game variable available to report it, as for the other CAPs):



In order to get the CAP down to 40% above, I reserved a number of Occupant Groups to provide this information.
I created a LUA function for the Census Repository that calculates the occurances of these OG's:


function RJCR_IRCurrentCAP()
  local result = 30000 -- initial IR CAP
    result = result
    + sc4game.automata.get_source_building_count(hex2dec('b5c00cc0')) * 100
    + sc4game.automata.get_source_building_count(hex2dec('b5c00cc1')) * 200
    + sc4game.automata.get_source_building_count(hex2dec('b5c00cc2')) * 400
    + sc4game.automata.get_source_building_count(hex2dec('b5c00cc3')) * 800
    + sc4game.automata.get_source_building_count(hex2dec('b5c00cc4')) * 1600
    + sc4game.automata.get_source_building_count(hex2dec('b5c00cc5')) * 3200
    + sc4game.automata.get_source_building_count(hex2dec('b5c00cc6')) * 6400
    + sc4game.automata.get_source_building_count(hex2dec('b5c00cc7')) * 12800
    + sc4game.automata.get_source_building_count(hex2dec('b5c00cc8')) * 25600
    + sc4game.automata.get_source_building_count(hex2dec('b5c00cc9')) * 51200
    + sc4game.automata.get_source_building_count(hex2dec('b5c00cca')) * 102400
    + sc4game.automata.get_source_building_count(hex2dec('b5c00ccb')) * 204800
    + sc4game.automata.get_source_building_count(hex2dec('b5c00ccc')) * 409600
    + sc4game.automata.get_source_building_count(hex2dec('b5c00ccd')) * 819200
    + sc4game.automata.get_source_building_count(hex2dec('b5c00cce')) * 1638400
    + sc4game.automata.get_source_building_count(hex2dec('b5c00ccf')) * 3276800
  return result
end


Thus, to provide an arbitrary IR CAP relief would require a number of these Occupant Groups.
E.g. the building mentioned above that provides an IR CAP relief of 30,000, needs the following OG's:


B5C00CC2   
400
B5C00CC3
800
B5C00CC5
3,200
B5C00CC8
25,600
---------
TOTAL
30,000

By using all 16 OG's above, we can denote any CAP relief between 100 and 6,553,500, with increments of 100.

This also allowed me to display the exact CAP, not only a percentage:


SC4BOY

It would seem that one of the primary influences of farming demand should be land value. Since a farmer can't afford to pay appreciated land taxes and still make a profit on crops his price/value of land must be very low.. anything else and its likely being farmed more for land appreciation than crops ;)  Do you have any data on the impact of Agriculture Taxes vs demand? I seem to recall you did something like that for R,C and I.

RippleJet

Demand is primarily set by the residential population's wealth and education, as given by the Workforce Drives.
That demand can also include extrapolated demand from neighbouring cities.
If the city you're playing does not have any residents at all, then all demand is based on extrapolated demand.

On top of that, the city-wide demand (for all RCI types) is regulated by the tax rate,
or more specifically based on how much the tax rate differs from the neutral tax rate.

The neutral tax rate depends on the city's population:


Population   Neutral Tax Rate
0
9.0 %
150,000
8.3 %
300,000
7.5 %
450,000
6.5 %
600,000
4.0 %

It isn't fully clear what population means in this context.
The most logical interpretation would be to assume that it is the city's total RCI capacity (R + C + I).

The real tax (for each type of RCI) is related to this neutral tax rate,
giving the following reduction or increase in demand (linearly interpolated between these):


Relative Tax Rate   Demand Influence
20 %
+30 %
100 %
±0 %
500 %
-350 %

In addition to this, demand is locally increased or decreased depending on desirability.
Desirability is trimmed between 0 and 255, and for I-R it's the sum of the following factors:


Factor
Value Range
   Desirability Range
Land Value
0 ... 255
+10 ... ±0
Traffic Effect
0 ... 255
+50 ... -50
Trip Length Effect
0 ... 255
+15 ... -15
Crime Effect
0 ... 255
+10 ... -10
Air Pollution Effect
0 ... 1000
+50 ... -50
Garbarge Pollution Effect
0 ... 4096
+50 ... -50
Radiation Pollution Effect
0 ... >0
±0 ... -2000

The effect of Land Value is actually not that significant.

The following factors have no effect on I-R:


  • Landmark Effect
  • Park Effect
  • School Effect
  • Hospital Effect
  • Water Pollution Effect
  • Slope Effect
  • Proximity Effect

Finally, on top of this you may have local transient aura effect,
the effect of which can be as large as -100 ... +100 on desirability.

SC4BOY

#3
Hehe.. I was speaking only from the "real world" point of view regarding land value..

Thanks for some, as usual, EXCELLENT and not widely known, info!!!

One other thing that I recall from SC3000 and which I think was carried over into SC4 is an overall semi-randomized "envelop" of demand that will cause slow rise and fall of demand in a cyclical manner. And I am not at all sure that all the demands (ie for each type of demand, CO$, CS$, etc etc) that the cycles are in synch. (these were originally said to model the boom/bust cycles that occured in the pre-2000 US economy, but I've never seen it proven) Do you know if that effect still exists?

RippleJet

Quote from: SC4BOY on August 28, 2009, 01:10:39 PM
Do you know if that effect still exists?

I'm pretty sure it was discarded all-together in SC4.
At least I haven't found anything in the demand simulators indicating there would be any kind of cycles.
Also the Prima Guide doesn't mention anything about such a thing.

jmyers2043

So if I read this correctly - I can bat a cattle auction building or a road side farmer's stand and add the IR demand property to it. This will have a positive impact on I-AG. And that it can be measured using your LUA so that I can keep track of things.

What would be cool is ... if a reward (so to speak) were developed which offered various buildings when I-AG demand dropped. Something like - "Dear Mayor Jim. I see that you are a great farmer because you have 57 farms in the city of Loudeac. But farm demand has dropped to a low level due to an infestation of horse flies. Do you wish to invest in a Cattle Auction at the cost of $35,000? There will also be a cost of $10 per month for aerial spraying. These actions should encourage more cattle farmers to build in your city"

I'm obviously speaking off the top of my head and something wittier will come to mind if given time.

I don't have a question per se - but my mind is pondering the affects that 'artificial' I-AG demand might cause to regional demand of other rural cities and my educated metropolis.

Jim Myers  (5th member of SC4 Devotion)

SimGoober

Jim, I like where you are going with this....  &apls
When life just blows ... Fukitol!

RippleJet

Quote from: jmyers2043 on August 28, 2009, 06:09:31 PM
What would be cool is ... if a reward (so to speak) were developed which offered various buildings when I-AG demand dropped. Something like - "Dear Mayor Jim. I see that you are a great farmer because you have 57 farms in the city of Loudeac. But farm demand has dropped to a low level due to an infestation of horse flies. Do you wish to invest in a Cattle Auction at the cost of $35,000? There will also be a cost of $10 per month for aerial spraying. These actions should encourage more cattle farmers to build in your city"

:D

Looking forward to all that... and it's all doable! :thumbsup:

meinhosen

Quote from: jmyers2043 on August 28, 2009, 06:09:31 PM
I don't have a question per se - but my mind is pondering the affects that 'artificial' I-AG demand might cause to regional demand of other rural cities and my educated metropolis.

I don't know how relevant this may be to the discussion, but a while ago I modded one of the in-game ordinances to increase I-Ag demand.  I haven't seen any negative regional effects since I began using the modded ordinance, although after filling sizable regions (more than 75% of a 10x10 large quad region) with farming the mod does stop working.  I figure if my cheat works, a few buildings that relieve demand caps should work better.

As this was nothing more than changing a few of the values in the properties of the ordinance, I'm not sure how applicable it is to RippleJet's initial point, but it could help.

For anyone curious, here's what I did:



The original value was pretty small compared to the change I made.
You're telling me I get to be home for more than 12 months?


RippleJet

Quote from: meinhosen on August 28, 2009, 07:41:43 PM
As this was nothing more than changing a few of the values in the properties of the ordinance, I'm not sure how applicable it is to RippleJet's initial point, but it could help.

I'm glad you brought this up! :)
This shows the difference between demand itself and demand CAP.

The "Demand Effect I-Ag" in your ordinance exemplar increases the demand, but it will not raise the CAP.
The CAP will still be at 30,000 unless something provides CAP relief.

Once you hit a CAP and demand goes down to 0, neither Buggi's Super Demand Ordinances nor RalphaelNinja's Radical Ordinances can increase demand. What these ordinances in that case do is multiplying a demand of 0 with 50 (in your case), 500 (in Buggi's case) or 5,000 (in RalphaelNinja's case). That will still always be 0...


meinhosen

#10
Quote from: RippleJet on August 28, 2009, 09:41:02 AM
Thus, to provide an arbitrary IR CAP relief would require a number of these Occupant Groups.
E.g. the building mentioned above that provides an IR CAP relief of 30,000, needs the following OG's:

B5C00CC2       400
B5C00CC3           800
B5C00CC5           3,200
B5C00CC8           25,600
   
---------
TOTAL           30,000

By using all 16 OG's above, we can denote any CAP relief between 100 and 6,553,500, with increments of 100.

Let's make sure I'm following this correctly, adding the above mentioned occupant groups (with the appropriate LUA script) will add CAP relief to the building they are added.  I only added demand with the modded ordinance, which did nothing to relieve the CAP.

Sooo, if I were to add the a combination of the occupant groups to a given LOT or reward, said LOT or reward would relieve the indicated amount for the I-Ag CAP. 
You're telling me I get to be home for more than 12 months?


RippleJet

Quote from: meinhosen on August 30, 2009, 08:13:56 AM
Let's make sure I'm following this correctly, adding the above mentioned occupant groups (with the appropriate LUA script) will add CAP relief to the building they are added.

No, those Occupant Groups only enable us to be able to report the current I-R CAP and CAP status.
The CAP relief itself is given with Demand Satisfied: 0x4900, ...
The number following 0x4900 is the CAP relief itself.

For all other CAPs there is an in-game variable available that can report the CAP relief for us.
However, that is not the case for the I-R CAP.

Thus, if we want the Census Repository to be able to report the current I-R CAP,
then we need to find another way of tracking the I-R CAP.
And that's where the Occupant Groups come into play.

meinhosen

Quote
No, those Occupant Groups only enable us to be able to report the current I-R CAP and CAP status.
The CAP relief itself is given with Demand Satisfied: 0x4900, ...
The number following 0x4900 is the CAP relief itself.

For all other CAPs there is an in-game variable available that can report the CAP relief for us.
However, that is not the case for the I-R CAP.

Thanks!  Guess trial, error, and swearing would have eventually gotten me there, but the explanation helped more.
You're telling me I get to be home for more than 12 months?