Jump to content

Issues


the bigg

Recommended Posts

This refers to the version from the Sneak Peek thread. WeiDU.log and similia are available here (although I can't fathom how it'd be needed).

 

1) The XP Adjuster component only works with Bioware NPCs who are L1'd. Mod NPCs who are L1'd and Bioware NPCs who aren't don't have their XP adjusted.

2) Rather than having one component per NPC (and thus leaving in place the bullshit "OMG AUTHORIZATION LOL" system we currently have for modifying mods), you should work your way through PDIALOG.2DA and ACTION_READLN (yes/no) for all NPCs available there, to be sure you can L1 both Bioware and Mod NPCs without being forced to add a component for Stivan and ask me authorization to do so. My patch for Virtue should have something that vaguely looks like this if you need some inspirational code :p

3) Minor, but the basic +1 weapons you receive when a cre joins the party aren't correct if you installed one of the Altered Proficiency System from BG2Tweaks. I'm pretty sure that this one is too hard to fix, so ignore me if it is so :p

Link to comment

Just a note that some mod NPCs come with their own leveling script. Gavin and Haldamir both do. So if you do decide to implement L1NPC leveling practices for mod NPCs, please leave Gavin and Haldamir out.

 

After examining the script for Angelo, I see that he does, as well, if he's one of the included mod NPCs.

Link to comment

Thanks - let me run through these out of order.

 

XP adjuster wasn't coded to work with mod NPCs in the sneak peek (it's part of why they were commented out). I've deprecated it as a stand alone component for V2 though; the join dialogues for NPCs are read from the .cres into an array, blah blah.... I'll add exemptions for Gavin, Haldamir, and Angelo - this hasn't been common practice in the past, so I can probably get by without downloading every mod ever. (ohgod I hope so)

 

The sneak peek readme asks that Altered Weapon proficiencies be installed after this mod - but mandatory install orders suck, so I'll work around it - shouldn't take more than an hour or two.

 

An (much) earlier version did in fact mine the joinable NPCs out of pdialog.2da. I dropped this implementation because

  1. Uninstalling Keto after she'd been level oned caused Weidu to freak right out during stack uninstall/reinstall and go into infinte READ_LN loops (this was like WeidU 198, though, and READ_LN $selected_class(~%component_name%~) may fix that).
  2. The Weidu log was less than informative - I'm adding a Level1npcs.log for Version2, but it's not something people expect to look for.
  3. It was non-trivial for other mods to check if this one had been installed.
  4. If you'd added a Harper fighter kit, and run through the mod once to apply it to Jaheira, and then decided to wanted to apply it to Khalid too, you had to go back through every NPC you'd already installed and re-apply your changes.

With all that said, it's still a preferable implementation, so let me think on it a bit.

Link to comment
2) Rather than having one component per NPC (and thus leaving in place the bullshit "OMG AUTHORIZATION LOL" system we currently have for modifying mods), you should work your way through PDIALOG.2DA and ACTION_READLN (yes/no) for all NPCs available there, to be sure you can L1 both Bioware and Mod NPCs without being forced to add a component for Stivan and ask me authorization to do so.

 

May suck because of the prefix stuff. ADAngel and j#klsy? Not good.

Link to comment

Oh, I don't touch the NPCs script at all :p It's too long to have running in the background all the time - I use the invisible .cre hack and generate the script at install time with

ACTION_IF horrible_xp_mess_0 THEN BEGIN
     ACTION_PHP_EACH ~%component_name%_cre~ AS pointless_integer => cre_to_copy BEGIN
       ACTION_IF FILE_EXISTS_IN_GAME ~%cre_to_copy%.cre~ THEN BEGIN
         COPY_EXISTING ~%cre_to_copy%.cre~ override
           PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
             WRITE_LONG 0x18 0x01
           END
         BUT_ONLY
       END
     END
     OUTER_SPRINT select_script ~%0t_10%IF%0t_10%  Name("",LastSummonerOf(Myself))%0t_10%THEN%0t_10%  RESPONSE #100%0t_10%    DestroySelf()%0t_10%END%0t_10%~
     ACTION_PHP_EACH pdialog_script_name AS pointless_integer => script_name BEGIN
       OUTER_PATCH innie_patch BEGIN
         SNPRINT 0x08 synthetic_resref ~fj%script_name%~
       END
       OUTER_SPRINT select_script ~%select_script%%0t_10%IF%0t_10%  Name("%script_name%",LastSummonerOf(Myself))%0t_10%THEN%0t_10%  RESPONSE #100%0t_10%    ChangeAIScript("%synthetic_resref%",OVERRIDE)%0t_10%END%0t_10%~
     END
     <<<<<<<<inlined/scripts/are/gauche/fjxpsele.baf
     %select_script%
     >>>>>>>>
     COPY - ~inlined/scripts/are/gauche/fjxpsele.baf~ fjxpsele.baf
       EVALUATE_BUFFER
     COMPILE fjxpsele.baf
     ACTION_DEFINE_ASSOCIATIVE_ARRAY attribute_column_map BEGIN
       strength     => 0x01
       dexterity    => 0x02
       constitution => 0x03
       intelligence => 0x04
       wisdom       => 0x05
       charisma     => 0x06
     END
     ACTION_FOR_EACH file IN abdcscrq.2da abdcdsrq.2da BEGIN
       COPY_EXISTING ~%file%~ override
         PATCH_IF SOURCE_SIZE BEGIN
           READ_2DA_ENTRIES_NOW class_requirement_rows 0x01
           FOR (i1 = 0x00; i1 < class_requirement_rows - 0x01; i1 += 0x01) BEGIN
             READ_2DA_ENTRY_FORMER class_requirement_rows i1 0x00 class_name_2da
             PATCH_IF ~%class_name_2da%~ STRING_EQUAL_CASE ~%class_name_text%~ || ~%class_name_2da%~ STRING_EQUAL_CASE ~%kit_name_rowname%~ BEGIN
               PHP_EACH attribute_column_map AS stat => col BEGIN
                 READ_2DA_ENTRY i1 col 0x01 EVALUATE_BUFFER ~%stat_0%_requirement~
                 SET_2DA_ENTRY  i1 col 0x01 EVALUATE_BUFFER ~%stat_0%_requirement~ > EVALUATE_BUFFER ~%stat_0%~ ? EVALUATE_BUFFER ~%stat_0%~ : EVALUATE_BUFFER ~%stat_0%_requirement~
               END
             END
           END
         END
       BUT_ONLY
     END
     ACTION_PHP_EACH ~%component_name%_script_name~ AS pointless_integer => script_name BEGIN
       OUTER_PATCH innie_patch BEGIN
         SNPRINT 0x08 synthetic_resref ~fj%script_name%~
       END
       ACTION_IF pre_dual_level_cap > 0x01 THEN BEGIN
         ACTION_PHP_EACH xp_array AS class_array => class_ids_number BEGIN
           ACTION_IF class_ids_number = class THEN BEGIN
             OUTER_FOR (i_0 = pre_dual_level_cap; i_0  > 0x01; i_0 -= 0x01) BEGIN
               ACTION_IF VARIABLE_IS_SET $EVALUATE_BUFFER ~%class_array_0%~(EVALUATE_BUFFER ~%i_0%~) THEN BEGIN
                 OUTER_SET required_experience = $EVALUATE_BUFFER ~%class_array_0%~(~%i_0%~)
                 OUTER_SPRINT prepended_script ~%prepended_script%%0t_10%IF%0t_10%  OR(7)%0t_10%    CheckStatGT(Player1,%required_experience%,44)%0t_10%    CheckStatGT(Player1,%i_0%,34)%0t_10%    CheckStatGT(Player1,%i_0%,68)%0t_10%    CheckStatGT(Player1,%i_0%,69)%0t_10%    CheckStat(Player1,%i_0%,34)%0t_10%    CheckStat(Player1,%i_0%,68)%0t_10%    CheckStat(Player1,%i_0%,69)%0t_10%  Global("fjxpmodstage","LOCALS",0)%0t_10%THEN%0t_10%  RESPONSE #100%0t_10%    AddXPObject(LastSummonerOf(Myself),%required_experience%)%0t_10%    SetGlobal("fjxpmodstage","LOCALS",1)%0t_10%END%0t_10%~
               END
             END
           END
         END
         OUTER_SPRINT prepended_script ~%prepended_script%%0t_10%IF%0t_10%  Class(LastSummonerOf(Myself),%class%)%0t_10%THEN%0t_10%  RESPONSE #100%0t_10%    NoAction()%0t_10%END%0t_10%~
         OUTER_SPRINT prepended_script ~%prepended_script%%0t_10%IF%0t_10%  Global("fjxpmodstage","LOCALS",1)%0t_10%  !Class(LastSummonerOf(Myself),%class%)%0t_10%THEN%0t_10%  RESPONSE #100%0t_10%    SetGlobal("fjxpmodstage","LOCALS",2)%0t_10%    CreateVisualEffectObject("spholy",(LastSummonerOf(Myself))%0t_10%END%0t_10%~
       END
       OUTER_SPRINT prepended_script ~%prepended_script%%0t_10%IF%0t_10%  GlobalLT("fjxpmodstage","LOCALS",2)%0t_10%THEN%0t_10%  RESPONSE #100%0t_10%    SetGlobal("fjxpmodstage","LOCALS",2)%0t_10%END%0t_10%~
       ACTION_PHP_EACH xp_array AS class_array => class_ids_number BEGIN
         ACTION_PHP_EACH ~%class_array_0%~ AS target_class_level => requisite_experience BEGIN
           OUTER_SPRINT appended_script ~%0t_10%IF%0t_10%  GlobalLT("fjxpmodstage","LOCALS",3)%0t_10%  Class(LastSummonerOf(Myself),%class_ids_number%)%0t_10%  OR(4)%0t_10%    CheckStatGT(Player1,%requisite_experience%,44)%0t_10%    CheckStat(Player1,%target_class_level_0%,34)%0t_10%    CheckStat(Player1,%target_class_level_0%,68)%0t_10%    CheckStat(Player1,%target_class_level_0%,69)%0t_10%  THEN%0t_10%  RESPONSE #100%0t_10%    AddXPObject(LastSummonerOf(Myself),%requisite_experience%)%0t_10%    SetGlobal("fjxpmodstage","LOCALS",3)%0t_10%END%0t_10%%appended_script%~
         END
       END
       OUTER_SPRINT appended_script ~%appended_script%%0t_10%IF%0t_10%  True()%0t_10%THEN%0t_10%  RESPONSE #100%0t_10%    ActionOverride(LastSummonerOf(Myself),ChangeAIScript("fjxprest",AREA))%0t_10%    CreateVisualEffectObject("spholymt",(LastSummonerOf(Myself))%0t_10%    DestroySelf()%0t_10%END~
       <<<<<<<<inlined/scripts/are/gauche/fjxpmooc.baf
       %prepended_script%
       %appended_script%
       >>>>>>>>
       COPY  - ~inlined/scripts/are/gauche/fjxpmooc.baf~ ~%synthetic_resref%.baf~
         EVALUATE_BUFFER
       COMPILE ~%synthetic_resref%.baf~
     END
   END

 

There really isn't going to much for you to check for :p

Link to comment

1. Okie Dokie.

2. Oh, right, it doesn't work too well with uninstallations, log etc. Pity. Perhaps you can hack something with COPY + and l1npcs.log?

3. OMG Learn me raeding skillz LOL.

 

While you're here, is it possible to have a way to move around the stat points as well?

Link to comment
While you're here, is it possible to have a way to move around the stat points as well?

 

Please, please! And alignments! I want a Chaotic Neutral Viconia and Evil Minsc and Very Evil... wait, it may ruin Anomen's quest and romance, right... ?

Link to comment

Alignments? What kind of changes were you thinking of making, Kulyok?

 

And bigg, did you have anything specific in mind? Also, I've now had a chance to check both Shapeshifting fix options, and I get that stutter on both of them.

 

I'm going to create a new topic in General Mod Discussion, since the SHS thread isn't getting much joy.

Link to comment

I don't give a hoot what folks do with my guys' stats. I change them on a whim with SK all the time. Likewise, I'm not fussed if somebody wants to mod a LE Gavin. The dialogue won't match the alignment on the character sheet, and it'll cause problems if the player roleplays evil for other reasons, but that's the player's call.

 

My post which got deleted (I thought I was the only one that did that!) just said that I'll fix things on my end so that you don't have to worry about excluding Gavin and Haldamir. A simple XPLT() trigger would do it.

Link to comment
And bigg, did you have anything specific in mind? Also, I've now had a chance to check both Shapeshifting fix options, and I get that stutter on both of them.

 

I'm going to create a new topic in General Mod Discussion, since the SHS thread isn't getting much joy.

Congratulations for cross-thread spamming.

 

 

Likewise, I'm not fussed if somebody wants to mod a LE Gavin.

Interestingly, not six months ago you said the exact opposite.

Link to comment

Likewise, I'm not fussed if somebody wants to mod a LE Gavin.

Interestingly, not six months ago you said the exact opposite.

I'm female. I'm allowed to change my mind. :p

 

Edit: Seriously, though, after seeing how hyperprotective some modders can be of their NPCs, and seeing how much that attitude stifles creativity in other modders and robs players of choice, I've reconsidered my stance. I've got no right to dictate how my guys should be used. Just don't blame me if Gavin leaves the party when the PC's rep hits 5.

Link to comment

Archived

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

×
×
  • Create New...