wc3campaigns
WC3C Homepage - www.wc3c.netUser Control Panel (Requires Log-In)Engage in discussions with other users and join contests in the WC3C forums!Read one of our many tutorials, ranging in difficulty from beginner to advanced!Show off your artistic talents in the WC3C Gallery!Download quality models, textures, spells (vJASS/JASS), systems, and scripts!Download maps that have passed through our rigorous approval process!

Go Back   Wc3C.net > Warcraft III Modding > Developer's Corner > Warcraft Editing Tools
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 06-30-2014, 10:09 PM   #1
francot514
User
 
Join Date: Oct 2013
Posts: 7

francot514 has little to show at this moment (0)

Default How to use cache converted and slk files

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??
francot514 is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 07-01-2014, 06:12 AM   #2
MasterofSickness
User
 
MasterofSickness's Avatar
 
Join Date: Feb 2006
Posts: 211

MasterofSickness is on a distinguished road (23)

Default

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
__________________
my nicknames:
20002006200720102012
Master of SicknessDesignatusKakarotEdwardElricSourceSeeker

Last edited by MasterofSickness : 07-01-2014 at 07:23 AM.
MasterofSickness is offline   Reply With Quote
Old 07-01-2014, 07:26 PM   #3
francot514
User
 
Join Date: Oct 2013
Posts: 7

francot514 has little to show at this moment (0)

Default

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...
francot514 is offline   Reply With Quote
Old 07-02-2014, 05:50 AM   #4
MasterofSickness
User
 
MasterofSickness's Avatar
 
Join Date: Feb 2006
Posts: 211

MasterofSickness is on a distinguished road (23)

Default

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  ^-xM!tq#*6@2n/W54?y}&!TO:mmIX$lbC+LaFaI]Gux'*
l_Jh*f58P$niA`  
documentation for almost all specifications from Warcraft III (for "W3V" see #27 & especially #28)
__________________
my nicknames:
20002006200720102012
Master of SicknessDesignatusKakarotEdwardElricSourceSeeker

Last edited by MasterofSickness : 07-15-2014 at 11:10 AM.
MasterofSickness is offline   Reply With Quote
Old 07-02-2014, 08:27 PM   #5
francot514
User
 
Join Date: Oct 2013
Posts: 7

francot514 has little to show at this moment (0)

Default

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"...
francot514 is offline   Reply With Quote
Old 07-03-2014, 09:41 PM   #6
MasterofSickness
User
 
MasterofSickness's Avatar
 
Join Date: Feb 2006
Posts: 211

MasterofSickness is on a distinguished road (23)

Default

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...
__________________
my nicknames:
20002006200720102012
Master of SicknessDesignatusKakarotEdwardElricSourceSeeker

Last edited by MasterofSickness : 07-15-2014 at 11:13 AM.
MasterofSickness is offline   Reply With Quote
Old 07-03-2014, 10:13 PM   #7
francot514
User
 
Join Date: Oct 2013
Posts: 7

francot514 has little to show at this moment (0)

Default

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: png Warcraft3gamecache.png (20.9 KB, 5 views)
francot514 is offline   Reply With Quote
Old 07-05-2014, 02:23 PM   #8
MasterofSickness
User
 
MasterofSickness's Avatar
 
Join Date: Feb 2006
Posts: 211

MasterofSickness is on a distinguished road (23)

Thumbs up

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.
__________________
my nicknames:
20002006200720102012
Master of SicknessDesignatusKakarotEdwardElricSourceSeeker

Last edited by MasterofSickness : 07-07-2014 at 08:02 AM.
MasterofSickness is offline   Reply With Quote
Old 07-11-2014, 07:37 PM   #9
francot514
User
 
Join Date: Oct 2013
Posts: 7

francot514 has little to show at this moment (0)

Default

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
francot514 is offline   Reply With Quote
Old 07-15-2014, 11:12 AM   #10
MasterofSickness
User
 
MasterofSickness's Avatar
 
Join Date: Feb 2006
Posts: 211

MasterofSickness is on a distinguished road (23)

Default

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).
__________________
my nicknames:
20002006200720102012
Master of SicknessDesignatusKakarotEdwardElricSourceSeeker

Last edited by MasterofSickness : 07-15-2014 at 11:26 AM.
MasterofSickness is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT. The time now is 11:46 AM.


Donate

Affiliates
The Hubb http://bylur.com - Warcraft, StarCraft, Diablo and DotA Blog & Forums The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

Powered by vBulletin (Copyright ©2000 - 2014, Jelsoft Enterprises Ltd).
Hosted by www.OICcam.com
IT Support and Services provided by Executive IT Services