Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Dark Dreams of Furiae - a new module for NWN:EE! Buy now
Attention, new and old users! Please read the new rules of conduct for the forums, and we hope you enjoy your stay!

Making individual creatures immune to on-hit slay

Looking for advice on how to make an individual creature immune to on-hit slay.... is this an option in the toolset or does it need to be done via scripting?? I know there is a fortitude save but no matter how high a *1* still works... so how do i make it immune to on-hit slay period??

thanks

Comments

  • CalgacusCalgacus Member Posts: 228
    edited February 2019
    Did you try adding to the creature's hide (in inventory, of not there "Edit Copy" the "Empty Creature Skin" and add it to the creature ) Immunity-Miscellaneous-Death Magic?
    If that doesn't work (the wiki says it won't, weird) could you try to replace the on-hit property with something else - maybe On Hit-Cast Spell-Unique Power and then script it?

    Post edited by Calgacus on
  • jpsweeney94jpsweeney94 Member Posts: 83
    AFAIK slay is exempt from "immunity to death magic" as it doesn't count as death magic. The creature in question is already immune to death magic.

    do you mean replace on-hit slay on the item in question? if so id like to avoid that... To be clear the item is dragon slaying arrows with on-hit slay for dragons... id only like 2 dragons to be immune to the on-hit slay, the other dragons id like to be 'slay-able"

  • CalgacusCalgacus Member Posts: 228
    Could you mark the two dragons as plot until some scripted event removes the plot flag?

  • ShadowMShadowM Member Posts: 533
    Just make the dragon that you do not want to be one-shoted another race and just give it the dragon appearance and all the abilities of a dragon. The pc cannot see it actual race. Just a thought.

  • ShadooowShadooow Member Posts: 348
    you can use this: https://neverwintervault.org/project/nwn1/script/shadooows-devastating-critical-immunity

    obviously it has some drawbacks such as making that dragon to be immune to all disable effects and devastating critical as well, but if that should be a real boss it might not be such a big deal

  • DerpCityDerpCity Member, Moderator Posts: 288
    edited February 2019
    @ShadowM The PC may not notice the creature's actual race, but if they're playing a ranger they would probably notice their Favored Enemy isn't working as it should, or their sword with extra damage against dragons isn't doing extra damage to the dragon. If I should have a +9 damage bonus against dragons, especially if its of a damage type that isn't physical, it wouldn't take much effort to notice that my damage output is much lower than it was against every other dragon, and I'd certainly feel cheated if I was playing the module.

    As for the question, one way way to solve this would be to replace On Hit: Slay Racial Type with On Hit Cast Spell: Unique Power, and scripting it so that it mimics On Hit Slay Racial Type while excluding the people you want immune. I've written a script for it below, which worked in my testing. To use it, you'll need to put a script in your module that is named what your item's tag is and make sure that Tag Based Scripting is enabled in your module.

    EDIT: It occurs to me that On Hit Slay Racial Type doesn't have a random chance to activate associated with it, but it should be easy enough to make it 100% chance to activate either by setting the value of nChance to 0 or by simply removing the check for nChance entirely.
    //Mimics On Hit Slay Racial Type
    
    void main()
    {
        object oItem = GetSpellCastItem();
        object oPC = GetItemPossessor(oItem);
        object oTarget = GetSpellTargetObject();
     
        //Change random size for increased or decreased chances. Default is 4, or 25% chance.
        int nChance = Random(4);
    
        if (nChance == 0)
        {
            //Change RACIAL_TYPE_DRAGON to whatever race you wish to be at risk of death.
            //Replace "dc_draco" and "dc_bob" with the tag of the creature you want to be immune.
            //If you wish for more creatures to be immune, add additional && statements.
            if ((GetRacialType(oTarget) == RACIAL_TYPE_DRAGON) && (GetTag(oTarget) != "dc_draco") && (GetTag(oTarget) != "dc_bob"))
            {
                //Change nDC to whatever value you want, I guess.
                int nDC = 14;
    
                //Change SAVING_THROW_TYPE_NONE to SAVING_THROW_TYPE_DEATH if you want immunity to Death Magic to protect the target from death.
                int nFort = FortitudeSave(oTarget, nDC, SAVING_THROW_TYPE_NONE, oPC);
    
                if (nFort == 0)
                {
                    effect eDeath = EffectDeath();
    
                    ApplyEffectToObject(DURATION_TYPE_INSTANT, eDeath, oTarget);
                }
            }
        }
    }
    

    Post edited by DerpCity on
    ShadowM
  • ShadowMShadowM Member Posts: 533
    You right, but if I saved my game to fight the dragon that cannot be on-hit slayed with the one shot weapon and I find out that by constantly reloading that my one-shot dragon killing item that I work hard for does not work, I'd certainly feel cheated also. I would at least add in some roleplaying element to explain why x creature cannot be kill with the on-hit slayed item, like it just looks like a dragon or the gods or an item gave it this immunity and also would add some way for the pc to find out about this so they know going in to the fight that particular item will not work and they have to kill it the old fashion way.

    DerpCity
Sign In or Register to comment.