Check the companion level via script?

Lexx

Testament to the ghoul lifespan
Moderator
Modder
Yeah, as the title says- I feel a little bit dumb right now. What's the most convenient way to check the current level of a party member? I'll have to add some script checks based on that, but somehow I don't know where to start.

Are party members switching their protos right on levelup? If so, I probably could just check the current proto and be done with it. No idea if they *really* level up or if they just switch the proto (as soon as the levelup text floater appears?)... if they gain a real level, I might as well just check their current level?
 
NPCs don't switch their photos on leveling up. The game copys data from their leveled protos and saves the altered photo data in the save game folders.
You can check NPC level with "get_npc_level" function. It should be noted that it takes NPC names from scrname.msg, not critter pointers, as the parameter.
I posted a simple cheating script in sfall thread two years ago to demonstrate get/inc_npc_level functions.
 
Awesome. That's exactly what I was looking for. Thanks.
 
Back
Top