Staredit Network > Forums > SC1 UMS Theory and Ideas > Topic: Saving and Loading.
Saving and Loading.
Jan 26 2009, 2:09 am
By: midget_man_66  

Jan 26 2009, 2:09 am midget_man_66 Post #1



So far, saving and loading is a series of checks. All of which have to do with a player "inputting" their save/load code into the map, map checks for certain things... then simulates (hopefully) the same conditions as the save.

So far, i have been using a binary check system.. where the codes are random.

the player (if they choose to load a game) is given a line of 10 siege tanks. if they are sieged then 1. if they are unsieged 0. The codes look like this:
[0-1-0-1-0-0-0-1-0-1].

Using this system... you get about 2^10 interpretations to work with.

If i was a hardworking person, this system would sit fine with me. but... i dont like writing every check. lol.
Any advice for a new system?



None.

Jan 26 2009, 2:11 am ForTheSwarm Post #2



Why not have the player use actual saving (as in multiplayer)?



None.

Jan 26 2009, 2:12 am midget_man_66 Post #3



The saving im talking about:

A trigger ridden save, where a user writes down codes, and inputs them at time of load.

The save im not talking about:

*clicks menu in starcraft game..... clicks save game*



None.

Jan 26 2009, 3:12 am Vi3t-X Post #4



Quote from midget_man_66
So far, saving and loading is a series of checks. All of which have to do with a player "inputting" their save/load code into the map, map checks for certain things... then simulates (hopefully) the same conditions as the save.

So far, i have been using a binary check system.. where the codes are random.

the player (if they choose to load a game) is given a line of 10 siege tanks. if they are sieged then 1. if they are unsieged 0. The codes look like this:
[0-1-0-1-0-0-0-1-0-1].

Using this system... you get about 2^10 interpretations to work with.

If i was a hardworking person, this system would sit fine with me. but... i dont like writing every check. lol.
Any advice for a new system?

Dropship code system.
8 functions.



None.

Jan 26 2009, 4:56 am Vrael Post #5



Use a sequential input system maybe, and make it not be binary. 2^10 is 1024, but 5^5 is 3125, much less slots and 3x more possibilities.
Say the code is 3 1 0 2 4. In the input area, you have 5 scvs, and put the correct number on a beacon (I think this was used in Xuru rpg), then bring a probe to another area or beacon to "enter" the number.
Each entry from 0 to 4 gets added to a check sum stored in a death count. A second death counter keeps track of which phase of the sequence we are in. After the first number has been entered, a trigger checks to see if that's a valid check sum for phase 1. If it is, you move on to the next number. If it isn't, they get reset for the player. Now, you have to be careful at this point to avoid getting your sums mixed up, since 2 + 4 = 3 + 3, so the check sums could be mixed up. One solution is to use only 25 codes, since 0-25 are the possible sums, and the other is to multiply the second digit by 10. That way the check sums wont interfere with each other, i.e. 2 + 4 checksum = 42, and 3 + 3 checksum = 33. The 3rd digit gets multiplied by 100, 4th 1000, and 5th by 10000, so you will end up with exactly the number of checksums as you have valid codes. 3 1 0 2 4 will become 42031, in fact. For all the non-valid entries you can then use the "At least" and "At most" conditions to reduce the amount of triggering you have to do.
For example, if in the 3rd phase one valid check sum is 542 and the next valid one isn't until 634, you could do like this:

Conditions:
3 Deaths of Phase 3
At Least 543 deaths of Checksum
At most 633 deaths of Checksum
Actions:
Reset Input
Set Checsum for Current Player to 0
Set Deaths of Phase for Current Player to 0



None.

Jan 26 2009, 5:14 am Vi3t-X Post #6



Or Dropship system.

One dropship.
Eight Units.

Unload A, Place A at location Input 1
Unload B, Place B at location Input 2
Unload C, Place C at location Input 3
Unload A, place A at location Input 4
Unload E, place E at location Input 5

Some people don't understand moving units to beacons, and sometimes the units wont fit.
Adding on to yours however.

You have X locations, I'll use 8 as an example.

X X X
X O X
X X X

X represents locations, O represents the middle, where the units are respawned.

Player 1 brings at least one unit to Location 1
Add 1 death count to Cantina.

Player 1 brings at least one unit to Location 2
Add 1 death count to Ruins

Etc

1 X 2
X O X
X X X

And to end it, perhaps you build a pylon. Or shoot a pylon.

X X X
X O X G -- P
X X X

X represents locations
O represents respawn location
G represents Ghost to shoot Pylon
P represents Pylon

And if you're short on locations, you could always make it.

Center location UNIT on "Selection Unit"

Player 9 brings at least one "Option" to location UNIT
Add death counts.

Many possibilities, although to myself, a dropship and/or bunker system would be the easiest to comprehend.



None.

Jan 26 2009, 5:49 am Fwop_ Post #7



Using a minimap display of text will probably yield the highest amount of possible codes. Have digits along the top in which you input various characters that represent a certain value for a certain saved feature. It's a lot of trigger work, but the possibilities such a system opens up is very great. It's probably only good for RPGs when you have things like experience and gold that you would want to be saved at the exact value.



None.

Jan 26 2009, 5:50 am Vrael Post #8



Viet, how would you output the code for people to write down though? Potentially, if there's a thousand codes, you would need a thousand big ugly strings, like so

Please write down for entry next game. Your code:

Marine Medic Firebat
zergling [dropship] zergling
marine zergling ghost

If you use numerals, you only need 10 strings, e.x.

Conditions:
Time to output code
Other factors determining which code
Actions:
Display text: Your code is:
Display text: 1
Display text: 2
Display text: 3
Display text: 4
Display text: 5


You can reuse those strings over and over for each code as long as they're typed exactly the same.

Edit: One thing I realized about my sequetial method, is it would be even simpler if you only checked the end sum. Not only that, but if you check the sum every phase and restart, people will actually be able to figure out the codes relatively easy, but if you don't check the sum until the end then they can't because they won't know which entries were wrong.

Post has been edited 1 time(s), last time on Jan 26 2009, 2:29 pm by Vrael.



None.

Jan 26 2009, 3:27 pm BlueFalcon Post #9



What if you stored the code in the deaths? Since death counters go up to 2,147,483,647, what you do for generating a code is:

Conditions:
(Player is generating password:)
Action:
Set Deaths of Any unit owned by current player to 0
Set deaths of Password unit to 123456789

Conditions:
(Detect Player has left the game)
Action:
Set Deaths of any unit owned by Current Player to 0

This gives them their password, and gives a decent password masking, not perfect and still able to be found I believe. If they look at the replay, and then leave just before the player leaves, they can still get the password. So what you can do is, at the start of the map randomly generate a location for players to walk on. The more possibilities, the harder it is for the replay to hand out the password. And put a just a few of them throughout the map, the longer you play to get the password the harder for the code to be had from the replay.

But that's only if you're interested in making it so no one can grab the password... and it's still a decent way to generate the password.



None.

Jan 26 2009, 3:30 pm Devourer Post #10

Hello

I do not really get it but I like to use "slots"
on entry you create on a row of 1x1 squared the codes given in
for example you said the code 10101 and then you let it save.
somewhere at the map is a row with 1x1 squares which also fills with 10101 then
then it's easy to check if the code is right wrong ot whatever you want, and you easly can reset it by removing them.



Please report errors in the Staredit.Network forum.

Jan 26 2009, 4:42 pm . . Post #11



Using death numbers and then displaying with the mineral and gas could work. I can't recall what is the maximum amount of mineral.

lets say it's 65535 ( I know it's more)

you get in hexa FF FE and gas FD FC

Now you can use the first byte (FF) to save the level number for example.
Use the second and decompose it in binary 1111 1110 then use each of those to save switchs.
and you still have the gas.

Adding the triggers to calculate this would take some thinking, but I know it's been done.

Now to load the players could move a unit on beacons like a calculator : move a unit on ADD then move a unit on 1000 6 time then 100 3 times then 10 2 times, then 1 6 times. (if the number was 6326) Or could use two dropships, one to add, one to substract. Unload units to add 1, 10, 100, or 1000 etc.

Just my grain of salt.



None.

Jan 26 2009, 9:02 pm Vi3t-X Post #12



Quote from Vrael
Viet, how would you output the code for people to write down though? Potentially, if there's a thousand codes, you would need a thousand big ugly strings, like so

Please write down for entry next game. Your code:

Marine Medic Firebat
zergling [dropship] zergling
marine zergling ghost

If you use numerals, you only need 10 strings, e.x.

Conditions:
Time to output code
Other factors determining which code
Actions:
Display text: Your code is:
Display text: 1
Display text: 2
Display text: 3
Display text: 4
Display text: 5


You can reuse those strings over and over for each code as long as they're typed exactly the same.

Edit: One thing I realized about my sequetial method, is it would be even simpler if you only checked the end sum. Not only that, but if you check the sum every phase and restart, people will actually be able to figure out the codes relatively easy, but if you don't check the sum until the end then they can't because they won't know which entries were wrong.

String 1: Your Code is...
String 2: A
String 3: B
String 4: C
String 5: D
String 6: F
String 7: E
String 8: H
String 9: G
String 10: Please remember this code, or else you won't be able to continue from this exact spot!
String 11: Please note that these codes will not work in Single Player.

11 strings including some filler text.



None.

Jan 26 2009, 10:19 pm midget_man_66 Post #13



Quote from Vrael
Use a sequential input system maybe, and make it not be binary. 2^10 is 1024, but 5^5 is 3125, much less slots and 3x more possibilities.
Say the code is 3 1 0 2 4. In the input area, you have 5 scvs, and put the correct number on a beacon (I think this was used in Xuru rpg), then bring a probe to another area or beacon to "enter" the number.
Each entry from 0 to 4 gets added to a check sum stored in a death count. A second death counter keeps track of which phase of the sequence we are in. After the first number has been entered, a trigger checks to see if that's a valid check sum for phase 1. If it is, you move on to the next number. If it isn't, they get reset for the player. Now, you have to be careful at this point to avoid getting your sums mixed up, since 2 + 4 = 3 + 3, so the check sums could be mixed up. One solution is to use only 25 codes, since 0-25 are the possible sums, and the other is to multiply the second digit by 10. That way the check sums wont interfere with each other, i.e. 2 + 4 checksum = 42, and 3 + 3 checksum = 33. The 3rd digit gets multiplied by 100, 4th 1000, and 5th by 10000, so you will end up with exactly the number of checksums as you have valid codes. 3 1 0 2 4 will become 42031, in fact. For all the non-valid entries you can then use the "At least" and "At most" conditions to reduce the amount of triggering you have to do.
For example, if in the 3rd phase one valid check sum is 542 and the next valid one isn't until 634, you could do like this:

Conditions:
3 Deaths of Phase 3
At Least 543 deaths of Checksum
At most 633 deaths of Checksum
Actions:
Reset Input
Set Checsum for Current Player to 0
Set Deaths of Phase for Current Player to 0

Im liking this method, but instead of having 3 lines of save code like Xuru... im thinking about one large line. where different chunks code for different aspects of game info:

[0-0-0-0] [0-0] [0-0-0-0] [0-0] [0-0-0] Each 0 represents a slot. 5 possibilities.
^ Level ^quest ^minerals ^town ^tech-tree completion

Then... when its time to display characters... you just space each block correctly from the other ones, with hyper triggers (if im right) the 5 strings should mesh. if the displays are looping.. that is.

Thank you all, thanks vrael. i am going to use this method.



None.

Jan 26 2009, 10:26 pm O)FaRTy1billion[MM] Post #14

👻 👾 👽 💪

I made this a while back... It might be helpful (though it seems people have already gone over using a base higher than 2.)

Using any base that is a multiple of 2 will allow you to cut back on the number of digits... though as you make fewer digits you create more possible values for the digits.

Attachments:
Password.scx
Hits: 1 Size: 45.37kb



TinyMap2 - Latest in map compression! ( 7/09/14 - New build! )
EUD Action Enabler - Lightweight EUD/EPD support! (ChaosLauncher/MPQDraft support!)
EUDDB - topic - Help out by adding your EUDs! Or Submit reference files in the References tab!
MapSketch - New image->map generator!
EUDTrig - topic - Quickly and easily convert offsets to EUDs! (extended players supported)
SC2 Map Texture Mask Importer/Exporter - Edit texture placement in an image editor!
\:farty\: This page has been viewed [img]http://farty1billion.dyndns.org/Clicky.php?img.gif[/img] times!

Jan 28 2009, 1:52 am Vrael Post #15



Quote
[0-0-0-0] [0-0] [0-0-0-0] [0-0] [0-0-0] Each 0 represents a slot. 5 possibilities.
^ Level ^quest ^minerals ^town ^tech-tree completion

With this, just be careful about which codes you use. For example, if someone figures out your pattern for levels, the others might not matter so much. If they play 2 or three times and get a couple different codes, like
Level 3 = 1005XXXXXXXXXXX
Level 5 = 1015XXXXXXXXXXX
Level 10= 1040XXXXXXXXXXX

That makes it pretty easy to see that + 5 to the first four digits = 1 level. Only reason I say this is because I used this did that on a Wc3 map that I played for like 20 minutes, guessed the pattern and got level 50 in like another minute. If people can figure out the "Level" counter especially easy, then the other ones wont matter so much.

On second thought, if you only use the entire checksum this won't matter since adding 5 to the level without adding the correct digits to the remainder of the thing will make it not match any valid sum. However, if this is the case you will need a valid checksum for a bazillion possibilities.

If you're going to treat each section [0-0-0] as a separate checksum (which it looks like you are, since death counts don't go into the 10^15 range), then the codes will be easy to guess if there is a pattern. Also, if you're going to store that much info in a single password, it's going to take a long time to input and might annoy people. I guess it's better than having to start over with no password though. :D



None.

Jan 28 2009, 5:40 am Vi3t-X Post #16



Don't use patterns. Or use complex patterns that no one will find out.



None.

Jan 28 2009, 5:56 am Morphling Post #17



You could just make up your own formula to make your pattern.

For example: 2(X+4)+X(8)
X= Saved data (minerals, quest number, location, levels)

You could use a barracks or something to pick your numbers to input.
Marine= Add 1
Firebat=Add 10
Ghost=Add 50
Medic=Restart input




Jan 29 2009, 4:16 am midget_man_66 Post #18



its funny that u mention this, hah.. in my earlier days of mapping... i made a bound that had a binary i/o for save loading. the levels were just counts for binary xD. i started to notice that when i hosted people would automatically pick the highest level, or something close to it. now i realize what a silly idea that was.

lol...

lvl1 - 001
lvl2 - 010

(ect... XDDD)



None.

Jan 29 2009, 7:13 am Vrael Post #19



So what did you decide on doing then? Going to stick with the [0-0-0-0][0-0][0-0-0-0] format and just randomize things appropriately?



None.

Jan 30 2009, 11:02 am pneumatic Post #20



We had a cool thread about this a while back.

I like my idea for it. It uses meta-information which makes it easier to trigger and harder to crack.

Here's my post on it. (I had an earlier one in the thread but the one I linked to is more clear and to the point.)

The example I gave in that post is a long password, but it can be made much shorter, because the meta information obscures the game data.



None.

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" 🎵
[2024-4-27. : 3:33 pm]
O)FaRTy1billion[MM] -- o sen is back
[2024-4-27. : 1: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: C(a)HeK