HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

automatic starting and finishing scripts

05-21-2007, 09:36 PM#1
emeraldemon
Hi, I'm trying to write a program that can play two AIs against each other and record the result. To do this, I need two things:
(1) The ability to start a map automatically, like from a commandline.
(2) A trigger that would write the result of the game ("player 1 wins") to a file or to stdout or something similar. I looked through the JASS API briefly and didn't find anything like printf or file operations.

Does anyone know a way to do either of these two things? Are they even possible? My final goal is to create a machine learning framework for wc3. If I can get it to work, I'd be happy to share.
Thanks,
Tom
05-22-2007, 09:04 PM#2
MaD[Lion]
you cannot write to files using jass ;)
05-22-2007, 09:18 PM#3
Earth-Fury
Quote:
Originally Posted by emeraldemon
(1) The ability to start a map automatically, like from a commandline.
There is a command line option, im almost sure of it. I don't know what it actually is... maybe -loadfile or -loadmap ?

Quote:
Originally Posted by emeraldemon
(2) A trigger that would write the result of the game ("player 1 wins") to a file or to stdout or something similar. I looked through the JASS API briefly and didn't find anything like printf or file operations.
I think this will help you out:
http://wc3campaigns.net/showthread.p...highlight=JAPI
05-23-2007, 07:22 PM#4
emeraldemon
Quote:
Originally Posted by Earth-Fury
There is a command line option, im almost sure of it. I don't know what it actually is... maybe -loadfile or -loadmap ?


I think this will help you out:
http://wc3campaigns.net/showthread.p...highlight=JAPI

Yes, it's -loadfile, thanks a lot.

As for the JAPI, that's some pretty heavy stuff, I'll have to look at it for a while to try and figure it out. But I'll let you know if I can make it work.

Thanks for the pointers!
Tom