pancakewizard Posted April 14, 2016 Share Posted April 14, 2016 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
Jarno Mikkola Posted April 14, 2016 Share Posted April 14, 2016 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. Link to comment
Roxanne Posted April 14, 2016 Share Posted April 14, 2016 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
pancakewizard Posted April 14, 2016 Author Share Posted April 14, 2016 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. Link to comment
subtledoctor Posted April 14, 2016 Share Posted April 14, 2016 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) Link to comment
pancakewizard Posted April 15, 2016 Author Share Posted April 15, 2016 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
subtledoctor Posted April 15, 2016 Share Posted April 15, 2016 Ah - you're making a content mod? Very cool. I thought this was just for your own game. Carry on! Link to comment
AL|EN Posted April 15, 2016 Share Posted April 15, 2016 @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. Link to comment
subtledoctor Posted April 15, 2016 Share Posted April 15, 2016 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
pancakewizard Posted April 15, 2016 Author Share Posted April 15, 2016 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! Link to comment
pancakewizard Posted April 17, 2016 Author Share Posted April 17, 2016 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
lynx Posted April 17, 2016 Share Posted April 17, 2016 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). Link to comment
Roxanne Posted April 17, 2016 Share Posted April 17, 2016 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
pancakewizard Posted April 17, 2016 Author Share Posted April 17, 2016 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
lynx Posted April 17, 2016 Share Posted April 17, 2016 Not all areas have scripts assigned. The snippet looks like it is from BGT — mod added. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.