Recovering game from finished save.

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
Post Reply
User avatar
rk84
Filter Inserter
Filter Inserter
Posts: 556
Joined: Wed Feb 13, 2013 9:15 am
Contact:

Recovering game from finished save.

Post by rk84 »

So I was standing on railway track, bend over to place signal light for new crossing, then I saw it through my legs getting closer. :)
-Nice stats. Ok I just save the replay for testing purposes to see what I get even though replay is disabled.
-Now I just load autosave and suffer 15min gameplay lost... AAARGH IT ISN'T ON :shock: :evil:
*Loads replay and glares at frozen train*

After while thinking. I unzip the saved replay and rewrite the onload event in control.lua

Code: Select all

game.onload(function()

  ----------- REMOVE THIS FROM NEW SAVE ASAP OR YOU CANT SAVE GAME IF YOU DIE AGAIN.
  if not game.player.character then
    game.setgamestate({gamefinished=false})
    game.player.character = game.createentity({name="player", position={0,0}, force=game.forces.player})
  end
  -----------

  if glob.attackdata == nil then
    initattackdata()
    if glob.attackcount ~= nil then glob.attackdata.attackcount = glob.attackcount end
    if glob.untilnextattacknormal ~= nil then glob.attackdata.untilnextattack = glob.untilnextattacknormal end
  end
  if glob.attackdata.distraction == nil then glob.attackdata.distraction = defines.distraction.byenemy end
end)
I dodged a train there. phew :D

EDIT: I guess it would have been possible save the map and start again via custom scenariors too
Test mode
Searching Flashlight
[WIP]Fluid handling expansion
[WIP]PvP gamescript
[WIP]Rocket Express
Autofill: The torch has been pass to Nexela

Post Reply

Return to “Gameplay Help”