Random Events

@Ori, I have a few events I am working on for the Extra Diplomacy mod and rightfuture and I will be looking at the old Stone Age events to see which can be made to fit with Indigenous Peoples and prehistoric c2c. Currently I propose we put the XML in our own working folder and coordinate changing the python with you. When we have things working well enough the events XML should be merged back into core or into your files.
 
:bump:

I was just looking through the InterfaceRandomEvents.py and found this:

Spoiler :
Code:
if map.getWorldSize() == gc.getInfoTypeForString("WORLDSIZE_DUEL"):
    iNumUnits1 = 2
    iNumUnits2 = 1
  elif map.getWorldSize() == gc.getInfoTypeForString("WORLDSIZE_TINY"):
    iNumUnits1 = 3
    iNumUnits2 = 1
  elif map.getWorldSize() == gc.getInfoTypeForString("WORLDSIZE_SMALL"):
    iNumUnits1 = 4
    iNumUnits2 = 1
  elif map.getWorldSize() == gc.getInfoTypeForString("WORLDSIZE_STANDARD"):
    iNumUnits1 = 5
    iNumUnits2 = 1
  elif map.getWorldSize() == gc.getInfoTypeForString("WORLDSIZE_LARGE"):

I wonder if this is the reason why some events are not happening, no world size for any map larger than LARGE:eek::confused:

Do you want me to give it a go and fix these or do you just want to try and do them?
 
Actually I checked all the code that references world size and they all have a fall back else value, i.e. if its larger than large (or huge in many instances) it just sets a default value that is one larger than the largest map size referenced. Now this might bite those that include a world size not listed in the usual tiny -> huge chain but is smaller than the largest in there (e.g. say someone invents a map size between standard and large and calls it mediumlarge or someone invents a reallytiny mapsize - then this is treated as if it was larger than huge in most instances - but I don't think this needs fixing.

TLDR: The code seems fine as is :)
 
Actually I checked all the code that references world size and they all have a fall back else value, i.e. if its larger than large (or huge in many instances) it just sets a default value that is one larger than the largest map size referenced. Now this might bite those that include a world size not listed in the usual tiny -> huge chain but is smaller than the largest in there (e.g. say someone invents a map size between standard and large and calls it mediumlarge or someone invents a reallytiny mapsize - then this is treated as if it was larger than huge in most instances - but I don't think this needs fixing.

TLDR: The code seems fine as is :)

OK great then, sounds wonderful to me, as i cant read that kind of coding anyways
 
In another thread Dancing Hoskuld mentoned the following
Which is one reason rightfuture and I want to look at the Stone Age events to see which ones can be used or converted to c2C
Although I haven't checked this to see what the settings are, couldn't the Great Beast event be moved to the prehistoric/ancient periods only.

Just been reading about the fire events. Are the chances of a fire event reduced if a city has been built adjacent to any water source (with the exception of maybe the oasis)? If the chances aren't reduced couldn't the Co-operation Tech be used to create a primitive fire fighting team, bucket chain style?

This then opens a new question, at what point is any form of container available from the tech tree to enable a bucket chain to be formed. I don't recall seeing a container tech available until pottery. Could the Sewing Tech make available a new resource of leather containers (Buckets or Water Skins) which could help with desert survival (reducing damage by half) as well as fire fighting? Alternatively Wood Carving could make available Wooden Containers (Buckets or Bowls)

Some suggestions for other events in the Prehistoric Era (and other eras too) follows:

Stampede - in a tile that has an untamed (no camp) animal resource like horse/bison/Deer/cattle/camels there be a stampede event that either damages any units in the same tile or spawns an animal unit of the same type as is on the tile (not so much on tiles with pigs/sheep/rabbits/kangeroos)

Predators - A worked animal resource tile that has no units on it experiences a predatory creature attack. The resource tile becomes unavailable until a military or Hunter/Ranger type unit is sent to the tile. If the Predator isn't dealt with by the start of the next turn the animal resource is destroyed and a Lion/Tiger/Cheetah/Sabretooth Tiger/Wolf/Shark/Killer Whale spawns on the tile.

Disease (land animals) - an animal resource tile (worked or not) within the players territory is affected by a disease if a healer (may need a veterinary promotion) is not dispatched to the affected tile within 2 or 3 turns the animal resource is destroyed.

I may have some more later on after I've sat and thought a bit more but have a think about these.
 
What happened to being able to "save" a building that was burning by paying gold?
Twice now I've lost buildings I can't rebuild, Smoke Signals, due to having built Imu which replaces Fire Pit and Smoke Signals require Fire Pit to be built so to rebuild it I'd have to scrap my Imu, build Fire Pit and then Smoke Signals, before rebuilding the Imu again.
Shucks, really.

Cheers
 
Just been reading about the fire events. Are the chances of a fire event reduced if a city has been built adjacent to any water source (with the exception of maybe the oasis)? If the chances aren't reduced couldn't the Co-operation Tech be used to create a primitive fire fighting team, bucket chain style?

We have a Fire Brigade building already. It comes in the early Medieval Era.
 
I understand PsiCorps sentiment: Fires were being fought in an organized manner long before the Medieval Era and Fire Brigades.

Besides which I myself would love a way to "save" a building in the fire events, like an option like "if having Fire Fighting Team pay X gold to keep the building" added to the events.

Cheers
 
Right now the fire events are set up so that you will lose one building when they fire (I think the one that fires at the lowest flammability level just takes some gold and doesn't burn a building. Essentially these five events are escallating in severity - one pay gold to not lose anything, two pay gold to not lose another building, three pay gold to not lose many more buildings, four pay gold to not lose many many more buildings.
 
OK i know way back when there were ALOT of volcanic activity, infact that is the only way (Moses and his followers) escaped in that empty river) was because of the HUMUNGOUS Volcano that erupted by Gibraltar straights, that covered over half the world in ash (fact).

But see pics below:
and timelines and how near they are?

plus i get alot of the Obsidian stuff and i mean alot of it.
 
OK i know way back when there were ALOT of volcanic activity, infact that is the only way (Moses and his followers) escaped in that empty river) was because of the HUMUNGOUS Volcano that erupted by Gibraltar straights, that covered over half the world in ash (fact).

But see pics below:
and timelines and how near they are?

plus i get alot of the Obsidian stuff and i mean alot of it.

I don't think the problem is the frequency so much as that you're seeing volcano events in unrevealed territory. The problem is that player events (I think these are player ones?) have a fixed probability, so when it only put them in city vicinity it meant far too much geographic concentration of the volcanos. Now that it puts them anywhere it leads to this report of events in unrevealed territory.

@Ori - how does it pick a plot?

@AIAndy - does the event trigger probability support dynamic expressions? If it did could we have an event that always chooses a revealed plot, but whose trigger probability is dynamically calculated to be inversely proportional to the number of revaled (to the target player) plots?
 
in the xml I put it to pick a plot - if I recall the SDK code for that correctly it should just randomly get one that fits the other xml tags - and those are essentially for new volcanos that it should be a plot with no bonus. There then is a python call that nixes the event if the plot is a city plot.
 
ori, I haven't looked at the bug thread for a response yet, but I think the TXT errors might be related to the new caching thing. I got them for all events (including a SETBACK_1 reported for another player) in a second running of the game after SVN update (because I had forgotten to set my viewports), but after restarting my computer they were reporting fine.
 
ori, I haven't looked at the bug thread for a response yet, but I think the TXT errors might be related to the new caching thing. I got them for all events (including a SETBACK_1 reported for another player) in a second running of the game after SVN update (because I had forgotten to set my viewports), but after restarting my computer they were reporting fine.

Some events work though, the Herbal Cures one worked fine for me on a recent SVN. The caching though could very well be the problem now that I think about it.
 
Back
Top Bottom