• 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.

C2C - Flammability

I am just asking for the outer borders of values, because I intend to burn down buildings semi randomly - for that knowing the max possible negative and positive values would be good :)

Hmm well in the later eras i would say ...

Max negative would be between -150 to -200

Max positive would be between +500 to +1000

There is a lot of flammable buildings with some big values like +25.

If you want to go through all the buildings and count be my guest but there are really so many, I cannot give a good ballpark estimate.

It took me forever to go through all the buildings and then give it a value if I thought it was flammable.

Here are some examples of +/- ...

Fire Station = -25
Fire Dock = -20
Fire Brigade = -15
Water Tower = -10
Town Well = -5

Factory = +5
Fire Pit = +10
Charcoal Burner = +15
Forge = +20
Chemical Plant = +25
Oil Power Plant = +30
Toxic Waste Dump = +50
 
Hmm well in the later eras i would say ...

Max negative would be between -150 to -200

Max positive would be between +500 to +1000

There is a lot of flammable buildings with some big values like +25.

If you want to go through all the buildings and count be my guest but there are really so many, I cannot give a good ballpark estimate.

isn't that what the spreadsheet tool does? List the info from all the files in one place.
 
isn't that what the spreadsheet tool does? List the info from all the files in one place.

Well If someone wants to do that they will have to look through the following mods ...

- Firestorm
- Water
- Garbage
- Electricity
- Towers
- Military
- Craft
- Science
- Tweaks
- Embassy (Specifically UB)

Since those are the mods I added flammability stats to.
 
plan is now to have fires possible that will burn down the more flammable buildings first but have a small chance to also burn down the less flammable ones. I am thinking about assigning each a score of
iflammability+rand where rand is between 0 and 99 and burning down the ones with the highest score.
By the way AIAndy: would it be possible to get a tag that alters these scores for a building class for events?
 
Well probbly something like this ...

Fire Event

A fire has broken out in your city!

1. Do nothing. [Loose a building +1 :mad:]
2. Call the Fire Brigades! (Require Fire Brigades building) [No building is destroyed you loose some money]
3. Call the Fire Department! (Require Fire Department building) [No building is destroyed you loose some money]

Something like that I would think.
 
plan is now to have fires possible that will burn down the more flammable buildings first but have a small chance to also burn down the less flammable ones. I am thinking about assigning each a score of
iflammability+rand where rand is between 0 and 99 and burning down the ones with the highest score.
By the way AIAndy: would it be possible to get a tag that alters these scores for a building class for events?
I'll add some tags to alter the score as event results later but first the tags for properties influencing event triggering.
 
Properties are now exposed to Python (read only).

Use getProperties() on a player, city or building info object to get them.
Then you can use these methods:
getNumProperties() - return the number of properties e.g. to loop through them
getProperty(index) - returns the PropertyType ID at index
getValue(index) - returns the value belonging to the property at index
getValueByProperty(eProp) - returns the value of the property with the ID eProp and 0 if not defined here

So if you want to retrieve the crime rating of the city object pCity then you could use:
Code:
iCrime = pCity.getProperties().getValueByProperty(CyGlobalContext().getInfoTypeForString("PROPERTY_CRIME"))
 
So what I am planning now is three fire events (and ones there is a tag to alter the properties two more) as below:

1)A fire starts in the city
-> have locals deal with it -> a building is destroyed, chance of (2) or (3)
-> give any assistance needed -> gold cost, maybe cheaper with fire brigades/dept, maybe requires the fire buildings -> low or no chance of (2) or (3)
2)Major fire is raging in the city -> multiple additional buildings are destroyed
3)Fire is out of control ->even more buildings are destroyed, chance of loss of life
4) requires 2) to have happened & fire brigades: firebrigades propose additional safeguards that cost money but reduce fire risk -> -gold/turn -flammability in city
5) requires 3) to have happened & fire department: fire dept. proposes overhaul of regulations -> -moregold/turn -moreflammability civ wide

I am looking at the chances for 2) and 3) being low but increasing with flammability score to some extent.
For number of buildings destroyed in 2) and 3) I'll have to go through python so I can just as well make this a bit more involved:
for 2) fire rages until flammability is 4/5 of original score, for 3) until its half the original score. It will destroy buildings semirandomly were I'll try to disallow burning down world and national wonders but all others are fair game. I'll use a score of
flammability + random
where random is in the range of 0 to originalflammability/4
to decide which buildings to kill:
this means that the higher the flammability score in a city the more buildings will be burned down and the higher the likelihood that low flammability buildings are affected.
Comments?
 
1)A fire starts in the city
-> have locals deal with it -> a building is destroyed, chance of (2) or (3)
-> give any assistance needed -> gold cost, maybe cheaper with fire brigades/dept, maybe requires the fire buildings -> low or no chance of (2) or (3)
2)Major fire is raging in the city -> multiple additional buildings are destroyed
3)Fire is out of control ->even more buildings are destroyed, chance of loss of life
4) requires 2) to have happened & fire brigades: firebrigades propose additional safeguards that cost money but reduce fire risk -> -gold/turn -flammability in city

These sound good.

5) requires 3) to have happened & fire department: fire dept. proposes overhaul of regulations -> -moregold/turn -moreflammability civ wide

I have plans for Smoke Detector Ordinance and Fire Code Ordinance buildings to help reduce the flammability. I just have not gotten around to making these buildings yet. I am not sure if that's the kind of idea you had with #5.
 
I have in mind that if some devastating fire happens that there is a chance for another event later on which allows you to reduce the flammability in the city or the nation by having learned from it (and investing money).

Sounds cool.

Also there is a Fire Dock, Fire Hangar and Fire Hydrants. I am not sure if you want to incorporate these into your Fire Events.

Note the main fire related techs are, Fire Brigades, Firefighting and Fire Suppression. Not sure if those matter.
 
Property values can be defined as prereqs for buildings now.
So you could use this for a major crime building that should only be buildable in high crime cities:

Code:
<PrereqMinProperties>
	<Property>
		<PropertyType>PROPERTY_CRIME</PropertyType>
		<iPropertyValue>100</iPropertyValue>
	</Property>
</PrereqMinProperties>

PrereqMaxProperties does the same but defines a maximum.
PrereqPlayerMinProperties and PrereqPlayerMaxProperties is used the same way but uses the national property value (the accumulated value over all cities).
 
ok I have now created the python functions for three types of fires:
minor fire -> destroys one building and his heavily geared towards the most flammable one (though some radomness exists)
major fire -> destroys up to (citywide Flammable score / 10) buildings and stops doing so once citywide Flammable score is 3/4 of when it started. Is still mostly killing the most flammable ones but less than the minor fire
These two are working fine and I don't think there is going to be much adjustment needed, will see.
catastrophic fire:
kills up to 50% of the city population (probably needs toning way down)
destroys up to (citywide Flammable score / 5) buildings and stops when citywide flammability is half of when it started, favors highly flammable buildings but not terribly much - this means that it can burn through a darn lot of buildings before it stops.

Now I can either tone them down or just have the last one very unlikely. I'll think about it when I do the actual events next, and will offer something for feedback when done...
 
ok I have now created the python functions for three types of fires:
minor fire -> destroys one building and his heavily geared towards the most flammable one (though some radomness exists)
major fire -> destroys up to (citywide Flammable score / 10) buildings and stops doing so once citywide Flammable score is 3/4 of when it started. Is still mostly killing the most flammable ones but less than the minor fire
These two are working fine and I don't think there is going to be much adjustment needed, will see.
catastrophic fire:
kills up to 50% of the city population (probably needs toning way down)
destroys up to (citywide Flammable score / 5) buildings and stops when citywide flammability is half of when it started, favors highly flammable buildings but not terribly much - this means that it can burn through a darn lot of buildings before it stops.

Now I can either tone them down or just have the last one very unlikely. I'll think about it when I do the actual events next, and will offer something for feedback when done...

Does a negative flamability total inhibit the events entirely? (it probably should)
 
ok I have now created the python functions for three types of fires:
minor fire -> destroys one building and his heavily geared towards the most flammable one (though some radomness exists)
major fire -> destroys up to (citywide Flammable score / 10) buildings and stops doing so once citywide Flammable score is 3/4 of when it started. Is still mostly killing the most flammable ones but less than the minor fire
These two are working fine and I don't think there is going to be much adjustment needed, will see.
catastrophic fire:
kills up to 50% of the city population (probably needs toning way down)
destroys up to (citywide Flammable score / 5) buildings and stops when citywide flammability is half of when it started, favors highly flammable buildings but not terribly much - this means that it can burn through a darn lot of buildings before it stops.

Now I can either tone them down or just have the last one very unlikely. I'll think about it when I do the actual events next, and will offer something for feedback when done...

Those sound cool. Could you tie the earthquake event into the fire events? That way earthquakes can start fires (which they do in real life).

In fact you may want to make a set of earthquakes such as

1.0 (Micro) = Earthquake but no damage
2.0 (Micro) = Earthquake but no damage
3.0 (Minor) = Earthquake and rare chance of damage
4.0 (Light) = Earthquake and rare chance of damage
5.0 (Moderate) = Earthquake and moderate chance of damage.
6.0 (Strong) = Earthquake and large chance of damage and minor fires.
7.0 (Major) = Earthquake and serious damage and major fires.
8.0 (Great) = Earthquake and massive damage and catastrophic fires.
9.0 (Great) = Earthquake and catastrophic damage and catastrophic fires. (Japan's Earthquake was this)
10.0+ (Massive) = So huge its never been recoded. Is suspect the city is raised into ruins.

http://en.wikipedia.org/wiki/Richter_magnitude_scale
 
Back
Top Bottom