Civ4lerts

How about a CivLert message option for when a civ founds a new city. I now periodically check the trade windows to see what cities have been founded.
 
How about a CivLert message option for when a civ founds a new city.

Done. As well, an icon pointing to it appears on the map like other events if you can see the city when it's founded.

I first used the civ's color, but that made it hard to read in the event log. I then tried the culture color (same as for culture expansion, so it made sense), but that is also hard to read. So I fell back on white. Any other suggestions?

I now periodically check the trade windows to see what cities have been founded.

I noticed during my game last night that cities aren't shown when trading with a rival's vassal. I can check for this and block the alert in that case, but I wanted to first make sure that others see the same thing.
 
By "culture color" do you mean COLOR_CULTURE_RATE (i.e. purple) that we used to use for the cultural expansion messages or the COLOR_MAGENTA that we currently use?

As for city trading I believe you are correct that city lists don't show up with vassals.
 
I believe I used CULTURE_FILLED (the first one in the color value XML file). It's in the MoreCiv4lerts module if you wanna try other values. You have to specify it in Python to affect the border of the on-screen icon flag.

So should I block the alert for vassals since it's information you can't get normally? I know the answer; I just don't like it and am hoping someone will say "no, it's okay to show it." :mischief:
 
Hmmm. This is all kindsa confusing. Assuming nobody says "it's okay to show it" :p and it is treated as spoiler, if they end their vassalage agreement, should we then go back through their city list and send alerts for any cities we didn't know about before? Assuming that we can tell in the code when a vassalage agreement ends?

On a related topic, when you buy/trade for somebody's map and a new city that you haven't seen before shows up on a previously revealed plot, is there any special event that's fired?
 
If they end their vassalage agreement, should we then go back through their city list and send alerts for any cities we didn't know about before?

I wasn't planning to do that, and I would find it rather annoying myself. If you want to know, you can always bring up the trade window and diff it against your memory. :rolleyes:

On a related topic, when you buy/trade for somebody's map and a new city that you haven't seen before shows up on a previously revealed plot, is there any special event that's fired?

I'm 99% sure there is no such event. I'm keying off the CityBuilt event which is fired when the city is founded--not when it is revealed to you. I alter the alert depending on whether or not it is revealed to you (built on a plot you can see at that moment).

Now, there is the generic PlotRevealed event fired for each plot exposed by the new map, and we could check to see if it contains a revealed city and display an alert in that case.

Hmm, thinking of that made me realize that I'm not checking the city's owner to see if they are barbarian or minor. Perhaps I should do that and alter the alert somewhat. I suspect a new barbarian city would show up as "Barbarian has founded Two Rocks." Any suggestion on if and how it should be altered for the barbs, assuming the event is even fired for new barb cities?
 
Now, there is the generic PlotRevealed event fired for each plot exposed by the new map, and we could check to see if it contains a revealed city and display an alert in that case.
Does PlotRevealed get fired every time you get a new view of a fogged plot? I always assumed it was only when you removed the initial blackness. The case I am talking about would be a plot whose terrain has already been revealed but a city has been founded there after we last saw it. But it may be overkill in either case; new maps don't happen on their own and if it's important to you, you'd probably be looking over what the map revealed afterwards anyhow.

Hmm, thinking of that made me realize that I'm not checking the city's owner to see if they are barbarian or minor. Perhaps I should do that and alter the alert somewhat. I suspect a new barbarian city would show up as "Barbarian has founded Two Rocks." Any suggestion on if and how it should be altered for the barbs, assuming the event is even fired for new barb cities?
Barb (and minor) cities should definitely not be announced on founding since you can't enter diplomacy with either.
 
Yeah, I really don't mind that vassals cities don't come up. Really, this feature is useful around the beginning of the game anyway. I'm sometimes interested in when the 2nd, 3rd, and 4th cities of my neighbors get established. Late in the game, I'd probably turn this CivLert off anyway to avoid information spam.
 
Does PlotRevealed get fired every time you get a new view of a fogged plot? I always assumed it was only when you removed the initial blackness.

I assume the latter as isRevealed() checks for blackness and isVisible() checks for fog. We'd have to store the known cities and compare when a new map was acquired in order to make this happen. You already get an alert, this new alert would just point out where the city was.

It would be useful I think, but a bit of work especially if we stored it in saved games. I suppose we could just store the city IDs I think. I'm still not entirely sure how IDs work in Civ4. Are they merely the index into the array and get reused when a city is razed and a new one founded? In that case we'd need something trickier to track the cities.

I'd love a map view mode that appeared whenever you acquired a map that highlighted plots that were "new". Start by showing your map dimmed and then highlight plots that were only in the new map or different from yours. I don't know if this would even be possible with a DLL as I think "bare map" view is part of the graphic engine--not the DLL--but I've never checked.

Barb (and minor) cities should definitely not be announced on founding since you can't enter diplomacy with either.

True, I'll fix this now.
 
City and unit IDs look to me like memory offsets as they are generally 5 and 6 digit numbers (in decimal.) And -- here's the fun part -- if you capture a city or upgrade a unit, they will change. This is because in both instances a new object is created, the details are copied over from the old object, and then the old object is deleted. Not sure whether they get recycled and reused later as I haven't looked too deeply into the details -- I would hope so though.

As for a map view mode, perhaps we could do something like with the developing strategy layer. First overlay your known map in something dark like the black pattern and then clear the spots that are revealed by the new map and/or overlay them with a different brighter color on a different layer.
 
The trick is storing the previous view of the map for comparison. If we're really lucky, we can do this in response to a trade involving a map and it's before the new map is copied over. Otherwise we'd have to do it every time the diplomacy window is opened in case a map is traded.

The other possibility is a button to save the map state that the player would have to consciously hit. This would allow them to hit the button, trade some maps, and see all the changes combined.

If we do it, what to save?

  • Revealed - bool
  • Owner - int
  • City - bool
  • Feature (forest/jungle/fp) - int
  • Improvement - int
  • Route - int
Now that I list that out, it's not that much to store. We wouldn't even need to save it permanently.
 
I've just added alerts for when rivals will become your vassal, sign a 10-turn peace treaty or surrender.

These work like the Open Borders, DP and PA alerts in that they only get displayed when the AI becomes willing--not the other way around. I was wondering if I should change that.

If I do change it to show when they are no longer willing to trade the item (like tech trades do now), should I show the alert when war breaks out or can you assume they are no longer willing to trade and show only those things which they are still willing to trade (peace treaty or surrender would be most likely)?

Actually, I should clarify. When war exists, you cannot sign OB, DP and PA, nor can they become your vassal peacefully. It's not that they wouldn't but that they can't. In that case it makes sense not to show an alert.

For a peace treaty or surrender, those are normally not tradeable until war breaks out and cannot be traded once peace is declared. However, they may cease to be willing to surrender if they start doing well or there's a dogpile on you. Should I show that alert then? "Tokugawa will no longer surrender."

I want to know if there's strong desire to change the alerts as I'll have to pretty much rewrite this code as I did for the city-based alerts. It's doable but maybe low priority if there's no strong opinion.
 
My gut instinct is that the "no longer willing" alert isn't necessary but I have no strong opinion on it. I don't know that it happens all that often either.

While you're on this massive civ4lert spree, did you happen to change the tech (and other?) trade alerts so that they don't trigger for someone who's at war with you? :groucho:
 
My gut instinct is that the "no longer willing" alert isn't necessary but I have no strong opinion on it. I don't know that it happens all that often either.

There's not much you can do if someone won't sign OB anymore 'cept cry over the missed opportunity.

While you're on this massive civ4lert spree, did you happen to change the tech (and other?) trade alerts so that they don't trigger for someone who's at war with you? :groucho:

I want to fix that as well as move all of the "Will Trade" techs into the "Won't" column on the trade screen when at war. They are caused by the same problem. I'm sick of getting all excited when I see techs the AI has been hoarding appear there only to be let down when I try to initiate trade talks. :mad:

Coming Alerts

  • WHEOOH
  • Worst Enemy
  • Attitude (unlikely as it's not very useful)
  • Maps (just to be thorough)
Am I missing any others?
 
I'm doing some work in Civ4lerts to make them all handle Hot Seat games correctly. In doing so I have expanded the Worst Enemy alerts to show both the old and new enemies instead of just the new one. I'd like some feedback on the format of the messages. I don't want them to get too long, but I also like having them read naturally. Here are the possible forms.

A. Alerts Involving You

  1. You are the worst enemy of Isabella. [will stack multiple haters here]
  2. You are the worst enemy of Isabella (was Mansa Musa).
  3. Mansa Musa is the new worst enemy of Isabella (was you).
  4. You are no longer the worst enemy of Isabella.
B. Alerts Not Involving You

  1. Ghandi is the worst enemy of Isabella. [will stack multiple haters here]
  2. Ghandi is the new worst enemy of Isabella (was Mansa Musa).
  3. Ghandi is no longer the worst enemy of Isabella.
C. Possible Changes

  1. Change "(was <leader>)" to " instead of <leader>". It's more natural if a bit longer.
  2. Just as A1 and B1 stack when multiple people start hating one player, stack A2, A3, and B2 where multiple people switch from hating player X to player Y. This would be extremely rare and would look like this:
    "Mansa Musa is the new worst enemy of Isabella, Montezuma, Hannibal instead of Catherine."
I moved the worst enemy to the start of the message for all alerts. A4 and B3 were originally "Isabella has no worst enemy." This way you can see immediately with whom you might want to think twice before trading. The old enemy is at the end making it almost as easy to spot the player you can trade with again.

However, it may be more important for you to see who is doing the hating first. If it's a friend or someone you fear, only then would you need to read who their enemy is.

D. Haters Up Front

  1. Isabella hates you most. [will stack multiple haters here]
  2. Isabella hates you more than Mansa Musa.
  3. Isabella hates Mansa Musa more than you.
  4. Isabella no longer hates you.
  5. Isabella hates Ghandi most. [will stack multiple haters here]
  6. Isabella hates Ghandi more than Mansa Musa.
  7. Isabella no longer hates Ghandi.
I'd love some feedback on these ideas.
 
That sounds so complicated. A simple "(was you/someone else)" upon WE change would be enough, stacking only if simple but I doubt that makes much sense since as you said it would only be used in rare occations. Also I like "was" a lot better than "instead of"
 
The stacking in A1 and B1 are handy when loading saved games and is already done. I'll probably skip stacking the changed enemies.
 
I have fixed the City-related, Worst Enemy, and Refuses to Talk alerts for Hot Seat games. I haven't looked into MoreCiv4lerts yet, but I suspect they all need to be updated.
 
Instead of
"Ghandi is the new worst enemy of Isabella (was Mansa Musa)."

How about
Ghandi has replaced Mansa Musa as the worst enemy of Isabella
or
Ghandi has surpassed Mansa Musa as the worst enemy of Isabella
 
Top Bottom