HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

How to use cache converted and slk files

06-30-2014, 10:09 PM#1
francot514
Hi, i want to extract game cache files, and after i used cache converter on campaigs.w3v i get a slk file but the only what i contains in text is:

ID;PWXL;N;E
B;Y0;X8;D0 0 -1 7
E


Is there anything else to do, to decode or decrypt the gamecache and savefiles??
07-01-2014, 06:12 AM#2
MasterofSickness
i could reproduce the error by using War3 Cache Converter 1.0.0.1 from PitzerMike.
it seems to me, like you didnt setup game cache (correctly) in your maps triggers.

how did you trigger game cache, can you provide some code?

EDIT:
here's an example of how i initialize & use gamecache for later conversion of "...\Warcraft III\save\Profile1\Campaigns.w3v" with Mike's tool:
Trigger:
Initialization
Collapse Events
Map initialization
Conditions
Collapse Actions
Wait 1.00 seconds
Visibility - Disable fog of war
Visibility - Disable black mask
Custom script: call FlushGameCache(InitGameCache("DataCache.w3v"))
Custom script: set udg__GC = InitGameCache("DataCache.w3v")
-------- NFO: "udg__GC" = global game cache variable "_GC" --------
Trigger:
Usage
Collapse Events
Unit - A unit enters Region 000 <gen>
Conditions
Collapse Actions
Set _i_gc = (_i_gc + 1)
-------- NFO: "_i_gc" = global integer variable "_i_gc" --------
Game Cache - Store (String((Y of (Position of (Entering unit))))) as (String(_i_gc)) of Category:PositionY in _GC
Game Cache - Save _GC
Game - Display to (All players) for 3.00 seconds the text: updated game cache
07-01-2014, 07:26 PM#3
francot514
Dont know what you mean, i used the triggers for me map:

-Create cache for file Map.w3v
-Save cache: last created cache

Also im using the default campaings.w3v file...
07-02-2014, 05:50 AM#4
MasterofSickness
i dont have to ask whether you even stored data into the game cache, do i?

heres another - even smaller - example which works flawlessly for me:
Trigger:
Melee Initialization
Collapse Events
Map initialization
Conditions
Collapse Actions
Wait 1.00 seconds
Visibility - Disable fog of war
Visibility - Disable black mask
Game Cache - Create a game cache from MapName.w3v
Game Cache - Store "value: this is a the actual value (here: value type = string)" as label: this is the value's description (always string) of category: this is the value's group (always string) in (Last created game cache)
Game Cache - Save (Last created game cache)
output.slk:
MapName.w3v
category:thisisthevalue'sgroup(alwaysstring)
stringlabel:thisisthevalue'sdescription(alwaysstring)value: this is a the actual value (here: value type = string)
Campaigns.w3v (binary file!):
Warcraft III recorded game D   å      Ý      PX3W   «      Ë/vJ™  ï^-xìM!…™›tç¸qãŽÄ#è*6@‚2n/Wº˜¸54í¢?y}ù&!ÄTëŠá†O:mçµ÷m¦IûX$›lbC+ºL‡¤£ÏaF·aI‰£]ô±žïGux'÷¥ø*¤¢
lýò¡Û_Jh*f5¨8£ƒ¾ÙP$ùn¸‚üâißõ¸A`þŽÀ  ÿÿ
documentation for almost all specifications from Warcraft III (for "W3V" see #27 & especially #28)
07-02-2014, 08:27 PM#5
francot514
Now when i addd data to the game caches and save it again, it become unreadable by the cache converted: "This is not a valid input file"...
07-03-2014, 09:41 PM#6
MasterofSickness
so, my examples above from post #4 & #2 dont work for you?

Quote:
Originally Posted by francot514
Now when i addd data to the game caches and save it again, it become unreadable by the cache converted: "This is not a valid input file"...
again, the more informations you provide, the quicker we can help you...
please show code where you experience described behaviour.

also note, that game cache only works for single player as far as i know, but perhaps im confusing game cache with sth else right now...
07-03-2014, 10:13 PM#7
francot514
Ok, i have uploaded the picture about how looks my triggers for the game cache, tell me if anything is wrong...
Attached Images
File type: pngWarcraft3gamecache.png (20.9 KB)
07-05-2014, 02:23 PM#8
MasterofSickness
finally something we can contribute to!
however, keep in mind, that you dont need a screenshot for showing code, you can just right click your triggers in the trigger editor in world editor & "Copy As Text". then in your post, you can click the TRIGGER icon & paste your code. it is somewhat hidden, but heres a link to an example from the wc3c FAQ for usage of TRIGGER tags.

you provided 2 triggers: "win" & "start".
comparing the code of those triggers i assume that trigger "win" from map A runs first. this trigger will then load the map where trigger "start" runs at map init.
my advice for trigger "win":
- use a normal game cache name without backslash (perhaps it also works with it, but i never tested)
- dont store an empty unit to the game cache like it seems from your provided code, instead use the actual entered unit
Trigger:
win
Collapse Events
Unit - A unit enters Region 000 <gen>
Conditions
Collapse Actions
Game Cache - Create a game cache from win.w3v
Game Cache - Store (Entering unit) as Unit of Units in (Last created game cache)
Game Cache - Save (Last created game cache)
Game - Save game as win.w3z and change level to Maps\MapName.w3x (Skip scores)

my advice for trigger "start":
to be honest, i never worked with this function:
Trigger:
Game Cache - Reload all game cache data from disk
"common.j" says:
Collapse JASS:
// Creates a new or reads in an existing game cache file stored
// in the current campaign profile dir
//
native  ReloadGameCachesFromDisk takes nothing returns boolean
PandaMine says that this function only returns true or false: http://www.wc3c.net/showthread.php?t...CachesFromDisk
also ap0calypse just uses this function as a boolean: http://www.hiveworkshop.com/forums/w...system-232530/

so, unless you have some reasons for using this function, i would remove it. it seems to me, that you want to use this function to init a new game cache so that you can restore a unit from it through the next function:
Trigger:
Game Cache - Restore Unit of Units from (Last created game cache) for Player 1 (Red) at (Center of Region 001 <gen>) facing 0.00
however, by only using the reload func, i wasnt even able to refer to my currently existing game cache file "...\Warcraft III\save\Profile1\Campaigns.w3v". i had to use the create func to actually get data from the game cache.
so, assuming that the reload func does nothing else than returning true or false, your unit restore func will never work. also, after you created your game cache, you clear it. that way you also can't receive anything from it.
Trigger:
start
Collapse Events
Map initialization
Conditions
Collapse Actions
Wait 1.00 seconds
Game Cache - Create a game cache from win.w3v
Set GameCache = (Last created game cache)
Game Cache - Restore Unit of Units from GameCache for Player 1 (Red) at (Center of Region 001 <gen>) facing 0.00
Game - Display to (All players) the text: Hi you welcome!!!
Set Unit = (Last restored unit)
when creating the game cache, you have to adjust "MapName.w3v" to the name of the game cache from the map which contains your trigger "win" like i showed in the triggers above.

i didnt tested this, but it should work. otherwise please report. if i find enough time, i will test it on my notebook later.

edit:
and to be save, delete your "Campaigns.w3v" if it already got corrupted.
07-11-2014, 07:37 PM#9
francot514
Yes, very weird, that you need to create game cache file always to be able to reload values from it, but going back to question, can you tell me how to proper extract the game cache files and able to edit slk, also can you show me how a slk looks, becuase as i said you only get that weird:
ID;PWXL;N;E
B;Y0;X8;D0 0 -1 7
E
07-15-2014, 11:12 AM#10
MasterofSickness
Quote:
Originally Posted by francot514
...but going back to question, can you tell me how to proper extract the game cache files and able to edit slk, also can you show me how a slk looks, becuase as i said you only get that weird:
ID;PWXL;N;E
B;Y0;X8;D0 0 -1 7
E
Quote:
Originally Posted by MasterofSickness
so, my examples above from post #4 & #2 dont work for you?
by the way:
updated post #4 by adding a link to the W3V file specifications, adding binary content of appropriate W3V & changing the visual appearance of the content from the SLK from CODE tags to TABLE tags.

edit:
oh, and because i dont know what you still are doing wrong: SLK files apparently are opened with Microsoft Excel (or for example with the freeware OpenOffice if you dont have Excel).