Unciv
Unciv copied to clipboard
Request: Trigger (existing) notifications for particular events
- The notification "
Your city [cityName] was converted to [religionName]!" is only triggered when a city is converted to a religion after an unit action executed by the player (e.g. Great Prophet spreading religion, whatever is the religion).
This notification is not triggered when:
- The player's city is converted to a foreign religion by an AI religious unit (e.g. foreign Great Prophet)
- The player's city is converted to any religion by natural religion spread
Could it possible to also trigger the notification "Your city [cityName] was converted to [religionName]!" in these cases, because currently, it's easy to miss that some of my cities have been "sneakily" converted?
Note: The notifications "You gained [Stats] as your religion was spread to [cityName]" and "You gained [Stats] as your religion was spread to an unknown city" exist in the stringtables but are never triggered in-game, even when converting a foreign city to the player's religion with a Great Prophet, or when the player's religion is naturally spread to a foreign city.
- The notification "
[cityName] has been disconnected from your capital!" is only triggered when a road/railroad is removed (by mistake most of the time) by the player. If a road/railroad is pillaged by an enemy, the notification is not triggered (possibly because the road is considered to be still "existing" but needs to be repaired), so it's easy to miss that a city is not connected anymore to the capital (other than deducing the gold/turn decrease is due to a tile having been pillaged, and that tile was containing a road connecting two cities)
So, could it possible to also trigger the notification "[cityName] has been disconnected from your capital!" when a road connecting two cities is pillaged by an enemy (or a tile, containing any improvement and a road, is pillaged)?
Thanks for reading.
This sounds like something the Event Bus would be helpful for!
Good catch! The problem here is that the game doesn't remember what cities were connected to capital last turn, so it doesn't know what changed... To implement this we'll need to add another field to the saved game data
This could use a few save games for any developer to test some approach... Preferably of course the end of the turn before stuff happens.
The notification "Your city [cityName] was converted to [religionName]!" is only triggered when a city is converted to a religion after an unit action executed by the player (e.g. Great Prophet spreading religion, whatever is the religion).
This notification is not triggered when: The player's city is converted to any religion by natural religion spread
I think this one has been fixed a few months ago, but I have to check (EDIT: the notification is triggered if one of my city is converted to any religion by natural religion spread, but not if converted by a foreign missionary or prophet) .
Yup, the first part of your OP - religion- is also hard to review in code, everything looks carefully designed, every level suggests "can't go wrong", but there's a lot of pieces to the puzzle. For the capital connection part on the other hand I can (oops, already have) easily write a draft, testing it is quite another challenge...
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 15 days.
- The player's city is converted to any religion by natural religion spread
Pretty sure this has been resolved by now
- The player's city is converted to a foreign religion by an AI religious unit (e.g. foreign Great Prophet)
This too, but I'm less sure here
2. "
[cityName] has been disconnected from your capital!" is only triggered when a road/railroad is removed
#9545
I'm closing, but maybe someone should double check this