borderlands2
borderlands2 copied to clipboard
New functionality: Borderlands:TPS, Challenges, Character Name, Others
Hello! Not sure if you'd be interested in merging this at all, but figured I'd pass it along regardless.
I've added in a couple new features. The big one is supporting editing of Challenge data, so it's possible to (for instance) set all your challenges to one below their "max" value, to more easily bump up your badass ranks or the like. It's... a bit silly, really, given that there's a Profile editor out there which could be used to just edit your badass ranks directly, but I was struck with the desire to figure out how these were stored in the savegames. The possibly-more-useful part would be the ability to zero out a character's challenges, which might be useful if someone wanted to reset but wasn't at the required 85% level for an in-game reset.
One potential problem with the changeset is that my code currently assumes little-endian, and I assume it'd produce invalid non-PC savegames (and probably screw up reading non-PC savegames as well). I didn't see an immediately obvious method of passing around the "endian" var to the necessary functions, so for now it's just hardcoded to assume little. If you were interested in merging this but wanted that straightened out, and had a non-PC savegame or two lying around, I'd be happy to play around with them (though I wouldn't actually be able to test out the non-PC saves "natively").
Anyway, in addition to the challenge stuff, there's also the ability to set the character's name from the commandline, and also setting the save slot number (which I think is ignored by the engine, actually, but c'est la vie!)
Thanks for the app, regardless, even if you don't want to merge this! It's always nice to be able to dig into save formats with tools like this.
Hm, looks like this pull request just updates as I make commits? Odd.
Anyway, since my original pull request, I've ended up doing a bunch more work on my fork. Dunno if you'd ever be interested in merging, but here's a basic rundown of what's new:
- Pulled the code into a class so it's a bit more modular.
- Added Borderlands: The Pre-Sequel support (which was the reason for the modularity in point 1)
- Defaults to little-endian (PC) outptut instead of big-endian.
- Unlocking ammo SDUs / setting ammo levels
- Fixed an error in the item import code (would generate invalid savegames if there were any weapons in the item file, previously)
- Added a bunch of stderr output to show what the program's doing
- Won't overwrite files without either user confirmation, or with a --force option.
- Switched from optparse to argparse, moved the "-m" option string to individual arguments for each operation
In addition to the stuff I'd mentioned originally, namely setting the character name, save game slot, and the ability to work with Challenge data directly. There's probably one or two other minor things that I've forgotten about, but that list should be reasonably thorough.
Unfortunately, the code layout's changed enough that providing patches for any ONE of those features is reasonably difficult, so the pull request is probably just gonna be the whole thing.
I'm looking into adding that, btw. It's a weird layout! Ended up looking into the Gibbed sourcecode, because it wasn't immediately obvious -- turns out that they use some weird little custom items in the item pool to store a few bits of information, including what Overpower levels have been unlocked. These are the ones which the item export skips and seemed to have all zeroes for the actual item data. The data in question in this case is all stored in what this project refers to as the item's unknown2 field (Gibbed calls that one "Quantity"). Anyway, I can at least read the OP level now, should be able to write it out pretty shortly.
Not that I wouldn't still be happy to have my changes merged into the main branch, btw, but if you end up with other feature requests, it may be better to just submit 'em as an issue on my own fork. :)
(And, since I'm here again - since the last update I'd enumerated above, my fork's also received a port over to Python 3 (Py2 isn't supported over there), so that's something else to keep in mind.)
Yes I noticed that as well with the -g command above the characters level when I set the level to 80 and was able to use the OP8 gear as there was item tags but no actual data for the OP levels and wasn't sure how to inject it since there is no current listing of it in the .py code glad to see you are still working on this and can't wait to see as I would like to add a GUI to this so easy character creation can exist. such as custom currency or just clicking a tab for max money, skill trees, ammo, etc. Sorry, I am pretty new to github so it took me a while just to find out where I could comment on here.
Okay, I've added an --oplevel argument on my fork, which seems to work well! You can get that from here: https://github.com/apocalyptech/borderlands2/
And no worries about being new to github, it's a complex beast. :) Enjoy!
I've found this through my attempts at trying to convert my PS3 save games over to Steam, on Linux. It seems this is unlikely to get merged (the PR has been open for 3.5 years), as last commit was 6 years ago. I see you don't have Issues enabled on your fork (which I am trying to use). Any chance you could open up issue reporting on it? I've copied a file over, however, with both the old script, and this fork, I can only get "Invalid save file" as an error. I'd like to open an issue and figure what is going on. Thanks.
Oh, for sure! I hadn't even realized that Issues weren't already enabled on there - sorry about that! Should be good to go now, feel free to submit away over there. :)