Skip to content

NPC starting XP adjustments

SikorskySikorsky Member Posts: 402
edited March 2016 in The Road to v2.0
Is this a new v2.0 feature? Now when NPC join your party they exp is scaled with CHARNAME but they are on level 1 and you can level them up by yourself. For me it's great for the NPC that you can join only later in game. Now you can spend the proficency points and thieving skills like you want it. What do you think about that?
Post edited by AlexT on
«13

Comments

  • IthualIthual Member Posts: 136
    I love it like this. Having more control over the npcs.

    If it is a bug, I hope no-one fixes it.
  • SikorskySikorsky Member Posts: 402
    Now the cons of NPC like Alora (poorly distributed thieving skills) are outdated. But what about NPC like Coran. Can he still have those *** in Long Bows?
  • AedanAedan Member, Translator (NDA) Posts: 8,551
    Ithual said:

    If it is a bug, I hope no-one fixes it.

    It is not a bug - it is a new feature and it will stay.
    Very useful indeed!
  • JuliusBorisovJuliusBorisov Member, Administrator, Moderator, Developer Posts: 22,754
    I have to say that the ToB approach to NPC levels and abilities have always been the favourite of mine.

    It's especially important with SoD in mind, when you'll (possibly) start BG2 with higher levels than before, so would want to spend all those shiny proficiencies and abilities on NPCs the way YOU want.
  • SikorskySikorsky Member Posts: 402
    But can you still give this "extra" points to NPC? Coran have *** in long bows, Haer'dalis have ** in shortswords and ** in long swords if you recruit him after level 15. Are those two be affected by this feature and will lose extra points?
  • ThelsThels Member Posts: 1,422
    Oeh, that's a nice feature! I generally use the BG2 Tweaks ToB style one, but that only goes as low as the lowest character file, so it's not perfect.
  • JuliusBorisovJuliusBorisov Member, Administrator, Moderator, Developer Posts: 22,754
    Sikorsky said:

    But can you still give this "extra" points to NPC? Coran have *** in long bows, Haer'dalis have ** in shortswords and ** in long swords if you recruit him after level 15. Are those two be affected by this feature and will lose extra points?

    When my higher-level character met Coran, he was of the 3rd level, and already had 3 pips in longbows.

    The same happens in BG2, with NPCs startin not of the 1st level.

    So, this thing is covered by the new patch, don't worry, with NPCs starting rather not of the 1st level, but of their minimum game level (3 in case of Coran), after which you level them up as you want.
  • ThelsThels Member Posts: 1,422
    So it's probably identical to using the BG2 Tweaks ToB style option, then?
  • DeeDee Member Posts: 10,447
    It might not be identical (as in, the scripting involved might not be the same on a 1:1 basis), but yeah, the principle is the same.
  • ThelsThels Member Posts: 1,422
    Yeah, the end result I mean. It's obviously a little different under the hood, but it seems to work the same (the tweaks also uses the lowest level file).

    I like it, as otherwise I feel forced to rush over to NPCs I want to make sure the game doesn't give them any weird proficiency and skill slots that I don't want them to have. Now I can just continue the story in the normal flow and encounter them naturally.
  • ErgErg Member Posts: 1,756
    Wow!

    Once in a blue moon even Beamdog manages to do something right :smile:

    N.B.: this is as close as a compliment you'll get from me :wink:
  • GodKaiserHellGodKaiserHell Member Posts: 398
    edited July 2016
     
    Post edited by GodKaiserHell on
  • AbelAbel Member Posts: 785
    Nice indeed! Well done!
  • AmmarAmmar Member Posts: 1,297
    How is this handled with dual-classes characters in BG 2? I assume you start with the current lowest level for each character and can level the character yourself from there?
  • JuliusBorisovJuliusBorisov Member, Administrator, Moderator, Developer Posts: 22,754
    Ammar wrote: »
    How is this handled with dual-classes characters in BG 2? I assume you start with the current lowest level for each character and can level the character yourself from there?

    For the dual-classed characters you start with their minimum BG2 version, when they have already dual-classed, i.e. you can't change anything in their first class, but can still develop their second class.

    For example,

    Imoen - Thief 7/Mage 8+XP based on your main character's XP
    Anomen - Fighter 7/Cleric 9+XP based on your main character's XP
    Nalia - Thief 4/Mage 9+XP based on your main character's XP
  • ThelsThels Member Posts: 1,422
    If I understand this correctly, how this works is:

    Normally, NPCs have two or three different character files, each indicating them at different levels. When you first encounter them, the game picks a file based on your current XP. Say an NPC has two character files, one at level 2, and one at level 6.

    Normally, if you rush over to the NPC when you're still low level, you'll get the level 2 version of the NPC, whereas if you first do a bunch of sidequests, and are of higher level, you'll get the level 6 version of the NPC. The level 6 version has already gained additional levels, and placed weapon proficiency and skill points where you don't like them to be.

    What this change does is always use the lowest level file, level 2 in the above example, and then give that character an amount of XP based on the PCs current amount of XP, so you can immediately level him up, and then assign the proficiency points yourself.

    It still uses one of the pregenerated sheets, it just always uses the lowest level available, so you don't need to rush over to a certain NPC to recruit it, worried that if you wait, a higher level with oddly placed proficienty points is used instead.

    The Dualclass characters are already Dualclass in the lowest level file of their character, so they remain Dualclass under this system.
  • ErgErg Member Posts: 1,756
    edited March 2016
    Thels wrote: »
    What this change does is always use the lowest level file

    @Thels

    not exactly.

    I don't know the details of Beamdog implementation, but the "right way to do it" still requires using different files for different levels as before.

    The only difference should be that the higher level versions are not fully levelled and their proficiencies, skills, etc are not fully assigned, but they must still differ from the lower level variants in terms of things like equipment, known wizard spells, etc.
  • ThelsThels Member Posts: 1,422
    That really beats the point then. All it does is give them more XP. If Erg is right, then I guess I'll keep using BG2 Tweaks (or well, the new Tweaks, the name escapes me at the moment).
  • ErgErg Member Posts: 1,756
    edited March 2016
    Thels wrote: »
    That really beats the point then. All it does is give them more XP. If Erg is right, then I guess I'll keep using BG2 Tweaks (or well, the new Tweaks, the name escapes me at the moment).

    I'm confused. What I'm describing is the method used by BG2 Tweaks.
  • ThelsThels Member Posts: 1,422
    ToB-Style NPCs
    This component will alter all joinable NPCs to join in the same fashion as Throne of Bhaal, where NPCs immediately level-up upon joining, with a caveat: all creature files are moved down to their lowest experience version, so if you pick up an NPC early enough they will not level upon joining. However, later in the game they will, allowing you to select weapon proficiencies, thieving points, and other goodies from the level-up process.

    Notice where it says "all creature files are moved down to their lowest experience version". If I understand this correctly, that means it always uses the lowest level version of each character, not?
  • ErgErg Member Posts: 1,756
    edited March 2016
    Thels wrote: »
    Notice where it says "all creature files are moved down to their lowest experience version". If I understand this correctly, that means it always uses the lowest level version of each character, not?

    No.

    For example Ajantis has three CRE files (AJANTI.CRE, AJANTI4.CRE, AJANTI6.CRE).

    The code in "ToB-Style NPCs" start by overwriting AJANTI4.CRE and AJANTI6.CRE with a copy of AJANTI.CRE (this is indeed the "moving down to their lowest experience version" part), but subsequently the copies are modified so AJANTI4.CRE and AJANTI6.CRE will still have better equipment than AJANTI.CRE (e.g. AJANTI.CRE has a Chain Mail, AJANTI4.CRE has a Splint Mail and AJANTI6.CRE has a Plate Mail).

    And it isn't just equipment, also other stuff is modified back to whatever the higher lever version had, like known spells, scripts, etc. For a full list see the code under the spoiler tag:

    DEFINE_PATCH_MACRO ~tob_style_npcs~ BEGIN

    SET "orig_xp" = 0

    INNER_PATCH_FILE ~%DEST_FILE%~ BEGIN // read info from file about to be overwritten
    READ_LONG 0x2a0 "orig_known_off"
    READ_LONG 0x2a4 "orig_known_num"
    READ_LONG 0x2a8 "orig_meminfo_off"
    READ_LONG 0x2b0 "orig_memspl_off"
    READ_LONG 0x2b4 "orig_memspl_num"
    READ_LONG 0x2b8 "orig_slot_off"
    READ_LONG 0x2bc "orig_item_off"
    READ_LONG 0x2c0 "orig_item_num"
    READ_LONG 0x18 "orig_xp"
    READ_SHORT 0x28 "orig_anim"
    READ_ASCII 0x280 "orig_dv" (18)
    READ_ASCII 0x34 "orig_portraits" (16)
    READ_ASCII 0x248 "orig_scripts" (40)
    READ_ASCII 0x2cc "orig_dialogue" (8)
    READ_ASCII "%orig_slot_off%" "orig_slot_info" (78)
    READ_ASCII "%orig_meminfo_off%" "orig_meminfo_info" (272)
    READ_ASCII "%orig_item_off%" "orig_item_info" (0x14 * "%orig_item_num%")
    READ_ASCII "%orig_known_off%" "orig_known_info" (0x0c * "%orig_known_num%")
    READ_ASCII "%orig_memspl_off%" "orig_memspl_info" (0x0c * "%orig_memspl_num%")
    END

    PATCH_IF (("%orig_xp%" != 0) AND (SOURCE_SIZE > 0x2d3)) BEGIN // only true if read from destination file is successful and source exists
    WRITE_LONG 0x18 "%orig_xp%"
    WRITE_SHORT 0x28 "%orig_anim%"
    WRITE_EVALUATED_ASCII 0x34 "%orig_portraits%" #16
    WRITE_EVALUATED_ASCII 0x248 "%orig_scripts%" #40
    WRITE_EVALUATED_ASCII 0x2cc "%orig_dialogue%" #8
    WRITE_EVALUATED_ASCII 0x280 "%orig_dv%" #18

    READ_LONG 0x2a0 "known_off"
    READ_LONG 0x2a4 "known_num"
    READ_LONG 0x2a8 "meminfo_off"
    READ_LONG 0x2b0 "memspl_off"
    READ_LONG 0x2b4 "memspl_num"
    READ_LONG 0x2b8 "slot_off"
    READ_LONG 0x2bc "item_off"
    READ_LONG 0x2c0 "item_num"
    READ_LONG 0x2c4 "fx_off"
    WRITE_EVALUATED_ASCII "%slot_off%" "%orig_slot_info%"
    WRITE_EVALUATED_ASCII "%meminfo_off%" "%orig_meminfo_info%"

    // transfer memorized spells
    SET "offset" = (0x0c * ("%orig_memspl_num%" - "%memspl_num%"))
    PATCH_IF ("%offset%" > 0) BEGIN
    INSERT_BYTES "%memspl_off%" "%offset%"
    END ELSE
    PATCH_IF ("%offset%" < 0) BEGIN
    DELETE_BYTES "%memspl_off%" (0 - "%offset%")
    END
    WRITE_EVALUATED_ASCII "%memspl_off%" "%orig_memspl_info%"
    WRITE_LONG 0x2b4 "%orig_memspl_num%"
    PATCH_IF NOT ("%memspl_off%" > "%meminfo_off%") BEGIN
    SET "meminfo_off" = "%meminfo_off%" + "%offset%"
    END
    PATCH_IF NOT ("%memspl_off%" > "%known_off%") BEGIN
    SET "known_off" = "%known_off%" + "%offset%"
    END
    PATCH_IF NOT ("%memspl_off%" > "%slot_off%") BEGIN
    SET "slot_off" = "%slot_off%" + "%offset%"
    END
    PATCH_IF NOT ("%memspl_off%" > "%item_off%") BEGIN
    SET "item_off" = "%item_off%" + "%offset%"
    END
    PATCH_IF NOT ("%memspl_off%" > "%fx_off%") BEGIN
    SET "fx_off" = "%fx_off%" + "%offset%"
    END

    // transfer items
    SET "offset" = (0x14 * ("%orig_item_num%" - "%item_num%"))
    PATCH_IF ("%offset%" > 0) BEGIN
    INSERT_BYTES "%item_off%" "%offset%"
    END ELSE
    PATCH_IF ("%offset%" < 0) BEGIN
    DELETE_BYTES "%item_off%" (0 - "%offset%")
    END
    WRITE_EVALUATED_ASCII "%item_off%" "%orig_item_info%"
    WRITE_LONG 0x2c0 "%orig_item_num%"
    PATCH_IF NOT ("%item_off%" > "%known_off%") BEGIN
    SET "known_off" = "%known_off%" + "%offset%"
    END
    PATCH_IF NOT ("%item_off%" > "%meminfo_off%") BEGIN
    SET "meminfo_off" = "%meminfo_off%" + "%offset%"
    END
    PATCH_IF NOT ("%item_off%" > "%memspl_off%") BEGIN
    SET "memspl_off" = "%memspl_off%" + "%offset%"
    END
    PATCH_IF NOT ("%item_off%" > "%slot_off%") BEGIN
    SET "slot_off" = "%slot_off%" + "%offset%"
    END
    PATCH_IF NOT ("%item_off%" > "%fx_off%") BEGIN
    SET "fx_off" = "%fx_off%" + "%offset%"
    END

    // transfer known spells
    SET "offset" = (0x0c * ("%orig_known_num%" - "%known_num%"))
    PATCH_IF ("%offset%" > 0) BEGIN
    INSERT_BYTES "%known_off%" "%offset%"
    END ELSE
    PATCH_IF ("%offset%" < 0) BEGIN
    DELETE_BYTES "%known_off%" (0 - "%offset%")
    END
    WRITE_EVALUATED_ASCII "%known_off%" "%orig_known_info%"
    WRITE_LONG 0x2a4 "%orig_known_num%"
    PATCH_IF NOT ("%known_off%" > "%meminfo_off%") BEGIN
    SET "meminfo_off" = "%meminfo_off%" + "%offset%"
    END
    PATCH_IF NOT ("%known_off%" > "%memspl_off%") BEGIN
    SET "memspl_off" = "%memspl_off%" + "%offset%"
    END
    PATCH_IF NOT ("%known_off%" > "%slot_off%") BEGIN
    SET "slot_off" = "%slot_off%" + "%offset%"
    END
    PATCH_IF NOT ("%known_off%" > "%item_off%") BEGIN
    SET "item_off" = "%item_off%" + "%offset%"
    END
    PATCH_IF NOT ("%known_off%" > "%fx_off%") BEGIN
    SET "fx_off" = "%fx_off%" + "%offset%"
    END

    // commit offset changes
    WRITE_LONG 0x2a0 "%known_off%"
    WRITE_LONG 0x2a8 "%meminfo_off%"
    WRITE_LONG 0x2b0 "%memspl_off%"
    WRITE_LONG 0x2b8 "%slot_off%"
    WRITE_LONG 0x2bc "%item_off%"
    WRITE_LONG 0x2c4 "%fx_off%"
    END

    END
  • ThelsThels Member Posts: 1,422
    Hmm, ok, but if I was like, high enough level to encounter the level 6 variant, I'd still get him at level 1, right? As in, I can still choose what weapon proficiency to pick for level 6.
  • JuliusBorisovJuliusBorisov Member, Administrator, Moderator, Developer Posts: 22,754
    This is how it works in the beta in terms of Ajantis. My char (a barbarian of the 8th level) met Ajantis:

    dcv8dxgiexmg.jpg

    1xcwwja2gjeu.jpg

    From the looks of it, Ajantis always has a Chain mail, i.e. there's no way to meet Ajantis with a Splint Mail or a Plate Mail now.

    So, the beta works differently from the "ToB-Style NPCs" mod component.
  • ErgErg Member Posts: 1,756
    bengoshi wrote: »
    So, the beta works differently from the "ToB-Style NPCs" mod component.

    Well. That's disappointing and it could get worse.

    I wonder how wizards are handled. For example Edwin, at low level, knows only Color Spray and Armor, but at higher level is supposed to know already also Larloch's Minor Drain, Melf's Acid Arrow, Mirror Image, Horror, Haste and Monster Summoning I. Does that mean that in 2.0 Edwin only knows a couple of level 1 spells even when recruited by an high level main char?

    I can't check myself because I don't have the beta.
  • DeeDee Member Posts: 10,447
    Erg wrote: »
    bengoshi wrote: »
    So, the beta works differently from the "ToB-Style NPCs" mod component.

    Well. That's disappointing and it could get worse.

    I wonder how wizards are handled. For example Edwin, at low level, knows only Color Spray and Armor, but at higher level is supposed to know already also Larloch's Minor Drain, Melf's Acid Arrow, Mirror Image, Horror, Haste and Monster Summoning I. Does that mean that in 2.0 Edwin only knows a couple of level 1 spells even when recruited by an high level main char?

    I can't check myself because I don't have the beta.

    That's correct. But it's something that we can definitely look at addressing (along with the equipment thing mentioned earlier). Probably not for this release, but it's already in our lists.
  • ErgErg Member Posts: 1,756
    Dee wrote: »
    That's correct. But it's something that we can definitely look at addressing (along with the equipment thing mentioned earlier). Probably not for this release, but it's already in our lists.

    If you are planning to revise this feature, you should really take a look at the code in "Level 1 NPCs", because it is more advanced than the one in "BG2 Tweaks"/"The Tweaks Anthology" and includes additional handy features like the optional one-time-only rest script.
  • [Deleted User][Deleted User] Posts: 0
    edited March 2016
    The user and all related content has been deleted.
  • AbelAbel Member Posts: 785
    I have a mod component that drops NPCs to level 1... by patching the higher-level .cre files instead of overwriting them with the lower-level ones. So if edwin6.cre knows Ghost Armor and has it memorized... when you meet that .cre in the game it is a 1st-level conjurer who can knows Ghost Armor and has it memorized. Technically illegal? Yes. But he has enough XP to immediately jump to level 6, and after doing that he'll be able to re-memorize Ghost Armor.

    So long story short, this does not have to be a problem for spellcasters.

    (EDIT what's going on with text gormatting around here? Can't use italics)
    @subtledoctor What about proficiencies then? Can players pick them?
  • O_BruceO_Bruce Member Posts: 2,790
    I am not a beta tester, but vast majority of things I'm reading in "The Road to v2.0" pleases me. Very much.
Sign In or Register to comment.