hello,
I would like to summon creatures and be able to possess them like I do with familiars. Is this possible?
hello,
I would like to summon creatures and be able to possess them like I do with familiars. Is this possible?
hm, first thing i'd try is adjusting the spellscript. At the end of the summon routine, add them to the Roster / Party (summons *might* get automatically added to the roster -- they show up in the partybar, right?) If so, just add them to the party like a companion ...
I'd consider the procedure experimental, since it's still just a summon_effect. Things could get finicky when the spell times out. And if it dies, then the module's (entirely separate) event scripts kick in,
- might also want to consider swapping out the creature's event slots' scripts; from NPC to companion scripts.
Or you could re-implement summons from scratch, without using the summon_effect at all .....
/ by hook or by crook, as they say
hm, first thing i'd try is adjusting the spellscript. At the end of the summon routine, add them to the Roster / Party (summons *might* get automatically added to the roster -- they show up in the partybar, right?) If so, just add them to the party like a companion ...
tried this but didn t work. Perhaps I have to give up this time.
ha, gave me a CTD when it died and I respawned in a different area
edit
yeh .. so the problem stems from the onDeath event.
It looks possible to fix, either by attaching a "deathscript" variable to all summoned creature UTC's. Or by altering the stock 'gb_comp_death' script, which is what I'd do rather than try to pull off the fancy footwork required to swap in & out event scripts on-the-fly.
basically, the death of the pet needs to handle removing it from the party & roster.
Modifié par kevL, 14 juillet 2014 - 12:52 .
ok, stopped the CTD with this snippet in 'gb_comp_death' -- near the top, after the early "returns"
//- begin PossessiblePets mod:
if (GetIsPC(OBJECT_SELF))
SetOwnersControlledCompanion(OBJECT_SELF);
string sRoster = GetRosterNameFromObject(OBJECT_SELF);
if (GetStringRight(sRoster, 4) == "_pet")
{
RemoveRosterMemberFromParty(sRoster, GetFactionLeader(OBJECT_SELF));
RemoveRosterMember(sRoster);
SetRosterNPCPartyLimit(GetRosterNPCPartyLimit() - 1);
}
//- end mod.
also fixed some things in the main script. [edit] removed redundant condition [edit2] remove unnecessary loop too.
Modifié par kevL, 14 juillet 2014 - 04:43 .
wow! thanks for the huge efforts. This will come handy!
![]()
yeh ![]()
I figure i'm going to leave it in my project, see how things go and debug it whenever I get into my next big round of NwN2 play.
am glad it sounds like you're going to see what you can do with it too. A couple of things, if it's not too much to get yer head around, is that they can't be dismissed like a normal pet (without quite a bit of a GUI overhaul, that is), and also, if a caster tries to summon another while one is already out, at present, uhhhhh I think the script will just let it happen (!) But that'd lead to massively undefined behavior. Lol
i did some touchups to my custom-Kaedrin summoning script to alleviate this, but it got too complicated to parse out for posting ....
anyway, if you come up with anything interesting Pls post up,
yeah, I cannot dismiss the creature, but I believe I can workaound this using a delayed destroyobject on the creature, when the spell ends.
I tried to summon another creature, when one is present. A yellow message appears in the chat that informs I have already a pet and wasted a spell. Sounds right.
oh, ok