HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

store amount of gold/lumber/../../ at end of game into external file.

12-02-2007, 08:12 PM#1
archpsi
hi

is it possible to store the amount of gold/lumber/.. etc each player had at the end of the game by using a trigger that sends the data (variables used to keep track of those things) into the cache or something when the victory/defeat tab comes up?

any help would be appreciated, thanks in advance.
12-02-2007, 08:46 PM#2
Vexorian
Can't answer since I can't guess what the .. could involve, it could contain yet another ultra easy value like gold and lumber or something much harder to describe.

But yeah you can store such values (gold and lumber) at the end of the game, you should learn to exploit grimoire's ability to write to external files using the Cheat function.
12-03-2007, 05:53 AM#3
The Elite
use game cache
12-04-2007, 01:04 PM#4
Hoernchen
Quote:
Originally Posted by Vexorian
But yeah you can store such values (gold and lumber) at the end of the game, you should learn to exploit grimoire's ability to write to external files using the Cheat function.

Wait a minute, so I could save my 37 letter long load strings to an external file?! and load it on gamestart, in multiplayer?! explain please, cause this would be something id really really need to know...
12-04-2007, 01:43 PM#5
Vexorian
Quote:
in multiplayer?
You can't load the data I am talking about, at least not yet.

In theory you could add load and save functions to the Cheat native using grimoire, but you would need all players in the game to use grimoire in order to work.

You could save the code to a file and I guess it would be easier to type it manually if you have a file.
12-05-2007, 06:52 AM#6
archpsi
Basically what im trying to do is testing a.i vs each other, but with thousands of games and while im not around, and I need a way to keep track of the results.

a few of the things Im doing atm (this thread is only about 2):
1- run the map at 25*times the normal speed -this has been already implemented. (since its a.i vs a.i I don't think 25 minutes per game are necessary).

2- when one player loses, record data to file and exit game (data is gold,lumber, number of units created/killed, basically stuff which would appear on the score screen in the end)

3- non jass stuff.
external scripts make a copy of the file storing the previous game results (incase its overwritten in the next game) and use this data for something :) (wont say what, but I just need help getting the data out).

this would have to run many games, while im not around, so the scripts will handle a lot, my only issue is the data storing part :).
12-05-2007, 11:43 AM#7
Jazradel
Gamecache should work fine then.

Create one, store them (StoreInteger(), etc), and retrieve them from the appropriate file in your profile folder.
12-05-2007, 01:00 PM#8
masda70
If you go gamecache, there is this tool
http://www.wc3campaigns.net/showthread.php?t=81733
that does all the job and converts the gamecache file into something usable.