Author Topic: Leveling Up Spawned Creatures  (Read 519 times)

Legacy_Argentor

  • Newbie
  • *
  • Posts: 18
  • Karma: +0/-0
Leveling Up Spawned Creatures
« on: October 10, 2010, 12:52:15 pm »


               Hi,
  I'm trying to understand how to use LevelUpHenchman on a spawned creature.

I understand about the classes/positions, etc. But for almost all spawns the level up failts.
Some generic monsters succeed.

What would cause the level up to fail? And what's the best way to do this?

Almost all my spawns were originally custom creatures already with classes/levels but I want to raise them onspawn.

thanks for any tips.
               
               

               
            

Legacy_FunkySwerve

  • Hero Member
  • *****
  • Posts: 2325
  • Karma: +0/-0
Leveling Up Spawned Creatures
« Reply #1 on: October 10, 2010, 06:43:27 pm »


               You don't want to do this on normal spawns, as LevelUpHenchman is one of the most expensive functions there is, possibly THE most (it's intended for Henchmen, per the name). If you want to scale difficulty by level, the bioware encounter system allows you to put in different CRs and will spawn from them according to player level. Alternatively, you can set up an onspawn script that buffs the creatures according to the level of the pcs, with much less overhead. If you want, I can post the onspawn we use, which is variable-based - though it'd be easy enough to convert it to scale by pc level. The only reason I'm NOT posting it yet is that I'm not directly answering the question you asked.



Funky
               
               

               
            

Legacy_TSMDude

  • Hero Member
  • *****
  • Posts: 1515
  • Karma: +0/-0
Leveling Up Spawned Creatures
« Reply #2 on: October 10, 2010, 10:18:36 pm »


               Another way to do it if I may also not answer your intended question and instead suggest a less overhead way, is to have OnSpawn the creatures get a random HPs and Stat Boost which also makes it more challenging. Beating on a simple goblion with 8 Str and 4 HPs vs a Gobby with 16 Str and 20 HPs does beef it up. Doing this in all your encounters gives the bad guys some even pairing.



Then randomize the weapons or what not they carry and viola...challening AI.



And would love to see yours Funky as I am sure it will allow me to make mine work better so I hope the OP request it.
               
               

               
            

Legacy_Argentor

  • Newbie
  • *
  • Posts: 18
  • Karma: +0/-0
Leveling Up Spawned Creatures
« Reply #3 on: October 10, 2010, 11:10:20 pm »


               We have really powerful servers and the leveluphenchman runs fine performance wise, its just that it fails for most creatures and I'd like to learn why. Even if just to understand the reason.



In my levelup scripts, I can stock the spawn creature with a variety of items of various level and the AI will choose the items appropriate to the creatures spawning level and then drop only those items. it works nice - when it works. But darned if I can't understand why some succeed to level and others fail.



Thanks for the tips guys, though. I'll consider those too!
               
               

               
            

Legacy_Baragg

  • Sr. Member
  • ****
  • Posts: 496
  • Karma: +0/-0
Leveling Up Spawned Creatures
« Reply #4 on: October 11, 2010, 12:03:18 am »


               From the remarks section of the Lexicon for LevelUpHenchman:



Remarks



It is unknown which class is levelled up when a creature is already multiclassed.



In order to level up a henchman (or any NPC, it isn't restricted to henchmen), that NPC must have followed its packages stringently. When you create a creature in the toolset, giving it, say, 5 levels of wizard, it automatically follows it packages. If you then start adding feats manually to it, for instance, you'll no longer be able to use the LevelUpHenchman command successfully on that NPC. As of HotU and patch 1.61, there a level up wizard available in the Toolset.
               
               

               
            

Legacy_Argentor

  • Newbie
  • *
  • Posts: 18
  • Karma: +0/-0
Leveling Up Spawned Creatures
« Reply #5 on: October 11, 2010, 02:14:19 pm »


               I was afraid of that. I thought I could get around it by deselecting "Enforce Legal Characters" on the server, but it didn't help.



I guess I will have to modify LevelUpHenchman and allow illegal level ups for monsters. I know, sounds like heresy, but if they are already illegal with added feats in the toolset, its fine by me.



But what's weird is that even some of the normal default monsters in the toolset e.g. 'Goblin Elite', don't level up successfully. And best as I can tell, they ARE legal.
               
               

               
            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
Leveling Up Spawned Creatures
« Reply #6 on: October 11, 2010, 02:25:39 pm »


               

Argentor wrote...
But what's weird is that even some of the normal default monsters in the toolset e.g. 'Goblin Elite', don't level up successfully. And best as I can tell, they ARE legal.



That is because as Baragg already pointed out they are a custom creature.  Meaning they did not follow the auto level package for a goblin.  In order for the function to work they have to match the package from the auto level wizard for the creature.
               
               

               
            

Legacy_Argentor

  • Newbie
  • *
  • Posts: 18
  • Karma: +0/-0
Leveling Up Spawned Creatures
« Reply #7 on: October 11, 2010, 02:32:58 pm »


               Some of the non-custom creatures don't auto level up either.



In my script, I try to level up each class of their multiclass and I don't specify a package. It says it will use the default package if its not specified though. Which is why I'm confused still.



But like I said, even some of the "non custom" monsters don't auto level up.



Can I get the default package from script and then specify that to LevelUpHench to please it?
               
               

               
            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
Leveling Up Spawned Creatures
« Reply #8 on: October 11, 2010, 04:23:27 pm »


               Ok,  This misunderstanding is comming from the word 'custom' . By custom creature in this case, We are not talking about what palette they are comming off of.  Many if not most of the creatures on the standard palettes where not made strictly by the creature wizard(package system). Being as such custom creatures to the package system, they will not level with the LevelUpHenchman() function.



Can I get the default package from script and then specify that to LevelUpHench to please it?




No, Not if the creature has strayed from that package in any way at all. If they have been given any stat,feat, HP, or anything that was not given to them by the package they will no longer level by the system.
               
               

               
            

Legacy_Mudeye

  • Full Member
  • ***
  • Posts: 238
  • Karma: +0/-0
Leveling Up Spawned Creatures
« Reply #9 on: October 11, 2010, 04:42:21 pm »


               I have had no problem leveling up creatures that have feats and stats that are not given by the LevelUpHenchman().

The limitation is that the LevelUpHenchman function only works right in two cases:
1) The creature is level 1
2) Any levels above level 1 were leveled up using the function LevelUpHenchman


  I believe you can do whatever you want with them so long as you leave them at level 1.  You need to use the LevelUpHenchman function in order to level them up.  So you must design a level 1 creature any way you want, but you can't level it up in the toolset.  Leveling has to be done by a script.  I've used this in a module, but not a multiplayer world. 

So the method is:
Design a level 1 creature any way you want.
Make a trigger near the creature or that creates the creature and it should levele up the creature.

Say your creature was a Tiefling that starts as an Outsider and you want it to be PC level plus 2.   An example OnEnter trigger script that creates the creature and levels up your creature with a Rogue class would be:

void main()
{
    object pc = GetEnteringObject();
    if( GetIsPC( pc ) )
    {
        int hd = GetHitDice(pc);
        object wp = GetWaypointByTag("wpTag");
        location loc = GetLocation(wp);
        object myMonster =
            CreateObject(OBJECT_TYPE_CREATURE, "monsterSref", loc );
        int i;
        for( i=0; i<hd+1; i++ )
        {
            LevelUpHenchman( myMonster, class_TYPE_ROGUE );
        }
    }
}
               
               

               


                     Modifié par Mudeye, 11 octobre 2010 - 03:45 .
                     
                  


            

Legacy_Argentor

  • Newbie
  • *
  • Posts: 18
  • Karma: +0/-0
Leveling Up Spawned Creatures
« Reply #10 on: October 11, 2010, 08:52:48 pm »


               Awesome. Thank you for this. So my final question, is.



Is there any way to de-level a spawned creature down to 1? I thought there was a 'reset' function of sorts, but don't see it anymore.



Without having to go through 100's of palette monsters and change them or create dozens of CR variations of each, I'm trying to achieve the same result the lazy scripting way.



So my monsters are already with levels and I want to "fix" them on spawn and level them the script way.



               
               

               
            

Legacy_Mudeye

  • Full Member
  • ***
  • Posts: 238
  • Karma: +0/-0
Leveling Up Spawned Creatures
« Reply #11 on: October 11, 2010, 10:47:25 pm »


               The palette is like a bunch of templates.  You create the monster from the palette and level it up.  That only levels up the monster you created. It doesn't change the Palette. You could create another one and level it up separately.  I'm not aware of any way to remove levels once the creature has them. But you could still create a new level 1 from the Palette.

I don't know if editing them in the toolset and lowering them back to level 1 would still let you level them up using LevelUpHenchman().
               
               

               


                     Modifié par Mudeye, 11 octobre 2010 - 10:35 .
                     
                  


            

Legacy_Argentor

  • Newbie
  • *
  • Posts: 18
  • Karma: +0/-0
Leveling Up Spawned Creatures
« Reply #12 on: October 12, 2010, 06:17:59 pm »


               Hi Mudeye,

  yeah, the only problem here is that ALL my creatures are custom, modified and already leveled up in the toolset. So I would have to create level 1 versions of all of them.



But what I'm thinking now (and this is because my mod is 500+ areas with 100's of custom creatures) is to spawn the assigned creatured as invisible appearance. Create a real level 1 creature (a generic one from palette I will create) and copy all the items, attributes to the new creature, set its identical appearance as the spawned creature and level that one up, then destroy the original (obsolete) creature.



If I had 200 hours to correct my mod/palette I'd do it "the right way", but I don't. '<img'>
               
               

               
            

Legacy_Mudeye

  • Full Member
  • ***
  • Posts: 238
  • Karma: +0/-0
Leveling Up Spawned Creatures
« Reply #13 on: October 12, 2010, 06:41:32 pm »


               Ok,  that sounds like it could work.  Note what FunkySwerve says above.  If you do that will all of your creatures, you might have a lot of lag.  I've done it with a single creature at a time, like a boss, and don't notice any lag.  If you try to level up everything in an area I don't know what will happen.