harIII Posted January 25, 2010 Share Posted January 25, 2010 I need a script to find what level an NPC is, would anybody know of something that would work? Link to comment Share on other sites More sharing options...
moda Posted January 25, 2010 Share Posted January 25, 2010 getlevelcreature command should be able to find the level of whoever it is used on Link to comment Share on other sites More sharing options...
harIII Posted January 25, 2010 Author Share Posted January 25, 2010 Could I see some actual syntax, I can script all day long but only so long as I have a template to work with Link to comment Share on other sites More sharing options...
Star Admiral Posted January 25, 2010 Share Posted January 25, 2010 Not too sure about the GetLevelCreature command. moda, could you tell me where you saw that? It isn't an in-game function. harIII, you can use the GetHitDice() function. Something simple like this: void main() { object oTarget = GetFirstPC(); int nLevel = GetHitDice( oTarget ); // Do stuff... } - Star Admiral Link to comment Share on other sites More sharing options...
harIII Posted January 25, 2010 Author Share Posted January 25, 2010 Does the "GetHitDice()" make a randomly generated number? Link to comment Share on other sites More sharing options...
moda Posted January 25, 2010 Share Posted January 25, 2010 its what force powers such as Force storm use to set the levelcap to prevent the power from becoming one hit kill on everything when you go beyond level 10. so i would assume that every level adds 1 to your hit dice which is then used as part of damage calculation or some such operation. oh there is no getcreaturelevel, i must have misread setcreatureailevel sorry about that Link to comment Share on other sites More sharing options...
Darth_Rurik Posted January 25, 2010 Share Posted January 25, 2010 Hit dice is actually a remnant from the D20 system that both Knights of the Old Republic and Dungeons and Dragons based games, like Neverwinter Nights, which of course shares the same basic game engine, use. When a character is created in D&D you're assigned a certain type of die based on your class, for instance a four sided die for wizards, and a ten sided die for barbarians. These dice will determine your character's base hit points, which of course increase with constitution bonuses and levels, at first level you get the full possible amount, then at each level up you roll the dice to determine how many more hit points you earn. That's where the term hit dice comes from, and why it's basically another way of saying level, because a level one creature would only have one hit die worth of HP, while a level ten creature would have ten. Link to comment Share on other sites More sharing options...
harIII Posted January 25, 2010 Author Share Posted January 25, 2010 Ok, got it chief, I'll see if this does the trick. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.