I'm currently making a ghetto mod of the game in which there are multiple types of nuclear weapons (Nuclear bomber, ICBM, and tactical nuke [for shits and giggles]), looked all through the .ruleset scripts and couldn't find where to change the properties of the nuclear explosions, as in to change the radius of the explosion and its effects on cities.
Being temporarily hindered-in-the-brain I probably overlooked where those settings were, thanks in advance.
Editing the Effects of Nuclears
Re: Editing the Effects of Nuclears
Unfortunately Nuclear blast moddability exist in my loooong TODO list only.
- GriffonSpade
- Elite
- Posts: 578
- Joined: Mon Apr 29, 2013 4:41 pm
Re: Editing the Effects of Nuclears
Hmm, a thought, is the SDI defense's thing linked to the nuclear flag? Because really, it should only work on ICBMs, not short range tactical nukes.
Re: Editing the Effects of Nuclears
Afraid it is; and it's not possible to make the Nuke_Proof effect (which is what SDI buildings use) depend on properties of the attacking unit, although that wouldn't be so hard to add. It can only depend on properties of the city that is attacked.
See common/combat.c:sdi_try_defend() and callers.
See common/combat.c:sdi_try_defend() and callers.
Re: Editing the Effects of Nuclears
While looking at sdi_try_defend I noticed something
This code only applies to fixed city radius of 2. Variable city radius is not handled here.
Code: Select all
struct city *sdi_try_defend(const struct player *owner,
const struct tile *ptile)
{
square_iterate(ptile, 2, ptile1) {
struct city *pcity = tile_city(ptile1);
if (pcity
&& !pplayers_allied(city_owner(pcity), owner)
&& fc_rand(100) < get_city_bonus(pcity, EFT_NUKE_PROOF)) {
return pcity;
}
} square_iterate_end;
return NULL;
}