Okay so what I did was working from stolenrays atomic bomb modcomp (see clanky4's link above). You basically want to merge everything from in there:
- copy all the unit art and art defines XML
- copy the unit XML or make up your own if you want. The important part is for the animation to work, bSuicide needs to be 0 and iAirCombat needs to be any non-zero value (-1 unless you also want the unit to do air combat).
- copy the two new effect entries in CIV4EffectInfos.xml (EFFECT_JETFIGHTER_NUKE and EFFECT_JETFIGHTER_NUKE_EXPLODE) or if your mod does not otherwise add its own effects so far, outright copy the entire file.
- merge in the DLL changes included in the CvUnit.cpp file (search for "Dale" to find them). The crucial part here is what comes after the "// nuke entity mission" comment, i.e. the special case for a unit with non-zero air combat strength. You can merge in the others too if you want.
Against my initial assumptions, this only works if you recompile the DLL with these changes. I assume the animations are tied to the bombard air mission for the nuclear bomber unit art, so you need to change the code so that mission is triggered when you order a nuke strike.
I didn't need to do anything else with these effects, I guess they are already referenced by the unit animations in some arcane way. The trick was to trigger the correct mission they are associated with.
- copy all the unit art and art defines XML
- copy the unit XML or make up your own if you want. The important part is for the animation to work, bSuicide needs to be 0 and iAirCombat needs to be any non-zero value (-1 unless you also want the unit to do air combat).
- copy the two new effect entries in CIV4EffectInfos.xml (EFFECT_JETFIGHTER_NUKE and EFFECT_JETFIGHTER_NUKE_EXPLODE) or if your mod does not otherwise add its own effects so far, outright copy the entire file.
- merge in the DLL changes included in the CvUnit.cpp file (search for "Dale" to find them). The crucial part here is what comes after the "// nuke entity mission" comment, i.e. the special case for a unit with non-zero air combat strength. You can merge in the others too if you want.
Against my initial assumptions, this only works if you recompile the DLL with these changes. I assume the animations are tied to the bombard air mission for the nuclear bomber unit art, so you need to change the code so that mission is triggered when you order a nuke strike.
I didn't need to do anything else with these effects, I guess they are already referenced by the unit animations in some arcane way. The trick was to trigger the correct mission they are associated with.