Ghosts and possession...
#1
Posté 15 mai 2013 - 05:18
Since I'm using the SoZ party system, the player will have 3-4 party members, and I'd love a way for ghosts to posess the players party members forcing the player to deal with the posession before they can destroy the ghost.
Are there any NWN2 scripts out there that handle this sort of behavior? I don't see anything on the vault except for NWN scripts and I'm not sure if they will translate.
#2
Posté 15 mai 2013 - 07:15
#3
Posté 15 mai 2013 - 07:52
#4
Posté 15 mai 2013 - 08:22
#5
Posté 15 mai 2013 - 10:48
As well as their random violent outbursts, you could apply some sort of penalty for the duration of the possession (whether or not the spirit is in control). Their constant internal battle might reduce certain skills, such as concentration, or anything that requires dexterity (tumble, trap setting, rogue skills, etc). Random Tourette-like outbursts might also force a character out of certain combat modes (especially stealth).
#6
Posté 16 mai 2013 - 08:01
#7
Posté 16 mai 2013 - 08:03
#8
Posté 16 mai 2013 - 08:14
#include "a_include_mor"
#include "a_inc_lycanthrope"
void main()
{
//SendMessageToPC(GetFirstPC(FALSE), "Active Cycling");
object oSelf = GetAreaOfEffectCreator();
location lSelf = GetLocation(oSelf);
SetGlobalInt("is_poly", TRUE);
if(GetIsDone(oSelf, "act_buff") == FALSE)
{
SkillBuff(oSelf, 5);
Regeneration(oSelf, 4, RoundsToSeconds(3));
effect eDamIncr = VersusRacialTypeEffect(EffectDamageIncrease(d8(), DAMAGE_TYPE_PIERCING, 1), RACIAL_TYPE_UNDEAD);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDamIncr, oSelf, RoundsToSeconds(50));
ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectDetectUndead(), oSelf);
SetIsDone(oSelf, "act_buff", TRUE);
}
int nMurder = GetGlobalInt("murder");
int nWis = GetAbilityModifier(ABILITY_WISDOM, oSelf);
int nDC = (16 + nMurder) - nWis;
int nCur = GetCurrentHitPoints(oSelf);
int nMax = GetMaxHitPoints(oSelf);
object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_ASTRONOMIC, lSelf, TRUE, OBJECT_TYPE_CREATURE);
while(GetIsObjectValid(oTarget))
{
if(oTarget == oSelf)
{
//SendMessageToPC(GetFirstPC(FALSE), "Skip oSelf");
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_ASTRONOMIC, lSelf, TRUE, OBJECT_TYPE_CREATURE);
}
//SendMessageToPC(GetFirstPC(FALSE), "Is Valid");
if(GetIsInCombat(oSelf) == TRUE)
{
//SendMessageToPC(GetFirstPC(FALSE), "In Combat");
if(GetIsEnemy(oTarget, oSelf))
{
//SendMessageToPC(GetFirstPC(FALSE), "Is Enemy");
if(IsVampire(oTarget))
{
//SendMessageToPC(GetFirstPC(FALSE), "Is Vampire");
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectModifyAttacks(2), oSelf, RoundsToSeconds(d6()));
if(GetPlayerCurrentTarget(oSelf) == oTarget && IsVampire(oTarget) == TRUE)
{
if(GetIsDone(oTarget, "sMax") == FALSE)
{
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectMaxDamage(), oTarget, RoundsToSeconds(d4()));
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectMaxDamage(), oSelf, RoundsToSeconds(d4()));
SetIsDone(oTarget, "sMax");
}
}//effect max dam
}//vampire
if(IsUsingSilver(oTarget))
{
//SendMessageToPC(GetFirstPC(FALSE), "IsUsingSilver");
if(GetGlobalInt("is_poly") == TRUE && GetLastDamager(oSelf) == oTarget)
{
if(GetIsDone(oTarget, "sApplyConfuse") == FALSE)
{
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectConfused(), oSelf, RoundsToSeconds(d4()));
//SendMessageToPC(GetFirstPC(FALSE), "Confusion Applied");
SetIsDone(oTarget, "sApplyConfuse");
}
if(GetAttemptedAttackTarget() == oSelf && IsUsingSilver(oTarget) && GetIsDone(oTarget, "sMax") == FALSE)
{
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectMaxDamage(), oTarget, RoundsToSeconds(d4()));
SetIsDone(oTarget, "sMax", TRUE);
}
}
}//IsSilver
}//IsEnemy
}//InCombat
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_ASTRONOMIC, lSelf, TRUE, OBJECT_TYPE_CREATURE);
}//while
if(GetIsInCombat(oSelf) == FALSE)
{
//SendMessageToPC(GetFirstPC(FALSE), "Non-Combat");
RevertEffects(oSelf);
SkillBuff(oSelf, 5);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectDetectUndead(), oSelf);
Regeneration(oSelf, 3, RoundsToSeconds(2));
if(GetGlobalInt("murder") > 21)
{
if(GetIsDone(oSelf, "sRecord_Act") == FALSE)
{
FeatAdd(oSelf, Feat_Lycanthrope, TRUE, TRUE, TRUE);
nMurder = GetGlobalInt("murder");
//SendMessageToPC(GetFirstPC(FALSE), "Act_nMurder = " + IntToString(nMurder));
FeatRemove(oSelf, Feat_Lycanthropy_Act);
SetIsDone(oSelf, "sRecord_Act");
TransformRestore(oSelf);
SetGlobalInt("is_poly", FALSE);
SetGlobalInt("murder", 0);
}
}//New Murder
}//combat false
//SendMessageToPC(GetFirstPC(FALSE), "Final_Act_nMurder = " + IntToString(nMurder));
}//main
#9
Posté 16 mai 2013 - 08:21
#10
Posté 16 mai 2013 - 04:54
True ghostly posession has the ghost entering the body and you no longer have a ghost to target and must get the ghost out of the host body to kill it. That is the delema I want to introduce.
Such a fight happened in NWN with the Intelect Devourer taking control of thralls that you then had to target and kill. Killing your own party members is pretty evil...but I guess I'm a jerk.
I of course have no idea how to script such a thing.
#11
Posté 16 mai 2013 - 06:01
Mokah wrote...
If I were to use domination, all the player would have to do is kill the ghost and the domination would end.
set the ghost scripthidden until the domination ends
#12
Posté 17 mai 2013 - 01:04
MokahTGS wrote...
I of course have no idea how to script such a thing.
#13
Posté 17 mai 2013 - 02:47
It doesn't have to be Domination per se; in fact so far i can't think of a good way to remove this .... short of, uh, enDEADment.
Actually a good dispell or rest could do it ... but that can be prevented ( or not ),
try it out, i used a wraith
#14
Posté 17 mai 2013 - 03:23
#15
Posté 17 mai 2013 - 06:51
no - really -
I would like to emphasise that adding and removing a feat is MUCH cleaner - and portable as well: within the game world that is
Modifié par Morbane, 17 mai 2013 - 06:53 .
#16
Posté 17 mai 2013 - 11:37
I feel it still needs an extra safety though; I mean, this is so friggin gamebreaking if something goes wrong. ( like, during the 0.2 sec delay before ScriptHidden engages, although that could be reversed: scripthidden first, then Possess. But scripthidden itself isn't exactly invulnerability... ) Something like a heartbeat on the area/module that's ( also? ) doing checks for IsValid.
i wouldna want to adulterate 'nw_g0_dominate'
Morbane, why add line to Feat.2da when you'd just have to run a script like this to call an additional 'feat' script? The AI isn't going to up & doFeat just because it's in the .2da
#17
Posté 17 mai 2013 - 08:49
-or i just like modding 2das
Modifié par Morbane, 17 mai 2013 - 08:50 .
#18
Posté 17 mai 2013 - 08:59
(neglecting the passive/active difference atm)
#19
Posté 17 mai 2013 - 11:10
#20
Posté 17 mai 2013 - 11:16
Normally you'd need to do something to break the posession. But exactly what would normally be story based, do you pour holy water on them, recruit a priest to exorcise them? Maybe some of the planar banishment type spells would work?MokahTGS wrote...
So what are the players options when a party member gets possessed? If they kill the party member, what happens? Are there other options that would end the possession?
#21
Posté 18 mai 2013 - 12:15
You could also come up with a custom Exorcism ritual, perhaps on a scroll or tome. Or you could hold them underwater until they drown and the possessor has to come out. The possibilities are as boundless as your sadistic streak allows.
Modifié par I_Raps, 18 mai 2013 - 12:19 .
#22
Posté 18 mai 2013 - 12:25
#23
Posté 18 mai 2013 - 01:24
I'm not really looking for a total rewrite of how things work...this is just one monster after all...
Modifié par MokahTGS, 18 mai 2013 - 01:24 .
#24
Posté 18 mai 2013 - 01:29
Dispel Magic, Greater DM, Remove Curse, Song of Freedom, Dismissal, Banishment, Greater Restoration, Word of Faith - all could logically work, though none of them explicitly cover ghostly possession in their descriptions. Maybe even Turn Undead.
******************************
* I should say "should not be affected." If all you're doing is adding a standard effect, then those spells may very well work without further ado.
Modifié par I_Raps, 18 mai 2013 - 01:38 .
#25
Posté 18 mai 2013 - 02:16
dispel magic looks like it won't work (unless it's among the group), death/respawn should work but haven't tried the default scripts, and resting did work for me ( but i wasn't using defaults, so test test ).
You could even run a script from a conversation ...
... any event that runs a script: onAttacked, onDeath, onSpellCastAt, onEnterArea, onExitArea, etc. although some are more problematic than others,
I suspect that either using a tag-based item or from a conversation is easiest -- the onEvent slots of the possessed character would seem to require mucking with EventHandlers and possibly setting the character as player-unpossessable. Although as a game device i'd prefer the onSpellCastAt mechanic,
but Consider a player going solo: deep dada
EDIT:
here's a thought: give the character a chance per rnd. to expell the ghost based on Wis.
Modifié par kevL, 18 mai 2013 - 02:26 .





Retour en haut






