• 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.

[JASS] Savecodes attached to a specific version of a map

Status
Not open for further replies.
Level 28
Joined
Feb 2, 2006
Messages
1,631
Hi, I was wondering if you could generate save codes which contain the version of a map and verify that version against the currently played version.

I have already added a checksum and the player name's hash to the save code so you can only use the save code for your player in battle.net and I stored whether or not there were other user players (singleplayer or not) but still a person could open the unprotected map, change some stuff to give himself XP and host it once with players and get a savecode that is pretty good. Of course he could also look at the code and manually generate one by replacing stuff which stores whether it was multiplayer or not etc. If was also thinking about using the player name's hash to move the code table, so you get different characters with every player name.

To make it a bit harder to create your own savecode, I would have checked the saved map version/editor version or a checksum of the map. Are there any possibilities to do that? Then I could make a list of valid checksums/versions of the map and verify the save code against that. The player is only able to use his generated savecode with a modified version of the map and players will notice that when he/she hosts it.

Unfortunately, I see no natives for getting the map's version or checksum or something like that :(

I am not sure how current save/load systems work. Are they only "safe" for protected maps?
 

Wrda

Spell Reviewer
Level 28
Joined
Nov 18, 2012
Messages
2,010
Integers can be represent anything you want, so you would do it that way. You should read instructions how to use, and its examples. Not only that exists, but also frequent questions and answers on posts on the resource itself.
Furthermore, I don't know why you're so concerned about people opening your map, unprotected or not, there will always be ways to approach it, there's no way to stop that. If you want to protect it because of the "save/load" system, I understand that, but going beyond that is just absurd.
Also, people playing your map, saving the progress only to get a punch in the stomach by you "deleting" their progress with new version is just...flabbergasting. That is so demoralising and unmotivated.
Are they only "safe" for protected maps?
What does this mean?
 
Level 28
Joined
Feb 2, 2006
Messages
1,631
I don't want to protect it. That's why I am asking. But if you can open it and just add a trigger action giving you like 100000 XP and hosting it once to save your hero it is much easier.
I would not delete their progress. You could allow multiple versions of the map, previous versions included.

"safe" means that others cannot see how the save code is generated or easily change stuff to get a better save code. I am not sure how other maps prevent that. There is probably no way?
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
I don't think there's a method to get the saved version of your map. At least outside of you giving the map version numbers yourself (which would probably just be a name change).

That being said, I work on maps using WCSharp and it seems pretty secure. I code the map in C# which is then transpiled to Lua. That Lua code is separate from the map itself so when you load up the map in the World Editor the entire Trigger Editor is empty. I imagine that's possible without WCSharp so you could probably do something like that yourself. It even comes with a save/load system that's so easy to use it's not even funny, that plus you can can save near endless amounts of data. I'm not 100% sure how any of these s/l systems work but I can tell that this one is more advanced than the systems I've seen before, so maybe looking into it could do you some good.
 
Last edited:
I don't want to protect it. That's why I am asking. But if you can open it and just add a trigger action giving you like 100000 XP and hosting it once to save your hero it is much easier.
You can already do that even on corrupted maps. It would probably take five minutes. You just open a blank map, create the trigger you want, then modify your game installation and paste the trigger into the set of triggers the load for every map (Scripts/Blizzard.j)

Then play the game, run the cheat trigger, then remove the modified game installation.

Using data corruption and obfuscation as a form of security only works if you can guarantee the ignorance of your users. Maybe you could have your map open with a questionairre that asks the users some World Editor questions, then instantly defeat any player who gives correct answers. This might go a long way towards ensuring that the only users of your map file are the ignorant ones, and therefore that it is safe.

Map protection actually does exist, contrary to popular belief, but it is not available to us like Vexorian says in the documentation of his optimizer. His program is an optimizer and not a map protector. On Warcraft 3 there are actually 5 protected maps ever created in human history that I know of. These maps are included with the Warcraft III Demo disk from the year 2002 that we found last year in my old parents' basement. On that version of Warcraft III, only the 5 prologue Thrall missions are playable because these maps include cryptographic signatures from Blizzard Entertainment. If you try to modify the maps, the World Editor would save over the map with an unprotected version and then the War3Demo.EXE will reject your map because it lacks the correct cryptographic signature. (You're supposed to buy Warcraft III to play other maps.)

Unfortunately, cryptographic map protection* is not available on any public release clients of Warcraft III and never has been. In order to resolve that, you would need to be able to modify the game program itself.

Edit: I guess technically I shouldn't say there are only 5 protected maps created in human history because the BLIZ tag exists also on melee maps and campaign maps in the release versions of Warcraft III. So, it has cryptographically signed maps as well -- and there are a lot more than 5. But the release client of Warcraft III does not restrict the user to only play those maps, so I figured it was not what you were going for.

*: Fixed a typo
 
Last edited:
Status
Not open for further replies.
Top