you might then want to change the iweight value for the specific event (the new volcano events are in ori_civ4eventtriggerinfos.xml)
I'll mainly need to know what you think is the best way to use the crime and flammability values (or any other property values that are added) in the events. I have not done any check on what does what in event processing.will need to look through them (its 300+ events, so it may need a bit of time)
The cumulative value is already calculated for city and player. So I'll expose those to Python and also add threshold tags for them to the event trigger.events use two functions really, the trigger/cando as governed by the triggerinfos.xml and the actual event (i.e. what is to be changed) as governed by the eventinfos xml - if things are to be altered it should probably go through an xml tag so that the game knows what is happening.
Just for triggering its easy to use a python cando function in the trigger.
So the answer is: either
For events that end up removing buildings semi-randomly one will need to go through python in any case I expect and I would be happy with having the whole thing exposed to python, but ideally for triggering the whole thing one would have either a python function or an xml tag that returns the cumulative value in the city - for an xml tag I'd really love a maxcounter and a mincounter tag so that one could trigger an event above or below as specific threshold.
Of course in python one could just go through all buildings as well, but if something like this was already present in the dll, it would make it much easier (and faster I expect).
So to sum the whole thing up:
whats needed:
python function for flammability (or any other counter) by building
further great would be:
python function for flammability (or any other counter) by city
xml tag for the event trigger returning true for either equal/above or equal/below the number entered
The cumulative value is already calculated for city and player. So I'll expose those to Python and also add threshold tags for them to the event trigger.
One question there: removing buildings via python (like burning them down): does that cause any problems? I expect no, but there is always a good chance my expectations are quite wrong...
I agree and that was also my intention.Try to stick to a pattern of only GETing the values from Python NOT chnaging them if at all possible (due to the loss of information on rebuild otherwise). Ideal pattern would be:
- Building XML provides chnages and/or modifiers to each property
- Accumulated values on player and city exposed to Python for read only
- Event XML provides for changes to values using similar syntax to the building XML
That matches the additions I'm making to the event XML for the commerce and yield modifiers etc (see other event thread), and allows for clean rebuilding of the data by the existing mechanism that replays events (but doesn't rerun event Pythion since it can't tell what it's going to do that might go beyond just putting modifications to values back).
added quicksand event, active in 100% of games, iweight 30 (quite rare), can recur.
requires unit on dunes, option 1: unit is killed, option 2 (requires cooperation tech): units is immobile for 1 turn.
AI will be unaware of the dangers of quicksand. This gives a little advantage to human players to avoid dunes. Maybe just use option 2![]()
The event about the dangerous number of barbarian warriors on the border never happens for me until I have archery, at which time three little clubmen materializing is not much to get worried about.
I didn't look at those events at all yet, but I recall that they were toned done by some modders, not sure though I want to have game stopping events kill your game early on by shear bad luck![]()
The AI is told adamantly to take option 2 though, and frankly its extremely unlikely to be unavailable since the first 20 turns no events can happen - and by then cooperation tech is likely researched![]()
language (5 turns) -> nomadic lifestyle (7 turns) -> gathering (11 turns) -> scavenging (11 turns) -> cooperation (9 turns) = 5+7+11+11+9 = 43 turns. I must be doing something wrong![]()
language (5 turns) -> nomadic lifestyle (7 turns) -> gathering (11 turns) -> scavenging (11 turns) -> cooperation (9 turns) = 5+7+11+11+9 = 43 turns. I must be doing something wrong![]()
You have selfish cavemen who go for generations without helping each other.![]()
It doesn't even increase worker speed!