Author Topic: Prevent Animal Companion from unsummoning when leveling?  (Read 366 times)

Legacy_Jesse_the_Thief

  • Newbie
  • *
  • Posts: 44
  • Karma: +0/-0
Prevent Animal Companion from unsummoning when leveling?
« on: July 16, 2010, 04:12:33 am »


               I'm working on a module that has an unusal problem: you level quickly every "round" of gameplay, going from level 4 to level 30+ in 1-2 hours. This makes it a pain to use Familiars and Animal Companions because they unsommon every time you level.

Easy enough question: any one know of a way to prevent the unsummoning upon level up without resorting to haks? Or am I SOL on this one?
               
               

               


                     Modifié par Jesse_the_Thief, 16 juillet 2010 - 04:07 .
                     
                  


            

Legacy_SHOVA

  • Hero Member
  • *****
  • Posts: 893
  • Karma: +0/-0
Prevent Animal Companion from unsummoning when leveling?
« Reply #1 on: July 16, 2010, 05:29:27 am »


               Your SOL, because when you level, the current familiar, or animal companion, is replaced with a level higher one. In other words, your pet, whichever type, levels with you. The game handels this by having 20 copies of each pet, each one a level higher than the last, 1-20.
               
               

               
            

Legacy_ChaosInTwilight

  • Full Member
  • ***
  • Posts: 126
  • Karma: +0/-0
Prevent Animal Companion from unsummoning when leveling?
« Reply #2 on: July 16, 2010, 09:06:26 am »


               Can't you do something like....

IncrementRemainingFeatUses(oPlayer, 199);//Companion
IncrementRemainingFeatUses(oPlayer, 303);//Familiar

And just up the uses per day of the relevant feat?  

If that doesn't do it, could try tweeking the spawn script maybe, so the critters are present just long enough to create a duplicate of themselves and add that as a henchmen?

AddHenchman(oPC, CreateObject(OBJECT_TYPE_CREATURE, GetResRef(oSelf), GetLocation(oSelf)));
DestroyObject(oSelf, 3.0f);

               
               

               
            

Legacy_Jesse_the_Thief

  • Newbie
  • *
  • Posts: 44
  • Karma: +0/-0
Prevent Animal Companion from unsummoning when leveling?
« Reply #3 on: July 16, 2010, 01:29:00 pm »


               Hmmm, the first is a good idea but the second is a great one. I'll give #2 a shot first and see how it works, thanks.



SEE PEOPLE? IS IT THAT HARD TO FIX ALL MY PROBLEMS FOR ME?
               
               

               
            

Legacy_Baragg

  • Sr. Member
  • ****
  • Posts: 496
  • Karma: +0/-0
Prevent Animal Companion from unsummoning when leveling?
« Reply #4 on: July 16, 2010, 04:09:22 pm »


               What about just auto-summoning their new familiar/companion after their done leveling?
               
               

               
            

Legacy_ChaosInTwilight

  • Full Member
  • ***
  • Posts: 126
  • Karma: +0/-0
Prevent Animal Companion from unsummoning when leveling?
« Reply #5 on: July 16, 2010, 10:55:44 pm »


               Actually, the first one came in first for a reason..



That way they always get a new one right after leveling.   With the second, you need to make sure its Associate_Type (on spawn) isn't a henchmen.  And then they still keep the old one until they rest/resummon manually anyway.



Which is essentially a long way of saying..  I'd go with Baragg's suggestion. Pretty sure if you look at the Whirlwind attack code, somewhere in there is code to force a PC to use a feat. Can reincrement and it do that, I think.   Note sure if the summoning exists in spells.2da or not.  



I'm afraid I must turn over my cookie to Baragg..            Sorry B man, your SOL, I ate it already.  It was a Micro-chocolate-ship though, so you probably wouldn't have liked it anyway.
               
               

               
            

Legacy_Jesse_the_Thief

  • Newbie
  • *
  • Posts: 44
  • Karma: +0/-0
Prevent Animal Companion from unsummoning when leveling?
« Reply #6 on: July 16, 2010, 11:39:42 pm »


               Well, the major annoying aspect I'm trying to get around is when you buff up your critter and then bam - level up. This is particularly annoying for Druids who not only have strong animal companions, but some nice animal companion buffing spells. I'm trying to avoid the choice of holding off on your level up or losing your buffed buddy until the next rest. You level every 3-10 minutes in this module, so it's a significant nuisance for Druids.

I want a stronger companion but it's not worth losing a current buffed one when I can't resummon another yet anyway.
               
               

               


                     Modifié par Jesse_the_Thief, 16 juillet 2010 - 10:40 .
                     
                  


            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
Prevent Animal Companion from unsummoning when leveling?
« Reply #7 on: July 17, 2010, 12:25:02 am »


               Here is an off the wall Idea that might not work, even if it does work it will have side effects. 

In the compiaions section of the HB check if the PC has enough XP to level. If he does set the compiaion to not be able to be destroyed.  SetIsDestroyale (False).

In the Ondeath Event check to see if it is a comapinion and reset the destroyable flag to true, so he can die normally if killed.

there may be a problem with the compainion still being removed from the party even if not destroyed.  If there is add a local object of the compainion on the PC at the same time as you set him undestroyable. in the level up event add him back on as a henchmen.

several side effects this could create if it works.

One he could summons another compainion if he levels and the previous one is a henchman.  May be able to take care of this in the onSpawn to check if there is already a Henchman with the same name. 

two: compainions will not be able to be removed normally until the PC takes his level.  

There may be all kind of bugs this could cause.  

Just thought of option two.  
OnSpawn of the compianion make him a henchman.  
Several of the Defaults event scripts would need to be edited with this idea also.  Not sure wich one is more messy. 

 
               
               

               


                     Modifié par Lightfoot8, 16 juillet 2010 - 11:27 .
                     
                  


            

Legacy_Axe_Murderer

  • Full Member
  • ***
  • Posts: 199
  • Karma: +0/-0
Prevent Animal Companion from unsummoning when leveling?
« Reply #8 on: July 19, 2010, 02:21:23 am »


               Making it non-destroyable won't work for familiars and companions because each time you level you get a whole new blueprint with new abilities etc.

I'd suggest a buff-your-pet widget that quickly rebuffs them after a level up. Maybe use one of the new instant player feats. Then just put:

[dascript]SummonFamiliar( GetPCLevellingUp() );
SummonAnimalCompanion( GetPCLevellingUp() );
[/dascript]

into your OnPlayerLevelUp script.
When they level it auto re-summons their familiar/companion then they can use the widget or instant feat to buff it back up. Or you can put the re-buffing code directly in the OnPlayerLevelUp script and forget the widget. Sounds like your players could use a quick buffing tool tho at that speed.
               
               

               


                     Modifié par Axe_Murderer, 19 juillet 2010 - 01:27 .