Autohost suggestion: Use regex for GAM/PLR/etc. files
[RSS]
PBW uses a regex to determine what files should be uploaded or downloaded. Why can't the autohost do the same? This would obviate the need for the autohost to delete all files in the savegame folder prior to processing the turn, making it easier for players to use the autohost - they wouldn't need a separate game install!
Replies
[ Post reply ]
$savepath\$gamename*.*
It is already there in the config file, so I don't see a need for it to clean itself up.
Just change
del "$savepath\*.???"
(line 47 in AutohostConfig.xml for autohost2, don't know in autohost3)
to
del "$savepath\$gamename*.???"
It is already there in the config file, so I don't see a need for it to clean itself up.
Just change
del "$savepath\*.???"
(line 47 in AutohostConfig.xml for autohost2, don't know in autohost3)
to
del "$savepath\$gamename*.???"
Yeah, except what if you have one game called "space" and another game called "space2"? Then you go to delete the files for the first game, and oops, it deletes all the ones for the second game as well! That's why you'd need an actual regex like PBW uses.
Commenter:
Perkins
Date: Nov 22, 2013 12:35 AM
Autohost suggestion: Use regex for GAM/PLR/etc. files
Date: Nov 22, 2013 12:35 AM
Autohost suggestion: Use regex for GAM/PLR/etc. files
I hadn't considered that. Could write a list of expected file names with a wildcard...
del "$savepath\$gamename_plr*.???" "$savepath\$gamename_log*.???" "$savepath\$gamename.gam"
I think that would probably do it, assuming del works like that...
I sidestepped the issue by automatically swapping symlinks around.
del "$savepath\$gamename_plr*.???" "$savepath\$gamename_log*.???" "$savepath\$gamename.gam"
I think that would probably do it, assuming del works like that...
I sidestepped the issue by automatically swapping symlinks around.
[ Post reply ]