Removing resources and improvements

jenks

Prince
Joined
Jan 9, 2006
Messages
494
Location
Yorkshire, UK
Hi :) Im trying to cut out many many vanilla resources and improvements with little success. Things like the Whaling Boats, cottage/hamlet/village/town, Fish, Deer, Gold, Iron, Uranium etc. are proving stubborn to change or remove! .......

Ive tried removing their code from:
CIV4BonusInfos.xml and CIV4ImprovementInfos.xml

and removing their gfx from:
CIV4ArtDefines_Bonus.xml and CIV4ArtDefines_Improvement.xml

I then get the mod to load, but either get loads of empty pedia entries or it wont generate a map properly because of these missing improvements!:confused:

Can anyone tell me exactly what im missing? which files need to be edited to remove them?

Cheers:)
 
I've been doing just that sort of thing for the past couple of days. The BonusInfos.xml has a comment at the top warning one sternly not to fool with mother nature.

The best thing is just to leave it there and not use it for anything. Defang it so it can't hurt, but disconnect it from all function.

For instance, most improvements only have to exist in ImprovementInfos.xml. You can take them out of BuildInfos and UnitInfos, so nothing can build them.

To get rid of biological Bonuses, like Pigs and Corn, I set them all to 0 probability and gave them 90 degrees as both maximum and minimum latitude.
<Type>BONUS_FUR</Type>
<Description>TXT_KEY_BONUS_FUR</Description>
<Civilopedia>TXT_KEY_BONUS_FUR_PEDIA</Civilopedia>
<BonusClassType>BONUSCLASS_GENERAL</BonusClassType>
<ArtDefineTag>ART_DEF_BONUS_FUR</ArtDefineTag>
<TechReveal>NONE</TechReveal>
<TechCityTrade>NONE</TechCityTrade>
<TechObsolete>NONE</TechObsolete>
<YieldChanges>
<iYieldChange>0</iYieldChange>
<iYieldChange>0</iYieldChange>
<iYieldChange>1</iYieldChange>
</YieldChanges>
<iAITradeModifier>0</iAITradeModifier>
<iHealth>0</iHealth>
<iHappiness>1</iHappiness>
<iPlacementOrder>5</iPlacementOrder>
<iConstAppearance>50</iConstAppearance>
<iMinAreaSize>3</iMinAreaSize>
<iMinLatitude>90</iMinLatitude>
<iMaxLatitude>90</iMaxLatitude>
<Rands>
<iRandApp1>0</iRandApp1>
<iRandApp2>0</iRandApp2>
<iRandApp3>0</iRandApp3>
<iRandApp4>0</iRandApp4>...


To keep from upsetting anything, I renamed the minerals in Description but kept the names the computer uses for them.

<BonusInfo>
<Type>BONUS_ALUMINUM</Type>
<Description>BATTERIES</Description>...


Depending on what you are doing you could probably do that and even give them new art and actually use them.

These solutions rancor, making things messy, and I will ultimately fix them properly in the L thing, but they'll do for now.

As for the civilopedia, I haven't done one in civ4 yet, but I would think you can just have the civilopedia entries in the phantom items point to civilopedia entries for stuff you are keeping. It's the same principle as I am using here:

<Type>BONUS_URANIUM</Type>
<Description>URANIUM</Description>
<Civilopedia>TXT_KEY_BONUS_URANIUM_PEDIA</Civilopedia>

and

<Type>BONUS_URANIUMORE</Type>
<Description>URANIUM ORE</Description>
<Civilopedia>TXT_KEY_BONUS_URANIUM_PEDIA</Civilopedia>
 
Doesn't solve the problem really - if you do that then they still clog up the 'pedia, and you end up having to do an ugly hack to removed them.

From what the comment says I would suggest taking a look at the LSystem (Buildings/CIV4PlotLSystem.xml I think).
 
the way im currently stopping them from spawning is to have them set to future tech, but i might as well adjust those stats as well.

how does the min and max latitude function work ? could you set it higher or is it reallly not likely well ever get maps that large (no idea off the top of my head how big maps are!)

Is the only real way to fix this changing the text key? We seem to have had no difficulty adding resources to the code, it seems SO LAME (!) that we cant remove them :(
 
Removing from this file appears to work easily for improvements and all the vanilla ones are now removed ...

Resources it works (in part)

I have found resources which really dont want to be removed :p when you comment them out of the code, they change ALL the game icons (?), like combat strength becomes Wine , movement poiints becomes Whales.

Mental!
 
Setting them to future tech just keeps them invisible until then. If you look in WB they are there. I believe map generation keeps bonuses spaced, so these invisible bonuses block out the ones you keep.

Latitude is how far you are north or south of the equator. 0 is the equator, 90 is the pole. It is so arctic resources can appear only in the arctic and such. By setting minimum lattitude to 90 you make it so the bonus can only exist at the north pole (or north of it) or south pole (or south of it).
I set the probability of generation to 0 as well because I guess theres a chance resources could appear at the very top and bottom of the map.

Just now thought of this: maybe it would be possible to set maximum lattitude to LESS than 90 so there would be zero chance of this. Maybe the computer does the math and will have a problem with such a thing.
 
Back
Top Bottom