Are you, in fact, a pregnant lady who lives in the apartment next door to Superdeath's parents? - Commodore

Create an account  

 
Random Events

Can't help but notice how often events target capitals so I thought I'll investigate it a little.

The game picks a "target wizard" first. Each player has weight equal to the distance they are from the end of the bar on the three categories in Astrologer. For example if a player has all bars maxed, they have a weight of zero. If they have them all at half, they have 300. This means if there is a clear leader, they won't be hit by an event. Players behind are more likely to be hit. 
If a banished wizard would get chosen, consider it a failed attempt and try again.

To pick a town, roll a random town. If it doesn't belong to that wizard, skip that town and try the next in the array (start from the beginning if it was the last one). If the racial unrest modifier for that race is 1 or greater with the home race of the wizard, also try the next.

What this means in practice :
The system is biased to hit the weakest person most often. (this does include positive events as well as negative)
The system doesn't consider the number of cities that person owns, in fact the weakest person is usually the one with the least cities.
The system is heavily biased towards hitting a capital. (Assuming you have unrest with all but your home race, any cities that get rolled which were made after the last city using that race, will result in hitting your capital. For example, you play Orcs, city 0, 3 and 7 are your Orc cities, and you didn't build an Orc settler this game nor did you conquer any cities friendly with orcs. Rolling anywhere from 8 to 100 will hit your capital.1-7 hits one of your other two cities.)

If not intentional, then this is horrible a algorithm choice. Otherwise, it's really underhanded...
Reply

Hmm. I almost would like to do two checks, so negatives hit the leader, and positives hit elsewhere.

As for city array, I'd drop the unrest thing. However, I'm fine with targetting the capital more often, as it makes sense for things like a depleted mine to target the oldest city. It also makes sense to target the largest population, which is usually the oldest which is often the capital, especially in older slower versions of the game.

Personally, I wish it could actually be based on both population and age of city. So yes the capital would be most common, but not quite as common as now.  Ideally, given same population, age would make it 10% more likely per year. And population would make it 4% more likely owe population.

BUT I think that would be far far far more complicated, so I'm very open to much simpler versions.
Reply

New and depleted minerals actually don't target cities through this system. They use the "targetwizard" variable though.

The city part is for pestilence, meteor, earthquake, population boom and rebellion, that's all 5.

Meteor targeting the fortress is definitely a problem, it can kill heroes, or result in getting banished if an enemy attacks it before you can replace the dead units. The others are not so bad.
Rebellion has some other restrictions (must be nonfortress, without a hero, and fewer fantastic units than normal units)

I don't see any reason why the unrest restriction is necessary - aside from pure malice from the developers to have players lose their best cities all the time. If anything, rebellion being limited to a city where you don't have an unrest penalty seems odd.

Without the restriction it still results in uneven distribution - but much less uneven. Unless you stopped conquering and building cities way before anyone else, in which case you'll still have like 90% chance to get your capital hit. And of course this works in both ways - if you are the one owning the city that was built last in the entire game, your capital has the lowest chance to be chosen instead...
Reply

... that confuses me greatly. I would have thought at least 3 of those 5 would target wizards. bleh. can we change the whole targetting? What exactly is in target wizard?
Reply

also, i've never seen a meteor hit my capital so that's even more confusing (sure i've only seen half a dozen meteors, but still..)
Reply

So the cities are a fixed 100 length array, with first 5 the capitals, and then in order of founding? If a city gets destroyed, does the next city replace it or only after 100 is full? And the event picks a random 1-100 and then moves along the array? Pretty horrible indeed. Perhaps just "try again" if the first roll didn't hit would suffice? Sure you could need to roll ~200 times but it's rare enough that probably doesn't matter? Also, it seems possible for rebellion to not have a valid target at all.
Reply

Quote:So the cities are a fixed 100 length array, with first 5 the capitals, and then in order of founding?
Yes.

Quote:If a city gets destroyed, does the next city replace it or only after 100 is full?
The last city replaces it.

Quote:And the event picks a random 1-100 and then moves along the array?
Exactly.

Quote:Perhaps just "try again" if the first roll didn't hit would suffice? Sure you could need to roll ~200 times but it's rare enough that probably doesn't matter?

If we can assume there always is at least one valid target then yes. Otherwise it's an infinite loop.
So if we remove the "unrest" condition, it's safe - there is always at least one city owned by the target wizard - otherwise the event generation failed (wizard was dead -> same as banished) before getting this far.

Quote:Also, it seems possible for rebellion to not have a valid target at all.
Those additional conditions are checked outside the procedure - if they aren't met, the entire event fails and a new event is picked. So rebellion is much less frequent than other events, exactly because it picks the invalid fortress city most often.
Reply

Is redoing the whole algorithm, including whether it targets a wizard or city, an option? Or at least changing which event targets which?
Reply

We can change a lot of the details if we want to, probably not everything.

For the time being, I made it so that the procedure which picks a city does this :

while (target=not found and tries<500) do {
target=random(maxcity)
if city does not belong to "targetwizard" then target=not found
tries=tries+1
}

So each city has an equal chance to be picked, but still must belong to the previously selected target player.
Reply

What are your thoughts on my rationale why some cities should actually be picked more often (and those would happen to include the capital most of the time, if not nearly as often as the previous formula)? 

The numbers I'm not overly worried about, but I do think larger, and older, cities should get picked more often.
Reply



Forum Jump: