Adjusting %chance of events with Gamespeed

phungus420

Deity
Joined
Mar 1, 2003
Messages
6,296
Something I brought up in the main RevDCM thread, that's now on the todo list (thanks glider) is adjusting the revolution event probabilities (a revolt occurs, a barbarian city settles, etc) with gamespeed. Under the current system a lack of such scaling is very apparent. To see it, set up a game with Barbarian Civ and Barbarian World, have one be played on Marathon, and the other on Quick speeds, and check the number of settled barbarian cities in both, you will see in Marathon that all barbarian cities will have settled while the game is just entering the classical era, whereas on quick not every barb civ will have settled (and some barbarian cities will actually be taken out) by the medieval era. So I'd like to address this and add in that function.

However I can't find where a %chance factors in, in fact I can't find where it's decided a rev event happens. I can find where the units are selected, and the artstyle and leader and such, but I can't find where the die is rolled and the city is turned into a new civ. Where is this? I must be blind, but I can't find anything that looks like a die roll to see if an event will occur in BarbarianCiv.py, RevUtils.py, or RevEvents.py. What am I missing here?
 
For BarbarianCiv, it's line 915 that does the die roll for barb city settling. The best way to go is to scale up what the die roll is out of (100) as there's less of a quantization error doing that ... example: 3 out of 100 divided by two can either be 1 out of 100 or 3 out of 200.

My solution has been checked in to svn.
 
Top Bottom