Jump to content

NPC preset levels question


pancakewizard

Recommended Posts

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.

Link to comment

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.

Link to comment

 

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.beamdog.com/discussion/43305/npc-ee-non-player-characters-enhanced-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!)

Link to comment

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.)

Link to comment

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.

Link to comment

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).

 

IF

Global("BGTNPC9500","GLOBAL",0)

LevelLT(Player1,4)

THEN

RESPONSE #100

SetGlobal("BGTNPC9500","GLOBAL",1)

CreateCreature("SAFANA",[3747.2389],5) // Safana

END

 

IF

Global("BGTNPC9500","GLOBAL",0)

OR(2)

Level(Player1,4)

Level(Player1,5)

THEN

RESPONSE #100

SetGlobal("BGTNPC9500","GLOBAL",1)

CreateCreature("SAFANA4",[3747.2389],5) // Safana

END

 

IF

Global("BGTNPC9500","GLOBAL",0)

LevelGT(Player1,5)

THEN

RESPONSE #100

SetGlobal("BGTNPC9500","GLOBAL",1)

CreateCreature("SAFANA6",[3747.2389],5) // Safana

END

 

This is in that area's bcs

Link to comment

 

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).

 

IF

Global("BGTNPC9500","GLOBAL",0)

LevelLT(Player1,4)

THEN

RESPONSE #100

SetGlobal("BGTNPC9500","GLOBAL",1)

CreateCreature("SAFANA",[3747.2389],5) // Safana

END

 

IF

Global("BGTNPC9500","GLOBAL",0)

OR(2)

Level(Player1,4)

Level(Player1,5)

THEN

RESPONSE #100

SetGlobal("BGTNPC9500","GLOBAL",1)

CreateCreature("SAFANA4",[3747.2389],5) // Safana

END

 

IF

Global("BGTNPC9500","GLOBAL",0)

LevelGT(Player1,5)

THEN

RESPONSE #100

SetGlobal("BGTNPC9500","GLOBAL",1)

CreateCreature("SAFANA6",[3747.2389],5) // Safana

END

 

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.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...