Package: bl3-cli-saveedit
Borderlands 3 Commandline Savegame/Profile EditorThis project is a commandline Python-based Borderlands 3 Savegame
and Profile Editor.  It's a companion to the very similarCLI editor for BL2/TPS,
and provides some very similar functionality.  It can be used
to level up your characters, unlock Mayhem modes early in the
game, unlock TVHM, add SDUs, unlock equipment slots, and more.This editor has only been tested on PC Savegames -- other platforms'
savegames are not supported at the moment.Please keep the following in mind:This app does not have any graphical interface.  You must be
on a commandline in order to use it.  (A rudimentary web
interface is available, though -- see below.)The app has only very limited item-editing capability at the
moment, which is restricted to:Item Levels can be changedMayhem Level can be set on itemsIt does not offer any direct ability to alter Guardian Rank status.While I have not experienced any data loss with the app,take backups of your savegames before using this, and
keep in mind that it could end up corrupting your saves.  If
you do encounter any data loss problems, please contact me
and I'll try to at least fix whatever bug caused it.Table of ContentsWeb UIInstallationUpgradingNotes for People Using WindowsRunning from GithubFinding SavegamesEditor UsageTODOCreditsLicenseOther UtilitiesChangelogWeb UIAbram Hindle is providing a simple web-based version of this utility,
so feel free to give that a try:https://abramhindle.github.io/bl3-cli-saveedit/Yes, this will install python and bl3-cli-saveedit in your browser and
give you a tiny UI to dupe your savefiles or import items.InstallationThis editor requiresPython 3, and has been
tested on 3.7, 3.8, 3.9, and 3.10.  It also requires theprotobuf package.The easiest way to install this app is viapip/pip3.  Once Python 3 is
installed, you should be able to run this to install the app:pip3 install bl3-cli-saveeditOnce installed, there should be a few new commandline utilities available
to you.  The main editor isbl3-save-edit, and you can see its possible
arguments with-h/--help:bl3-save-edit -hThere's also abl3-save-infoutility which just shows some information
about a specified savefile.  You can see its possible arguments with-h/--helpas well:bl3-save-info -hIf you've got a raw savegame protobuf file that you've hand-edited (or
otherwise processed) that you'd like to import into an existing savegame,
you can do that withbl3-save-import-protobuf:bl3-save-import-protobuf -hAlternatively, if you've got a savegame exported as JSON that you'd like
to import into an existing savegame, you can do that withbl3-save-import-json:bl3-save-import-json -hFinally, there's a utility which I'd used to generate myBL3 Savegame Archive Page.
This one won't be useful to anyone but me, but you can view its arguments
as well, if you like:bl3-process-archive-saves -hThere are also profile-specific versions of most of those commands, which
can be used to edit the main BL3profile.sav:bl3-profile-edit -h
bl3-profile-info -h
bl3-profile-import-protobuf -h
bl3-profile-import-json -hUpgradingWhen a new version is available, you can update usingpip3like so:pip3 install --upgrade bl3-cli-saveeditYou can check your current version by running any of the apps with the-V/--versionargument:bl3-save-info --versionNotes for People Using WindowsThis is a command-line utility, which means there's no graphical interface,
and you'll have to run it from either a Windowscmd.exeprompt, or presumably
running through PowerShell should work, too.  The first step is to
install Python:The recommended way is toinstall Python from python.org.
Grab what's available in the 3.x series (at time of writing, that's 3.9.4),
and when it's installing, make sure to check the checkbox which says something
like "add to PATH", so that you can run Python from the commandline directly.If you're on Windows 10, you can apparently just typepython3into a command
prompt to be taken to the Windows store, where you can install Python with
just one click.  I've heard reports that this method doesnotprovide the
ability to add Python to your system PATH, though, so it's possible that
running it would be more complicated.When it's installed, test that you can run it from the commandline.  Open up
eithercmd.exeor PowerShell, and make sure that you see something like this
when you runpython -V:C:\> python -V
Python 3.9.4If that works, you can then run thepip3 install bl3-cli-saveeditcommand
as mentioned above, and use the commandline scripts to edit to your heart's
content.Running from GithubAlternatively, if you want to download or run the Github version of
the app: clone the repository and then installprotobuf(you can
usepip3 install -r requirements.txtto do so, though apip3 install protobufwill also work just fine).You can then run the scripts directly from the Github checkout, though
you'll have to use a slightly different syntax.  For instance, rather than
runningbl3-save-edit -hto get help for the main savegame editor, you
would run:python -m bl3save.cli_edit -hThe equivalents for each of the commands are listed in their individual
README files, linked below.Finding SavegamesThis app doesn't actually knowwhereyour savegames or profiles are located.
When you give it a filename, it'll expect that the file lives in your "current"
directory, unless the filename includes all its path information.  When launching
acmd.exeon Windows, for instance, you'll probably start out in your home
directory (C:\Users\username), but your savegames will actually live in a
directory more likeC:\Users\username\My Documents\My Games\Borderlands 3\Saved\SaveGames\<numbers>\.
The easiest way to run the utilities is to just usecdto go into the dir
where your saves are (or otherwise launch your commandline in the directory you
want).  Otherwise, you could copy the save into your main user dir (and then
copy back after editing), or even specify the full paths with the filenames.Editor UsageFor instructions on using the Savegame portions of the editor, seeREADME-saves.md.FOr instructions on using the Profile portions of the editor, seeREADME-profile.md.TODOWould anyone appreciate an option todeleteFabricators?  Hm.Would be nice to have some anointment-setting functions in here.Did we want a function toclearVault Card progress?PS4 Support (for already-unlocked saves, anyway)If we fail to read a savefile or profile, might be nice toactuallycheck
if it's the other of profile-or-savefile, and give a more helpful message in
those cases.Something a bit more Enum-like for various things in__init__.py; I
know that's not very Pythonic, but when dealing with extra-Python data
formats, one must sometimes make exceptions.Unit tests?CreditsThe encryption/decryption stanzas inBL3Save.__init__andBL3Save.save_towerehelpfully provided by Gibbed(rick 'at' gibbed 'dot' us), so many thanks for that!  The protobuf definitions
are also provided by Gibbed, from hisBorderlands3Protosrepo,
and used with permission.  Gibbed also kindly provided the exact hashing
mechanism used to work with weapon skins and trinkets.The rest of the savegame format was gleaned from 13xforever/Ilya'sgvas-converterproject:https://github.com/13xforever/gvas-converterAbram Hindleis responsible for getting
a web version of this utility online (based on histtwl-cli-saveeditfork for Wonderlands).  Thanks!Many thanks also to Baysix, who endured an awful lot of basic questions about
pulling apart item serial numbers.  Without their help, we wouldn't have
item level editing (or nice item names in the output)!Basically what I'm saying is that anything remotely "hard" in here is all thanks
to lots of other folks.  I'm just pasting together all their stuff.  Thanks, all!LicenseAll code in this project is licensed under thezlib/libpng license.  A copy is
provided inCOPYING.txt.Other UtilitiesVarious BL3 Savegame/Profile editors have been popping up, ever since Gibbed
released the encryption details.  Here's a few which could be more to your
liking, if you didn't want to use this one for whatever reason:FromDarkHell's BL3 Save/Profile Editor-
Written in C#, has EXE downloads for ease of use on Windows.Zak's Borderlands 3 Save Editor- Written
in Rust, and is cross-platform.  Edits both saves and profiles.Raptor's Editor- This is a web-fronted editor,
though it uses alocal executableto do all the work.  Sourcecode is available, and it works on Windows, Mac,
and Linux.  Coded inGo.A couple others exist but as of September 2022, are out of date and not really great
for use on newer saves.  Here they are, though, in case they get updated without
me noticing:HackerSmaker's CSave Editor- Cross-platform
commandline editor written in C.  Has a terminal (ncurses) UI on UNIX-like OSes.sandsmark's borderlands3-save-editor-
Written in C++ with Qt for GUI.  Is still in development.  Native downloads
for Windows, but should compile fine on other platforms.In Memoriam: Baysix, the author of the original web-based editor at bl3editor.com,
passed away in early 2021, and that editor is now permanently offline.  RIP!Changelogv1.17.0- September 1, 2023Added--copy-tvhmoption to copy TVHM state to NVHM.Ported--inventory-wipeinventory wipe option fromttwl-cli-saveeditAdded new cosmetics introduced in the Aug 31, 2023 patchv1.16.0- November 18, 2021Updated name of "Seventh Sense (unknown version)" to "Seventh Sense (purple
version)", since realizing that it's now a valid drop from the Diamond
Armory (presumably since DLC5's release).Updated for Vault Card 3 patch:Data Updates (to understand new gear)Vault Card 3 Keys/Chestsv1.15.1- August 11, 2021Updated with some Character Heads which were shipped with the Vault Card 2
update but overlooked for 1.15.0.v1.15.0- August 5, 2021Updated for Vault Card 2 patch:Data Updates (to understand new gear)Vault Card 2 Keys/ChestsUpdated Bank SDU countv1.14.0- July 7, 2021Added--mission-pathstobl3-save-infoAdded--delete-pt1-missionand--delete-pt2-missiontobl3-save-editAdded options to clear seasonal event challenge progress (Bloody Harvest,
Broken Hearts, Revenge of the Cartels)v1.13.0- June 24, 2021Updated for today's patchUpdated level cap to 72Updated protobufsAdded--reverseoption for my Savegame Archive processing script, for some more
flexibility on the CSS when outputting HTMLv1.12.0- April 11, 2021Updated with DLC6 (Director's Cut) compatibility.Support for updated item serial number formatAdded--guardian-keys,--vaultcard1-keys, and--vaultcard1-chestsarguments
for profile editorFixed a few item names which weren't being mapped properlyv1.11.1- February 12, 2021Fixed name of the Broken Hearts 2021 weapon trinket "Cosmic Romance" to be "Tentacle
Ventricles" like in game -- it was updated with an OakTMS update on Feb 11 by GBX.v1.11.0- February 1, 2021Added Citizen Science editing functionality to profile editor, thanks
to@apple1417v1.10.4- January 21, 2021Updated with the new cosmetics data from today's patch.(Totally forgot to do that
in v1.10.3.)v1.10.3- January 21, 2021Updated internal inventory DB with data from today's patch.  (No real functionality
changes with this.)v1.10.2- November 10, 2020Updated internal inventory DB with a minor change which was in the previous GBX
patch.  (Probably no actual functionality changes with this.)v1.10.1- November 10, 2020A second patch was released, about 12 hours after the Designer's Cut release, which
updated the protobufs and was causing us to not read saves properly.  This has been
fixed up now.Also require at least protobuf v3.12, which appears to be required as of my
latest protobuf generation.v1.10.0- November 9, 2020Updated with DLC5 (Designer's Cut) supportv1.9.2- October 8, 2020Added in the missed weapon skin "Porphyrophobia," from Bloody Harvest 2020.v1.9.1- September 30, 2020Fixed unlocking FL4K's "Antisoci4l" head (though you should still get
that oneall legit-like)v1.9.0- September 10, 2020Updated with DLC4 (Psycho Krieg and the Fantastic Fustercluck) supportv1.8.2- July 27, 2020Updated to allow unlocking the Battle Driver and Devil Tooth weapon trinkets, since
the July 23 patch fixed those so that they properly stay in your profile.v1.8.1- July 14, 2020--item-mayhem-maxand--item-mayhem-levelswill now apply Mayhem parts to
grenades as well as weapons.v1.8.0- July 11, 2020Added--mayhem-seedoption tobl3-save-edit, to set the random seed used to
determine active Mayhem modifiers.  The seed is now shown in thebl3-save-infooutput, as well.v1.7.2- July 6, 2020Allow characters to use skill trees properly if levelled higher directly from level 1.v1.7.1- June 29, 2020Added three more DLC3 room decorations that I'd missed orginally, for the profile
editor's cosmetic-unlock abilityAdded Jetbeast unlocks (both parts and skins)v1.7.0- June 26, 2020Updated for DLC3 (Bounty of Blood) contentJetbeast vehicle unlocks are forthcoming, until I can actually test them out.Added various Guardian Rank processingFor savegames and profiles, added--zero-guardian-rankFor only profiles, added--min-guardian-rank,--guardian-rank-rewards, and--guardian-rank-tokensAdded--unlock cubepuzzleto reset the Eridian Cube puzzle in Desolation's EdgeAdded--clear-takedownsto get rid of the Takedown mission-pickup notifications
for chars you never intend to do Takedowns with.Item name processing will now recognize the specific legendary artifact balances
added by the Maliwan Takedown update (they're functionally identical to the world-
drop versions)Updatedbl3-process-archive-savesto wipe out Guardian Rank entirelyv1.6.2- June 18, 2020Allow setting character/item levels higher than the currently-known max, in case
users want to pre-level their saves ahead of level cap increases (and in case
they don't want to wait for an official update of this app)v1.6.1- June 13, 2020Updated room decoration/trinket/weaponskin alphabetization to ignore case (so
"Casino Banner" sorts before "COV Bat," for instance).Counts of unlocked cosmetic items inbl3-profile-infowill now include the
"default" cosmetics which are always unlocked, so those counts match the numbers
in-game.v1.6.0- June 11, 2020Updated for extra content introduced by Takedown at the Guardian BreachAdded--golden-keysoption tobl3-profile-edit, to set available Golden KeysAdded--randomize-guidoption tobl3-save-editv1.5.2- May 23, 2020Updated item name mapping to include the COM Balances used by Trials bosses, for
their dedicated COM drops.Add in the--csvoption to allow importing/exporting items into CSV files,
instead of just text files (which is the default without--csv).  Has no effect
except on item imports/exports.v1.5.1- May 5, 2020Fixed alphabetization of COV Buzzaxe room decoration.  In the game data it looks
like it's called "Psycho Buzzaxe," but the actual in-game label is COV Buzzaxe.Fixed name displays for "regular" (non-E-Tech, non-Legendary) Maliwan snipers and
Tediore pistols.Updated item name mapping to distinguish between the blue-rarity mission reward
version of Redistributor from the legendary version from Maliwan Takedown.Updatedbl3-process-archive-savesto clear out some 3rd-playthrough data
which earlier versions had accidentally introduced(only really of interest
to myself)v1.5.0- April 28, 2020Added ability to alter Mayhem level for items, both in savegames and profile.--item-mayhem-maxwill set items to the max Mayhem level (10), or--item-mayhem-levels <num>will set a specific level (0to remove Mayhem
from items entirely).Item level reports when viewing contents or exporting items will include
the Mayhem levelsInfo views will show the total number of available SDUs along with the
purchased countVarious internal code reorganizationv1.4.0- April 23, 2020Updated for the Cartels + Mayhem 2.0 patch:Update item/weapon handling to understand new serial number versionsAdded in new cosmetic unlocksMayhem level can now be set as high as 10Extra SDU levels addedFixed a bug related to viewing vehicle unlocks, thanks to new game dataIntroduction of profile editing utilities, viabl3-profile-edit,bl3-profile-info,bl3-profile-import-json, andbl3-profile-import-protobuf.
The following functionality is supported:Importing/Exporting to both JSON and ProtobufImporting/Exporting items to/from the bankAltering the level of gear stored in the bankUnlocking all global customizations/cosmeticsAlphabetizing the list of room decorations, trinkets, and weapon skinsDisplay changes forbl3-save-info- introduced individual arguments to
show more detailed information as-requested, instead of only having a
global-v/--verboseoption:Added-i/--itemsargument, to show inventory informationAdded--fast-travelargument, to show unlocked fast travel stationsAdded--all-challengesargument, to list all challenges in the save file
and their statuses (note: this will be over 1.5k items!)Added--all-missionsargument, to list all completed missions in addition
to active ones-v/--verbosenow implies the four options above.bl3-save-infowill now also report on whether the savegame has finished the
main game or any of the DLCs.Added--unfinish-nvhmoption tobl3-save-edit, to completely clear out
any TVHM data and pretend that NVHM was never finished.v1.3.1- April 14, 2020Bah, forgot a few more README tweaks about the JSON export/importv1.3.0- April 14, 2020Addedjsonoutput type, to export the protobuf as encoded into JSONAddedbl3-save-import-jsonutility, to load JSON into a savegamev1.2.2- April 12, 2020Updated README with some more specific Windows 10 installation advice.v1.2.1- April 12, 2020Updated Credits section of the README with one more credit that I'd
wanted to put in but forgot. :)v1.2.0- April 12, 2020Added ability to change item/weapon levels, using--items-to-charor--item-levelsItem Imports will nownotimport Fabricators unless explicitly
told to with the--allow-fabricatoroption.Item names and levels are now shown where appropriate:In verbosebl3-save-infooutputIn item export filesWhile importing itemsUpdated to Protobuf v3, which is what BL3 itself uses.  Now when we
re-save without any edits, the save should be identical to the
original savegame.Item export will now be done without any encryption, so an item will
have the exact same item code regardless of where it came from
(previously, item codes would change every time the game was saved,
so the same item could have very different-looking codes)Added-V/--versionflag to show version numberv1.1.1- April 7, 2020Added in Citizen Science mission name.v1.1.0- April 7, 2020Addedbl3-save-import-protobufcommand, to load a raw protobuf file
into an existing savegame.v1.0.1- April 5, 2020Some saves include Eridium as an ammo type, presumably related to the
Fabricator.  Fixed a crash inbl3-save-inforelated to that.v1.0.0- April 5, 2020Initial version