Jump to content


Photo

Starting level of NPCs


  • Please log in to reply
12 replies to this topic

#1 russ

russ

    bilbo_faramir

  • Member
  • 78 posts

Posted 06 March 2005 - 12:17 PM

I probably shouldn't be asking this question here but I think the problem I'm having is related to BGT. Some NPCs are created when you enter a new area and the script for that area will CreateCreature that NPC at a specific point and if the script has a level check it will spawn a specific .cre file that matches the level of the PC. That I understand. It seems, though, that several NPCs (Yoshimo, Kachiko, Aerie, for example) aren't created this way. I was trying to find what file is used to create them and the best I could come up with was NPCLEVEL.2DA. I've just joined Yoshimo and he was level 10 and based on the Yoshi7.cre. Based on my PC's level he should have been level 11 and based on Yoshi11.cre. Using NI to look into my save games Kachiko and Aerie will also be the wrong levels when I join them since the NPC list (in baldur.gam in my save dir using NI) points to Kachi10 and Aerie7. However, if I'm right, I should be joining with the 11th level version of each of them. Does anyone know how the game engine puts these NPCs into your game and how it does the level check?

Thanks.

#2 Sir BillyBob

Sir BillyBob
  • Modder
  • 5315 posts

Posted 06 March 2005 - 04:27 PM

I use a script on my NPC in BoneHill to level up. Normally the NPC's use the area script to level them based on when you first enter the area. Not a great solution if you enter several times before you actually have them join.

The NPCLEVEL.2DA file should help control which CRE file you will meet. Aerie is kind of different. There is nothing about her in the AR0604 area script and she isn't on the ARE file as an actor. Not exactly sure how they added her to the game.

As for your match of levels against an NPC, I assume your PC is not a dual-class or multi? Those seem to throw the game when doing level comparisons. Remember Flop in the Copper Coronet? He's appearance will be different for a multi-class PC than for a single class PC. Also, the game may be comparing your XP amount not the exact level you are at. Though in this case, I would assume Yoshi would be a higher level than you since most thieves advanced in levels faster than other classes.

Anyone else have an idea?

Tired of Bhaal? Try some classics mods instead:
Classic Adventures
Official Classic Adventures Website


#3 horred the plague

horred the plague

    Scourge of the Seven Seas

  • Modder
  • 1899 posts

Posted 06 March 2005 - 09:50 PM

Anyone else have an idea?

View Post


BALDUR.GAM is the game's default NPC add-er (not the one in your savegame, the real file). Most of the standards (all, before modder intervention) were added this way. TS NPC's were done this way--though Vlad may have changed it in v6.0--if so, I'll have to back him up. Remind me, i'll check when back on the BP duty. It does work in conjunction with npclevel.2da. It's proven itself to be a bit buggy at times, as I'm sure you've noticed.--That's why most modders discarded this system, and went with the scripting method. XP seems to be the better check, because in dual/multiclassers--only the first class level is counted in the Level (LevelGT/LT) checks. XP counts both classes' XP towards the enumeration.

#4 russ

russ

    bilbo_faramir

  • Member
  • 78 posts

Posted 07 March 2005 - 09:22 AM

BALDUR.GAM is the game's default NPC add-er (not the one in your savegame, the real file). Most of the standards (all, before modder intervention) were added this way. TS NPC's were done this way--though Vlad may have changed it in v6.0--if so, I'll have to back him up. Remind me, i'll check when back on the BP duty. It does work in conjunction with npclevel.2da. It's proven itself to be a bit buggy at times, as I'm sure you've noticed.--That's why most modders discarded this system, and went with the scripting method. XP seems to be the better check, because in dual/multiclassers--only the first class level is counted in the Level (LevelGT/LT) checks. XP counts both classes' XP towards the enumeration.

View Post


Once again Horred proves he is worth every penny we pay him! :thumb:
.
.
.
ok, maybe all the praise we give him, yeah that's it :thumb: :thumb:

i've done some testing and I think I've learned a little more about this. For me Baldur.gam, npclevel.2da and npclvl25.2da were in biffs. When I extracted these files into my override, increased the XP on all my in-partyNPCs and my PC, and moved to an area (0603) with new NPCs, the NPC's in that area also increased in level, whether I joined them or not.

First, what I've learned about the starting level of the NPCs, it doesn't get updated until you enter their area for the first time (no surprise there) and I think it's dependent on the XP/level of all the characters in your party not just the PC.

More important, I think having these files in a biff actually hurts the performance of the game. Before I moved these files into the override Yoshi wouldn't increase his starting level but Kachiko would. With them in the override, however, both increased their starting level. (I first tried just baldur.gam in the override but that didn't work and then I put all 3 files in the override and that did work.) I think that's because as soon as you enter 0603 Yoshi is created (so there isn't enough time for the game to update his starting level) but Kachiko isn't created until you are about to leave (so there is time for her starting level to be changed from the default). If I'm right having these files in the biff is what produces the bug.

And now I'm also wondering if baldur.gam is somehow involved in the xpcap problem we were having. Because the xpcap was checked as soon as you loaded a game maybe there wasn't enough time for the game engine to check the new cap levels in the .2da file and, therefore, stuck with the default cap level.

Anyway, thanks Horred and I hope the solution to this is as easy as I think it is.

#5 horred the plague

horred the plague

    Scourge of the Seven Seas

  • Modder
  • 1899 posts

Posted 07 March 2005 - 12:37 PM

Anyway, thanks Horred and I hope the solution to this is as easy as I think it is.

View Post


No prob, russ--but I disagree with your theory. Baldur.gam is in the biff files in ToB "vanilla", even the patched version. As is NPCLEVEL.2DA and NPCLVL25.2DA.
So, toss fate to the wind and flip a coin... :unsure:

#6 Vlad

Vlad
  • Member
  • 577 posts

Posted 08 March 2005 - 12:45 AM

TS NPC's were done this way...


No.

#7 horred the plague

horred the plague

    Scourge of the Seven Seas

  • Modder
  • 1899 posts

Posted 08 March 2005 - 11:23 AM

TS NPC's were done this way...


No.

View Post


Okay, i'll change it in BPv170. Originally, they most certainly were. I remember the nightmares of NooB autumn 2002, trying to figure out how to edit Baldur.GAM file.

#8 Ascension64

Ascension64
  • Modder
  • 5983 posts

Posted 08 March 2005 - 02:21 PM

TS NPC's were done this way...


No.

View Post


Okay, i'll change it in BPv170. Originally, they most certainly were. I remember the nightmares of NooB autumn 2002, trying to figure out how to edit Baldur.GAM file.

View Post

I would just like to note that BGT-WeiDU OVERWRITES the original BALDUR.GAM to remove Minsc and Jaheira (there might be others) from appearing at a 'mono'-level. I suppose I could get WeiDU to remove the relevant bytes but that could be tricky. :ermm: :ermm: :ermm:

--------------
Retired Modder
Note: I do not respond to profile comments/personal messages in regards to troubleshooting my modifications. Please post on the public forums instead.

Baldur's Gate Trilogy-WeiDU and Mods
Throne of Bhaal Extender (TobEx)

Contributions: (NWN2) A Deathstalker (voice acting) - (IWD2) IWD2 NPC Project (soundset editing) - (Misc) SHS PC Soundsets (voice acting)
Legacy: (BG/Tutu/BGT) Beregost Crash Fixer 1.9 (18 Jul 10) - (BG2) Enable conversations with charmed/dominated creatures (18 Jul 10) - (BG2) Experience Corrections (18 Jul 10) - (Misc) Platform Conversion Utility RC2 (13 Feb 10)


#9 russ

russ

    bilbo_faramir

  • Member
  • 78 posts

Posted 08 March 2005 - 09:33 PM

No prob, russ--but I disagree with your theory. Baldur.gam is in the biff files in ToB "vanilla", even the patched version. As is NPCLEVEL.2DA and NPCLVL25.2DA.
So, toss fate to the wind and flip a coin...  :unsure:

View Post



Yeah, but maybe when chitin.key gets too big, or if a file is biffed multiple times (in my game it would have been biffed by ToB, then BP-BGT-NEJ, then (I think) CtB. Something causes the files not to be read quickly enough by the game. Something to think about for the new biffing strategy in BPv170?

#10 horred the plague

horred the plague

    Scourge of the Seven Seas

  • Modder
  • 1899 posts

Posted 09 March 2005 - 05:41 AM

I would just like to note that BGT-WeiDU OVERWRITES the original BALDUR.GAM to remove Minsc and Jaheira (there might be others) from appearing at a 'mono'-level.  I suppose I could get WeiDU to remove the relevant bytes but that could be tricky. :ermm:  :ermm:  :ermm:

View Post


Or, wait for BPv170, and use that BALDUR.GAM as a base. Just take out Jaheira and Minsc (we'll have to check Imoen as well). Then, when it matters, you'll have a new overwrite version--up to date. No need for fancy coding then. Or, better yet--I add these 2 (3) via scripting even in BP, doing the .GAM overwrite for you while I'm fixing the others. That way, it won't even be a concern of yours. Or, at worst case--we'll have some AR0602.BCS issues to sort out.

#11 Ascension64

Ascension64
  • Modder
  • 5983 posts

Posted 09 March 2005 - 10:03 PM

I would just like to note that BGT-WeiDU OVERWRITES the original BALDUR.GAM to remove Minsc and Jaheira (there might be others) from appearing at a 'mono'-level.  I suppose I could get WeiDU to remove the relevant bytes but that could be tricky. :ermm:  :ermm:  :ermm:

View Post


Or, wait for BPv170, and use that BALDUR.GAM as a base. Just take out Jaheira and Minsc (we'll have to check Imoen as well). Then, when it matters, you'll have a new overwrite version--up to date. No need for fancy coding then. Or, better yet--I add these 2 (3) via scripting even in BP, doing the .GAM overwrite for you while I'm fixing the others. That way, it won't even be a concern of yours. Or, at worst case--we'll have some AR0602.BCS issues to sort out.

View Post

Yup, Imoen as well. What is the change to AR0602.BCS? I currently do a rather large REPLACE_BCS_BLOCK on it.

--------------
Retired Modder
Note: I do not respond to profile comments/personal messages in regards to troubleshooting my modifications. Please post on the public forums instead.

Baldur's Gate Trilogy-WeiDU and Mods
Throne of Bhaal Extender (TobEx)

Contributions: (NWN2) A Deathstalker (voice acting) - (IWD2) IWD2 NPC Project (soundset editing) - (Misc) SHS PC Soundsets (voice acting)
Legacy: (BG/Tutu/BGT) Beregost Crash Fixer 1.9 (18 Jul 10) - (BG2) Enable conversations with charmed/dominated creatures (18 Jul 10) - (BG2) Experience Corrections (18 Jul 10) - (Misc) Platform Conversion Utility RC2 (13 Feb 10)


#12 hlidskialf

hlidskialf

    Incarnation of the Eternal Ale Warrior

  • Modder
  • 2510 posts

Posted 09 March 2005 - 10:12 PM

Don't do a REPLACE_BCS_BLOCK, instead do a creative DECOMPILE_BCS_TO_BAF and COMPILE_BAF_TO_BCS. Just replacing the block will fail unless the block matches exactly. There are more code options with the latter.

The great wolf Fenrir gapes ever at the dwelling of the gods.


#13 Ascension64

Ascension64
  • Modder
  • 5983 posts

Posted 10 March 2005 - 06:44 PM

Don't do a REPLACE_BCS_BLOCK, instead do a creative DECOMPILE_BCS_TO_BAF and COMPILE_BAF_TO_BCS. Just replacing the block will fail unless the block matches exactly. There are more code options with the latter.

View Post

I was thinking of doing that, because the BGT-WeiDU.tp2 is so messy that adding some script lines would be little compared to the mass conundrum that I have at the moment.

--------------
Retired Modder
Note: I do not respond to profile comments/personal messages in regards to troubleshooting my modifications. Please post on the public forums instead.

Baldur's Gate Trilogy-WeiDU and Mods
Throne of Bhaal Extender (TobEx)

Contributions: (NWN2) A Deathstalker (voice acting) - (IWD2) IWD2 NPC Project (soundset editing) - (Misc) SHS PC Soundsets (voice acting)
Legacy: (BG/Tutu/BGT) Beregost Crash Fixer 1.9 (18 Jul 10) - (BG2) Enable conversations with charmed/dominated creatures (18 Jul 10) - (BG2) Experience Corrections (18 Jul 10) - (Misc) Platform Conversion Utility RC2 (13 Feb 10)