Jump to content

How iminent is a release involving mod NPCs?


berelinde

Recommended Posts

I ask because I have to make up new versions of Gavin, BG2 Gavin, and Haldamir to account for L1NPC adjusting the XP of the NPC in question. I need to disable the leveling script if L1NPC is used. Don't want these guys getting an XP boost twice! Since L1NPC will give each NPC slightly different equipment than I gave them, it's a simple matter of including an equipment check.

 

You might want to check how leveling is handled in Kelsey, whether there is a leveling script or whether there are multiple versions of the NPC who merely aren't fully leveled-up.

 

Actually, this might be more efficiently handled by L1NPC itslef. The leveling script will use some kind of a global variable, e.g. B!GavinLeveled (don't remember if that's the actual variable name). Replacing the variable=0 trigger with False() textually would disable the existing mod leveling scripts. Just make sure to add a block to the override that sets the variable to 1 because there's no telling what events are scripted to occur only after the NPC is leveled. Example

 

IF

InParty("NPC")

Global("##NPCLeveled","GLOBAL",0)

THEN

RESPONSE #100

SetGlobal("##NPCLeveled","GLOBAL",1)

END

 

Or leave it to the individual mod to disable the leveling script. With my guys, it's no big deal. With Kelsey, the worst that happens is that he levels up twice.

Link to comment

Are you saying you have the equivalent of L1NPCs' "Joinable NPCs more closely match the PCs experience" component built into your NPCs already? If so, then it's just a matter of not adding their join dialogues to that component. Obviously, L1NPCs has to be installed after Gavin, etc., or it won't be able to mod them. So there's no sense in checking for L1NPCs in your mods.

You might want to check how leveling is handled in Kelsey, whether there is a leveling script or whether there are multiple versions of the NPC who merely aren't fully leveled-up.
It is the latter case. I rather doubt there are other NPCs with "levelling scripts" unless they pinched the code or something similar from L1NPCs' component, but if you know of any, let me know.

 

As for the question implied in your topic title, it is "imminent." The code is (or was) done and it passed initial testing on Tutu and BG2, but testing on BGT revealed a defect, in that NPCs with special items (weapons and armour mainly) end up with extra gear they don't need. So I'm currently trying to fix that.

Link to comment

It's a lot simpler than L1NPC code, but yes, there is something in there to bring the NPC up to the PC's approximate level. It's similar to "ToB style NPCs".

 

Actually, I can "check" for L1NPC by including a !HasItemEquiped() check in the leveling script. L1NPC replaces the starting equipment for the NPCs. I gave Gavin a large shield, L1NPC gives him a medium shield. If I do a !HasItemEquiped("large_shield") in the leveling script, it detects L1NPC. Ditto Haldamir. I equip him with leather armor, L1NPC gives him something else, don't remember what.

Link to comment
It's a lot simpler than L1NPC code, but yes, there is something in there to bring the NPC up to the PC's approximate level. It's similar to "ToB style NPCs".
ToB-style NPCs only messes with the .cre files, it doesn't script anything that I can tell.
Actually, I can "check" for L1NPC by including a !HasItemEquiped() check in the leveling script. L1NPC replaces the starting equipment for the NPCs. I gave Gavin a large shield, L1NPC gives him a medium shield. If I do a !HasItemEquiped("large_shield") in the leveling script, it detects L1NPC. Ditto Haldamir. I equip him with leather armor, L1NPC gives him something else, don't remember what.
There's no reliable way you can check for their L1NPCs starting equipment, because it all depends on what class and proficiencies the player chooses. If someone gives Gavin the two-weapon skill, he'll probably get an offhand weapon instead of a shield. If someone gives him a two-handed weapon proficiency, he won't get a shield either, certainly not an equipped one at any rate. If someone's fool enough to turn your guys into mages, they won't get armour either. Like I said, you don't really have to worry about it - it's easiest for me just not to include b!gav.dlg, b!gavin.dlg and b!hal.dlg in the optional XP-matching component (the one DESIGNATED 3). It'll still affect other NPCs if installed. The actual NPC components do not rely on the XP-matching component, nor do they script any XP gains (they only mess with the .cre files).
Link to comment

Ah, cool, then let's go with not including b!gavin.dlg, b!gav.dlg, and b!hal.dlg in the XP matches PC component because each of those NPCs already approximates that behavior. Sorry to make life tough for you! I completely forgot about the XP matching until yesterday.

Link to comment

Archived

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

×
×
  • Create New...