Baldur's Gate 3
0 of 0

File information

Last updated

Original upload

Created by

hypermorphic

Uploaded by

hypermorphic

Virus scan

Safe to use

About this mod

Easily edit the boosts and magical properties of your weapons and armor. Tired of failing Perception checks? Make your underwear grant +30 Perception.

Permissions and credits
The equipment stats used by the game are simple text files.  You can easily edit in any kind of cheat without installing any "mods" that are recorded in your savegame.

Please share any cool effects you make in the comments.


Getting Started

*** Start by reading Tutorials 1 and 2 on the Articles tab. ***

Method 1
  • Pros
    • Reliable
  • Cons
    • Changes are spread across multiple files
    • Must edit each file again after each game update

Extract the Armor and Weapon Mod Files into the game's Data folder, preserving all the subfolders:  e.g.  x:\SteamLibrary\steamapps\common\Baldur's Gate 3\Data\Public

The files all have a .disabled extension to prevent the game from using them at startup.  When you're ready to make an edit, remove the .disabled extension from the filename.  You will need to restart the game entirely for BG3 to see your changes.

These files are all updated regularly with each new Patch release.  You will need to keep the files up-to-date and then reapply your edits.

Method 2 (experimental)
  • Pros
    • Changes are kept together in a single separate file
    • Much easier to recover after a game update
  • Cons
    • Quirky.  May need to work around strange loading behavior in the game engine

Extract the Method 2 Mod Files into the game's Data folder, preserving all the subfolders:  e.g.  x:\SteamLibrary\steamapps\common\Baldur's Gate 3\Data\Public

Create a new file to hold your changes that starts with Z (to push it to the end of alphabetical processing):  e.g.  x:\SteamLibrary\steamapps\common\Baldur's Gate 3\Data\Public\GustavDev\Stats\Generated\Data\Zzz.txt

Simplest - Find something you want to modify in the Data subdirectories of the Source Files.  Copy the entire entry into Zzz.txt, leaving one blank line between entries.  Make your edits there.  You can mix entries from different types of files (Armor, Weapon, Character, Spell_) or folders (Shared, Gustav), or create new entries by changing the names.

Best - Since the file is processed last, you can "edit" existing entries and replace select property values.  This is best approach for future-proofing your changes and making them compatible with other mods.  Simply define a new entry, then "use" the existing entry with the same name to copy its properties.  Here is an example from my Aura of Revealing mod where I add a status effect to the base class for Torches:

new entry "WPN_Torch"
type "Weapon"
using "WPN_Torch"
data "StatusInInventory" "ENABLE_REVEALING_AURA"


** Engine quirk: Changes in Zzz.txt to Armor/Weapons that were originally defined in GustavDev are ignored unless Armor.txt/Weapon.txt exists.  This might be some kind of optimization, allowing the game to skip recompiling the Armor and Weapon stats if it detects no new files.  I have included these files in the Mod Files to make this more seamless.  If you do not plan to edit GustavDev Armor or Weapon entries, you can safely remove one or both files.  Otherwise, they must be replaced with current versions after each new Patch release.

Please let me know in the comments if you find other quirks.


Documentation


I've tried to collect all of the available information into reference spreadsheets.  Use them as a guide, but they might contain errors or omissions.  I can't personally test every option in game, so you will need to experiment.

Armor and Weapons List

This CSV includes all Armor and Weapon objects that have Stats definitions.  Use it to cross reference the item name as it appears in the game with its Stats name and definition file path.  I have focused almost exclusively on armor, but weapons are easily hackable too.

Source Files

These are the raw Stats files extracted from the game.  Dig through them to get a fuller understanding of each option.

Reference Sheet

Excel spreadsheet with the data I've scraped from the source files into a convenient format.  IT IS NOT COMPLETE!  If you don't find what you're looking for, search in the Source files yourself.

Boosts sheet

Each Armor.txt entry can define one Boosts property in the form:

data "Boosts" "statement1;statement2"

Statements will look familiar to anyone who's used a programming language.  Each statement is a callable function that makes a change in the game.  Most statements are simple and take the form:

FunctionName(Argument1, Argument2, Argument3)

Functions take different numbers of arguments, and some arguments are optional and can be left out.  Check the Boosts worksheet in the reference sheet for a list of functions I've found.

For each function, I've tried to guess at what arguments it can take.  I've used this naming convention throughout:

  • / - separates multiple choices of argument options or types
  • SomeName - if the argument includes capital letters, it is a string defined by the game and should be copied exactly as written.  e.g.  All, AttackRoll, Skill, Magical
  • number - a positive number.  Usually a whole number unless a decimal makes sense, such as for multipliers.  e.g. 10, 1.25
  • modifier - positive or negative whole number.  Used for bonuses.  e.g.  1, +2, -3
  • dice - a dice roll in the format seen in the game.  Die sizes are: d4, d6, d8, d10, d12, d20, d100.  e.g.  1d8, 3d6, 1d12+4
  • percentage - a positive number followed by a % sign.  Used for granting proportional bonuses:  e.g.  25%, 100%
  • true/false - Either true or false
  • (opt) - indicates that the value is optional and can be left out
  • {empty} - indicates that this argument can be left empty, but more arguments can come after it.  e.g.  RedirectDamage(2, , ,false)
  • somename - names in all lower case refer to a list of values I've included on another sheet.  e.g. ability, attacktarget, proficiency, skill

If you study the source files, you'll see there are more complex statements available to use.  Conditional statements take the form:

IF(TestFunction()):FunctionName()

In this case, FunctionName will not be called unless TestFunction evaluates to true.  I used this once in the tutorial, but it's not needed for most of the cheats you will apply.


Passives sheet

Each Armor.txt entry can define one PassivesOnEquip property in the form:

data "PassivesOnEquip" "PassiveName1;PassiveName2"

Passives are character flags that are used to apply wide variety of changes, like class and leveling options, race and character abilities, or spell and magical object effects.  They are usually listed in your character sheet with the icon of the equipment that granted it.  Check the Passive.txt files in the Source to see all of the Boosts and other effects it applies.


Statuses sheet

Each Armor.txt entry can define one StatusOnEquip property in the form:

data "StatusOnEquip" "STATUSNAME1;STATUSNAME2"

Statuses are temporary and are usually displayed as an icon next to the player's portrait.  The effects are complex and they can apply both Boosts and Passives, which are listed in the spreadsheet.  They may also add visual effects to the character.  See the Status_*.txt source file for more detail.

Status effects are only applied when the armor is equipped.  You may need to re-equip it to regain a lost status.


Extracting Source Files

The Source files will need to be continually replaced as new patches are released.  I've included a small batch script for automating the extraction process.  Files must be extracted in order from oldest (Shared.pak, Gustav.pak) to newest (PatchX.pak).  In the batch file I've assumed that after Patch9, Larian will start numbering them like Patch10_Hotfix1.pak and so on.

You will need a copy of divine.exe from LSLib to do the actual extraction.  You must also edit your game's Data path, divine.exe path, and the extraction destination into the batch file before running it.


Notes

I will use this section as a dumping ground for additional info and explanations.

Weapon.txt

I haven't really investigated weapons yet, but a quick look at this file reveals that it does not use data "Boosts".  Boosts are assigned with data "DefaultBoosts" instead.  Armor entries can use both Boosts and DefaultBoosts, and I haven't figured out yet if there is a difference.

The using statement

Defining the same properties over and over would get very repetitive, so object Stats are set up with a hierarchy.  Here is the definition for a common Greatsword:

new entry "WPN_Greatsword"
type "Weapon"
using "_BaseWeapon"
data "RootTemplate" "ecfb9f69-5bc3-402e-acd8-c91d57e28403"
data "Damage Type" "Slashing"
data "Damage" "2d6"
data "ValueLevel" "4"
data "Weight" "2.7"
data "BoostsOnEquipMainHand" "UnlockSpell(Target_PommelStrike);UnlockSpell(Target_Slash_New);UnlockSpell(Zone_Cleave);"
data "Weapon Group" "MartialMeleeWeapon"
data "Weapon Properties" "Twohanded;Heavy;Melee;Dippable"
data "Proficiency Group" "Greatswords;MartialWeapons"


The game also needs to define what a Greatsword +1 is.  They could have repeated all of the properties above, but instead its entry is much shorter:

new entry "WPN_Greatsword_1"
type "Weapon"
using "WPN_Greatsword"
data "RootTemplate" "1a2a58b7-4bd5-44d5-b1fe-8cd7e5b53def"
data "ValueUUID" "4cd41c74-9c86-4233-922e-4db5bc750df5"
data "Rarity" "Uncommon"
data "DefaultBoosts" "WeaponEnchantment(1);WeaponProperty(Magical)"
data "Weapon Properties" "Twohanded;Heavy;Melee;Dippable;Magical"

The using "WPN_Greatsword" line means:  process all properties of WPN_Greatsword first before continuing on.  We see that they've added a few things.  The Boost WeaponEnchantment(1) upgrades the weapon by 1 level in a consistent way, and WeaponProperty(Magical) changes the way its icon appears, at the least.  "Weapon Properties" is defined in both, but the second definition replaces the first, adding Magical to the list of properties.

Many entry are defined this way and inherit properties from previous ones.  WPN_Greatsword itself inherits from _BaseWeapon, the root entry for all weapons.

Character.txt

Characters base stats can also be edited to some extent with this method.  It's more difficult and inconsistent, so you should try other methods first.

There are 2 Character.txt files provided the Source files.  Either can be copied into the game folder and edited.  These files makes heavy use of the using statement explained above.

The copy in the Shared folder defines an entry _Hero that is used as a base for all player characters, party members, and hirelings.  If you want to add an improvement for your whole party, this is the place to try first.  It is just a base stat, so defining an attribute like data "Strength" "30" is probably not going to work.   Many other stats will be layered on top of the character definition as you level up, so the chances are high that this property will be overwritten.  Adding a DefaultBoosts with Perception +30 did work for all of my party though.  Perception problem solved!

On top of _Hero are series of child entries broken down by race and gender:  HeroElfMaleHeroGithFemaleHeroGnomeMale, etc.  These are base entries for any player character you create.  Strangely, they only change body weight, so I suspect they are placeholders for the Character Creator to build on.  In my game, I play a male elf, so if I make a change to HeroElfMale, it affects both my character and Astarion.  There doesn't seem to be an entry that is only for you, the player.

After these definitions are some that you will recognize, like new entry "POC_Player_Rogue", using "HeroElfMale".  This is obviously Astarion, and I've successfully added some Passives and DefaultBoosts for him here.  His base abilities are defined here as well, but my changes don't appear in game, so these must have been recorded in my savegame when he leveled up.

Some more POC_Player_ entries are defined in the second Character.txt file.  These seem to be for the characters you meet later in the game.