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?
Bypass mind-immunity on a sleep spell
Débuté par
psiiijay
, nov. 01 2013 12:01
#1
Posté 01 novembre 2013 - 12:01
#2
Posté 01 novembre 2013 - 12:48
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.
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
Posté 01 novembre 2013 - 03:52
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
Posté 05 novembre 2013 - 10:12
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
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
Posté 11 novembre 2013 - 12:37
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)
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
Posté 11 novembre 2013 - 09:51
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)
}
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
Posté 11 novembre 2013 - 11:31
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?
but for some reason, the creatures fall down and get BACK UP (still sleeping and not attacking)..
why would this happen?
#8
Posté 12 novembre 2013 - 12:20
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.
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.





Retour en haut






