Aller au contenu

Photo

Bypass mind-immunity on a sleep spell


  • Veuillez vous connecter pour répondre
7 réponses à ce sujet

#1
psiiijay

psiiijay
  • Members
  • 258 messages
Is there a script to bypass the natural immunity for sleep (for mind) effects?

Another Q- I changed the target for the shadow simulacrum spell so you could target friends and copy them but for some reason, you can't unsummon the clone ever. So when the duration of the spell ends- The clone just stays there uncontroled. 

Is there a way to fix this?

#2
Dann-J

Dann-J
  • Members
  • 3 161 messages
In the case of elves with immunity to sleep, you'd have to temporarily remove feat 235, apply the spell effects, then add the feat back again after a short delay (less than 1 second should do it).

For equipped items that grant immunity, it's a lot more complicated. You have to loop through all equipped items, identify those that provide immunity, store the original item property, remove it from the item, apply the mind-affecting effects, then add the item property back again. The exhaustion scripts I use in my modules do that for immunity to ability/level drain, in order to apply exhaustion-related effects to players.

Modifié par DannJ, 01 novembre 2013 - 12:52 .


#3
psiiijay

psiiijay
  • Members
  • 258 messages
well I just wanna use it for creatures like dragons and such.. Can your script help me? I'll even be very pleased with just a bypass for natural immunity (like with dragons) without rings and such..

#4
Dann-J

Dann-J
  • Members
  • 3 161 messages
It depends on whether dragons (and such) owe their immunities to feats or hide properties. If the former, then the scripting is a lot easier. If the latter, it gets quite complex.

I based my own script that bypasses immunity to level/ability drain on the response to this thread:
http://social.biowar...4/index/5057514 

Modifié par DannJ, 05 novembre 2013 - 10:13 .


#5
psiiijay

psiiijay
  • Members
  • 258 messages
It's on the hide. So it's suppose to be... easy you said?
Can you post the level drain bypass script here? There is no script in the link (or in the link that is on that thread)

#6
Dann-J

Dann-J
  • Members
  • 3 161 messages
For equipped item properties (like hides), it's harder. Although if you're *only* interested in temporarily removing hide properties, then you can forego the loop that checks all equipment slots.

Here's the function I used in Isle of Shrines to bypass immunity to level/ability drain:

void BypassAbilityDrain(object oPC)
{
object oItem;
itemproperty ipBypass;

int nSlot = NUM_INVENTORY_SLOTS;
while ( nSlot-- > 0 )
{
oItem = GetItemInSlot(nSlot, oPC);
if ( oItem != OBJECT_INVALID )
{
ipBypass = GetFirstItemProperty(oItem);
while ( GetIsItemPropertyValid(ipBypass) )
{
if ( GetItemPropertyType(ipBypass) == ITEM_PROPERTY_IMMUNITY_MISCELLANEOUS &&
GetItemPropertySubType(ipBypass) == IP_CONST_IMMUNITYMISC_LEVEL_ABIL_DRAIN &&
GetItemPropertyDurationType(ipBypass) == DURATION_TYPE_PERMANENT )
{
RemoveItemProperty(oItem, ipBypass);
DelayCommand(0.1, AddItemProperty(DURATION_TYPE_PERMANENT, ipBypass, oItem));
}
// Next item property.
ipBypass = GetNextItemProperty(oItem);
}//while (ipBypass)
}//if (oItem)
}//while (nSlot)
}

#7
psiiijay

psiiijay
  • Members
  • 258 messages
Thanks, I'ts all good now :)
but for some reason, the creatures fall down and get BACK UP (still sleeping and not attacking)..
why would this happen?

#8
Dann-J

Dann-J
  • Members
  • 3 161 messages
I've seen that happen quite a bit with the sleep spells.

It may also be that some creatures don't have the correct idle animation for sleeping, but have the knockdown and stand-up animations. The game developers might not have bothered with sleeping animations for creatures that are immune to sleep, or that have too many hit dice for sleep spells to affect them.