HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Where is the game cache file?

11-10-2007, 10:05 PM#1
CaptainPicard
I have a simple test map (attached) with the following trigger:

My question is, when I run this map and wait five seconds, it should create a game cache, then store a value in it, and finally save the game cache.

Collapse JASS:
function Trig_Map_the_terrain_Actions takes nothing returns nothing
    call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_007" )
    call InitGameCacheBJ( "TerrainGrid.w3v" )
    call StoreRealBJ( 0.11, "TestNumber", "Grid", GetLastCreatedGameCacheBJ() )
    call SaveGameCacheBJ( GetLastCreatedGameCacheBJ() )
endfunction

//===========================================================================
function InitTrig_Map_the_terrain takes nothing returns nothing
    set gg_trg_Map_the_terrain = CreateTrigger(  )
    call TriggerRegisterTimerEventSingle( gg_trg_Map_the_terrain, 5 )
    call TriggerAddAction( gg_trg_Map_the_terrain, function Trig_Map_the_terrain_Actions )
endfunction

But, I don't seem to be able to locate this file TerrainGrid.w3v. Where can I find it?

(Edit: I still haven't found where the game cache file is stored, although it seems that game caches from the official campaign get stored as "Campaigns.w3v" in a folder called "save/profile<Number>/" within the Warcraft III main directory.

Now that I've seen that file, it appears that it's not human readable. Is there any way to extract the data from that file into human-readable format outside of WC3? Does anyone know how the game cache file is formatted, in other words?

What I'm really trying to do is write a lot of data about the map (the terrain elevations over the entire map grid) to the game cache so that I can extract this information later for use with another program. If someone knows a better way to do it, I'd be very grateful!
Attached Files
File type: w3xTerrainGridTest.w3x (16.1 KB)
11-11-2007, 01:35 PM#2
PitzerMike
http://www.wc3campaigns.net/showthread.php?t=81733

And yes, Campaigns.w3v contains all game caches.
11-11-2007, 02:30 PM#3
cohadar
What happens if I delete that file?
11-11-2007, 02:43 PM#4
CaptainPicard
PitzerMike,

My sincere thanks. This is a wonderful and very useful tool you've created. I can now see the data I printed just fine, and keep on rolling with my project. I only hope that SC2 will have such a facility built in, or that it would be created quickly by one of the community. I will keep your name in mind as I begin to mod SC2!

Cohadar,

If you delete the file your World (of Warcraft) will come crashing down.