Package: ttwl-cli-saveedit
Tiny Tina's Wonderlands Commandline Savegame/Profile EditorThis project is a commandline Python-based Wonderlands Savegame
and Profile Editor.  It's based onapocalyptech's CLI editor for BL3,
and provides some very similar functionality.  It can be used
to level up your characters, level up your gear, set character
stats (Hero Skills, Myth Rank), and unlock a variety of character
features early: feats/companions, second skill tree (including
re-selecting via Quick Change), Chaos Mode, SDUs, 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 changedChaos Level can be set on itemsEnchantment Reroll count can be clearedUnlike in BL3, when creating new savegames for Wonderlands, the
savegame GUIDmustbe randomized, otherwise the game won't
recognize the new save.  Therefore, rather than having a--randomize-guidoption for the save editor, this Wonderlands
version instead defaults to randomizing the GUID, and provides
a--dont-randomize-guidargument.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, who took an early lead in getting this ported over to
Wonderlands, is providing a simple web-based version of this utility,
so feel free to give that a try:https://abramhindle.github.io/ttwl-cli-saveedit/Yes, this will install python and ttwl-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 through 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 ttwl-cli-saveeditOr, for Abram Hindle's development version:pip3 install --user git+https://github.com/abramhindle/ttwl-cli-saveeditOnce installed, there should be a few new commandline utilities available
to you.  The main editor isttwl-save-edit, and you can see its possible
arguments with-h/--help:ttwl-save-edit -hThere's also attwl-save-infoutility which just shows some information
about a specified savefile.  You can see its possible arguments with-h/--helpas well:ttwl-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 withttwl-save-import-protobuf:ttwl-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 withttwl-save-import-json:ttwl-save-import-json -hFinally, there's a utility which is intended to be used to generate theWL Savegame Archive Page.
This one won't be useful to anyone but apocalyptech, but you can view its
arguments as well, if you like:ttwl-process-archive-saves -hThere are also profile-specific versions of most of those commands, which
can be used to edit the main BL3profile.sav:ttwl-profile-edit -h
ttwl-profile-info -h
ttwl-profile-import-protobuf -h
ttwl-profile-import-json -hUpgradingWhen a new version is available, you can update usingpip3like so:pip3 install --upgrade ttwl-cli-saveeditYou can check your current version by running any of the apps with the-V/--versionargument:ttwl-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 ttwl-cli-saveeditcommand
as mentioned above, and use the commandline scripts to edit to your heart's
content.Notes for people on Steam DeckMiniconda is a user space python distribution that works on Steam Deck.Once you've installed it open a new terminal session and it's executables
will be in your path.https://docs.conda.io/en/latest/miniconda.htmlRunning 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
runningttwl-save-edit -hto get help for the main savegame editor, you
would run:python -m ttwlsave.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\Tiny Tina's Wonderlands\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 UsageFull documentation for both savegames and profiles are linked immediately below,
but as a quick example, here's a command to list information about2.sav,
followed by an edit which saves out to a new3.savttwl-save-info -i 2.sav

ttwl-save-edit --name 'CoolNewName' --save-game-id 3 --level 40 2.sav 3.savFor 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.TODOUnlock overworld abilities early?Customization Randomization improvements:Maybe would be nice to have a magicallvalue for--randomize-customizationsto assume that all customizations are available, rather than having to read
the list from a profile?Allow only randomizing specific things?  (Char, Emotes, Banner, etc).  The
backend functions already support that.Option to copy customizations from one char to another?For that matter, would it be worth having an explicit customization-export
function which writes outjustcustomizations to a file, which could then be
imported via a different arg/util?  Probably not -- I think I'd probably just
content myself with copy-from-another-char, but something to think about.Expose symmetry chance to CLI argI'd kind of like to do custom weighting on facial accessory randomization.  I
personally tend to prefer being able to see the character's face to having it
covered up...Would be nice to have some enchantment-setting functions in here.Redo how we handle serial editing indatalib.py; it's super inefficient as-isUse a smarter wrapper around challenge data -- pull them into a dict so that we can
alter them by name without having to loop through the whole list.Might be nice to pull some common item-handling argparse options intocli_common.py.
The actual functionality is handled in there (levelling items, reroll counts, etc)
but there's a fair bit of duplicated code incli_edit.pyandcli_prof_edit.pyto handle argument parsing.Relatedly, there's a silly amount of code duplication insidecli_common.pyrelated
to properly pluralizing some of our item-editing user reporting.  Would be nice to
roll that up a little more properly.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.Unit tests?CreditsAbram Hindletook an early lead in
porting the BL3 CLI editor over to Wonderlands, which is much
appreciated!  All the initial Wonderlands-support framework, and the
basic editor functionality is thanks to him.The 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-converterMany 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)!Many thanks to shroomz for figuring out the Myth Rank XP-to-Rank calculation.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 UtilitiesThere aren't too many Wonderlands save editors in the wild yet.  One
fork ofFromDarkHell's BL3 Save/Profile Editoris currently being maintained by a third party, though:somefunguy's WL fork of FDH's Editor-
Written in C#, has EXE downloads for ease of use on Windows.Changelogv1.0.0- October 15, 2022Official 1.0 release!Fixed up--fake-tvhmto handle some edge cases, and removed--unfinish-missionsCleaned up documentationv0.0.16New extraction and update to chaos level 100v0.0.15Mythrank Updates thanks to Shroomzv0.0.13Updated DLC4 definitionsv0.0.12Apocalyptech contributionsAdding missing Fealty Oath ring from DLC3Shuffling this custom exception around -- I did want that to live inside TTWLProfile, I suppose.Option to see chosen customizations with ttwl-save-infoSlight bit of rearranging, and making some fuctions behave a bit more consistentlyTurns out the DLCs have some Ear Shape customizations I missedMissing EarShape and Exception in the wrong place?Version updateFixing linkOh yeah, one more thing I'd wanted to addA few more things for the TODOA few more comments -- I suppose I probably should've waited another few tens of minutes before committing originally.  Ah, well.Adding a bit of docs to this classAdd customization randomizationUpdating this to take advantage of our simplified playthrough handlingAh right, something else I'd wanted to look intoRewordingMay as well add that simple example back in to the main README; probably a good idea.Get my savegame archive script up to theoretical snuffv0.0.10Mega patch from Apocalyptechv0.0.9Updated Inventory for Molten Mirrors (20220623)v0.0.8Added options to turn everything into chaotics, volatiles, or primordialsv0.0.7Updated Inventoryv0.0.6Updated InventoryAdded Primary and Secondary Class Reportingv0.0.5Changes to deploy it in the browser.v0.0.4Dealt with pet names. Missing profile.v0.0.3Updated from Gibbed's repo again for coiled captors. Made the profile info work.v0.0.2Updated the item defs from Gibbed fromhttps://github.com/gibbed/WonderlandsDumps/blob/master/Inventory%20Serial%20Number%20Database.jsonv0.0.1Initial porting work to Tina Tiny's Wonderlands frombl3-cli-saveeditv1.16.0