Jump to content

Future tweak ideas - post 'em here


Recommended Posts

14 hours ago, JediMindTrix said:

Clerics and Mages can use light crossbows and put a prof point into them.

Something like:

//UNIVERSAL CROSSBOWS________________________________________________________________
//
COPY_EXISTING_REGEXP GLOB ~^.+\.itm$~ ~override~
  PATCH_IF (SOURCE_SIZE > 0x71) BEGIN
    READ_BYTE 0x31 prof ELSE 0
    READ_SHORT 0x1c type
    PATCH_IF (prof = 103) OR (type = 31) BEGIN
        WRITE_BYTE 0x20 (THIS BAND 0b11111011)
        PATCH_FOR_EACH offset IN
          ~0x50~
          ~0x54~
        BEGIN
          READ_LONG ~%offset%~ desc_strref
          PATCH_IF (desc_strref >= 0 && desc_strref < 2147483646) BEGIN
            READ_STRREF ~%offset%~ desc
           	LAUNCH_PATCH_FUNCTION ~REMOVE_CLASS_LINE_FROM_USABILITIES~
           	  STR_VAR
           	    unusable_regexp = EVALUATE_BUFFER ~^[ %TAB%]*\(Unusable By\|Not Usable By\).*~
           	    unusable_replacement = ~Not Usable By:~
           	    class_regexp = EVALUATE_BUFFER ~[%LNL%%MNL%%WNL%].*\bMage.*~
           	    class_prefix = ~ ~
           	END
          END
        END
    END
  END
BUT_ONLY

ACTION_IF !(FILE_EXISTS_IN_GAME ~d5__fnp_usability.d5~) BEGIN
 COPY_EXISTING_REGEXP GLOB ~^.+\.itm$~ ~override~
  PATCH_IF (SOURCE_SIZE > 0x71) BEGIN
    READ_BYTE 0x31 "prof" ELSE 0
    PATCH_IF ("%prof%" = 103) BEGIN
      READ_BYTE 0x1f "fighter"
      PATCH_IF (("%fighter%" BAND "0b00001000") = "0b00000000") BEGIN
        READ_BYTE   0x1E "cleric"
        WRITE_BYTE 0x1E ("%cleric%" BAND "0b01111111")
        READ_BYTE   0x1F "cleric-mage"
        WRITE_BYTE 0x1F ("%cleric-mage%" BAND "0b00111000")
        PATCH_FOR_EACH offset IN
          ~0x50~
          ~0x54~
        BEGIN
          READ_LONG ~%offset%~ desc_strref
          PATCH_IF (desc_strref >= 0 && desc_strref < 2147483646) BEGIN
            READ_STRREF ~%offset%~ desc
           	LAUNCH_PATCH_FUNCTION ~REMOVE_CLASS_LINE_FROM_USABILITIES~
           	  STR_VAR
           	    unusable_regexp = EVALUATE_BUFFER ~^[ %TAB%]*\(Unusable By\|Not Usable By\).*~
           	    unusable_replacement = ~Not Usable By:~
           	    class_regexp = EVALUATE_BUFFER ~[%LNL%%MNL%%WNL%].*\bCleric.*~
           	    class_prefix = ~ ~
           	END
          END
        END
      END
    END
    READ_SHORT ~0x1c~ ~type~
    PATCH_IF (~%type%~ = ~31~) BEGIN
      READ_BYTE 0x1f "fighter"
      PATCH_IF (("%fighter%" BAND "0b00001000") = "0b00000000") BEGIN
        READ_BYTE   0x1E "cleric"
        WRITE_BYTE 0x1E ("%cleric%" BAND "0b01111111")
        READ_BYTE   0x1F "cleric-mage"
        WRITE_BYTE 0x1F ("%cleric-mage%" BAND "0b00111000")
        PATCH_FOR_EACH offset IN
          ~0x50~
          ~0x54~
        BEGIN
          READ_LONG ~%offset%~ desc_strref
          PATCH_IF (desc_strref >= 0 && desc_strref < 2147483646) BEGIN
            READ_STRREF ~%offset%~ desc
           	LAUNCH_PATCH_FUNCTION ~REMOVE_CLASS_LINE_FROM_USABILITIES~
           	  STR_VAR
           	    unusable_regexp = EVALUATE_BUFFER ~^[ %TAB%]*\(Unusable By\|Not Usable By\).*~
           	    unusable_replacement = ~Not Usable By:~
           	    class_regexp = EVALUATE_BUFFER ~[%LNL%%MNL%%WNL%].*\bCleric.*~
           	    class_prefix = ~ ~
           	END
          END
        END
      END
    END
  END
 BUT_ONLY
END
//__________________________________________________________________________________

//CLASS/WEAPPROF LISTS______________________________________________________________
//
ACTION_DEFINE_ASSOCIATIVE_ARRAY clerics_array BEGIN 
  6 => 3 END
  17 => 14 END
  18 => 15 END
END
ACTION_DEFINE_ASSOCIATIVE_ARRAY warrior_clerics_array BEGIN 
  13 => 8 END
  20 => 17 END
  21 => 18 END
END
ACTION_DEFINE_ASSOCIATIVE_ARRAY wizards_array BEGIN 
  4 => 1 END
END
                                                                 
COPY_EXISTING ~kitlist.2da~ ~override~
//  COUNT_2DA_COLS cols
  READ_2DA_ENTRIES_NOW ~r2en_kitlist~ 10
  FOR (row = 2; row < r2en_kitlist; row += 1) BEGIN
    READ_2DA_ENTRY_FORMER ~r2en_kitlist~ row 1 kit_name
    READ_2DA_ENTRY_FORMER ~r2en_kitlist~ row 6 prof_col
    READ_2DA_ENTRY_FORMER ~r2en_kitlist~ row 8 class_num
    PATCH_IF (class_num == 3) OR (class_num == 14) OR (class_num == 15) BEGIN 		//	clerics
      DEFINE_ASSOCIATIVE_ARRAY clerics_array BEGIN "%prof_col%" => "%class_num%" END
    END
    PATCH_IF (class_num == 8) OR (class_num == 17) OR (class_num == 18) BEGIN 		//	warrior/clerics
      DEFINE_ASSOCIATIVE_ARRAY warrior_clerics_array BEGIN "%prof_col%" => "%class_num%" END
    END
    PATCH_IF (class_num == 1) OR (class_num == 19) BEGIN 		//	wizards
      DEFINE_ASSOCIATIVE_ARRAY wizards_array BEGIN "%prof_col%" => "%class_num%" END
    END
  END
BUT_ONLY

//PROFS FOR KIT CLERICS____________________________________________________________
//
COPY_EXISTING ~weapprof.2da~ ~override~
  COUNT_2DA_COLS cols 
  PHP_EACH clerics_array AS kit_col => class BEGIN
    SET_2DA_ENTRY 23 (%kit_col% + 1) cols 1 // xbow
  END
  PHP_EACH wizards_array AS kit_col => class BEGIN
    SET_2DA_ENTRY 23 (%kit_col% + 1) cols 1 // xbow
  END
  PHP_EACH warrior_clerics_array AS kit_col => class BEGIN
    SET_2DA_ENTRY 23 (%kit_col% + 1) cols 2 // xbow
  END
BUT_ONLY
//__________________________________________________________________________________
Link to comment
14 hours ago, JediMindTrix said:

All warrior classes and their kits (where applicable) can put 3 pips into their proficiencies

All multi-class fighters and cleric/ranger can put 3 pips into their proficiencies

You could almost just do

COPY_EXISTING ~weapprof.2da~ ~override~
  REPLACE_TEXTUALLY ~[ %TAB%]2~ ~ 3~
BUT_ONLY

Might need some cleanup after, though.

Link to comment
17 hours ago, CamDawg said:

Once you ID an item all future copies get ID'd automatically, e.g. if you ID an Arrow +1, all other Arrows +1 don't need ID.

You sure ? Cause in BG1 and BG2 you needed to do that for sure. (non-EE) .. if you didn't have enough lore to ID them, vs the items lore value(0x42).

Edited by Jarno Mikkola
Link to comment
4 hours ago, Jarno Mikkola said:

You sure ? Cause in BG1 and BG2 you needed to do that for sure. (non-EE) .. if you didn't have enough lore to ID them, vs the items lore value(0x42).

Yes, it currently doesn't work that way, hence the proposal for a new component of Tweaks to change the behavior.

Link to comment

Ah - it wasn’t clear from reading it that it was a proposed future tweak. 

But, it is a good idea! (Not sure how it could actually be done, though…)

(Neither here nor there, but I’d love to make a Lore Overhaul that makes identification purely binary, requiring a spell or store purchase, and re-use the Lore stat for something more interesting…)

Link to comment

It's simple, but it just requires a script block for every identifiable item in the game. Which is easy to code but may slow the game down to a crawl, so I'm currently pondering alternatives.

edit: Simple, but after testing, not reliable enough due to how the actions and triggers interact with multiple copies of items in inventory.

Edited by CamDawg
Link to comment
15 hours ago, subtledoctor said:

(Neither here nor there, but I’d love to make a Lore Overhaul that makes identification purely binary, requiring a spell or store purchase, and re-use the Lore stat for something more interesting…)

Right, and then you have a mod that makes every jewel(ruby, emerald etc...) indentifiable, and your non lore based thing is just expensive as the jewels themselves.

 

18 hours ago, CamDawg said:

Yes, it currently doesn't work that way, hence the proposal for a new component of Tweaks to change the behavior.

The problem with this is that it can have bad effects to the efficiency of the game. As it involves Action_if (item) ... as that still causes lag even today.

Link to comment

Some BG2 tweak requests for the future.

An option to speed up the Jaheira quests similar to the romance tweak.  Many playthroughs I find myself using the console to spawn Dermin and Terminsel in order to finish her quests.

Static quest pickup for strongholds.  Example, the paladin stronghold lets you begin the next quest as soon as you finish the previous one.  The ranger stronghold has someone spawn off screen after X days.  The final

Allow Carsomyr, Purifier, and the three bracers to be used by a certain female halfling fighter.  It just seems so right she be the one to wield these.

 

Link to comment
5 hours ago, Voths said:

Allow Carsomyr, Purifier, and the three bracers to be used by a certain female halfling fighter.  It just seems so right she be the one to wield these.

Sorry, this one can't be done without undesirable side effects. Disallowing characters with a particular characteristic (name, class, race, etc) from using an item that they otherwise could works just fine. Allowing characters with a particular characteristic to use an item that they otherwise couldn't doesn't work. You can't let priests of Helm use longswords without allowing them for clerics in general, and you can't let Mazzy use those paladin items without allowing them for fighters in general.

If you want Mazzy to use those items, the cleanest solution is to make her an actual paladin, through one of the various NPC customization mods.

Link to comment

Something I'd like to see is a tweak to the Multiple Strongholds component, being that I'd like to keep it to class restrictions, but with the exception that every class still gets the De'Arnise Keep. As is It's either class restrictions, or all strongholds, and the next component "Make Individual Strongholds Available" gets skipped if either of the two options are selected.

I understand that I could just enable all, and just turn down the ones that aren't appropriate to class (except the De'Arnise Keep), but I'd much rather just not be offered everything in game unless it's class appropriate, seems silly to me the idea of a Paladin being offered the Thieves Guild for instance, but even if you're not a warrior class, I think the argument can be made that all characters in the game are "the fighting type" as would be appropriate for the De'Arnise keep.

Link to comment

I'd like to see another option in the NPC "Consistent Stats" tweaks - the NPCs gain their bonuses when transitioning from BG1 to the next campaign. For example, if you have Jaheira in your party during the main BG1 campaign, she starts with 14 Dex there. Then, when you transition to Siege of Dragonspear with her in the party, or pick her up later in SoD, she gains +3 Dex to match the starting 17 she would have if you recruited her in SoD without ever having her before.

This one would work by tweaking the characters' scripts; set a local variable if the character joins the party in chapter 1-7, increment stats if you see that variable in chapter 8+. Available only for BGEE with SoD or for trilogy versions.

Link to comment

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...