Other yield from chopping forests

Fullerene

Warlord
Joined
Aug 26, 2009
Messages
228
So, I have experimented a bit with this mod component:http://forums.civfanatics.com/showthread.php?t=411157

Basically I added fourth base yield that is called raw materials. Raw materials are harvested from the land and stored in the cities. Production (hammers) is refined from the raw materials by work force (citizens, engineers, animals etc).

So my question is how do you define which yield is accumulated into the city when workers chops the forest down? In Civ4BuildInfos.XML I have set BUILD_REMOVE_FOREST .... <iProduction>0</iProduction> tag, but chopping still gives hammers to the city. And I would really like to change the yield type to raw materials not just set production to 0.
And yes I'm able to read the SDK/C++ but just thought it might save some time if someone has done something like this before.

Spoiler :
I also understand that this kind of new production system changes everything in game: balance, AI, game speed, micromanagement overheat... but I just like to do some experiments:)
 
I haven't done this but the place to start in the SDK is CvPlot::changeBuildProgress. This is the function that does stuff when a build removes a feature such as adding the production value to a city. You would need to have it call a new/updated city function that knows it is being passed a raw materials value rather than hammers.
 
Top Bottom