Fauch
Responsible
Undefeatable Hero
|
posted February 08, 2011 05:59 PM |
|
Edited by Fauch at 18:00, 08 Feb 2011.
|
Modding Chilling bones (Anyone good at scripting?)
the idea is to make Chilling bones give cold immunity to necropolis unit.
of course, I don't think you can modify a creature in game, but there is a trick, it uses both a script and new NCF creatures.
basically, the script looks for necropolis creatures in heroes' armies and replace them by new NCF creatures which are the exact same necro creatures, but with immunity to cold.
new NCF creatures here
here is the script I did, it only works for "Raven" it first checks if you have the perk chilling bones and then proceed to replace creatures. It is triggered at the beginning of each new days.
the only problem is the script ends as soon as it finds nothing to replace.
which means that at best, it will work for the 3 kind of skeletons, the 3 kind of zombies and unupgraded ghosts.
I thought about checking if GetHeroCreatures == 0 or nil but it didn't work at all
Quote: Trigger(NEW_DAY_TRIGGER, "ChillingBones" );
function ChillingBones()
if HasHeroSkill("Effig", 105 )
--skeletons
n900 = GetHeroCreatures("Effig", 29);
RemoveHeroCreatures("Effig", 29, n900 );
AddHeroCreatures("Effig", 900, n900 );
n900 = GetHeroCreatures("Effig", 30);
RemoveHeroCreatures("Effig", 30, n900 );
AddHeroCreatures("Effig", 901, n900 );
n900 = GetHeroCreatures("Effig", 152);
RemoveHeroCreatures("Effig", 152, n900 );
AddHeroCreatures("Effig", 902, n900 );
--zombies
n900 = GetHeroCreatures("Effig", 31);
RemoveHeroCreatures("Effig", 31, n900 );
AddHeroCreatures("Effig", 903, n900 );
n900 = GetHeroCreatures("Effig", 32);
RemoveHeroCreatures("Effig", 32, n900 );
AddHeroCreatures("Effig", 904, n900 );
n900 = GetHeroCreatures("Effig", 153);
RemoveHeroCreatures("Effig", 153, n900 );
AddHeroCreatures("Effig", 905, n900 );
--ghosts
n900 = GetHeroCreatures("Effig", 33);
RemoveHeroCreatures("Effig", 33, n900 );
AddHeroCreatures("Effig", 906, n900 );
n900 = GetHeroCreatures("Effig", 34);
RemoveHeroCreatures("Effig", 34, n900 );
AddHeroCreatures("Effig", 907, n900 );
n900 = GetHeroCreatures("Effig", 154);
RemoveHeroCreatures("Effig", 154, n900 );
AddHeroCreatures("Effig", 908, n900 );
--vampires
n900 = GetHeroCreatures("Effig", 35);
RemoveHeroCreatures("Effig", 35, n900 );
AddHeroCreatures("Effig", 909, n900 );
n900 = GetHeroCreatures("Effig", 36);
RemoveHeroCreatures("Effig", 36, n900 );
AddHeroCreatures("Effig", 910, n900 );
n900 = GetHeroCreatures("Effig", 155);
RemoveHeroCreatures("Effig", 155, n900 );
AddHeroCreatures("Effig", 911, n900 );
--liches
n900 = GetHeroCreatures("Effig", 37);
RemoveHeroCreatures("Effig", 37, n900 );
AddHeroCreatures("Effig", 912, n900 );
n900 = GetHeroCreatures("Effig", 38);
RemoveHeroCreatures("Effig", 38, n900 );
AddHeroCreatures("Effig", 913, n900 );
n900 = GetHeroCreatures("Effig", 156);
RemoveHeroCreatures("Effig", 156, n900 );
AddHeroCreatures("Effig", 914, n900 );
--wraiths
n900 = GetHeroCreatures("Effig", 39);
RemoveHeroCreatures("Effig", 39, n900 );
AddHeroCreatures("Effig", 915, n900 );
n900 = GetHeroCreatures("Effig", 40);
RemoveHeroCreatures("Effig", 40, n900 );
AddHeroCreatures("Effig", 916, n900 );
n900 = GetHeroCreatures("Effig", 157);
RemoveHeroCreatures("Effig", 157, n900 );
AddHeroCreatures("Effig", 917, n900 );
--dragons
n900 = GetHeroCreatures("Effig", 41);
RemoveHeroCreatures("Effig", 41, n900 );
AddHeroCreatures("Effig", 918, n900 );
n900 = GetHeroCreatures("Effig", 42);
RemoveHeroCreatures("Effig", 42, n900 );
AddHeroCreatures("Effig", 919, n900 );
n900 = GetHeroCreatures("Effig", 158);
RemoveHeroCreatures("Effig", 158, n900 );
AddHeroCreatures("Effig", 920, n900 );
end;
end;
of course there should also be another script to remove cold immunity if you give your buffed undead creatures to a hero without cold death.
|
|