• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Save & Load system

Status
Not open for further replies.
Level 22
Joined
Feb 3, 2009
Messages
3,292
Hello, I need a save & load system which is a little different from the ones I found in the spell section.

This system when player red writes -add TestPlayer then it will save TestPlayer to a string. Everytime this map starts it should automatically load all players who were ever added using the above method and then performing a certain action on them.
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
you can't because thatd require either local storage saving or modifying the map inside of wc3, which are both impossible
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
wtf are you asking

i read this as "Player types -addplayer, they exit and restart, the added player gets something special"

And that would require editing the game without giving the added player a special save code that allows him to load with those special privleges
 
Level 31
Joined
Jul 10, 2007
Messages
6,306
-save "hi"

Add 1

Convert hi to ascii using Ascii from JASS section. Be sure to use BigInt for this as it will likely overflow w/o it.

Multiply first big int that has 1 in it by something really huge so that you can store large strings. You could possibly store the power in base 2 that way you can do unlimited string sizes with dynamic sizing. Add the BigInt that has the string.


Set base to something obscene so that players can't figure it out (big as well).


Apply Knuth Checksum.


Scramble.


Output code.



This seems kind of silly...


Also, if you want to do multiple strings, scrap the 1 and just continue loading them out until BigInt is 0 =).



There is no decent way to do this in GUI as it requires a BigInt library and a string -> ascii char converter. In GUI, it would be a massive nightmare ;o.
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
-save "hi"

Add 1

Convert hi to ascii using Ascii from JASS section. Be sure to use BigInt for this as it will likely overflow w/o it.

Multiply first big int that has 1 in it by something really huge so that you can store large strings. You could possibly store the power in base 2 that way you can do unlimited string sizes with dynamic sizing. Add the BigInt that has the string.


Set base to something obscene so that players can't figure it out (big as well).


Apply Knuth Checksum.


Scramble.


Output code.



This seems kind of silly...


Also, if you want to do multiple strings, scrap the 1 and just continue loading them out until BigInt is 0 =).



There is no decent way to do this in GUI as it requires a BigInt library and a string -> ascii char converter. In GUI, it would be a massive nightmare ;o.

but why dont make a single thread/turorial and u can post there ur demonstration map (what reallly usefull) and then we can ask there? :p
 
Level 9
Joined
Apr 23, 2011
Messages
460
There's no need for any sort of encryption in this system,as all it does is hold a list of player names.

There would be no point in that. If you just store the players names there's no values being saved. Using a system like Nestharus' Save/Load System to create a save code that holds the players hero and progress is the only way to save values that can be accessed later. Otherwise you just have a list of the names of players that used the command "-add player" in the game which is useless. Storing just the players name holds no real value other than their name.
 
Level 22
Joined
Feb 3, 2009
Messages
3,292
Fine, guess I'll have to reveal what the system does before you'll understand it.

What this thing does is if red writes -blacklist Ironside then it will save the name.At the start of the map it would retrieve all the names ever saved.
Every name which is on the blacklist gets kicked immediately at map initialization.
 
Level 13
Joined
Sep 13, 2010
Messages
550
You CAN use local storage way. All you need is to use the preloader bug and allow local files. Also you can't synchronize strings between players and that can cause disconnection

The player not should be kicked by name but by an auto generated Game User ID.
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
problem with maps are u cant sore any physical data after a playing session over, so after players let its can store any data, only during game play u can store temporaly variables but that valid only during playing :/

1 thing what could transfer data between 2 playing session and that is the save game but that not work in multiplayer maps

when we use save code its dont store to pc or into map any physical data, so map size dont will be longer just u do something like this
make unit array heroes[0....10] store all heroes then lead depend from index ofc u can encrypt etc but the thing is its load only fixed things what map maker already writed into map and load that fixed values and dont change anything physically in map file

You CAN use local storage way

i guess he want the map host on other pc's too not just on his pc
 
Level 13
Joined
Sep 13, 2010
Messages
550
that can be filtered easily if he does not have locals enabled, but you can't enable it ingame, or set a constant GUID. It is not a solution to kick everyone who disabled locals :/ Yea you exactly pointed out this disadvantage.
 
Status
Not open for further replies.
Top