WHoward's Military Log / Civ6like Era-Restricted GGs&GAs / Generals Spawn at the Nearest City

balparmak

Prince
Joined
Sep 20, 2015
Messages
545
Local Generals&Admirals to the Nearest City (amazing title) NOT WORKING WITH THE RECENT VP VERSIONS, REMOVE IF YOU HAVE IT
So sometime ago I asked why WHoward's Local Generals wasn't included in the base VP and @ridjack replied that it made it easy for the AI to lose their generals, which is a perfectly valid reason. So this is a midway between Local Generals and VP, and spawns the generals at the safety of a near city, instead of a far away capital. As of VP 1.3, this is a DLL modmod and doesn't require any teleport shenanigans! Requires VP 1.3 or later.

Credits: WHoward for the base mod

Civ6like Era-Restricted Generals&Admirals
erarestr.jpg

For me, one of the few things Civ6 did right was limiting combat bonuses of GG&GAs to two eras, so that you can't profit off of a GG earned in an ancient war for the entire game. This modmod makes GGs&GAs "obsolete" after two eras, by making them lose their combat bonuses. The obsolete GGs&GAs can still be expended for Citadels&Luxuries.
The era in which the GG&GA was born is indicated with Roman numerals (as a promotion) on the unit panel. A notification is sent to the player when they become obsolete and GG&GGs get an ugly X (obsolete promotion) on the unit panel.
The AI is trained to expend obsolete GG&GAs and can be quite relentless with Citadels. Their use is directly linked to the existing Citadel placement&Luxury mission logic of the VP. For example, the AI places Citadels only if it can steal tiles, and it also considers whose tiles it's stealing, prioritizing hostile or weak neighbors. GA logic is simpler, and they're expended as soon as they get obsolete.
A note on Repair Fleet: I haven't seen the AI use Admirals for repairs, and I'm not sure if they are actually able to do that. So I haven't modified anything regarding the Repair ability and an obsolete Admiral can still do that in the player's hands. I use a house rule and don't do that myself, but ultimately it's up to you. I'll work on this a bit more when I have better understanding/feedback on the AI, it's pretty likely that I'll remove the ability from obsolete admirals.
A separate note for Civ6 players:
While GG&GAs provide bonuses for units from two eras in Civ6, in this mod they're limited to two eras regardless of units. Exactly imitating the Civ6 method would be much harder and possibly more resource-intensive, I think this method gets pretty much the same results except edge cases.
Requires VP 1.3 or later.

To-do:
Add better texts&icons for flavor (I'd appreciate any suggestions)
Remove hard-coded stuff from DLL
Experiment with slightly lower GG thresholds since there's less of them active

Credits: Machiavelli's Scaling Merchants, which I heavily borrowed from for unitspawn lua
Thanks: Macchievalli for allowing the use of his code, Chrisy15&Troller001 on ModdingHelpline discord for Lua support, Recursive for endless DLL support.

WHOWARD'S MILITARY LOG! (all caps because I'm hyped for this)
militarylog.jpg

Last but not least, this modmod introduces a late gem from WHoward, the Military Log, to VP. Any combat event (attack, defense, capture, bombard, intercept etc. etc.) can be viewed through the Military Log screen and clicking on an event will move the map to the event location. Basically, this allows you to replay the lightning-fast on-screen combat notifications that you get with quick combat. I think its psychological impact may even be greater than the practical one, I feel much more at ease with using quick combat since I don't worry about losing information. I made two minor improvements on WHoward's version by making the log screen transparent to get a better view of the map and adding a crossed-swords icon for the pop-up. Big thanks to WHoward for allowing me to repackage his mod with these insignificant changes, and of course for making the mod. Requires VP 1.3 or later.

Limitations:
Currently, the military log data does not persist between saves, i.e. your log will be refreshed with each re-load. Keeping the log intact would require getting into an area of modding (storing data/serialization) which I'm not comfortable with yet, and a poor implementation would carry the risk of save-bloat. I can prioritize this if there's significant demand, but it works just fine this way.
Possible issues:
This was mostly a late-night copy-paste job. There are dozens of combat events, some of which are named differently in WH's DLL and VP's DLL, so it's very possible that I overlooked some of them, in fact, I'm pretty sure I passed over at least one and didn't return, IIRC it was late-game stuff about air warfare or paratroopers. So let me know if you see any event not-logged or logged improperly.
Also, currently, a maximum of 50 events are logged, then the oldest ones are discarded to make room for new events. I think 50 is a pretty safe number, it could even be too much, but I don't play on large maps. I can increase or decrease this depending on feedback.
Special thanks to ilteroi for making sure I didn't break anything
 

Attachments

  • UI - Military Log (v 2).zip
    41.3 KB · Views: 162
  • EraRestrictedGenerals.zip
    597.4 KB · Views: 113
Last edited:
Nice to see!

One thing I'll make note of for you: with the original Local GGs option enabled and 3rd/4h Unique Components added, Carthage will always spawn two Shofets: one at the battlefront and one back in the city. Not sure if yours will have the same problem or if it's fixable on your end, but figured I'd let you know.
 
Could you include Admirals in that? It seems whenever I buy (for faith) or gain an admiral they keep showing up in the capital. At least if I buy a general they show up in the city where I bought them. Admirals do not. They all appear to go to the capital.
 
Nice to see!

One thing I'll make note of for you: with the original Local GGs option enabled and 3rd/4h Unique Components added, Carthage will always spawn two Shofets: one at the battlefront and one back in the city. Not sure if yours will have the same problem or if it's fixable on your end, but figured I'd let you know.

Thanks for letting me know, I'll look into it!
edit: Seems to work fine

Could you include Admirals in that? It seems whenever I buy (for faith) or gain an admiral they keep showing up in the capital. At least if I buy a general they show up in the city where I bought them. Admirals do not. They all appear to go to the capital.

Actually they're included, I just forgot to mention them :c5happy:
 
Last edited:
Hi all, Local Generals to the Nearest City (gets more meaningless every time I type this) is now a DLL modmod, also bumping for two new additions. I don't have anything else planned (yet) so this pretty much ends my spamming.
 
ast but not least, this modmod introduces a late gem from WHoward, the Military Log, to VP. Any combat event (attack, defense, capture, bombard, intercept etc. etc.) can be viewed through the Military Log screen and clicking on an event will move the map to the event location. Basically, this allows you to replay the lightning-fast on-screen combat notifications that you get with quick combat. I think its psychological impact may even be greater than the practical one, I feel much more at ease with using quick combat since I don't worry about losing information. I made two minor improvements on WHoward's version by making the log screen transparent to get a better view of the map and adding a crossed-swords icon for the pop-up. Big thanks to WHoward for allowing me to repackage his mod with these insignificant changes, and of course for making the mod. Requires VP 1.3 or later.

Limitations:
Currently, the military log data does not persist between saves, i.e. your log will be refreshed with each re-load. Keeping the log intact would require getting into an area of modding (storing data/serialization) which I'm not comfortable with yet, and a poor implementation would carry the risk of save-bloat. I can prioritize this if there's significant demand, but it works just fine this way.
Just letting you know that I will be using this for the foreseeable future.
 
Last edited:
Is there any way that the Military log could just be a tab on the Notification Log UI, instead of it being its own button?
 
Is there any way that the Military log could just be a tab on the Notification Log UI, instead of it being its own button?

Oh that's a good idea, I really know very little about UI but I'll look into it!
 
Yep that's my edit :c5happy: That was before 1.3 though, those changes are already added but you need the modmod in this thread to activate the code & get the proper UI
Awesome. So the only problem I see with the event maximum is late game when the AI has guided missiles and swarms of sea units. Then they make several attacks before your turn quickly filling up the log. Each person can modify per their needs though. In which file is that setting?
 
Last edited:
Top Bottom