Making units not able to launch amphibious attacks

MatteM

Prince
Joined
Sep 7, 2015
Messages
319
Location
Stockholm
Hello!

So I'm making a mod with lots of UUs, as I understand it all land-units can attack other land units from transports? Where in the xml-files do I edit out that ability from certain units if possible? As I understand it there are severe penalties if you don't have the amphibious promotion, but I want to remove the ability altogether for unit types that shouldn't have it.
 
Oh no, thanks for clearing that out, any mods that deal with this? One workaround would be to make the amphibious promotion only available to a certain combat type, like "amphibious units", at least that would discourage ceartain situations. Is it possible to bombard with cannons and artillery from directly from transports? That would be pretty silly.

The mod I'm making is a beefed up (i.e. content-rich) version of the RevolutionDCM modcomp.
 
What you could do would be to make an amphibious attack prohibitively expensive. You can set the penalty for amphib attacks in GlobalDefinesAlt.xml. The default value is set in GlobalDefines as -50 but you could change this to be something like -200 and then have the amphib promotion be increased to 200 (or whatever you want to balance it out. The entry in GlobalDefinesAlt.xml should be in the form:

HTML:
<Define>
	<DefineName>AMPHIB_ATTACK_MODIFIER</DefineName>
	<iDefineIntVal>-50</iDefineIntVal>
</Define>

If you change the value to be a sufficiently large negative number the AI will think that it is not worth the effort. That it not the same as not being able to make an amphib attack as a Marine vs a Warrrior will still happen, but it gives you something in that direction without touching the dll.
 
Back
Top Bottom