how to change rates of Inflation and Random Events?

draco963

Prince
Joined
Jan 26, 2007
Messages
451
Location
Ottawa
I'm wanting to make some modifications to the Inflation rate, as well as increase the chance of Random Events occurring (they just seem to happen to rarely, especially the quests), but I can't seem to track down where those rates are coded. Any ideas?

Oh, and where would I define how many lines the event logger at the top-center of your screen has? I'd like to increase it from 6 to 9
 
I didn't test these, but XML\GameInfo\CIV4GameSpeedInfo.xml has iInflationPercent and iInflationOffset. XML\Civ4GlobalDefines.xml has EVENT_PROBABILITY_ROLL_SIDES and FIRST_EVENT_DELAY_TURNS. They might some of the thing that you want done.
 
Thanks General. I hadn't seen the CIV4GameSpeedInfo.xml entry. I'm thinking ROLL_SIDES is basically like a dice roll, so If i reduce it to 80 from 100, then I should increase the chances of random events occurring by 20%. I hope...

FIRST_EVENT_DELAY_TURNS reads to me like exactly that, a delay imposed to prevent random events from happening too soon into the game, where a negative one might be so off-putting as to cause a Civ to simply fail.
 
You have them both right draco.

ROLL_SIDES = 1 in X chance of occuring
FIRST_EVENT_DELAY_TURNS = Don't roll before Turn X
 
In regular BtS it is not 1 in X, except for during the ancient era.

In CIV4EraInfos.xml, each era has an entry called iEventChancePerTurn.

This is the number of opportunities to get a random event on the roll of the N sided die, where the number of sides is determined by the EVENT_PROBABILITY_ROLL_SIDES value.

The default values for iEventChancePerTurn are:
Ancient = 1
Classical = 2
Medieval = 4
Renaissance = 4
Industrial = 6
Modern = 8
Future = 10

Since the default number of sides is 100, these are percentage chances for checking for an event each turn, after the delay is over.
 
zephyr, God-Emperor (should I just call you Leto II? ;)) thank-you!! The Era entries are what I'm looking for then. And that also reassures me that I'm not losing my powers of observation, I did see more events happening in the modern/future eras!

One more thing then: could either of you, or General Tso, explain what the purpose of the iPercentGamesActive & iWeight values in CIV4EventSchema.xml are for then?
 
I'm none of the above, but that doesn't matte I hope. ;)
iPercentGamesActive gives the chance that this event can happen in the game. For example, iPercentGamesActive = 90 gives a 90% chance for the event to be part of the game, 10% of the games won't have this event at all.

iWeight gives the chance that this certain event happens if an event happens. If iEventChancePerTurn is checked positively, all iWeights of the possible events are added together and a random number up to this number is created. The event that matches this random number happens. An example should make this clear:
iEventChancePerTurn is checked true, 3 events have been found to be possible. Event 1 has iWeight = 100, event 2 has iWeight = 300, event 3 has iWeight = 100. A random number 'Ran' from 0 to 499 will be generated. If Ran < 100, event 1 happens, if Ran is between 99 and 399, event 2 happens, if Ran > 399, event 3 happens.
 
iPercentGamesActive is what it says it is. Not every event can happen in every game. At the start of a game, it goes through and does the percent chance for each to determine which events can happen in that particular game .

Events that can happen have varying chances of happening. This is controlled by the iWeight value. It works something like: iWeight values of every active event that can happen for the player are added up and a random number in that range is generated to pick which event to try to inflict on the player. There is no way to know what the odds of a specific event happening are unless you know the total weight of all of the events that are still active for the player and that specific event's weight. There are other flags that can modify the weight, although how much it is modified I don't know (the bProbabilityUnitMultiply flag, set it to 1 and the weight goes up as the number of units the layer has goes up, and similarly for bProbabilityBuildingMultiply and buildings). However, in general an event with an iWeight of 200 will have twice the chance of one set to 100. I think the values used in the regular BtS event triggers range from something like 20 up to something like 5000, with most being 100 or 200.

The value -1 for iWeight means that this event trigger should happen as soon as its condition's are met. These are often called "non-random events".

All this and so much more is covered in the various event related tutorials and guides.
Here's one: Solver's Guide to event modding in BtS.
 
Top Bottom