<< Back to Programming Forum   Search

Posts 1 - 9 of 9   
How do I extract and parse Warlight maps?: 6/26/2017 14:10:02


Pig
Level 56
Report
Hi, I would like to make an efficient expansion brute-force solver for Warlight. Basically, it would find the most efficient way to pick starting spots and expand from there. I would put it on Github in the public domain, so you could use it too.

I don't know anything about web though, so I've no idea of how to extract the actual map files and their structure. Could anyone help me with that?

Also, don't worry about cheating, this program would become worthless once you meet an opponent. It would instead serve as a public learning utility, to develop machine-tested expansion strategies, kind-of like chess engines serve to improve the abilities of chess players.

I'm not sure if this is the right place to ask, but since this is all about maps, I figure this wouldn't be the worst place to put this. Thanks.

Also, maybe someone has already did this?
How do I extract and parse Warlight maps?: 6/26/2017 14:33:32


TBestLittleHelper
Level 50
Report
If you get a WL membership you get access to the WL API, which is what you are asking for.

See: https://www.warlight.net/wiki/API for details (Querry Game API is what you would be looking at)

Getting a M' now also means you could develop it as a Mod.

"this program would become worthless once you meet an opponent"
If you want to make an AI, then you could use this https://www.warlight.net/blog/index.php/2016/02/the-warlight-ai-goes-open-source/ (includes a way to run your AI in MP games.) No M is needed for that part. (I belive)

To me the programming forum would fit better. It's Map Development, not just Map ;)

Edited 6/26/2017 14:37:45
How do I extract and parse Warlight maps?: 6/26/2017 15:03:55


Pig
Level 56
Report
So far I'm not interested into making an AI.

The API only provides means to set stuff, not get it. It let's you set bonuses, names, connections, etc., but not extract them. At least that's what the wiki tells me.

EDIT: looks like the territory specification can be extracted from SVG.

Edited 6/26/2017 15:44:22
How do I extract and parse Warlight maps?: 6/26/2017 15:51:48


Deadman 
Level 64
Report
If you provide GetHistory=true when you use the API, you should get the entire map and all the territory connections. ( ex - https://www.warlight.net/API/GameFeed?GameID=1212978&GetHistory=true)

You should also be able to retrieve the actual distribution on each board (which varies from game to game).

Edited 6/26/2017 15:52:50
How do I extract and parse Warlight maps?: 6/26/2017 15:56:38


Genghis 
Level 54
Report
well you just kinda extra and parse them. not that much to it
How do I extract and parse Warlight maps?: 6/26/2017 16:15:47


Pig
Level 56
Report
Thanks for explaining. I haven't done any web development, I mainly code in C and some scripting languages.
How do I extract and parse Warlight maps?: 6/26/2017 17:04:24


Жұқтыру
Level 56
Report
Also, don't worry about cheating, this program would become worthless once you meet an opponent.


I'm not sure what WL's policies are on this. I thought of doing the same (but for multiplayer - just have an AI beancount everything for me).
How do I extract and parse Warlight maps?: 6/26/2017 18:36:25


TBestLittleHelper
Level 50
Report
You agree to use the Website and the Services provided through this Website only for lawful purposes and to behave in a fair manner. Unacceptable uses and behavior that is deemed unacceptable include, without limitation: ......
(vii) interfering, disrupting or attempting to gain unauthorized access to other Accounts on the Website or any other computer network; (viii) committing, or attempting to commit fraud, especially through the use of mechanisms, software, or any script in association with the Website that is intended to interrupt the functioning of the Website, help a user achieve better results than could be achieved through the sole use of a mouse/keyboard, help the user to achieve a score that is not possible by following the game controls described by Warlight , or negatively influence another Player's game controls;

Arguably a beancounter thing that you if used is not allowed. Arguably :P

Given that the next point is "ix) opening and/or using multiple Accounts; " I suppose practice may differ from ToS sometimes.

Edited 6/26/2017 18:37:16
How do I extract and parse Warlight maps?: 6/26/2017 18:44:38


Pig
Level 56
Report
Well, then this software will be intended for offline use of course.

Edit: I still get the error: "This API may only be used by members", even though I got membership a couple of hours ago. Do I need to wait for a day or does the free trial not count?

Edited 6/26/2017 20:05:56
Posts 1 - 9 of 9