Is there any way to make a city be captured when the Harbor is invaded by a naval unit?

Mettpawwz

Chieftain
Joined
Feb 4, 2017
Messages
73
I want to make Naval Melee units stronger (and inland cities with a harbor less safe) by granting harbors HP and a ranged attack (similar to the encampment) but making it so that if they are captured the city is taken.

Does anyone know if this could be done without LUA? And failing that, could someone give me some pointers as to how I might do this with LUA? I'm struggling to find any LUA modding resources for Civ 6 :(
 
Unless CityCenter flag could do the trick, I don't think you can do it without Lua.
With Lua you have to detect the fact of moving a naval unit into a Harbor (Events.UnitMoved). Once it's there you probably would need some additional checks, depending on how you actually imagine ths capture would look like. And if the conditions are met then you have to destroy the city, districts and buildings and recreate it for the new owner, as there's no "capture" or "change owner" function in Lua (yet).
Another idea, maybe even easier: once you detect "capture" situation, Lua code could damage CityCenter till 0 HP, create a military unit and move it into the center thus simulating a real capture.
 
Back
Top Bottom