• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Codeless Save/Load Demo !

Status
Not open for further replies.
Level 10
Joined
Dec 15, 2012
Messages
650
Codeless Save/Load _ !

Hi, guys. I learnt a lot of JASS but this one is too far from what I had learnt so I need your help :)

I do not need Save/Load Snippets and I just want to save variables :
P1_Integer, P1_Real, P1_String, P1_Boolean (for player 1)
P2_Integer, P2_Real, P2_String, P2_Boolean (for player 2)
P3_Integer, P3_Real, P3_String, P3_Boolean (for player 3)

I don't want to waste the size of my map so can you tell me that what triggers are needed for saving variable to code and where can I save my variables to codes ?
1. I'm not a stupid but a dummy, I need a Demo for this
2. Diary Book starts the effect of an ability, Save Game~ (I want give this trigger to all 3 players [don't mix them up so bugs won't happen so easily :)]
  • Events
    • Unit - A unit starts the effect of an ability
  • Conditions
    • (Unit-type) equal to Diary Book
    • (Owner of (Triggering unit)) equal to Player 1 (Red)
  • Actions
    • Save P1_Integer, P1_Real, P1_String, P1_Boolean into codes for Player 1
Thanks for your help/answer !

edit : currently do not need a demo
 
Last edited:
If your map can only have 3 players in it, it will take a couple of minutes to load the code given the amount of data you are likely going to have in it.

Anyways, do you not want any security? No security means that players will be able to modify the code as they see fit. They can go in and just change the values.

MD5 = tamper protection, but players will still see the values
AES = encryption, players will no longer see the values, but w/o MD5, they can randomly change it

MD5 adds 128 bits. AES won't add anything since it appears that you will have at least 128 bits of data. 128 bits+ takes a very, very long time to load. I'd think that 50 bits or so is about the limit of the system (maybe even less).
 
Not quite, but eh

http://aes.online-domain-tools.com/

Right now, someone is also having a problem with File I/O and BitInt. They saved a code and when they loaded it up, they lost the last bit :\, so the number was off by 1.


So not only is codeless save/load ridiculously slow, but BitInt doesn't play nice with File I/O atm.


You're better off just using save/load with snippets
 
Level 10
Joined
Dec 15, 2012
Messages
650
@ Secondhand, Join JASS class for sure :)
and see other people's JASS resources (download from http://www.hiveworkshop.com/forums/jass-functions-413/ and http://www.hiveworkshop.com/forums/spells.php

@ Nestharus, I found that Preload function can create a file at the path which I want. So is it possible to saved codes into the file (at TriggeringPlayer's hard disk) and load codes from the file easily (only 1, 2 or 3 triggers) ?
(I always develop something incredible even I don't understand JASS as well . . .)
JASS:
function AhXianLab takes nothing returns nothing
    call PreloadGenStart()
    call PreloadGenEnd( "save\\Multiplayer\\War3 Monster Hunter\\SavedData.txt" ) //I found that it saved the file as the extension you given too (exp: .dll).
endfunction
 
Level 10
Joined
Dec 15, 2012
Messages
650
I'm totally blurred with Save/Load system :/
Wait, wait, waitttttt, Nestharus, I have a few questions to ask you and I hope this does not bother you :eek:
1. save/load with snippets make my Frozen Throne not responding only. . .Look, I just want to store variables(now, I won't store too much var) for everyone so which type of Save/Load system should I use ?)
2. What File I\O for ?
 
Status
Not open for further replies.
Top