• Our friends from AlphaCentauri2.info are in need of technical assistance. If you have experience with the LAMP stack and some hours to spare, please help them out and post here.

Quick Modding Questions Thread

Isn't the retreating unit automatically the loser of the combat? You could simply check if the losing unit is still alive, if I'm not mistaken.

mmhh....how are siege units handled there?

i was wondering, is it possible to make fish (or a certain type of fish) to appear only on lakes?

mmhh...not by XML.
Theoretically you could have an additional function run after the game start which "manually" places fish in some lakes.
 
You're right, the DLL already checks if one of the units is dead before triggering the event.
 
I have 2 questions:

1) How do the events occur more frequently?

2)I have 10 religions that can be found in the game, for example.
When i start from Ancient era and researched tehnology which allow some kind of religion, in game can be found all religions, but when i start from some later era in which all tehnology which allow religions are researched, then the game is only 7 automatically selected religions. Why? And how to change that?
 
1) all events? Needs SDK.

That turns out not to be the case...

You can increase the odds of getting an event on any given turn via XML. In CIV4EraInfos.xml each era has a value called iEventChancePerTurn. If you increase
this value for an era, you increase the odds of getting an event on any turn during that era. Double them all and you double the chance in every era.

Default settings are: 1, 2, 4, 4, 6, 8, 10 going from the ancient era to the future era. These are the chance out of 100, a value which is itself set in an XML file: it is the EVENT_PROBABILITY_ROLL_SIDES value in GlobalDefines.xml.
 
That turns out not to be the case...

You can increase the odds of getting an event on any given turn via XML. In CIV4EraInfos.xml each era has a value called iEventChancePerTurn. If you increase
this value for an era, you increase the odds of getting an event on any turn during that era. Double them all and you double the chance in every era.

Default settings are: 1, 2, 4, 4, 6, 8, 10 going from the ancient era to the future era. These are the chance out of 100, a value which is itself set in an XML file: it is the EVENT_PROBABILITY_ROLL_SIDES value in GlobalDefines.xml.

Look spoiler and code with bold.
Spoiler :
<EraInfo>
<Type>ERA_ANCIENT</Type>
<Description>TXT_KEY_ERA_ANCIENT</Description>
<Strategy>TXT_KEY_ERA_ANCIENT_STRATEGY</Strategy>
<bNoGoodies>0</bNoGoodies>
<bNoAnimals>0</bNoAnimals>
<bNoBarbUnits>0</bNoBarbUnits>
<bNoBarbCities>0</bNoBarbCities>
<iAdvancedStartPoints>600</iAdvancedStartPoints>
<iStartingUnitMultiplier>1</iStartingUnitMultiplier>
<iStartingDefenseUnits>0</iStartingDefenseUnits>
<iStartingWorkerUnits>0</iStartingWorkerUnits>
<iStartingExploreUnits>1</iStartingExploreUnits>
<iStartingGold>0</iStartingGold>
<iFreePopulation>0</iFreePopulation>
<iStartPercent>0</iStartPercent>
<iGrowthPercent>100</iGrowthPercent>
<iTrainPercent>100</iTrainPercent>
<iConstructPercent>100</iConstructPercent>
<iCreatePercent>100</iCreatePercent>
<iResearchPercent>100</iResearchPercent>
<iBuildPercent>100</iBuildPercent>
<iImprovementPercent>100</iImprovementPercent>
<iGreatPeoplePercent>100</iGreatPeoplePercent>
<iCulturePercent>100</iCulturePercent>
<iAnarchyPercent>50</iAnarchyPercent>
<iEventChancePerTurn>1</iEventChancePerTurn> <!-- I can put here number from 1 to 100? -->
<iSoundtrackSpace>0</iSoundtrackSpace>
<bFirstSoundtrackFirst>0</bFirstSoundtrackFirst>
<EraInfoSoundtracks>
<EraInfoSoundtrack>AS2D_ANCIENT_SOUNDTRACK_1</EraInfoSoundtrack>
<EraInfoSoundtrack>AS2D_ANCIENT_SOUNDTRACK_2</EraInfoSoundtrack>
<EraInfoSoundtrack>AS2D_ANCIENT_SOUNDTRACK_3</EraInfoSoundtrack>
<EraInfoSoundtrack>AS2D_ANCIENT_SOUNDTRACK_4</EraInfoSoundtrack>
</EraInfoSoundtracks>
<CitySoundscapes>
<CitySoundscape>
<CitySizeType>CITYSIZE_SMALL</CitySizeType>
<SoundscapeScript>ASSS_CITY_ANCIENT_SMALL_SELECT_AMB</SoundscapeScript>
</CitySoundscape>
<CitySoundscape>
<CitySizeType>CITYSIZE_MEDIUM</CitySizeType>
<SoundscapeScript>ASSS_CITY_ANCIENT_SMALL_SELECT_AMB</SoundscapeScript>
</CitySoundscape>
<CitySoundscape>
<CitySizeType>CITYSIZE_LARGE</CitySizeType>
<SoundscapeScript>ASSS_CITY_ANCIENT_LARGE_SELECT_AMB</SoundscapeScript>
</CitySoundscape>
</CitySoundscapes>
<AudioUnitVictoryScript>AS2D_VICTORY_EARLY</AudioUnitVictoryScript>
<AudioUnitDefeatScript>AS2D_LOSS_EARLY</AudioUnitDefeatScript>
</EraInfo>


But if i want to increse one event more than others, where can I increase it?
 
ok i really need to know. BUG makes mods not work at least all the mods that i or someone else wrote! Help please. how do i fix it????
 
hey guys, when it comes to resources, are the effects cumulative, as in Iron gives +1 hammer to each city it is connected to right? does having 2 iron give you +2 hammers?

I want to know, because I want to make manufacturable resources that allow you to redistribute food, for instance, build a Cannery, and get -3 food, but you also get tin food resource which gives +1 Food.
 
You might want to combine that with a corporation to get certain yields per controlled resource (it's the easiest way to achieve what you're going for).
 
I just tested that out, and the +1:hammers: applies only to the tile it's in.

are you sure? because you get the tile bonus which is like +3 or some such, then when you look at it in the diplomacy screen it says it gives a plus one bonus, like cow gives +1 health?

What I want to make is like a way to redstribute food, so you have 1 city that makes a lot of food, you then make a building that reduces the food there and spreads it out everywhere via a resource bonus.

As to the corporations, I want to make it universal, rather than having to control the corp.
 
Well, the tile bonus of +3 is for the mined tile, and the +1 is for the unworked version.
Will put up some screenshots to proof this. As for your idea, maybe a dummy building?

Spoiler :
L6YO0.jpg


As you can see, the mine has 2:food:, 3:hammers:, whilst the unmined one has 2:food:, 1:hammers:. There is no production bonus anywhere, 1:hammers: from the city tile itself, and 1:hammers: from the Citizen.
 
ok back to the drawing board on how to make it work then...

hmmm i wonder if i could have a building that reacts to the resource, like a corporation does...so that you make one building to create the resource and then another that creates +food out of that resource like a corp... hmm more investigations... thanks for the info guys
 
How much do the number of civs effect the gameplay speed? Meaning will there be a huge difference if there is 50 civs versus 20 civs? Assuming that between ass the civs, the number of units, cities etc. Is all the same. Because it seems to have a huge effect, but when I think about it it shouldn't since the only real difference would be diplomacy
 
Do you mean the difference between e.g. 10 civs with 10 cities each, or 20 civs with 5 cities each?
That would surprisingly make really a difference. I noticed that once in a FfH2 game. In the late game, I normally had turn times of 5 minutes. And I played in most cases peacefully, so that most civs were still there.
In a more war like game, at the roughly same point half of the civs were eliminated. And I swear, the turn times were also nearly only the half.

Don't have really objective reliable data though :mischief:.
 
Back
Top Bottom