apocalyptech / bl3-cli-saveedit

Commandline Borderlands 3 Savefile/Profile Editor
zlib License
104 stars 20 forks source link

Feature Request: Ability to check or uncheck objectives in stuck missions #14

Open MobiuSRIT opened 3 years ago

MobiuSRIT commented 3 years ago

I'm looking for a way to "unbork" the Pandora's Next Top Mouthpiece mission that affects a bunch of users, it seems.

/Game/Missions/Side/Zone_0/Sacrifice/Mission_PandorasNextTopMouthpiece

I can see from another project that there are 24 or so objectives on that, but I cannot uncheck or check them off to get past the stuck point for this character sav file.

I'm not even sure how much manipulation can be done to mission objectives.

MobiuS

apocalyptech commented 3 years ago

Heya! Editing mission data would certainly be possible -- the biggest problem is sort of just knowing exactly what needs to be done in order to fix things.

One thing you could do is use the tool to export to a JSON file, edit the JSON, and then re-import it back in. Since that's just a side mission, you could try just deleting the whole Mission_PandorasNextTopMouthpiece entirely and then start the mission over from scratch. (That wouldn't work with locked story missions, because I don't think there's a way to pick those up again.)

MobiuSRIT commented 3 years ago

Thanks for the quick follow up. Let me do the export/import and see how it goes.

MobiuSRIT commented 3 years ago

Deleting the mission out of the json file didn't seem to affect the result. The mission was still in my list and when I brought it up, it looked like it was going to reset, but the 3 completed objects were still locked. Obviously, there's potential here to edit various values to try and get that mission to set to state where I can influence it again in-game. I'll carry on with the json editing and if I find a solution, I'll post the details so others who get that mission bugged out can see the steps to fix.

apocalyptech commented 3 years ago

Awesome, sounds good. Good luck!

MobiuSRIT commented 3 years ago
  1. Export the save as a json file: bl3-save-edit 1.sav 1.json -o json
  2. Edit the JSON file, and find this section (search for Mouthpiece), then set the 1s to 0s for the objectives_progress section: { "status": "MS_Active", "has_been_viewed_in_log": true, "objectives_progress": [ 1, <--change this to 0 1, <--change this to 0 1, <--change this to 0 1, <--change this to 0 0, 0, 0, 0, 0, 0, 0, 0 ], "mission_class_path": "/Game/Missions/Side/Zone_0/Sacrifice/Mission_PandorasNextTopMouthpiece.Mission_PandorasNextTopMouthpiece_C", "active_objective_set_path": "/Game/Missions/Side/Zone_0/Sacrifice/Mission_PandorasNextTopMouthpiece.Set_ProveWorthy_ObjectiveSet", "kickoff_played": true, "dlc_package_id": 0, "league_instance": 0 }
  3. Save that json file then import it back into your save with: bl3-save-import-json -j 1.json -t 1.sav
  4. Load up BL3 and you'll have the mission, but the collection objectives are ready to be hit again.

Thank you, apocalyptech for a great tool. Gearbox should take some freaking pointers here instead of telling people there's nothing they can do and to start a new character.

apocalyptech commented 3 years ago

Nice, glad you figured it out!

I suppose an option to zero out objectives, given a mission name, might not be a bad addition to the tool. I'll leave this open and see if I can get that in place eventually. :)

m-alice commented 3 years ago

Better is completely delete mission section. Example for The Feeble and the Furious (hardly and losable mission). Looking for a word: CaringForElderly - the word must appear four times, in two places. The first section we must erase. Carefully watch for comma before the first curly brace. If this is the last mission on the list, the comma in front of it must also be removed.

    , <--- this comma.
    {
      "status": "MS_Active",
      "has_been_viewed_in_log": true,
      "objectives_progress": [
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0
      ],
      "mission_class_path": "/Game/Missions/Side/Zone_3/Desert/Mission_CaringForElderly.Mission_CaringForElderly_C",
      "active_objective_set_path": "/Game/Missions/Side/Zone_3/Desert/Mission_CaringForElderly.SET_MeetDaughter_ObjectiveSet",
      "kickoff_played": true,
      "dlc_package_id": 0,
      "league_instance": 0
    }

Further we edit the second section.

{
  "challenge_class_path": "/Game/GameData/Challenges/Missions/Side/Zone_3/Challenge_Mission_Side_Desert_CaringForElderly.Challenge_Mission_Side_Desert_CaringForElderly_C",
  "completed_count": 0,
  "is_active": false,
  "currently_completed": false,
  "completed_progress_level": 0,
  "progress_counter": 0,
  "stat_instance_state": [],
  "challenge_reward_info": []
}

I installed python from microsoft store and for me the commands look like: python -m bl3save.cli_edit 1.sav 1.json -o json python -m bl3save.cli_import_json -j 1.json -t 1.sav -c

PLEASE MAKE A BACKUPS BEFORE !!!

P.S.: If you successfully returned a caring father to loving daughter - please share save or json file.

sandsmark commented 3 years ago

long time since I wrote the code so you might be aware of it, but iirc there were some issues if you tried to manually change the state too far from the current one: https://github.com/sandsmark/borderlands3-save-editor/blob/master/src/MissionsTab.cpp#L21-L24

apocalyptech commented 3 years ago

long time since I wrote the code so you might be aware of it, but iirc there were some issues if you tried to manually change the state too far from the current one: https://github.com/sandsmark/borderlands3-save-editor/blob/master/src/MissionsTab.cpp#L21-L24

Ah, good to know, thanks! That kind of thing is one reason why I've yet to really look into this much myself. The amount of testing needed to make sure that I'm not gonna brick someone's savegames is daunting. :) I can always hide behind the "always make backups" advice, which I still advise regardless, but I'd like the built-in functions to be as solid as possible. At least we've got the JSON conversion stuff, so folks can tinker all they want.

SmeIIySocks commented 3 years ago

WOW....... I am still unsure what I did or how I did it.... but after several hours I got there eventually. A huge THANK YOU VERY MUCCH to apocalyptech and MobiuSRIT, your coding and information enabled me to solve the same issue above. How Gearbox have ignored this and not solved it is beyond me!!! I am pretty handy with computers by layperson standards but the only coding I have dabbled with before was loading Windows 3.1 back in the day lol, so I am feeling rather chuffed with myself right now :D Hoping that the game runs as it should at the second attempt, although, apparently there are a few bugs with this particular mission, so, who knows.......

Keep up your good work

Thanks again Socks

150384506_1220270005075740_876637838032788259_n

apple1417 commented 3 years ago

I've done plenty of experimenting with this sort of stuff myself. I believe "change the state too far from the current one" is to do with the active objective set, something like the next uncompleted objective must be within that set to be able to progress. It's already pretty impractical to have some sort of generic objective editing, this just makes it worse.

The easiest solution I've found is as m-alice said, to just delete the whole mission struct (and edit the challenge one if you care about that). You do need to be careful with any story missions however, if you delete one of them you also need to set the status of the previous story mission to MS_Active, which will cause it to autocomplete, and start the one you reset. This will give you rewards and xp again if you care about that.

A better solution for an editor might be to special case the story missions, but delete the others like normal. Store the default objective set for each story mission somewhere, and when asked to delete one change it to the default and reset all objectives to 0. I haven't done any sort of testing around this sort of thing though.