View Full Version : Modding Question on Nukes


mechaerik
Oct 04, 2009, 11:37 AM
Is there a way to make it so that a unit can only nuke itself?


I'm making a plan to make a nuke which can move around and nuke itself and the surrounding area.

The_J
Oct 04, 2009, 11:43 AM
Weird idea :D.

Mmhhh, the immobility is done through DOMAIN_IMMOBILE -> change it to DOMAIN_LAND, and the nuke will be able to move.
The range is done via iAirRange, which is 4 for the tactital nuke, and 0 for the ICBM -> 0 = endless range, so there's no way to make it not be able to attack another plot.
I also guess, that even if this would work, you couldn't attack the plot with the nuke itself, because the normal game rules prevent nuking a plot with an allied unit.

TC01
Oct 04, 2009, 12:08 PM
I have an idea... you could make a mission/action button that did the effects of the nuke around the unit when you clicked it. So you'd have to find the exact code for what the nuke does and replicate it when you define the mission/action button's effect.

Or is there something wrong with this?

mechaerik
Oct 04, 2009, 12:08 PM
Weird idea :D.

Mmhhh, the immobility is done through DOMAIN_IMMOBILE -> change it to DOMAIN_LAND, and the nuke will be able to move.


I am aware of this.

The range is done via iAirRange, which is 4 for the tactital nuke, and 0 for the ICBM -> 0 = endless range, so there's no way to make it not be able to attack another plot.

Well that's a problem.

I also guess, that even if this would work, you couldn't attack the plot with the nuke itself, because the normal game rules prevent nuking a plot with an allied unit.

I know that Sevo made a modcomp that lets units nuke anywhere, but that was a while ago... and on vanilla.