Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Detecting save-loading
Detecting save-loading
Jan 11 2013, 2:42 pm
By: TF-  

Jan 11 2013, 2:42 pm TF- Post #1

🤙🏾

I can't remember if I asked this before but is there a reliable way to detect the game being reloaded, without EUDs? I'm thinking of tricks like the ones used in cheat detection etc.



🤙🏾

Jan 11 2013, 3:22 pm Ahli Post #2

I do stuff and thingies... Try widening and reducing the number of small nooks and crannies to correct the problem.

You could make the saving function crash by having more than 65536 triggers.




Jan 11 2013, 3:32 pm Roy Post #3

An artist's depiction of an Extended Unit Death

I could be wrong here (and I can't test right now), but if memory serves:

Triggers with waits in them reset when the map loads. If you can dedicate a player to be indefinitely wait-blocked (or just having a long wait in it to make it unlikely that a save would land on the cycle where the trigger completes), you could detect a trigger having been executed more than once over the course of the game.

Trigger
Players
  • Player 8
  • Conditions
  • Always
  • Actions
  • Set deaths of Cave for Current Player: Add 1.
  • Wait for 4294967295 milliseconds.
  • Set deaths of Cave for Current Player: Subtract 1. (Don't include this line; see Azrael's post below)
  • Preserve trigger.
  • Trigger
    Players
  • Player 8
  • Conditions
  • Current Player suffered at least 2 deaths of Cave
  • Actions
  • (Actions to take for loading a saved game)


  • Post has been edited 2 time(s), last time on Jan 12 2013, 12:46 am by Roy.




    Jan 11 2013, 8:26 pm Azrael Post #4



    I tested your triggers out, and what happened is the Wait got set to 0 when it loaded, but the trigger didn't restart from the beginning.

    The same principle you've explained here could still be used to detect loading, though. One way would be to have a DC timer that approximately matches the long Wait, except it's slightly shorter. If at any point the DC is higher than 24, and the action after the Wait is triggered, then you know the game was loaded.

    Note that I went with 24 DC to take into account the offset that's going to happen when the timer and Wait eventually rollover. To prevent this offset from accumulating, you can figure out the offset, then make the timer regulate itself by subtracting some number of DCs after each rollover (like what we do in real life with leap seconds).

    In reality, you could probably just use the Wait by itself and use the action after it to detect loading. 4294967295 milliseconds is 7 weeks, so it's most likely unnecessary to account for rollovers, especially with no saving taking place.




    Options
      Back to forum
    Please log in to reply to this topic or to report it.
    Members in this topic: None.
    [09:38 pm]
    NudeRaider -- Ultraviolet
    Ultraviolet shouted: NudeRaider sing it brother
    trust me, you don't wanna hear that. I defer that to the pros.
    [07:56 pm]
    Ultraviolet -- NudeRaider
    NudeRaider shouted: "War nie wirklich weg" 🎵
    sing it brother
    [06:24 pm]
    NudeRaider -- "War nie wirklich weg" 🎵
    [03:33 pm]
    O)FaRTy1billion[MM] -- o sen is back
    [01:53 am]
    Ultraviolet -- :lol:
    [2024-4-26. : 6:51 pm]
    Vrael -- It is, and I could definitely use a company with a commitment to flexibility, quality, and customer satisfaction to provide effective solutions to dampness and humidity in my urban environment.
    [2024-4-26. : 6:50 pm]
    NudeRaider -- Vrael
    Vrael shouted: Idk, I was looking more for a dehumidifer company which maybe stands out as a beacon of relief amidst damp and unpredictable climates of bustling metropolises. Not sure Amazon qualifies
    sounds like moisture control is often a pressing concern in your city
    [2024-4-26. : 6:50 pm]
    Vrael -- Maybe here on the StarEdit Network I could look through the Forums for some Introductions to people who care about the Topics of Dehumidifiers and Carpet Cleaning?
    [2024-4-26. : 6:49 pm]
    Vrael -- Perhaps even here I on the StarEdit Network I could look for some Introductions.
    [2024-4-26. : 6:48 pm]
    Vrael -- On this Topic, I could definitely use some Introductions.
    Please log in to shout.


    Members Online: Roy