Aller au contenu

Photo

Force dismiss familiars, animal companions, etc.


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

#1
Tchos

Tchos
  • Members
  • 5 072 messages

I have a non-combat area where I can't have any summoned creatures like familiars and animal companions.  I can't seem to find scripts or commands that unsummon/dismiss such creatures.  Any ideas?



#2
kevL

kevL
  • Members
  • 4 070 messages

have a look at the spellscripts for Banishment ( x0_s0_banishment ) and Dismissal ( nw_s0_dismissal )

EffectDeath() is the operation, but there appear to be some niceties surrounding it.



#3
Tchos

Tchos
  • Members
  • 5 072 messages

I thought there would be something ready-made for that situation, but the dismissal approach seems to be what I want, since I note this in the script:

if(GetAssociate(ASSOCIATE_TYPE_SUMMONED, oMaster) == oTarget ||
   GetAssociate(ASSOCIATE_TYPE_FAMILIAR, oMaster) == oTarget ||
   GetAssociate(ASSOCIATE_TYPE_ANIMALCOMPANION, oMaster) == oTarget ||
   GetRacialType(oTarget) == RACIAL_TYPE_OUTSIDER)
{

I'd just remove the outsider bit, and that seems to handle everything I'd want to dismiss.  I didn't know that it just kills the companions/familiars.  I hope that won't cause penalties for the wizard who has her/his familiar dismissed.



#4
kevL

kevL
  • Members
  • 4 070 messages

is there a d6 hitpoint loss? you could get the owner's hp before the familiar dies, then run a delayed function that gives back lost hp



#5
Tchos

Tchos
  • Members
  • 5 072 messages

According to the wiki, it's a temporary -2 CON penalty for 8 hours, and if you haven't rested since the last summoning, you'll have to rest again to get it back.  Pretty nasty for something that wouldn't even be their own fault in this case.



#6
Dann-J

Dann-J
  • Members
  • 3 161 messages

Who bothers to summon familiars anyway? :)



#7
kevL

kevL
  • Members
  • 4 070 messages

i agree : unless a familiar picks locks better than the Rogue,


butyouknow, all types & all that ....

T: have a look in 'gb_assoc_death' (tonyK's AI) and/or other deathscripts. Mine has d6() damage but its been commented out, perhaps by me /idk.

I just blew away a familiar a couple of times using EffectDeath() and there was no noticed effect on my PC. So it's not hardcoded .. been H'd.

which means whatever penalty that may be applied can be undone, and am pretty sure one or both of these functions can take care of the Feat use:

// Increment the remaining uses per day for this creature by one.
// Total number of feats per day can not exceed the maximum.
// - oCreature: creature to modify
// - nFeat: constant FEAT_*
void IncrementRemainingFeatUses(object oCreature, int nFeat);

// Description: This will reset the cooldown time and/or the uses per day
//              of the given feat. Use FEAT_INVALID to reset all.
///////////////////////////////////////////////////////////////////////////////
void ResetFeatUses( object oCreature, int nFeatID, int bResetDailyUses, int bResetLastUseTime );


#8
Tchos

Tchos
  • Members
  • 5 072 messages

I think the homunculus from MotB is the only familiar in NWN2 that can pick locks.  Baldur's Gate familiars, on the other hand...

 

Anyway, I'll do some experimenting myself and see about dealing with those penalties (if any), after I get them to disappear.  :)



#9
kevL

kevL
  • Members
  • 4 070 messages

/cheers