System CodeGen - Save and Load

Romek

Super Moderator
Reaction score
963
If the coding can be improved without any downsides, you're expected to improve it.
 
Reaction score
341
If the coding can be improved without any downsides, you're expected to improve it.

Well I plan on taking in what SerraAvenger in the next version. I'm just saying I'd rather have system comments, not code comments.
 

SerraAvenger

Cuz I can
Reaction score
234
In all honesty, who cares about speed in save and load systems.
By the way that reminds me, I plan on releasing a vJASS version.
So I'd rather not have any code comments, and have system comments instead. As long as the code doesn't leak.

It's not about speed, it's about the OP Limit.

As soon as you get to save 12 items (inventory+backpack) out of 100(?), 5 skilllevels, experience, heroid (12 heroes), location and quests solved so far, you might have a tiny promblem with the VM.
 

Nestharus

o-o
Reaction score
84
Oh, further improvements-
options for color coding of letters, like "aA", red (would make a and A characters red)

options for spacing, like, "-", 4, "=", 3 (would make a - after 4 chars, then = after 3 chars, then dash after 4, etc)

Random Encryption (if you have more than one encryption key defined, pick a random one. Should just check to see if encryption[1] is null, keys can be of varying lengths w/e the user wants, so use the StringLength on the given encryption key ^)^).

Random Sequencing (scramble the code based on sequencing. Similar to encryption keys except that sequence keys should use all ASCII chars. It scrambles the code and unscrambles it. Use a constant key in the background and then let users define their own sequence keys. The sequence keys should be initially copied from the base key, but they don't have to be. As long as sequence keys are greater than the amount of chars in the save/load code, they should work. This will make it virtually impossible to crack your save/load codes, and if they did crack it, they'd have to reseqeunce all of their saves and redo all of the sequences on their saves to use their cheats or they'd have to crack each and every sequence. They'd also have to crack each encryption key and determine which encryption key is being used).

Instead of auto adding a checksum, let the users add them in with just an integer called checksums. Checksums would be placed through out the code and layered on top of each other. Checksum 1 would do a sum of the code, Checksum 2 = code + checksum1, Checksum 3 = code + checksum2 + checksum3, etc ; ). It'd make it so that people trying to crack the code would have to change "all" checksums in the event of changing the code.

Dynamic compression. The save values should have a maximum value associated with them. Use the maximum value when saving them and loading them so you know the exact digit size rather than using one be all end all. Also, use digit sizes for determining the size of the digit that is inputted. If the digit size version for the entire code is smaller than the max size, use digit size (like 210 would be size of 2 and digit 10 vrs just 10, but the max value might be 1000000, 210 < 1000000). If the max size is smaller than the digit size, then use the max size instead. Compression type should be at the start, and guess what, this will make it even harder for someone to crack the code while adding more compression to your save/load system.

These are many of the techniques I was using when I was making my own save/load system, but there are still many more ; |.

Only way I'd use this is if you put in all of these techniques, otherwise I'd rather just make my own since there are 0 save/load systems that use all of these techniques ; \.
 

SerraAvenger

Cuz I can
Reaction score
234
@Nesthaurus:
I think adding heavy security doesn't really add security. If a cheater wants to cheat such a system, he doesn't crack it; He cracks the map around and saves the values he wants using the system (perhaps by identifying the system, and porting it to another language where he can then easily edit heroid, experience, items etc, then he gets a valid key that he can use in public maps. He doesn't even have to understand a single bit of how the save mechanism works).

best wishes, SerraAvenger
 
Reaction score
341
Agreed, the security as of now is a simple checksum and is secure enough.

It would be easier to crack your map and create a pwnage hero than cracking the code.

Also adding a bunch of security checks will also increase the code size.
 
Reaction score
341
Dynamic coloring seems completely useless, the point of coloring is to better identify the characters case.

I can make the spacing symbol configurable but your spacing idea is also just completely useless, at least in my opinion.

As for compression, I think my code size is pretty small and my compression method is fine.

I would actually like for someone to try the system o_O, still 0 views.
 

Nestharus

o-o
Reaction score
84
As for compression, I think my code size is pretty small and my compression method is fine.

So you are saying the fact that you can compress it further doesn't concern you: I love longer codes cuz I like to type

Dynamic coloring seems completely useless, the point of coloring is to better identify the characters case.

So you are saying you don't want to make it easy for people to configure the coloring of characters for their own use: Use your colors or gtfo?

I can make the spacing symbol configurable but your spacing idea is also just completely useless, at least in my opinion.

So you are telling me that You don't want to let people who use your system do whatever spacing they want: Use only one spacing symbol my way or gtfo?

That to me sounds wrong in so many ways and I can tell you that I'll never use your system. I'll just make my own that-
1. Is compressed as much as it can be: I don't like big codes
2. Lets people change the colors of characters easily: I like to configure stuff without going thru the code
3. Lets people do whatever kind of spacing they want: I like to easily change the spacing.
4. Does have random encryption as it'd only be 1 extra character and it would make players who didn't know how to open an optimized protected map unable to crack the code.
 
Reaction score
341
So you are saying you don't want to make it easy for people to configure the coloring of characters for their own use: Use your colors or gtfo?

The colors are configurable o_O. I'm saying this is useless;

options for color coding of letters, like "aA", red (would make a and A characters red)

So you are telling me that You don't want to let people who use your system do whatever spacing they want: Use only one spacing symbol my way or gtfo?

Yes.

Is compressed as much as it can be: I don't like big codes

Try the demo, if the codes are long (doubt it) then you don't have to use this.

Lets people change the colors of characters easily: I like to configure stuff without going thru the code

Look at the demo map.

Lets people do whatever kind of spacing they want: I like to easily change the spacing.

I said I would make the spacing symbol configurable, I'm not going to do anything complex and unneeded though.

Does have random encryption as it'd only be 1 extra character and it would make players who didn't know how to open an optimized protected map unable to crack the code.

Well, I can increase the checksums accuracy, but it would increase the code size. Though it's pretty secure as it is.

That to me sounds wrong in so many ways and I can tell you that I'll never use your system. I'll just make my own that-

This system is meant for GUI users, at least until a vJASS version is out.
 
Reaction score
341
While the codes may be small, if they can be smaller then the system can be improved ; ).

Yea but at what cost? Maybe hours or more of developing and re-writing my code. It's not really worth it to save a character or two.
 

Sevion

The DIY Ninja
Reaction score
424
You can save more than that.

And if you want your resources to get approved, it's the author's obliagation to improve their code and get rid of as many cons as they can.
 

Steel

Software Engineer
Reaction score
109
If we're going to nit pick this much we should create a subforum for cryptography for these save / load code systems to analyze how well optimized they are and at what cost...
 

Nestharus

o-o
Reaction score
84
We don't need a cryptography sub forum because protecting the save/load code is good enough with random encryption and a checksum.

For compression, to compress a code completely you literally and plainly convert the base. The problem is splitting up the numbers. You can either use digit sizes or you can use digit maximums or you can use just a plain huge digit like 1,000,000.

Plain digit is the worst possible method
Digit sizes is the best in most cases, but not good in cases where you have a lot of maximum digit sizes.
Maximum values is good in cases where you are at maximum digit sizes.

It's as plain and simple as that. I suggested to TriggerHappy to use the 2 methods to make the best compression possible and he turned me down, so I'll make my own that does do the best compression possible : ).
 

Steel

Software Engineer
Reaction score
109
Oh right, I forgot to close my tags from my last post.


[/sarcasm]

Nicely done TriggerHappy, very simple and easy to use.
 

Lobster

Old Fogey ofthe site
Reaction score
90
Is it possible to save 2 units?
If so, how?
(im not sure if this violates the rule you posted in first post, if so, sorry)
 
Reaction score
341
Code:
Set Hero = (Your first unit)
Custom script:   set udg_Save[udg_SaveCount] = CG_SaveHero(udg_Hero)
Set Hero = (Your second unit)
Custom script:   set udg_Save[udg_SaveCount] = CG_SaveHero(udg_Hero)

Remember to load them.
 

LordOfQc

New Member
Reaction score
0
Custom Script Problem

I copied all the triggers and all the variables to my map but i have a problem with custom script. My variables names are not the same than yours and i try to replace your variable by mines in custom script but it doesn't work. When I click on unable trigger = http://img43.imageshack.us/img43/2690/scripterror.jpg

And

I want to save items that are another unit than my hero. Can you tell me how to do this please?
 
Reaction score
341
The editor should automatically copy over all variables if you do;

File->Prefrences->General->Automatically paste unknown variable data when copying triggers.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top