Mission Replay v8

The window-shooting bug on m02 exists in the vanilla game, and it does seem to be related to having upgraded weapons (via co-op). I have a small mod that helps people through it. It'll be in my troubleshooting collection post shortly. We'll probably want a more robust solution, though, one that doesn't just flip the "is the window broken" boolean check.

In mine, in the bonus section @ http://www.saintsrowmods.com/forum/index.php?threads/111/ , I just removed (commented out) the check for windshield damage. I'm too dumb to see what i'd need to change to make it not take away all your weapons on the start, I kinda like the idea of replaying missions with whatever loadout I have/want.
I suppose it'd be necessary to come up with a general "is this a replay?" check to put into lua files for stuff like this, though you could argue there's no harm with disabling the taking away of weapons for your initial playthrough.
 
I'm curious to how people feel about world states. We have one of two different ways we can approach mission replay:

1. save all the current world state variables then revert back on replay completion. This would mean that the world would remain the same as it is no matter what you replay. It would also mean creating a set of optional mods later that let you pick a world state to load.

2. Permanently change the world state to whatever it is after the replay. This would be more dynamic for the player and allow them to change back to any previous world state simply by replaying the mission. For example, replay mission 1 and then stag are gone from the world, drawbridges are down, no outbreak, etc. Replay a later mission to set the world to that state, etc.

I quite like option 2, but I wonder if people would rather just keep the endgame world state permanently without the replays reverting it back.

I'd say there's also the question of how you approach setting the world state when starting the mission: Do you set the world as it would be during that point in the story, or do you only change what is needed for the mission to function?
Assuming we can easily define a global variable in sr3_city.lua or similar, it should be easy enough to even put in all alternatives and then do what the user wants (without keeping multiple sets of mission lua scripts, which I'd imagine to be more of a modding nightmare).
This ties in with what I said about checking whether we're replaying or initially playing a mission.
 
I like that idea. We could create a yes/no dialog box asking if the player wants to keep the world state.

The only thing I'm not sure about is how to check to see what the current state is for all the player zones to save them all in a table before init.
 
I just removed (commented out) the check for windshield damage.
I'd be okay with this. The one i wrote was before i figured out the fact that the file size and compressed size have to be the same or you have to ship a stream_city.asm_pc file with it, so all i knew was that it worked if i flipped the == to ~=, and it didn't work if i tried bigger changes. Since then, I have still been avoiding overwriting that asm_pc file where possible, just to keep little mission-workaround mods simple and compatible with each other.

As for the "keep changes" prompt, i love it. I'll be surprised if there's a way to determine which zone is loaded, but you CAN track the mission choices. If we update the mission choice states when we "keep changes", we shouldn't have any trouble keeping track of which one's loaded at any given time.

Code:
function m06_success()
    --[[ INSERT ANY MISSION SPECIFIC SUCCESS STUFF ]]--            
    if M06_trigger.disarm_bomb.hit then
        game_choice_set_state( MISSION_06_CHOICE, M06_CHOICE_BRANDED_TOWER )
    else
        game_choice_set_state( MISSION_06_CHOICE, M06_CHOICE_BLOWN_TOWER )
    end
...
Code:
function m06_coop_skip(skip_teleport)
    sr3_teleport_mission_start("m06", skip_teleport)
    -- Update the world state based on the choice that they made during the mission
    if game_choice_get_state( MISSION_06_CHOICE ) == M06_CHOICE_BRANDED_TOWER then
        city_zone_swap("tower_saints")
    else
        city_zone_swap("tower_dmg")
    end
    -- kill the building interior either way
    city_zone_swap("m6")
...
 
I'd be okay with this. The one i wrote was before i figured out the fact that the file size and compressed size have to be the same or you have to ship a stream_city.asm_pc file with it, so all i knew was that it worked if i flipped the == to ~=, and it didn't work if i tried bigger changes. Since then, I have still been avoiding overwriting that asm_pc file where possible, just to keep little mission-workaround mods simple and compatible with each other.

It's trivial to fix the ASMs though, I just run a bat file every time I tweak the mission lua. Far more effort to re-compress the str2_pc and rename it and move it into the game folder. :D
If you want I can share my bat (and supply a direct download of the fixed tools or keep prodding Rick to release fixed ones himself).

I like that idea. We could create a yes/no dialog box asking if the player wants to keep the world state.

The only thing I'm not sure about is how to check to see what the current state is for all the player zones to save them all in a table before init.

Is a 'silent' save into the autosave slot & immediate reload of that game possible? That'd just restore the game world according to the player's lua file and should be SP-safe to do after a mission. Don't know if the code that reloads a checkpoint or restarts a mission can be used to reload a savegame while keeping the coop partner aboard.
(It'd spare you looking up & saving the swapped zones and the like)


Did either of you get an 'alert' about this reply (that I *quoted* you) or not?
 
Froze when I brought up my cellphone.
I just put the files in the first post in the saints row 3 directory.

I think we need a different thread for install issues.
You probably have a store_vehicle.str2_pc or so too from other mods, right? If so that would be the conflict source.
 
Yes, i got a quote alert.

As i said, the reason my mission-workaround mods don't include the asm_pc file is so that they are simple and do not conflict with each other. I have no problem with updating the asm_pc file when necessary; it just wasn't necessary for these little ones. :) Also, thanks for the offer, but i can wait; I have a copy of UpdateASM that i added the data types to myself. It's in my modding missions thread.

I don't think you can make the game load a save. I mean, i haven't checked, but i don't expect that it's a function you can call. The game never loads a save in normal play unless you tell it to. In any case, changes to loaded zones seem to persist in save files. I can test this more.
 
Yes, i got a quote alert.

As i said, the reason my mission-workaround mods don't include the asm_pc file is so that they are simple and do not conflict with each other. I have no problem with updating the asm_pc file when necessary; it just wasn't necessary for these little ones. :) Also, thanks for the offer, but i can wait; I have a copy of UpdateASM that i added the data types to myself. It's in my modding missions thread.

I don't think you can make the game load a save. I mean, i haven't checked, but i don't expect that it's a function you can call. The game never loads a save in normal play unless you tell it to. In any case, changes to loaded zones seem to persist in save files. I can test this more.

I was under the impression that on save reload, my sr3_city.lua would change zones according to mission progress (and user changes of the file). It'd be great if you could investigate how that works exactly, i.e. when it is called and when it is not.
 
I was under the impression that on save reload, my sr3_city.lua would change zones according to mission progress (and user changes of the file). It'd be great if you could investigate how that works exactly, i.e. when it is called and when it is not.

I thought that whenever a zone is loaded or unloaded and the game is saved then it becomes a permanent part of the save file. It has nothing at all to do with mission progress. The only way to remove it is to explicitly run that zone function again with a false parameter.

But, now I wonder how coop works... I don't think a client comes back to a city overrun with stag if he coops with a host and they did a final later mission (where the client is still early in the story.) It's worth testing, anyway.
 
Back
Top