Play
Multi-Player
Coins
Community
Settings
Help
Community   Maps   Forum   Mail   Ladders   Clans   Recent Games
Sign In | Sign Up
<< Back to Programming Forum   

Posts 1 - 17 of 17   
Game ID feed API: 12/9/2015 05:38:09

Master of the Dead 
Level 62
Report
I'm looking for the template ID used for a game. It is missing in the response for some games, but present for the other ones.Please help.




Missing:
{
"termsOfUse" : "Please use this data feed responsibly, as it can consume significant amounts of server resources if called repeatedly. After getting the data for a game, please store the data locally so you don't need to retrieve it from the WarLight server again. The format of this data feed may change in the future. The feed requires that you be signed into your member WarLight account to use. If you're trying to access it programmatically, you may POST your username and API Token to this page in the format Email=your@email.com&APIToken=token",
"id" : "9958799",
"state" : "Finished",
"name" : "Snow Mountains Bloody Mess RT: First Round",
"numberOfTurns" : "6",
"players" : [ {
"id" : "635295275",
"name" : "Lolowut the Invincible • apex",
"email" : "lolow...@...",
"isAI" : "False",
"color" : "#008000",
"state" : "SurrenderAccepted"
}, {
"id" : "486201411",
"name" : "ps",
"email" : "...@...",
"isAI" : "False",
"colorb" : "#606060",
"state" : "Won"
} ]
}




Present:
{
"termsOfUse" : "Please use this data feed responsibly, as it can consume significant amounts of server resources if called repeatedly. After getting the data for a game, please store the data locally so you don't need to retrieve it from the WarLight server again. The format of this data feed may change in the future. The feed requires that you be signed into your member WarLight account to use. If you're trying to access it programmatically, you may POST your username and API Token to this page in the format Email=your@email.com&APIToken=token",
"id" : "10011688",
"state" : "Finished",
"name" : "Real-Time Ladder: Master of the Dead vs Sułtan ..",
"numberOfTurns" : "5",

"templateID" : "514267",

"players" : [ {
"id" : "6449746372",
"name" : "Sułtan Kosmitów",
"email" : "niele...@...",
"isAI" : "False",
"color" : "#94652e",
"state" : "SurrenderAccepted"
}, {
"id" : "2428496679",
"name" : "Master of the Dead",
"email" : "...@...",
"isAI" : "False",
"color" : "#009b9d",
"state" : "Won"
} ]
}
Game ID feed API: 12/9/2015 05:44:08


Fleecemaster 
Level 59
Report
Is it that one is a Ladder game?

Edit: No, that doesn't seem to be it, I have a non-ladder showing the Template ID. Have you noticed it with any other API feeds?

Edited 12/9/2015 05:45:23
Game ID feed API: 12/9/2015 05:47:34

wct
Level 56
Report
Is it possible that the ones with it missing have been customized from the template, that check box when you create a game, "Customize Template"?
Game ID feed API: 12/9/2015 05:51:19

wct
Level 56
Report
Appears that way. (https://www.warlight.net/MultiPlayer?GameID=10011688) lists Template Used as "Treasure Map 1v1" and (https://www.warlight.net/MultiPlayer?GameID=9958799) lists Template Used as "Custom".
Game ID feed API: 12/9/2015 06:00:39

Master of the Dead 
Level 62
Report
What is the difference between a custom template and a normal one?

EDIT:Nice find by the way

Edited 12/9/2015 06:01:36
Game ID feed API: 12/9/2015 06:02:03


Fleecemaster 
Level 59
Report
Is it just the name perhaps? "Custom"
Game ID feed API: 12/9/2015 06:02:29

Master of the Dead 
Level 62
Report
Have you noticed it with any other API feeds?


No.. But I haven't required the template ID till today.
Game ID feed API: 12/9/2015 06:04:14


knyte 
Level 58
Report
A "Custom" template is just an unsaved template that doesn't have an official template ID from what I can tell. So the game isn't actually associated with a logged template, just a set of settings.
Game ID feed API: 12/9/2015 06:05:47

Master of the Dead 
Level 62
Report
Oh I see.. That makes sense.. I'll have to check with Lolowut if he actually made the template!
Game ID feed API: 12/9/2015 06:07:13


Fleecemaster 
Level 59
Report
Optimum, to the rescue! :D
Game ID feed API: 12/9/2015 06:08:03


Fleecemaster 
Level 59
Report
Master, you can always get the template out of the game and then save it yourself, that should create an ID for it, if that's what you're after :)
Game ID feed API: 12/9/2015 06:10:54


Kenny • apex 
Level 59
Report
Hello, yeah I may have changed settings without actually saving them to the real template for the purpose of that tourney. I guess that's the problem then :)
Game ID feed API: 12/9/2015 06:11:05

Master of the Dead 
Level 62
Report
Yeah.. I'm working on automating something though.. So I was just worried if my feature would break completely. Seems like that is not the case. So I'm relieved!
Game ID feed API: 12/9/2015 06:13:04


knyte 
Level 58
Report
I don't think that's going to associate the game with the newly-created template. Probably depends on how the settings are handled, but my experimentation suggests they're just simply copied over- and just like how your game's not suddenly going to be associated with a random template I create with the same settings, I don't think creating a template after the fact is going to affect API output.

That said, is there a way to programmatically retrieve the settings from a game (without having to do any computation or guesswork) using the current APIs? If not, this could be something to add to Project PhantomWL because it would be worthwhile to be able to generate templates based on a game's settings.
Game ID feed API: 12/9/2015 06:16:45

Master of the Dead 
Level 62
Report
Yeah I'm not too worried about old games.

You can retrieve the template which you can re-use to create games with similar settings(which is what my current feature is about). I'm not aware of any way to retrieve individual settings like luck/ distribution/ move order etc.
Game ID feed API: 12/9/2015 06:23:31


Fleecemaster 
Level 59
Report
As far as I know there are very few settings in the API, for my map analysis I've had to manually input things like neutral sizes and starting armies, stuff like this because it doesn't seem to be there. I hadn't thought of taking it directly from the template though, but really, I think getting that stuff directly from the game would be better for things like wastelands and available picks, I know I'm going a bit off topic, sorry :P
Game ID feed API: 12/9/2015 17:31:52


ChrisCMU 
Level 60
Report
Very interesting discussion. Wish these didn't get buried in the All list
Posts 1 - 17 of 17   

Contact | About WarLight | Play Risk Online | Multiplayer Strategy Game | Challenge Friends, Win Money | Skill Game | Terms of Service