Jump to content

Photo

NPC preset levels question

NPC LEVEL

18 replies to this topic

#1 pancakewizard

pancakewizard
  • Members
  • 22 posts

Posted 14 April 2016 - 01:44 PM

This is kind of driving me crazy.

 

So I've been reclassing Safana as an assassin. I've made copies of  Safana.cre, Safana4.cre and Safana6.cre in the override folder and edited them accordingly.

 

So far so good.

 

I start a quick character, use the CLUA console to get to level 2, spawn her and ask her to join. everything looks good.

 

So far so good.

 

I start a quick character, use the CLUA console to get to level 4, spawn her and ask her join and...she's level 2 with 'level up' and I manually level her to 4 in one shot. This is where I get confused.

 

 

I check her script and it looks like it checks the players level then just throws XP at her to catch up eg:

 

IF
  Global("BD_JOINXP","LOCALS",0)
  InParty(Myself)
  XPGT(Player1,15999)
  XPLT(Myself,16000)
THEN
  RESPONSE #100
    SetInterrupt(FALSE)
    SetGlobal("BD_JOINXP","LOCALS",1)
    ChangeStat(Myself,XP,16000,SET)
    SetInterrupt(TRUE)

 

 

So this makes sense why I would get a 'level up' prompt when she joins. However if that's the case, why even have a level 4 and 6 cre file with stats I bothered to fill in if the player can just level them up however they want when she joins the party at those key levels?

 

What am I missing here because from the look of it the safana4.cre and safana6.cre aren't even required.



#2 Jarno Mikkola

Jarno Mikkola

    The Imp

  • Modders
  • 6830 posts
  • Gender:Male
  • Location:The town where the dead haven't keeled over, yet. In Finland.

Posted 14 April 2016 - 01:56 PM

The files are requested by the game over mind. The npclevel.2da file. You probably also have a mod that actually alters the normal in game safana4.cre and safana6.cre -files so they are this way.


Welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand.
Here's how to install all the ... mods you ever really could want to Infinity Engine games. I removed the stable word from there as Roxanne began to add BS mods that are likely to break compatibility from the BWS.

#3 Roxanne

Roxanne

    Modder

  • Modders
  • 2041 posts
  • Gender:Female
  • Location:Auckland, NZ

Posted 14 April 2016 - 02:04 PM

This is kind of driving me crazy.

 

So I've been reclassing Safana as an assassin. I've made copies of  Safana.cre, Safana4.cre and Safana6.cre in the override folder and edited them accordingly.

 

So far so good.

 

I start a quick character, use the CLUA console to get to level 2, spawn her and ask her to join. everything looks good.

 

So far so good.

 

I start a quick character, use the CLUA console to get to level 4, spawn her and ask her join and...she's level 2 with 'level up' and I manually level her to 4 in one shot. This is where I get confused.

 

 

I check her script and it looks like it checks the players level then just throws XP at her to catch up eg:

 

IF
  Global("BD_JOINXP","LOCALS",0)
  InParty(Myself)
  XPGT(Player1,15999)
  XPLT(Myself,16000)
THEN
  RESPONSE #100
    SetInterrupt(FALSE)
    SetGlobal("BD_JOINXP","LOCALS",1)
    ChangeStat(Myself,XP,16000,SET)
    SetInterrupt(TRUE)

 

 

So this makes sense why I would get a 'level up' prompt when she joins. However if that's the case, why even have a level 4 and 6 cre file with stats I bothered to fill in if the player can just level them up however they want when she joins the party at those key levels?

 

What am I missing here because from the look of it the safana4.cre and safana6.cre aren't even required.

I think you mix two different things here -

The code you quote is looking at PC's XP and setting Safana XP to a matching value - if that crosses some threshold, she levels up.

 

A second issue is which Safana creature is created in game with respect to your PC's level (the cre may still have above script). You need to look at how Safana is brought into the game which may be either by the npclevel.2da and xxx.are file where she spawns or by a script that creates creature - most likely xxxx,are's bcs-file (taking into account or not PC level). In the EE family it can also be the gam file.


Edited by Roxanne, 14 April 2016 - 02:07 PM.

The Sandrah Saga!

another piece of *buggy, cheesy, unbalanced junk*

 

 

 


#4 pancakewizard

pancakewizard
  • Members
  • 22 posts

Posted 14 April 2016 - 02:11 PM

You know what after reading both replies, I've realised I'm a dumbass. I just spawned another SAFANA.cre each time thinking that it loads the OTHER CREs on party join. I didn't think to load eg. SAFANA4.cre

 

So that's probably it.


Edited by pancakewizard, 14 April 2016 - 02:12 PM.


#5 subtledoctor

subtledoctor
  • Modders
  • 2853 posts
  • Gender:Male

Posted 14 April 2016 - 03:12 PM

I've been reclassing Safana as an assassin.


No need for all this work and worry. Someone has done the work for you:
https://forums.beamd...for-everyone/p1
(me)

Faiths & Powers: Spell spheres and kit pack for priests and paladins
Might & Guile: Tweaks and kits for warriors and rogues
Scales of Balance: Game tweaks and rule overhauls
NPC_EE: More options for NPCs in BGEE, SoD, & BG2EE


#6 pancakewizard

pancakewizard
  • Members
  • 22 posts

Posted 15 April 2016 - 07:53 AM

 

I've been reclassing Safana as an assassin.


No need for all this work and worry. Someone has done the work for you:
https://forums.beamd...for-everyone/p1
(me)

 

 

I'm sure it's a good mod, but it's only one part of a multi-part mod I'm working on that I'll be releasing as a complete vision. I intend to release it in parts (with a devlog blog or something) once I've got some of the basic stuff out of the way pre-release (NPC class/kit modification being one of those that I don't think worth of a release by itself for exactly the reason you posted! Plenty of mods like that already!)


Edited by pancakewizard, 15 April 2016 - 07:54 AM.


#7 subtledoctor

subtledoctor
  • Modders
  • 2853 posts
  • Gender:Male

Posted 15 April 2016 - 08:05 AM

Ah - you're making a content mod? Very cool. I thought this was just for your own game.

Carry on! :)

Faiths & Powers: Spell spheres and kit pack for priests and paladins
Might & Guile: Tweaks and kits for warriors and rogues
Scales of Balance: Game tweaks and rule overhauls
NPC_EE: More options for NPCs in BGEE, SoD, & BG2EE


#8 ALIENQuake

ALIENQuake
  • Modders
  • 630 posts
  • Gender:Male
  • Location:Poland

Posted 15 April 2016 - 08:22 AM

@pancakewizard If you mod content require Safana as an assassin then instead of making yet another component for you mod, code it to require NPC_EE component.



#9 subtledoctor

subtledoctor
  • Modders
  • 2853 posts
  • Gender:Male

Posted 15 April 2016 - 08:48 AM

Nah, NPC_EE just gives Safana an innate ability that lets her choose *any* kit. If his mods needs her to be an assassin for story reasons, the mod should do that and it should not be an optional component.

Btw @pancakewizard, if you need help with code you can grab any you need from NPC_EE. v2 only uses Weidu for class changes, but v1.2 (still available on GitHub) has components that change kit. Take a look at the Safana section of the v1.2 .tp2. (And/or the Montaron section, since that specifically gives him the Assassin kit.)

Edited by subtledoctor, 15 April 2016 - 08:48 AM.

Faiths & Powers: Spell spheres and kit pack for priests and paladins
Might & Guile: Tweaks and kits for warriors and rogues
Scales of Balance: Game tweaks and rule overhauls
NPC_EE: More options for NPCs in BGEE, SoD, & BG2EE


#10 pancakewizard

pancakewizard
  • Members
  • 22 posts

Posted 15 April 2016 - 10:35 AM

Good to know, thanks! I got Safana where I wanted her I think, and I definitely did it the long way around so an easier method is welcome!



#11 pancakewizard

pancakewizard
  • Members
  • 22 posts

Posted 17 April 2016 - 04:37 AM

OK so just to draw a line under the issue, ncplevel.2da was the culprit. What's great as well is if I force safana4 at player level 5, it gives her the required xp to 'catch up' still, but at player level 6 its safana6.

 

That's what I wanted :)

 

It didn't come up as an issue, but incidentally there doesn't appear to be spawn call for Safana in the ARE (AR3600) file itself so no idea what's governing that.



#12 lynx

lynx
  • Modders
  • 3145 posts
  • Gender:Male
  • Location:Ljubljana, Slovenija

Posted 17 April 2016 - 05:02 AM

she's probably embedded in the area. If she can be picked up also elsewhere, she'd probably be spawned through the global script (baldur.bcs).


GemRB - IE anywhere.
Mages needed! Looking for Planescape: Torment testers
Play android version IS NOT SUPPORTED ANYMORE: reported bugs will be ignored! Still looking for builders ...


#13 Roxanne

Roxanne

    Modder

  • Modders
  • 2041 posts
  • Gender:Female
  • Location:Auckland, NZ

Posted 17 April 2016 - 05:57 AM

OK so just to draw a line under the issue, ncplevel.2da was the culprit. What's great as well is if I force safana4 at player level 5, it gives her the required xp to 'catch up' still, but at player level 6 its safana6.

 

That's what I wanted :)

 

It didn't come up as an issue, but incidentally there doesn't appear to be spawn call for Safana in the ARE (AR3600) file itself so no idea what's governing that.

 

 

she's probably embedded in the area. If she can be picked up also elsewhere, she'd probably be spawned through the global script (baldur.bcs).

Spoiler

This is in that area's bcs


The Sandrah Saga!

another piece of *buggy, cheesy, unbalanced junk*

 

 

 


#14 pancakewizard

pancakewizard
  • Members
  • 22 posts

Posted 17 April 2016 - 07:15 AM

 

OK so just to draw a line under the issue, ncplevel.2da was the culprit. What's great as well is if I force safana4 at player level 5, it gives her the required xp to 'catch up' still, but at player level 6 its safana6.

 

That's what I wanted :)

 

It didn't come up as an issue, but incidentally there doesn't appear to be spawn call for Safana in the ARE (AR3600) file itself so no idea what's governing that.

 

 

she's probably embedded in the area. If she can be picked up also elsewhere, she'd probably be spawned through the global script (baldur.bcs).

Spoiler

This is in that area's bcs

 

Where are you finding that bcs? In the BCS location in near infinity and DLCTEP I can't see one for that area. All I can see is it goes from AR3500 to AR3800, so in fact large amounts of area scripts aren't showing up for me.


Edited by pancakewizard, 17 April 2016 - 07:20 AM.


#15 lynx

lynx
  • Modders
  • 3145 posts
  • Gender:Male
  • Location:Ljubljana, Slovenija

Posted 17 April 2016 - 07:53 AM

Not all areas have scripts assigned. The snippet looks like it is from BGT — mod added.


Edited by lynx, 17 April 2016 - 07:53 AM.

GemRB - IE anywhere.
Mages needed! Looking for Planescape: Torment testers
Play android version IS NOT SUPPORTED ANYMORE: reported bugs will be ignored! Still looking for builders ...




Reply to this topic



  



Also tagged with one or more of these keywords: NPC, LEVEL

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users