Skip to content

Can You Force the Game to Save?

semiticgoddesssemiticgoddess Member Posts: 14,903
This is a very technical question, so I'm posting this in the modding section. Is it possible to use a script or console command to force the game to save, whether an auto-save or a specific save slot like the Final Save file?

I ask because certain mod-introduced fights like the Chosen of Cyric encounter and Ascension Melissan are both very lengthy and very prone to crashing. Since both encounters are extremely complex, it's nearly impossible to replicate a bug that happens midway through the fight, and since both encounters are preceded by lengthy cutscenes, suffering a crash is a huge time loss, whether you're playing the game or just doing some testing. Being able to save at any time would also open up some new opportunities for ordinary gameplay.

It looks like the game forces auto-saves and Final Saves via the SaveGame() command in scripts, and it seems like the parameter determines the save slot. Most use the auto save slot, which appears to be SaveGame(0), but there are a bunch of others available.

lgtsd2lrfce3.png

Would it be possible to design a custom character script, which the player could assign via the Customize button on the Record screen, that would allow the player to activate the SaveGame() command by pressing a predetermined hotkey?

Comments

  • semiticgoddesssemiticgoddess Member Posts: 14,903
    Tagging @subtledoctor, @kjeron, and @Grammarsalad for their thoughts.
  • sarevok57sarevok57 Member Posts: 5,975
    im going to go with yes, as in yes you can force the game to save, for example:

    so lets say you are about to do the 5th bhaalspawn challenge you could make a script in the .bcs to auto save ( or actually any save you want to give that script ) as soon as that sequence is done

    although i am not sure if you can make it so the player can have a script to make it so, although i guess its not outside the realm of possibility, if you can script the language so that if player presses button "whatever" then save game is save slot "whatever"

    i know its possible to autosave with enemies on the screen because right now my bg2 autosave has yuanti on my tail chasing me and then i transitioned to another area, and when i look back on that autosave, those baddies are on screen

    so i dont know if the player can force an "autosave" ( i say autosave because in actuality you can make it any save slot that the game recognizes ) but it doesnt seem possible for the game to auto save while baddies are on screen
  • GrammarsaladGrammarsalad Member Posts: 2,582
    edited February 2019
    There it is:

    190 SaveGame(I:Slot*)

    https://gibberlings3.github.io/iesdp/scripting/actions/bgeeactions.htm

    Looks like you have to specify a slot, though...I'm not sure where there is a good example...
  • argent77argent77 Member Posts: 3,433
    Yes, it's possible. I'm using it for a custom save slot in "Trials of the Luremaster for BG2:EE" (see here and there).
Sign In or Register to comment.