Staredit Network > Forums > SC1 UMS Theory and Ideas > Topic: Generating Save Files
Generating Save Files
May 23 2013, 10:57 am
By: Kaias  

May 23 2013, 10:57 am Kaias Post #1



In working on maps, I've often thought of ways for the users to save their progression through save codes. This has some obvious limitations, and is a lot of headache for both the user and the triggerer to input and output the codes.

To get around this nuisance, the idea is to create a program where you input your saved game file (the .mlx produced from when you save your game), it reads your current state and uses that to build a new saved game file. So for instance, after beating the first act of an RPG map you'd save your game, load it into the utility, it reads your character's inventory, stats and choices and uses it to generate a save file with your same character on a new map, for Act 2. This could also be extended so that you and your friends could combine your save files so that it generates a save file for you to play with all of your characters present when you want to play together.

This is all in theory, however. I don't anything about the structure of the .mlx save files at the moment, which is all I really need. I haven't been able to find it documented anywhere thus far beyond this. The only thing that's really crucial is being able to read and write the deathcounter states.



None.

May 23 2013, 11:21 am Oh_Man Post #2

Find Me On Discord (Brood War UMS Community & Staredit Network)

Hmmm well this would be handy if you could figure this out. I would certainly use it.




May 23 2013, 11:40 am TF- Post #3

🤙🏾

That would be really cool, if it worked out.

Of course I can't help thinking, what if you cut to the chase and made a minimal barebones implementation of SC2's banks, with a way to save all death counters to a text file from Starcraft and then read it at any time via custom triggers. You would just batch save everything to keep it simple, storing the player, death counter unit name/id and death counter value.
Triggers would be:
- use_bank(bank txt filename)
- load_death_counters()
- save_death_counters()

If adding triggers is too complex, one way to run the bank functions is to make the exe intercept all Display Text Message triggers and run your code if it finds a special string, while blocking the actual text from displaying.
This should definitely be in the realm of possibility with decent knowledge of plugins, sorry it has nothing to do with savegames.



🤙🏾

May 23 2013, 3:11 pm jjf28 Post #4

Cartography Artisan

So...

.mlx --> program --> new .mlx
or
.mlx --> program --> .scx ?



TheNitesWhoSay - Clan Aura - github

Reached the top of StarCraft theory crafting 2:12 AM CST, August 2nd, 2014.

May 23 2013, 9:51 pm Kaias Post #5



Quote from jjf28
So...

.mlx --> program --> new .mlx
or
.mlx --> program --> .scx ?

The idea was: .mlx --> program --> new .mlx. There's no reason it has to be that way. I think in terms of ease of creation and use that generating a new .mlx is easier. All you have to do is take a base save file and edit the state of a few deathcounters. What I worry about with an scx is flooding the ecosystem with bunch of different versions of the map.

iirc, save files enforce certain names of each player.



None.

May 26 2013, 8:05 pm Heinermann Post #6

SDE, BWAPI owner, hacker.

The save files just fwrite all the data structures in the game in a compressed format. So you would literally need to take a snapshot of the new map in order to get the layout of the units, images, sprites, etc.
However, you should easily be able to execute code via buffer overflow from loading a save file.




Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[05:00 pm]
lil-Inferno -- benis
[10:41 am]
v9bettel -- Nice
[01:39 am]
Ultraviolet -- no u elky skeleton guy, I'll use em better
[10:50 pm]
Vrael -- Ultraviolet
Ultraviolet shouted: How about you all send me your minerals instead of washing them into the gambling void? I'm saving up for a new name color and/or glow
hey cut it out I'm getting all the minerals
[10:11 pm]
Ultraviolet -- :P
[10:11 pm]
Ultraviolet -- How about you all send me your minerals instead of washing them into the gambling void? I'm saving up for a new name color and/or glow
[2024-4-17. : 11:50 pm]
O)FaRTy1billion[MM] -- nice, now i have more than enough
[2024-4-17. : 11:49 pm]
O)FaRTy1billion[MM] -- if i don't gamble them away first
[2024-4-17. : 11:49 pm]
O)FaRTy1billion[MM] -- o, due to a donation i now have enough minerals to send you minerals
[2024-4-17. : 3:26 am]
O)FaRTy1billion[MM] -- i have to ask for minerals first tho cuz i don't have enough to send
Please log in to shout.


Members Online: Roy, Ultraviolet