Volcanoes

I am with Thunderbrd. For me it is certainly not annoying. I would even say, it would be very interesting. :yup: Without such things which enforce some attention, this game really starts to be boring.

However, there can be some problem with frequency of this event. Weren't there already two complains about it in the Volcano out of nowhere topic?


:dubious: Are you sure about that? It is absurd having all kind of events with the same frequency!


:pat:

The BTS event model assigns a weight to each event (in the XML). The part that is a bit broken is that it also has a CONSTANT event probability per turn (which can vary by era, but is constant within an era), which applies separately to each player. If this probability decrees an event happens for a given player, then it chooses one from those available (i.e. - those that are active and whose requirements are met by that player) with the choice probability normalized by the weights of the eligible events.

What this means is that if there are very few eligible events then the chances of the remaining ones occurring becomes high.

Early on there are very few events for which requirements are met, and later on, since many events are only allowed to happen once per game per player, those that are not so restricted become more and more frequent unless new events become eligible.

This is why:

1) You get lots of volcanoes (no eligibility requirement to meet, and not restricted to once per game)

2) You get lots of RE-eruptions of previously dormant volcanoes (3 times higher weight that the creation of a new one)

3) You get a ton of building-burnt-down events early on (because there are very few events to choose from then)

4) If you research herbalism reasonably early you are HIGHLY likely to get the (very beneficial) rare herb event (and when you do get it, it's probably replacing what would otherwise have been a building burning down!)

IMO the system should be changed to prevent some of the pathological behavior we currently see, due to lack of events (relative to C2C turn length of eras). I would suggest a new <iMaxProbability> tag on event triggers, which is the maximum probability that event can EVER have in the eligible event pool, regardless of what else is or is not available to choose from. That is, if the normalized probability obtained from the weight divided by the sum of the weights of all eligible events is above the iMaxProbability then iMaxProbability is used instead - thus there becomes a chance that even though the global player-should-have-event roll decided there should be an event, if there aren't many available it can still decide not to after all.

Without system changes the possible solutions are:

1) Define more events so that there are always plenty to choose from! Since we have no modders at all who deal with events currently (apart from DH I guess, but more to tinker with existing than adding a bunch), this is unlikely to happen in the near term.

2) Lower the event chances globally in the eras that have few (especially prehistoric). However, this is rather a blunt instrument
 
Sadly I barely have time to play c2c much less help out, beyond offering opinions and historical knowledge, as my background is in assembly coding not c++ or XML.
So what's the problem? At my university all programming languages guys says, c++ (maybe excluding templates) is just a high level assembly with many macros. ;)

I was speaking in geralities, even Mt Etna (and other 'active' volcanos) don't erupt constantly. They are 'quiet' for far longer periods than they are erupting.
Mt. Stromboli has been in almost continuous eruption for the past 2,000 years. ;)
But indeed, if eruptions are constant they are of small power and rather not destructive. Stromboli is even inhabited by people.

@Koshling, is it done for not calculating events every turn? There would have to be really many of them to such optimization be anyhow significant. But even if I am wrong, there are smarter ways to do this.
 
The BTS event model assigns a weight to each event (in the XML). The part that is a bit broken is that it also has a CONSTANT event probability per turn (which can vary by era, but is constant within an era), which applies separately to each player. If this probability decrees an event happens for a given player, then it chooses one from those available (i.e. - those that are active and whose requirements are met by that player) with the choice probability normalized by the weights of the eligible events.

What this means is that if there are very few eligible events then the chances of the remaining ones occurring becomes high.

Early on there are very few events for which requirements are met, and later on, since many events are only allowed to happen once per game per player, those that are not so restricted become more and more frequent unless new events become eligible.

This is why:

1) You get lots of volcanoes (no eligibility requirement to meet, and not restricted to once per game)

2) You get lots of RE-eruptions of previously dormant volcanoes (3 times higher weight that the creation of a new one)

3) You get a ton of building-burnt-down events early on (because there are very few events to choose from then)

4) If you research herbalism reasonably early you are HIGHLY likely to get the (very beneficial) rare herb event (and when you do get it, it's probably replacing what would otherwise have been a building burning down!)

IMO the system should be changed to prevent some of the pathological behavior we currently see, due to lack of events (relative to C2C turn length of eras). I would suggest a new <iMaxProbability> tag on event triggers, which is the maximum probability that event can EVER have in the eligible event pool, regardless of what else is or is not available to choose from. That is, if the normalized probability obtained from the weight divided by the sum of the weights of all eligible events is above the iMaxProbability then iMaxProbability is used instead - thus there becomes a chance that even though the global player-should-have-event roll decided there should be an event, if there aren't many available it can still decide not to after all.

Without system changes the possible solutions are:

1) Define more events so that there are always plenty to choose from! Since we have no modders at all who deal with events currently (apart from DH I guess, but more to tinker with existing than adding a bunch), this is unlikely to happen in the near term.

2) Lower the event chances globally in the eras that have few (especially prehistoric). However, this is rather a blunt instrument

It's an eventual plan to address this by making each event independently checked for occurrence each round. That would be a better way to go about it wouldn't it? Seems its this once/round check for an event then a check for which one is the problem. Haven't looked directly at the coding on that yet though.
 
It's an eventual plan to address this by making each event independently checked for occurrence each round. That would be a better way to go about it wouldn't it? Seems its this once/round check for an event then a check for which one is the problem. Haven't looked directly at the coding on that yet though.

No. If you did that then as we added more events you'd get into a position where events tended to go off every turn. You want adding more events to add VARIETY not necessarily QUANTITY.
 
@Koshling, is it done for not calculating events every turn? There would have to be really many of them to such optimization be anyhow significant. But even if I am wrong, there are smarter ways to do this.

I don't understand the question ('is it done for no calculating...?').

If you can suggest smarter ways, please go ahead and propose them...
 
I don't understand the question ('is it done for no calculating...?').
Is it, that events are checked for hit not each turn, because of performance reasons? -- is what I meant. :)

Koshling said:
No. If you did that then as we added more events you'd get into a position where events tended to go off every turn. You want adding more events to add VARIETY not necessarily QUANTITY.
I thought about such approach. It is actually strange for me, that when we unlock for example building-burnt-down event, then volcanoes calm down. Isn't it, that if probability of a volcano eruption is n per 1000 years, it should be also n per 1000 years, no matter do we have the herbalism or high flammability in cities, or not?
 
Is it, that events are checked for hit not each turn, because of performance reasons? -- is what I meant. :)
Ah I see. No, not performance - it's a very cheap check in the grand scale of things. I assume it is don that way because the BtS designers wanted to establish a constant rate of events, independent of what events are defined.

I thought about such approach. It is actually strange for me, that when we unlock for example building-burnt-down event, then volcanoes calm down. Isn't it, that if probability of a volcano eruption is n per 1000 years, it should be also n per 1000 years, no matter do we have the herbalism or high flammability in cities, or not?
From a realism perspective yes, for sure. However, from a game design perspective we want modders to be able to add events without causing a large scale change in the quantity of events that go off.
 
I actually would rather see even multiple events per turn, if statistics say they should appear. If I have hell-high flammability in my city, I want it really burn, I want to a building be burnt down per each turn (if not even multiple buildings at once), not once per 50 turns, when an event will be triggered.
 
The decision in Civ IV/BtS was that there would only be one event per turn per nation. It keeps the luck component down to manageable levels I suppose.
 
@DH, hmm, but maybe... What do you think about two categories of events? First - bonus events dependent on luck, working in the manner you say. And second - general events which would mostly dependent on statistics specific for them?
 
To be honest I don't know how to make events work. In C2C we have been extending and refining all aspects of Civ but we have done very little with events.

My main concern (except trying to get rid of the guy who is still sleeping on my couch after 6 weeks! He said it would be only 3 until his wife forgave him:rolleyes:.) will be on the proof of concept stuff. I have gone off the captive stuff and I am finding the middle period of C2C too boring. I want to try and make the ages different rather than more of the same which is what they have become IMO.
 
except trying to get rid of the guy who is still sleeping on my couch after 6 weeks! He said it would be only 3 until his wife forgave him:rolleyes:.
How cute. It is like having a pet. :D

I want to try and make the ages different rather than more of the same which is what they have become IMO.
You found a hard hobby. ;) Maybe some bandits which can appear inside borders? You know, Robin Hoods and those things.

Oh! And certainly you must remember about magical unicorns. :yup: It's unplayable without them!
 
Oh! And certainly you must remember about magical unicorns. :yup: It's unplayable without them!

They are covered by the Designed Animal Zoo and Animal Designers (Biopunk) ;)

I am all for different feelings during eras and I have some ideas for the Modern / TH Era.
 
From a realism perspective yes, for sure. However, from a game design perspective we want modders to be able to add events without causing a large scale change in the quantity of events that go off.
Meh... just means we'd need to tone down the likelihoods on individual events is all. I have zero problem with being able to have more than one event in a round but I have a hard time rationalizing my way around the quandary as n47 explains it. Makes less than no sense and creates terribly illogical circumstances (like the way our volcanoes are working right now.)

The concern is that we could end up making it possible to have too many events taking place? I've no issues with that - just so long as they are given conservative chances to occur (1% chance per round as a standard seems right - property driven ones could go much higher if the property is stronger, and we could build more variable factors into the system such as - gains .01 cumulative chance to occur for each round it hasn't been experienced but was qualified to experience - that sorta thing.)

The way it is now is like a random encounter but the problem with that structure is exactly what we're facing... it means that the chance of an event is next to impossible to accurately craft and will require continuous and everlasting tweaking as new events come into play. The 'Event Takes Place' check being the first one totally throws any ability to say how likely an event actually should be in general and then no matter what we put as a likelihood for an event that likelihood is always going to be nothing more than a fixed number of lottery tickets in a drawing of who knows what size. Thus the likelihood is only a ratio value to other possible events... ugh. No wonder we have such a tough time making the flammability and volcano systems work effectively!

So we have what, a 10% chance for an event, THEN we total up all the lottery ticket volumes from each event and pick a winner. Yeah... sounds like a truly unbalancable system.
 
That system however, is better in performance wise.
It is like you said, roll a dice, if event should occur, loop through all events and pick one from available ones based on weight.

On the other hand, if you ignore this first check, you end up looping through all events and roll a dice for each event every turn to allow multiple events per turn
 
@platyping
Ah I see. No, not performance - it's a very cheap check in the grand scale of things. I assume it is don that way because the BtS designers wanted to establish a constant rate of events, independent of what events are defined.
We would need tens of thousands, if not hundreds, events to make this significant.

@Thunderbrd, I actually understand the balance argument. You have in the game events like finding some super herbs, etc. which brings you some free bonuses. They are mostly insignificant, but some day maybe there will be a super event like that and it could bring one nation in favor, if will be gained three times by it and never once by others. (is in favor in the right place here? bad English, bad :cry: why everyone do not use Suahili instead?)

That is why I suggested the categories.

Thunderbrd said:
it means that the chance of an event is next to impossible to accurately craft and will require continuous and everlasting tweaking as new events come into play
This is true about event you really want to encounter with more or less same probability though the whole game. But there are event, that saying -- this is less probable then this and more then this, without giving exact probability, will be enough. And this can be done with the weights we currently have.

@Faustmouse, no! They are not real magical unicorns! I can't teleport with them! :mad:
 
There are at least 150 events in bts alone, plus whatever new ones in c2c.
Let's say total of 200.
If c2c is using 50 civ DLL, then this 200 loop will occur every turn for every player alive.

Which means, you are indeed talking about a loop in tens of thousands.

On the other hand, currently there is just a minimal chance of events occurring for each player now.
If it should occur, then you bother to loop through the events.
You are changing a 50 iteration loop to 10000 iterations.
 
There are at least 150 events in bts alone, plus whatever new ones in c2c.
Let's say total of 200.
If c2c is using 50 civ DLL, then this 200 loop will occur every turn for every player alive.

Which means, you are indeed talking about a loop in tens of thousands.

On the other hand, currently there is just a minimal chance of events occurring for each player now.
If it should occur, then you bother to loop through the events.
You are changing a 50 iteration loop to 10000 iterations.
50 civilizations? :eek: Either I didn't understand or you sailed away with your imagination. AI would die with such number of civilizations. Besides 10000 iterations is still meaningless. And besides at least part of events should be done per map not per player. ... But from the other hand, some should be done per city. So maybe there would be even more of them, actually. But still, it will be rather meaningless. And besides there are smart ways to do things like that.
 
There are at least 150 events in bts alone, plus whatever new ones in c2c.
Let's say total of 200.
If c2c is using 50 civ DLL, then this 200 loop will occur every turn for every player alive.

Which means, you are indeed talking about a loop in tens of thousands.

On the other hand, currently there is just a minimal chance of events occurring for each player now.
If it should occur, then you bother to loop through the events.
You are changing a 50 iteration loop to 10000 iterations.

Let's put this in perspective. LOTS of code loops through every uni or every building MANY times per turn (often per unit per turn). There are circa 1000 of each. The cost of these loops as measured by the profiler is negligible. A loop over 100 events probably takes order 100ns, so doing it one time extra fro every player would required about 10 000 000 players to add 1 second.

Also there is no need to roll separate random numbers. You could do this:

1) With every event store a random number that is generated at init time (so constant in any load for a given event, but random) [might have to be at game load in order to use sync'd rands, but the principal applies regardless]
2) On player turn roll ONE random number (0-99)
3) For each event if (<rand rolled> + <event random seed>) MOD 100 < eventProb do event
 
@n47
It should be using 50 civ dll.
In fact, there are many mods which do use the 50 civ dll...
Whether 2 players are in the game, or all players are in the game, a loop through all players will still loop through all 50 slots, although isAlive() checks can be used.
Whether your computer can actually run a fully filled game is another issue.

@Koshling
I do agree that once in a blue moon when you change a 50 iteration loop into a 10000 iteration loop, it is not a big deal due to how fast computers are nowadays.
But when you start doing these every now and then, "not a big deal" pile together and start becoming a small deal :D
Anyway, knowing C2C's motto is "the more the merrier", what is just 200 events now may become 400 next few years.
Then the 10000 loop will become a 20000 loop, whereas the current system will remain as a 50 iteration loop which only loops through whole event list when event triggers.

It doesn't matter whether you roll the number once and use it for every event, or roll a new one for every event.
You still have to loop through the whole event list to check if the number is jackpot for each event.
 
Back
Top Bottom