Resource icon

bal's gameplay mods (naval supply, reduced supply etc.) 1

balparmak

Prince
Joined
Sep 20, 2015
Messages
554
So I was testing a separate naval supply cap modmod when the issue of naval units in lakes was brought up. It took only a few minutes to modify the code to prevent lake navies, and it turned to be more useful than a separate naval cap (how the turn tables!), so here it is.

Separate Naval Supply
Download here
- Capitals, Lighthouses and each coastal city provide 1 naval supply. Great Admirals' ability (voyage of discovery, was it?) provides 2
- Harbors provide 1 supply for every 10 citizens, Seaports for every 5 citizens. Venetian Arsenale provides 1 for every 15 citizens (in addition to +3 flat supply).
- Naval wonders provide naval supply:
Great Cothon (Carthage NW): 2 / Great Lighthouse, Colossus: 2 / Piazza San Marco & Venetian Arsenale: 3 / Grand Canal: 4 . Venetian NWs have their usual (land) supply bonus reduced.

Use this Compatibility patch when using with Reduced Unit Supply
Haven't specifically tested but both should work with 4UC and Enhanced Naval Warfare.
Credits: Kwadjh for Dock icon: https://forums.civfanatics.com/resources/buildings-units-icons.18591/

Dynamic Battle Lines
Download here
- All melee units receive a tweaked version of Heavy Charge. Victorious melee units will push back the defending units, unless they are stationed in a city, fort or citadel. Units unable to retreat take 25 damage. (Polish Winged Hussar gains Blitz to compensate)
- Civilian units retreat with military units to prevent easy captures.
- Units suffer 5 attrition damage in turns they move in hostile lands. Recon, submarine and barbarian units are immune.

Unit Production AI Improvements
Download here

- Introduces soft checks to AI army composition to help it create more balanced armies. This is done by introducing new AIMilitaryStrategies, Flavors and UNITAIs for each unit type. When an AI player has too few of a certain unit type, it gets a bonus to prioritize the production of that type, and vice versa when it has too much. For a long description on what it does and why, please refer to: https://forums.civfanatics.com/threads/unit-production-ai-tweaks-experimental.676462/

Civ6like Era-Restricted Generals&Admirals
Download here

Spoiler Era Restricted GG&GA :
View attachment 617105
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.
 
Last edited:
Lower Supply Cap
Download here
Extensive changes to reduce supply cap throughout the game.
Spoiler Changes :


- Base SupplyFromPopulation is lowered by 60% for all difficulties (from 10% to 4%)
- SupplyFromPopulation from common buildings lowered by 60%, from wonders (national&global) by 40%.
- Global Supply From Population from Wonders lowered by 40% (currently Red Fort only, 5% to 3%)
- Flat supply from Brandenburg lowered by 2 (10 to 8), from other wonders (that provided more than 3) lowered by 1.
- SupplyFromPopulation from Policies and Traits (Napoleon) lowered by 40%
- Removed Barracks from Pioneers&Colonists, Conquistador keeps Barracks but loses Armory.
- Military units require 50% more production
- Buildings provide ~25% less Defense and ~33% less HP to Cities, doesn't affect Palace.
- Increased duration for military city-state unit gifts by 50%
- Barb spawn speed reduced accordingly
-(Optional: Increase resource consumption by military units, see the sql)

Be sure to download the compatibility patch when using Lowered Supply Cap and Naval Supply together!



Miscellaneous Tweaks
Download here
Various tweaks to reduce micro
Spoiler Changes :

More Movement (Movement.sql):
Two options:
- Units starting their turn in friendly territory gain +1 movement for the turn. Can be a bit iffy at times, e.g. it takes two turns for the bonus to apply in the lands of a newly founded city.
- (Option: +1 movement for all units, all the time / disabled by default)

Increased Minimum City Settle Distance (CityDistance.sql):
- Increases minimum city distance by one (4 to 5).

Purchase Civilians in Puppets (PuppetCivilianPurchase.sql):
- Allows the purchase of Workers and Workboats in puppet cities, through HungryForFoods' Faith Purchases in Puppets modmod.

Slightly Faster Animations (FasterAnimations.sql):
- Work in progress, currently only makes the basic movement animation and the annoying refacing animation before combat (most obvious with ranged units) faster. I'll eventually try to edit animation files to make them faster, SQL only comes this far.

Colonies (Colonies.sql)
- Pioneers and Colonists found puppet cities that can be annexed at a later data.I may add some depth to this as long as it's AI friendly. Will probably make annexation locked behind a policy or tech.


Simplified Promotions
Download here

Biggest and Noobest of all. Replaces VP's promotion with something similar to Ranks or Veteran bonuses found in other games, with linear bonuses.
Spoiler :
The goal is to keep low and high level units mechanically the same (so no new abilities or specializations, e.g. +1 attack from logistics), but still have a strength difference. Currently there are 6 ranks, accounting for 3 from common buildings and 3 from uniques&experience (may increase this to 8). All units (except Scouts) have a single promotion line that provides bonuses to the "core abilities" of a unit, with the same bonuses given at every level. "Core abilities" is of course subjective, I tried to capture the main role of a unit and use the bonuses provided by the VP promotion line with the most general application (decided by going through the forum basically).

Here are the new Rank promotions:

Melee Units: +10% CS, +10% vs Cities, +10% Ranged Defense per level.
Mounted Melee/Armor: +10% CS, +10% in open terrain, +5% Flank modifier per level.
Ranged Units: +15% RCS, +5% vs Units Above 50 HP.
Skirmishers: +15% RCS, +5% vs Units Below 50 HP.
Siege: +10% RCS, +15% vs Cities per level.
Helicopters: +10% RCS, +10% vs Armor per level.
Naval Melee: +10% CS, +10 HP and +1 boarded inflicted per level.
Naval Ranged: +15% vs Cities, +10% vs Land and Naval units per level.
Carrier: +1 capacity, +10% Defense for first three levels. +15% Defense for last three.
Submarines: +15% RCS, +5% CS in Outside Friendly Lands per level.
Fighters: +15% intercept change, +15% CS in interception and air sweeps, +15% vs Air units per level.
Bombers: +25% vs Cities, +10% vs Land and Naval units, +5% Evasion chance and -5% damage from inteception per level.
AntiAir: +10% inteception chance, +15% vs Air units per level.

- Scout line loses medic promotions, keeps the other two lines.
- Default unit promotions remain, so this doesn't touch the UUs. All VP promotions are set to CannotBeChosen.

PromotionOptions.sql:
-
Here you can enable all or one of Stalker's suggestions for even simpler promotions or increase the number of ranks to 8.

Further thoughts:
I'd like to simplify things further, especially the air promotions, which are a mess and hard to balance while keeping default proms. I don't think these make the AI performance any worse, may even help it since now it's impossible to pick suboptimal promotions.
There's the obvious issue of the removal of Medic promotions. I'm working on a Medic unit line, that'll act as civilian support units, I'll release it when/if I can make the AI properly use them. I'm not sure how good was the AI at using Medic promotions before, probably not good as human players, so this may be another plus for the AI. In the meantime, I should probably nerf healing promotions (like honor's) slightly.

Why this? In the unlikely event that anyone wonders
I know this is partly a "get good" issue, but I (and apparently some others) find the combat in Civ5 simply unfun. VP makes warfare an integral part of the game and the AI much better at it, both are great achievements. Yet in the absence of necessary UI/QoL features, this, unfortunately, brings forward the issues with warfare in Civ5 and it's just hard to get good at an unengaging mechanic. These tweaks helped me to get better, and even enjoy warfare (got my first Domination victory!), so they may serve as a stepping stone for beginners.


Deity Tactical AI for All Difficulties
Download here

Spoiler Changes :

Very simple mod, updates TacticalSimMaxCompletedPositions , TacticalSimMaxBranches , TacticalSimMaxChoicesPerUnit in HandicapInfos to use Deity values in all difficulties.
 
Last edited:
Melee Units: +10% CS, +10% vs Cities, +10% Ranged Defense per level.
Mounted Melee/Armor: +10% CS, +10% in open terrain, +5% Flank modifier per level.
Ranged Units: +15% RCS, +5% in Friendly lands.
Skirmishers: +15% RCS, +5% Outside Friendly lands.
Siege: +10% RCS, +15% vs Cities per level.
Helicopters: +10% RCS, +10% vs Armor per level.
Naval Melee: +10% CS, +10 HP and +1 boarded inflicted per level.
Naval Ranged: +15% vs Cities, +10% vs Land and Naval units per level.
Carrier: +1 capacity, +10% Defense for first three levels. +15% Defense for last three.
Submarines: +15% RCS, +5% CS in Outside Friendly Lands per level.
Fighters: +15% intercept change, +15% CS in interception and air sweeps, +15% vs Air units per level.
Bombers: +25% vs Cities, +10% vs Land and Naval units, +5% Evasion chance and -5% damage from inteception per level.
AntiAir: +10% inteception chance, +15% vs Air units per level.

I think the concept makes sense, and funny enough I would consider this useful for both war beginnings and war experts.....for experts that are used to just "winning" at war all the time, taking away the power magnifying promotions suddenly makes warfare a good point more challenging.

I do think that we can make this even simpler, as I think a lot of the conditional bonuses aren't really needed in your model. I also included the ones I made adjustments on. See what you think.

Mounted Melee/Armor: +10% CS, +10% Flank modifier per level.
Ranged Units: +15% RCS
Skirmishers: +15% RCS
Helicopters: +20% RCS
Naval Melee: +15% CS, +10 HP
Carrier: +1 capacity, +15% defense
Submarines: +30% RCS (seriously, subs need this boost if you're not giving them wolfpack)
Fighters: +30% intercept change, +15% CS in interception and air sweeps, +15% vs Air units per level. (gave them much more interception....else they will be useful at the role).
Bombers: +25% vs Cities, +10% vs Land and Naval units, -10% damage from interception
AntiAir: +20% interception chance, +15% vs Air units per level. (again more interception was needed to make this remotely competent at its job).
 
I hoped to receive feedback, but I didn't expect to receive the best feedback! Thank you so much for taking the time.

I think the concept makes sense, and funny enough I would consider this useful for both war beginnings and war experts.....for experts that are used to just "winning" at war all the time, taking away the power magnifying promotions suddenly makes warfare a good point more challenging

Good point! It should make it harder to rely on high-level promotion synergies to counter AI unit spam.

I do think that we can make this even simpler, as I think a lot of the conditional bonuses aren't really needed in your model. I also included the ones I made adjustments on. See what you think.

Mounted Melee/Armor: +10% CS, +10% Flank modifier per level.
Ranged Units: +15% RCS
Skirmishers: +15% RCS
Helicopters: +20% RCS
Naval Melee: +15% CS, +10 HP
Carrier: +1 capacity, +15% defense
Submarines: +30% RCS (seriously, subs need this boost if you're not giving them wolfpack)
Fighters: +30% intercept change, +15% CS in interception and air sweeps, +15% vs Air units per level. (gave them much more interception....else they will be useful at the role).
Bombers: +25% vs Cities, +10% vs Land and Naval units, -10% damage from interception
AntiAir: +20% interception chance, +15% vs Air units per level. (again more interception was needed to make this remotely competent at its job).

Honestly, I like all of them! I think I tried to keep some flavor of VP promotions and give at least two modifiers for each, but it doesn't always work well, especially with the Ranged units. I had in my mind to make a separate, even simpler version with just CS & RCS increases, which would probably destroy unit functionality and balance, and the current version is crowded with unnecessary bonuses, so your suggestions look great!
I only have minor reservations about AntiAir promotions though. In VP AA interception is capped at 60%, Anti-Aircraft Gun starts with 30% interception and can gain +30% more, for SAM it's 45%/15% (and +100% vs Air), after that unique AA promotions end and they have to go through Shock&Drill. They still get their default interception promotions with this mod, while 10% chance is ineffective by itself, it keeps us close to the cap for AA, I now realize SAM can still go over the cap though. With 6 ranks both go over the cap which was a gross oversight on my part. So I'm leaning towards 10% interception, 15% vs Air for the first three levels, 20% vs Air for the last three which leaves us with 60% interception for AA, 75% interception for SAM, and 105% vs Air for both, getting reasonably close to VP. Or we can frontload the vs Air bonuses with 33%, and give 10 CS at the last three levels.
I'll look into numbers a bit closer but I think it was similar for Fighters too, they start with 33% interception and cap at 100% with promotions, so I tried to approximate this with 6 ranks. The same goes for the Carriers, in VP they get a maximum of +3 cargo, so I had to separate the first three ranks from the last three. Differentiating between levels also bothers me, but I don't see any way around it if we're following VP caps.
 
I'll probably have two versions then, no need to delete the old one since it's mostly done (I think I'll go over AA&Bombers though).
I prefer your original version than @Stalker0 's, no offence. These are both simple, but yours @balparmak are more interesting and diverse.
 
Slightly Faster Animations (FasterAnimations.sql):
- Work in progress, currently only makes the basic movement animation and the annoying refacing animation before combat (most obvious with ranged units) faster. I'll eventually try to edit animation files to make them faster, SQL only comes this far.
This is what i am hyped for.
I've always played with animations off which makes it difficult to follow whats going on when big war erupts.
Make them fast like in civ 6 PLEASE
 
Last edited:
I conquered a city state costal city and it doesn't have a dock. I'll keep testing to see if this was a fluke.

Edit: Confirmed in IGE, no docks for any city state.
 
Last edited:
I conquered a city state costal city and it doesn't have a dock. I'll keep testing to see if this was a fluke.

Edit: Confirmed in IGE, no docks for any city state.

Good find, thanks! It seems there's something blocking city-state settlers from having any additional buildings, this could be buried deep in the code. So for now I'm uploading a workaround, v2 allows the coastal city-states to build Docks. In the rare case that they haven't built it themselves, you can build it in captured city-states. It still takes a turn, but it has 0 production cost so you can overflow all your production to the next item. Sadly this may not be save-game compatible.

edit: Yep, the DLL blocks that. Since city-states build the dock in their first turn in my testing, I don't think there's any need to fiddle with the DLL.
 
Last edited:
I've only used SupplyLower.sql, please check out my findings here. amazing mod, def works, performace boost is massive, however maybe changes too massive?

https://forums.civfanatics.com/threads/pineappledan-tweaks-for-vp.668932/page-14#post-16202378

Hi, thanks a lot for the feedback! Nice to see that this also improves the performance. I'm considering upping things from 0.4 to 0.5 (rounded), that probably still be a bit massive though. I'm still a low-level player (just went up to King, yay me) so it isn't surprising to see this performing poorly on Deity. I suspected there was something weird with how protection pledges/diplomacy interact with the supply cap, I'll take a deep look into that following your feedback. In the meantime, maybe you can try settings like 0.6 for buildings and 0.8 wonders, and see how they affect the gameplay.
 
Last edited:
Note that the promotion mod makes that melee ships can never see submarines (unless they attack of course).
 
Hm I tried now, Subs get revealed if you're adjacent to them. Are they always visible to Destroyers in base VP, I can't remember.

edit: Oh got it, there's a See Submarines prom, Promotion Tree didn't show that for reason and Submarine unit description is outdated it seems. So yeah, promotion submod also disables See Subs prom. I could give that to Destroyers&Miss.Cruisers by default, but that would probably be OP, I need to think a bit more about this.
 
Last edited:
Lake Cities Don't Produce (Melee) Navy:
Prevents lake cities from producing naval units. By default, it blocks all naval units (including workboats&cargo), but can be easily customized to disallow just melee&submarines (or any combat class you like), instructions are in Buildings.sql. It works by creating a new Dock building which is granted to all coastal cities upon founding. Naval units are locked behind the Dock, hence lake cities cannot produce them. I've only tested this with IGE so far, but it's pretty basic and unlikely to break anything, still do not add this to ongoing games.

Does this actually work? Because I have a dock built in my one-lake city and obviously it is considered coastal because I can build there lighthouse too(and naval units). As far as I know last few versions of Vox Populi consider all lake cities coastal. But I am using also other mods - "Better Lakes for Vox Populi (v 2.1)" and "More Wonders..", maybe one of them conflict with this mod.
 

Attachments

  • Lake city.jpg
    Lake city.jpg
    795.2 KB · Views: 61
It does work now, thank you. And I can still build lighthouse in lake cities which is probably a good thing. However Dock is only built when city is founded and circumstances can change during gameplay. For example if canal is built (fort or citadel) that connects city to an ocean or some crazy event occurs like draught or earthquake that would destroy dock building. It might be useful for player or AI to be able to built it manually if it is somehow accidentaly destroyed or if game can recognize that city has been connected to an ocean. I read in changelogs recently that there has been added som logic for AIs to build cannals too.
 
I'll probably have two versions then, no need to delete the old one since it's mostly done (I think I'll go over AA&Bombers though).

I would commit to the version you like best, maintaining two versions is just a pain in the butt. Its your modmod, do what you want!
 
Updated SWVP! Added some new options and fixed the melee/gun infantry UI issue. Also improved folder structure, so by default you get the LowerSupply option without needing to delete anything.

Changes:
Supply:
- Updated Formations so that AI needs less units to form an army group
- LowerSupply no longer equalizes lategame buildings' supply bonuses, but that can be enabled in LowerSupply/LateGame.sql
- Option to change flat supply bonuses from Barracks/Lighthouse lines to SupplyPerPop (LowerSupply/NoFlatSupply.sql)

Promotions:
- Replaced Skirmisher OutsideFriendlyLands bonus with vs. HealthBelow50
- Replaced Archer FriendlyLands bonus with vs. HealthAbove50. While I don't like how this imposes a certain attack order (not AI friendly), the old version just didn't make sense.

- New options file (PromotionOptions.sql) allows you to:
- Revert Archer&Skirmisher changes back to original.
- Enable all or some of Stalker's suggestions
- Increase promotion ranks to 8 (works but not balanced, also misses unique icons)
Check the main post for further details.

There's one thing to note though, in the earlier (pre 1.4) versions of VP the AI didn't manage its supply cap well, and this behavior was more pronounced at smaller supply cap (i.e. SWVP). VP 1.4 comes with a lot of fixes regarding this, so hopefully AI should do a lot better.

edit: Also updated NavalSupply mod, Great Admirals now provide Sailors instead of increasing the supply cap. Thanks to Flamingcheesepie for the idea!

It does work now, thank you. And I can still build lighthouse in lake cities which is probably a good thing. However Dock is only built when city is founded and circumstances can change during gameplay. For example if canal is built (fort or citadel) that connects city to an ocean or some crazy event occurs like draught or earthquake that would destroy dock building. It might be useful for player or AI to be able to built it manually if it is somehow accidentaly destroyed or if game can recognize that city has been connected to an ocean. I read in changelogs recently that there has been added som logic for AIs to build cannals too.

I can think of a way to do that but sadly it'd be very inefficient.
 
Last edited:
Top Bottom