<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.binary-tools.de/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=ITob</id>
	<title>Binary-Tools Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.binary-tools.de/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=ITob"/>
	<link rel="alternate" type="text/html" href="http://wiki.binary-tools.de/wiki/Special:Contributions/ITob"/>
	<updated>2026-04-07T02:06:02Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.33.0</generator>
	<entry>
		<id>http://wiki.binary-tools.de/index.php?title=Kingdoms_API&amp;diff=1318</id>
		<title>Kingdoms API</title>
		<link rel="alternate" type="text/html" href="http://wiki.binary-tools.de/index.php?title=Kingdoms_API&amp;diff=1318"/>
		<updated>2020-04-17T17:49:48Z</updated>

		<summary type="html">&lt;p&gt;ITob: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages/&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
{{Kingdoms Topic/en|legends=Legends API}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:2--&amp;gt;&lt;br /&gt;
Travian provides a [https://en.wikipedia.org/wiki/JSON JSON]-[https://en.wikipedia.org/wiki/Application_programming_interface API] to access some information about running game worlds.&amp;lt;ref&amp;gt;https://forum.kingdoms.com/index.php?thread/4099-api-for-external-tools/&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;https://forum.kingdoms.com/index.php?thread/21440-official-api-for-external-tools/&amp;amp;postID=149851#post149851&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Accessing the API == &amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
The base URL for all queries to the API is &amp;lt;pre&amp;gt;https://&amp;amp;lt;gameworld&amp;amp;gt;.kingdoms.com/api/external.php?action=&amp;amp;lt;action&amp;amp;gt;&amp;lt;/pre&amp;gt; (e.g. https:&amp;lt;nowiki /&amp;gt;//com1.kingdoms.com/api/external.php?action=...).&lt;br /&gt;
&lt;br /&gt;
=== Parameters === &amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
Depending on the value of ''action'' further parameters have to be specified. For most requests an [[#Action: requestApiKey |API key]] is required.&lt;br /&gt;
&lt;br /&gt;
=== Response format === &amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
 ╠═ time : int? : [https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#The_ECMAScript_epoch_and_timestamps javascript timestamp] (miliseconds since January 1, 1970, UTC), only present for some actions&lt;br /&gt;
 ╠═ error : object? : Indicates that an error occured. ''response'' will contain an empty array in this case.&lt;br /&gt;
   ╠═ type : string&lt;br /&gt;
   ╠═ number : int : error id&lt;br /&gt;
   ╚═ message : string&lt;br /&gt;
 ╚═ response : object | empty array&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
A question mark after a type indicates that this property is optional. ''object'' refers to the JSON meaning of the term (similar to dictionaries or maps in other languages). In the following sections, only the contents of the response object are shown.&lt;br /&gt;
''string(≤255)'' resp. ''string(32)'' indicates a string with a maximum resp. fixed length.&lt;br /&gt;
The type ''string(int)'' represents an integer that is formatted as a JSON string (surrounded by &amp;quot;) for unknown reasons.&lt;br /&gt;
&lt;br /&gt;
== Action: requestApiKey == &amp;lt;!--T:7--&amp;gt;&lt;br /&gt;
An API key can be requested using this action. The key is required for most other requests.&lt;br /&gt;
&lt;br /&gt;
=== Parameters === &amp;lt;!--T:8--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| email || string(≤255) || valid email address (may be used by Travian staff for questions)&lt;br /&gt;
|-&lt;br /&gt;
| siteName || string(≤255) || name of the tool&lt;br /&gt;
|-&lt;br /&gt;
| siteUrl || string(≤255) || URL of the tool&lt;br /&gt;
|-&lt;br /&gt;
| public || boolean || whether the tool should be available to the public (and may be used by Travian to create e.g. a tool list in the future)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Response === &amp;lt;!--T:9--&amp;gt;&lt;br /&gt;
 ╚═ response&lt;br /&gt;
   ╠═ privateApiKey : string(32)&lt;br /&gt;
   ╚═ publicSiteKey : string(32)&lt;br /&gt;
&lt;br /&gt;
== Action: updateSiteData == &amp;lt;!--T:10--&amp;gt;&lt;br /&gt;
This action can be used to update the data that was provided in the original ''requestApiKey'' request.&lt;br /&gt;
&lt;br /&gt;
=== Parameters === &amp;lt;!--T:11--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| privateApiKey || string(32) || private api key&lt;br /&gt;
|-&lt;br /&gt;
| email || string(≤255) || valid email address (may be used by Travian staff for questions)&lt;br /&gt;
|-&lt;br /&gt;
| siteName || string(≤255) || name of the tool&lt;br /&gt;
|-&lt;br /&gt;
| siteUrl || string(≤255) || URL of the tool&lt;br /&gt;
|-&lt;br /&gt;
| public || boolean || whether the tool should be available to the public (and may be used by Travian to create e.g. a tool list in the future)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Response === &amp;lt;!--T:12--&amp;gt;&lt;br /&gt;
 ╚═ response&lt;br /&gt;
   ╚═ data : boolean : always true (in case of an error, an error object is used instead as descried [[#Response_format|above]])&lt;br /&gt;
&lt;br /&gt;
== Action: getMapData == &amp;lt;!--T:13--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:14--&amp;gt;&lt;br /&gt;
The response to this action contains all available data including information about players, kingdoms and the map.&lt;br /&gt;
&lt;br /&gt;
=== Parameters === &amp;lt;!--T:15--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| privateApiKey || string(32) || private api key&lt;br /&gt;
|-&lt;br /&gt;
| date || string? || may be specified to request old data, the newest available data is returned if omitted, format is DD.MM.YYYY (e.g. 31.12.2020)&lt;br /&gt;
|}&lt;br /&gt;
The API has a bug when querying map data near midnight that leads to data for the wrong day getting returned.&amp;lt;ref&amp;gt;https://forum.kingdoms.com/index.php?thread/20863-suggestions-for-the-json-api/&amp;amp;postID=144462#post144462&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Response === &amp;lt;!--T:16--&amp;gt;&lt;br /&gt;
 ╚═ response&lt;br /&gt;
   ╠═ gameworld : object&lt;br /&gt;
     ╠═ name : string : (e.g. &amp;quot;com1&amp;quot;)&lt;br /&gt;
     ╠═ startTime : int : unix timestamp ('''seconds''' since January 1, 1970, UTC)&lt;br /&gt;
     ╠═ speed : int&lt;br /&gt;
     ╠═ speedTroops : int&lt;br /&gt;
     ╠═ lastUpdateTime : string(int) : unix timestamp, exact timestamp when returned data was generated&lt;br /&gt;
     ╠═ date : int : unix timestamp, start of the day (00:00:00) of returned data&lt;br /&gt;
     ╚═ version : string : always &amp;quot;1.0&amp;quot;&lt;br /&gt;
   ╠═ players : array&lt;br /&gt;
     ╠═ playerId : string(int)&lt;br /&gt;
     ╠═ name : string&lt;br /&gt;
     ╠═ tribeId : string(int) : 1 = Roman, 2 = Teuton, 3 = Gaul&lt;br /&gt;
     ╠═ kingdomId : string(int) : &amp;quot;0&amp;quot; for no kingdom&lt;br /&gt;
     ╠═ treasures : int : if player is king, then number of treasures of the kingdom, otherwise 0&lt;br /&gt;
     ╠═ role : int : 0 = Governor, 1 = King, 2 = Duke, 3 = Vice King, 0 if not part of any kingdom&lt;br /&gt;
     ╠═ externalLoginToken : string : see [[#Authentication using publicSiteKey|Authentication using publicSiteKey]]&lt;br /&gt;
     ╚═ villages : array&lt;br /&gt;
       ╠═ villageId : string(int)&lt;br /&gt;
       ╠═ x : string(int)&lt;br /&gt;
       ╠═ y : string(int)&lt;br /&gt;
       ╠═ population : string(int)&lt;br /&gt;
       ╠═ name : string&lt;br /&gt;
       ╠═ isMainVillage : boolean&lt;br /&gt;
       ╚═ isCity : boolean&lt;br /&gt;
   ╠═ kingdoms : array&lt;br /&gt;
     ╠═ kingdomId : string(int)&lt;br /&gt;
     ╠═ kingdomTag : string : name of the kingdom&lt;br /&gt;
     ╠═ creationTime : string(int) : unix timestamp, exact time of kingdom creation&lt;br /&gt;
     ╚═ victoryPoints : string(int)&lt;br /&gt;
   ╚═ map                         &lt;br /&gt;
     ╠═ radius : string(int) : current radius of the map&lt;br /&gt;
     ╠═ cells : array&lt;br /&gt;
       ╠═ id : string(int)&lt;br /&gt;
       ╠═ x : string(int)&lt;br /&gt;
       ╠═ y : string(int)&lt;br /&gt;
       ╠═ resType : string : if cell is an abandoned valley or village, then resource distribution (e.g. &amp;quot;4446&amp;quot;), otherwise &amp;quot;0&amp;quot; = wilderness, &amp;quot;1&amp;quot; = outside of map radius&lt;br /&gt;
       ╠═ oasis : string(int) : if cell is an oasis, then [[#Oases oasis type], otherwise &amp;quot;0&amp;quot;&lt;br /&gt;
       ╠═ landscape : string(int) : landscape id, see [[#Landscapes|Landscapes]]&lt;br /&gt;
       ╚═ kingdomId : string(int) / int : kingdom id (as string) of the village ('''not''' kingdom of the village's owner), 0 (as int) if not within kingdom borders&lt;br /&gt;
     ╚═ landscapes : object&lt;br /&gt;
       ╚═ [ landscape id : int ] : string : relative path to the corresponding image (e.g. &amp;quot;layout/images/map/wood0_0_0.png&amp;quot;), see [[#Landscapes|Landscapes]]&lt;br /&gt;
&lt;br /&gt;
==== Oases ==== &amp;lt;!--T:26--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:27--&amp;gt;&lt;br /&gt;
An oasis type consists of 2 digits. The first determines the main resource of the oasis according to the table below. If the second digit is a 1 the oasis has an addition 25% crop bonus, otherwise there is no secondary bonus.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:28--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! ID !! Type&lt;br /&gt;
|-&lt;br /&gt;
| 1 || wood&lt;br /&gt;
|-&lt;br /&gt;
| 2 || clay&lt;br /&gt;
|-&lt;br /&gt;
| 3 || iron&lt;br /&gt;
|-&lt;br /&gt;
| 4 || crop&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:29--&amp;gt;&lt;br /&gt;
Examples:&lt;br /&gt;
&amp;quot;20&amp;quot; is a 25% clay oasis.&lt;br /&gt;
&amp;quot;21&amp;quot; is a 25% clay and 25% crop oasis.&lt;br /&gt;
&amp;quot;41&amp;quot; is a 50% crop oasis.&lt;br /&gt;
&lt;br /&gt;
==== Landscapes ==== &amp;lt;!--T:17--&amp;gt;&lt;br /&gt;
Landscapes are the visualizations used on the ingame map (e.g. trees, mountains, lakes, clay pits). A landscape's id can be mapped to an image path using the ''landscapes'' object in the response. This path is relative to the static game files which can be found at https://cdn.traviantools.net/game/0.95/ for that specific version of the game. Example path: https://cdn.traviantools.net/game/0.95/layout/images/map/wood0_0_0.png&lt;br /&gt;
&lt;br /&gt;
== Authentication using publicSiteKey == &amp;lt;!--T:18--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:19--&amp;gt;&lt;br /&gt;
From https://forum.kingdoms.com/index.php?thread/4099-api-for-external-tools/:&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
With the ''externalLoginToken'' you can authenticate a player - without that the player needs to register for your tool.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:20--&amp;gt;&lt;br /&gt;
In your call to ''requestApiKey'' you were provided a ''privateApiKey'' and a ''publicSiteKey''. The ''privateApiKey'' should be.. guess what.. private. You shouldn't tell this to anyone. You will need it to make requests to our api's. In contrast your ''publicSiteKey'' can be public.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:21--&amp;gt;&lt;br /&gt;
If a player wants to log-in to your site, he needs first an ''accessToken'' for your site. The player needs your ''publicSiteKey''. The player can go to its Settings-Page in T5 and under point &amp;quot;External Tools&amp;quot; click on &amp;quot;Create Access&amp;quot;. He enters your ''publicSiteKey'' and get an ''accessToken'' back.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:22--&amp;gt;&lt;br /&gt;
If the player enters the ''accessToken'' on your site, you can calculate the players ''externalLoginToken'' by&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:23--&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;$externalLoginToken = md5($accessToken.$privateApiKey);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:24--&amp;gt;&lt;br /&gt;
Now you can search the player in your player table generated with the data from ''getMapData'' and - if you found him - log him into your site.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References == &amp;lt;!--T:25--&amp;gt;&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;/div&gt;</summary>
		<author><name>ITob</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.binary-tools.de/index.php?title=Kingdoms_API&amp;diff=1317</id>
		<title>Kingdoms API</title>
		<link rel="alternate" type="text/html" href="http://wiki.binary-tools.de/index.php?title=Kingdoms_API&amp;diff=1317"/>
		<updated>2020-04-17T17:48:26Z</updated>

		<summary type="html">&lt;p&gt;ITob: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages/&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
{{Kingdoms Topic/en|legends=Legends API}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:2--&amp;gt;&lt;br /&gt;
Travian provides a [https://en.wikipedia.org/wiki/JSON JSON]-[https://en.wikipedia.org/wiki/Application_programming_interface API] to access some information about running game worlds.&amp;lt;ref&amp;gt;https://forum.kingdoms.com/index.php?thread/4099-api-for-external-tools/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Accessing the API == &amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
The base URL for all queries to the API is &amp;lt;pre&amp;gt;https://&amp;amp;lt;gameworld&amp;amp;gt;.kingdoms.com/api/external.php?action=&amp;amp;lt;action&amp;amp;gt;&amp;lt;/pre&amp;gt; (e.g. https:&amp;lt;nowiki /&amp;gt;//com1.kingdoms.com/api/external.php?action=...).&lt;br /&gt;
&lt;br /&gt;
=== Parameters === &amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
Depending on the value of ''action'' further parameters have to be specified. For most requests an [[#Action: requestApiKey |API key]] is required.&lt;br /&gt;
&lt;br /&gt;
=== Response format === &amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
 ╠═ time : int? : [https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#The_ECMAScript_epoch_and_timestamps javascript timestamp] (miliseconds since January 1, 1970, UTC), only present for some actions&lt;br /&gt;
 ╠═ error : object? : Indicates that an error occured. ''response'' will contain an empty array in this case.&lt;br /&gt;
   ╠═ type : string&lt;br /&gt;
   ╠═ number : int : error id&lt;br /&gt;
   ╚═ message : string&lt;br /&gt;
 ╚═ response : object | empty array&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
A question mark after a type indicates that this property is optional. ''object'' refers to the JSON meaning of the term (similar to dictionaries or maps in other languages). In the following sections, only the contents of the response object are shown.&lt;br /&gt;
''string(≤255)'' resp. ''string(32)'' indicates a string with a maximum resp. fixed length.&lt;br /&gt;
The type ''string(int)'' represents an integer that is formatted as a JSON string (surrounded by &amp;quot;) for unknown reasons.&lt;br /&gt;
&lt;br /&gt;
== Action: requestApiKey == &amp;lt;!--T:7--&amp;gt;&lt;br /&gt;
An API key can be requested using this action. The key is required for most other requests.&lt;br /&gt;
&lt;br /&gt;
=== Parameters === &amp;lt;!--T:8--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| email || string(≤255) || valid email address (may be used by Travian staff for questions)&lt;br /&gt;
|-&lt;br /&gt;
| siteName || string(≤255) || name of the tool&lt;br /&gt;
|-&lt;br /&gt;
| siteUrl || string(≤255) || URL of the tool&lt;br /&gt;
|-&lt;br /&gt;
| public || boolean || whether the tool should be available to the public (and may be used by Travian to create e.g. a tool list in the future)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Response === &amp;lt;!--T:9--&amp;gt;&lt;br /&gt;
 ╚═ response&lt;br /&gt;
   ╠═ privateApiKey : string(32)&lt;br /&gt;
   ╚═ publicSiteKey : string(32)&lt;br /&gt;
&lt;br /&gt;
== Action: updateSiteData == &amp;lt;!--T:10--&amp;gt;&lt;br /&gt;
This action can be used to update the data that was provided in the original ''requestApiKey'' request.&lt;br /&gt;
&lt;br /&gt;
=== Parameters === &amp;lt;!--T:11--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| privateApiKey || string(32) || private api key&lt;br /&gt;
|-&lt;br /&gt;
| email || string(≤255) || valid email address (may be used by Travian staff for questions)&lt;br /&gt;
|-&lt;br /&gt;
| siteName || string(≤255) || name of the tool&lt;br /&gt;
|-&lt;br /&gt;
| siteUrl || string(≤255) || URL of the tool&lt;br /&gt;
|-&lt;br /&gt;
| public || boolean || whether the tool should be available to the public (and may be used by Travian to create e.g. a tool list in the future)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Response === &amp;lt;!--T:12--&amp;gt;&lt;br /&gt;
 ╚═ response&lt;br /&gt;
   ╚═ data : boolean : always true (in case of an error, an error object is used instead as descried [[#Response_format|above]])&lt;br /&gt;
&lt;br /&gt;
== Action: getMapData == &amp;lt;!--T:13--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:14--&amp;gt;&lt;br /&gt;
The response to this action contains all available data including information about players, kingdoms and the map.&lt;br /&gt;
&lt;br /&gt;
=== Parameters === &amp;lt;!--T:15--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| privateApiKey || string(32) || private api key&lt;br /&gt;
|-&lt;br /&gt;
| date || string? || may be specified to request old data, the newest available data is returned if omitted, format is DD.MM.YYYY (e.g. 31.12.2020)&lt;br /&gt;
|}&lt;br /&gt;
The API has a bug when querying map data near midnight that leads to data for the wrong day getting returned.&amp;lt;ref&amp;gt;https://forum.kingdoms.com/index.php?thread/20863-suggestions-for-the-json-api/&amp;amp;postID=144462#post144462&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Response === &amp;lt;!--T:16--&amp;gt;&lt;br /&gt;
 ╚═ response&lt;br /&gt;
   ╠═ gameworld : object&lt;br /&gt;
     ╠═ name : string : (e.g. &amp;quot;com1&amp;quot;)&lt;br /&gt;
     ╠═ startTime : int : unix timestamp ('''seconds''' since January 1, 1970, UTC)&lt;br /&gt;
     ╠═ speed : int&lt;br /&gt;
     ╠═ speedTroops : int&lt;br /&gt;
     ╠═ lastUpdateTime : string(int) : unix timestamp, exact timestamp when returned data was generated&lt;br /&gt;
     ╠═ date : int : unix timestamp, start of the day (00:00:00) of returned data&lt;br /&gt;
     ╚═ version : string : always &amp;quot;1.0&amp;quot;&lt;br /&gt;
   ╠═ players : array&lt;br /&gt;
     ╠═ playerId : string(int)&lt;br /&gt;
     ╠═ name : string&lt;br /&gt;
     ╠═ tribeId : string(int) : 1 = Roman, 2 = Teuton, 3 = Gaul&lt;br /&gt;
     ╠═ kingdomId : string(int) : &amp;quot;0&amp;quot; for no kingdom&lt;br /&gt;
     ╠═ treasures : int : if player is king, then number of treasures of the kingdom, otherwise 0&lt;br /&gt;
     ╠═ role : int : 0 = Governor, 1 = King, 2 = Duke, 3 = Vice King, 0 if not part of any kingdom&lt;br /&gt;
     ╠═ externalLoginToken : string : see [[#Authentication using publicSiteKey|Authentication using publicSiteKey]]&lt;br /&gt;
     ╚═ villages : array&lt;br /&gt;
       ╠═ villageId : string(int)&lt;br /&gt;
       ╠═ x : string(int)&lt;br /&gt;
       ╠═ y : string(int)&lt;br /&gt;
       ╠═ population : string(int)&lt;br /&gt;
       ╠═ name : string&lt;br /&gt;
       ╠═ isMainVillage : boolean&lt;br /&gt;
       ╚═ isCity : boolean&lt;br /&gt;
   ╠═ kingdoms : array&lt;br /&gt;
     ╠═ kingdomId : string(int)&lt;br /&gt;
     ╠═ kingdomTag : string : name of the kingdom&lt;br /&gt;
     ╠═ creationTime : string(int) : unix timestamp, exact time of kingdom creation&lt;br /&gt;
     ╚═ victoryPoints : string(int)&lt;br /&gt;
   ╚═ map                         &lt;br /&gt;
     ╠═ radius : string(int) : current radius of the map&lt;br /&gt;
     ╠═ cells : array&lt;br /&gt;
       ╠═ id : string(int)&lt;br /&gt;
       ╠═ x : string(int)&lt;br /&gt;
       ╠═ y : string(int)&lt;br /&gt;
       ╠═ resType : string : if cell is an abandoned valley or village, then resource distribution (e.g. &amp;quot;4446&amp;quot;), otherwise &amp;quot;0&amp;quot; = wilderness, &amp;quot;1&amp;quot; = outside of map radius&lt;br /&gt;
       ╠═ oasis : string(int) : if cell is an oasis, then [[#Oases oasis type], otherwise &amp;quot;0&amp;quot;&lt;br /&gt;
       ╠═ landscape : string(int) : landscape id, see [[#Landscapes|Landscapes]]&lt;br /&gt;
       ╚═ kingdomId : string(int) / int : kingdom id (as string) of the village ('''not''' kingdom of the village's owner), 0 (as int) if not within kingdom borders&lt;br /&gt;
     ╚═ landscapes : object&lt;br /&gt;
       ╚═ [ landscape id : int ] : string : relative path to the corresponding image (e.g. &amp;quot;layout/images/map/wood0_0_0.png&amp;quot;), see [[#Landscapes|Landscapes]]&lt;br /&gt;
&lt;br /&gt;
==== Oases ==== &amp;lt;!--T:26--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:27--&amp;gt;&lt;br /&gt;
An oasis type consists of 2 digits. The first determines the main resource of the oasis according to the table below. If the second digit is a 1 the oasis has an addition 25% crop bonus, otherwise there is no secondary bonus.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:28--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! ID !! Type&lt;br /&gt;
|-&lt;br /&gt;
| 1 || wood&lt;br /&gt;
|-&lt;br /&gt;
| 2 || clay&lt;br /&gt;
|-&lt;br /&gt;
| 3 || iron&lt;br /&gt;
|-&lt;br /&gt;
| 4 || crop&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:29--&amp;gt;&lt;br /&gt;
Examples:&lt;br /&gt;
&amp;quot;20&amp;quot; is a 25% clay oasis.&lt;br /&gt;
&amp;quot;21&amp;quot; is a 25% clay and 25% crop oasis.&lt;br /&gt;
&amp;quot;41&amp;quot; is a 50% crop oasis.&lt;br /&gt;
&lt;br /&gt;
==== Landscapes ==== &amp;lt;!--T:17--&amp;gt;&lt;br /&gt;
Landscapes are the visualizations used on the ingame map (e.g. trees, mountains, lakes, clay pits). A landscape's id can be mapped to an image path using the ''landscapes'' object in the response. This path is relative to the static game files which can be found at https://cdn.traviantools.net/game/0.95/ for that specific version of the game. Example path: https://cdn.traviantools.net/game/0.95/layout/images/map/wood0_0_0.png&lt;br /&gt;
&lt;br /&gt;
== Authentication using publicSiteKey == &amp;lt;!--T:18--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:19--&amp;gt;&lt;br /&gt;
From https://forum.kingdoms.com/index.php?thread/4099-api-for-external-tools/:&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
With the ''externalLoginToken'' you can authenticate a player - without that the player needs to register for your tool.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:20--&amp;gt;&lt;br /&gt;
In your call to ''requestApiKey'' you were provided a ''privateApiKey'' and a ''publicSiteKey''. The ''privateApiKey'' should be.. guess what.. private. You shouldn't tell this to anyone. You will need it to make requests to our api's. In contrast your ''publicSiteKey'' can be public.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:21--&amp;gt;&lt;br /&gt;
If a player wants to log-in to your site, he needs first an ''accessToken'' for your site. The player needs your ''publicSiteKey''. The player can go to its Settings-Page in T5 and under point &amp;quot;External Tools&amp;quot; click on &amp;quot;Create Access&amp;quot;. He enters your ''publicSiteKey'' and get an ''accessToken'' back.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:22--&amp;gt;&lt;br /&gt;
If the player enters the ''accessToken'' on your site, you can calculate the players ''externalLoginToken'' by&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:23--&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;$externalLoginToken = md5($accessToken.$privateApiKey);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:24--&amp;gt;&lt;br /&gt;
Now you can search the player in your player table generated with the data from ''getMapData'' and - if you found him - log him into your site.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References == &amp;lt;!--T:25--&amp;gt;&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;/div&gt;</summary>
		<author><name>ITob</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.binary-tools.de/index.php?title=Kingdoms_API&amp;diff=1313</id>
		<title>Kingdoms API</title>
		<link rel="alternate" type="text/html" href="http://wiki.binary-tools.de/index.php?title=Kingdoms_API&amp;diff=1313"/>
		<updated>2020-04-17T17:41:18Z</updated>

		<summary type="html">&lt;p&gt;ITob: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages/&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
{{Kingdoms Topic/en|legends=Legends API}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:2--&amp;gt;&lt;br /&gt;
Travian provides a [https://en.wikipedia.org/wiki/JSON JSON]-[https://en.wikipedia.org/wiki/Application_programming_interface API] to access some information about running game worlds.&amp;lt;ref&amp;gt;https://forum.kingdoms.com/index.php?thread/4099-api-for-external-tools/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Accessing the API == &amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
The base URL for all queries to the API is &amp;lt;pre&amp;gt;https://&amp;amp;lt;gameworld&amp;amp;gt;.kingdoms.com/api/external.php?action=&amp;amp;lt;action&amp;amp;gt;&amp;lt;/pre&amp;gt; (e.g. https:&amp;lt;nowiki /&amp;gt;//com1.kingdoms.com/api/external.php?action=...).&lt;br /&gt;
&lt;br /&gt;
=== Parameters === &amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
Depending on the value of ''action'' further parameters have to be specified. For most requests an [[#Action: requestApiKey |API key]] is required.&lt;br /&gt;
&lt;br /&gt;
=== Response format === &amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
 ╠═ time : int? : [https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#The_ECMAScript_epoch_and_timestamps javascript timestamp] (miliseconds since January 1, 1970, UTC), only present for some actions&lt;br /&gt;
 ╠═ error : object? : Indicates that an error occured. ''response'' will contain an empty array in this case.&lt;br /&gt;
   ╠═ type : string&lt;br /&gt;
   ╠═ number : int : error id&lt;br /&gt;
   ╚═ message : string&lt;br /&gt;
 ╚═ response : object | empty array&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
A question mark after a type indicates that this property is optional. ''object'' refers to the JSON meaning of the term (similar to dictionaries or maps in other languages). In the following sections, only the contents of the response object are shown.&lt;br /&gt;
''string(≤255)'' resp. ''string(32)'' indicates a string with a maximum resp. fixed length.&lt;br /&gt;
The type ''string(int)'' represents an integer that is formatted as a JSON string (surrounded by &amp;quot;) for unknown reasons.&lt;br /&gt;
&lt;br /&gt;
== Action: requestApiKey == &amp;lt;!--T:7--&amp;gt;&lt;br /&gt;
An API key can be requested using this action. The key is required for most other requests.&lt;br /&gt;
&lt;br /&gt;
=== Parameters === &amp;lt;!--T:8--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| email || string(≤255) || valid email address (may be used by Travian staff for questions)&lt;br /&gt;
|-&lt;br /&gt;
| siteName || string(≤255) || name of the tool&lt;br /&gt;
|-&lt;br /&gt;
| siteUrl || string(≤255) || URL of the tool&lt;br /&gt;
|-&lt;br /&gt;
| public || boolean || whether the tool should be available to the public (and may be used by Travian to create e.g. a tool list in the future)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Response === &amp;lt;!--T:9--&amp;gt;&lt;br /&gt;
 ╚═ response&lt;br /&gt;
   ╠═ privateApiKey : string(32)&lt;br /&gt;
   ╚═ publicSiteKey : string(32)&lt;br /&gt;
&lt;br /&gt;
== Action: updateSiteData == &amp;lt;!--T:10--&amp;gt;&lt;br /&gt;
This action can be used to update the data that was provided in the original ''requestApiKey'' request.&lt;br /&gt;
&lt;br /&gt;
=== Parameters === &amp;lt;!--T:11--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| privateApiKey || string(32) || private api key&lt;br /&gt;
|-&lt;br /&gt;
| email || string(≤255) || valid email address (may be used by Travian staff for questions)&lt;br /&gt;
|-&lt;br /&gt;
| siteName || string(≤255) || name of the tool&lt;br /&gt;
|-&lt;br /&gt;
| siteUrl || string(≤255) || URL of the tool&lt;br /&gt;
|-&lt;br /&gt;
| public || boolean || whether the tool should be available to the public (and may be used by Travian to create e.g. a tool list in the future)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Response === &amp;lt;!--T:12--&amp;gt;&lt;br /&gt;
 ╚═ response&lt;br /&gt;
   ╚═ data : boolean : always true (in case of an error, an error object is used instead as descried [[#Response_format|above]])&lt;br /&gt;
&lt;br /&gt;
== Action: getMapData == &amp;lt;!--T:13--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:14--&amp;gt;&lt;br /&gt;
The response to this action contains all available data including information about players, kingdoms and the map.&lt;br /&gt;
&lt;br /&gt;
=== Parameters === &amp;lt;!--T:15--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| privateApiKey || string(32) || private api key&lt;br /&gt;
|-&lt;br /&gt;
| date || string? || may be specified to request old data, the newest available data is returned if omitted, format is DD.MM.YYYY (e.g. 31.12.2020)&lt;br /&gt;
|}&lt;br /&gt;
The API has a bug when querying map data near midnight that leads to data for the wrong day getting returned.&amp;lt;ref&amp;gt;https://forum.kingdoms.com/index.php?thread/20863-suggestions-for-the-json-api/&amp;amp;postID=144462#post144462&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Response === &amp;lt;!--T:16--&amp;gt;&lt;br /&gt;
 ╚═ response&lt;br /&gt;
   ╠═ gameworld : object&lt;br /&gt;
     ╠═ name : string : (e.g. &amp;quot;com1&amp;quot;)&lt;br /&gt;
     ╠═ startTime : int : unix timestamp ('''seconds''' since January 1, 1970, UTC)&lt;br /&gt;
     ╠═ speed : int&lt;br /&gt;
     ╠═ speedTroops : int&lt;br /&gt;
     ╠═ lastUpdateTime : string(int) : unix timestamp, exact timestamp when returned data was generated&lt;br /&gt;
     ╠═ date : int : unix timestamp, start of the day (00:00:00) of returned data&lt;br /&gt;
     ╚═ version : string : always &amp;quot;1.0&amp;quot;&lt;br /&gt;
   ╠═ players : array&lt;br /&gt;
     ╠═ playerId : string(int)&lt;br /&gt;
     ╠═ name : string&lt;br /&gt;
     ╠═ tribeId : string(int) : 1 = Roman, 2 = Teuton, 3 = Gaul&lt;br /&gt;
     ╠═ kingdomId : string(int) : &amp;quot;0&amp;quot; for no kingdom&lt;br /&gt;
     ╠═ treasures : int : if player is king, then number of treasures of the kingdom, otherwise 0&lt;br /&gt;
     ╠═ role : int : 0 = Governor, 1 = King, 2 = Duke, 3 = Vice King, 0 if not part of any kingdom&lt;br /&gt;
     ╠═ externalLoginToken : string : see [[#Authentication using publicSiteKey|Authentication using publicSiteKey]]&lt;br /&gt;
     ╚═ villages : array&lt;br /&gt;
       ╠═ villageId : string(int)&lt;br /&gt;
       ╠═ x : string(int)&lt;br /&gt;
       ╠═ y : string(int)&lt;br /&gt;
       ╠═ population : string(int)&lt;br /&gt;
       ╠═ name : string&lt;br /&gt;
       ╠═ isMainVillage : boolean&lt;br /&gt;
       ╚═ isCity : boolean&lt;br /&gt;
   ╠═ kingdoms : array&lt;br /&gt;
     ╠═ kingdomId : string(int)&lt;br /&gt;
     ╠═ kingdomTag : string : name of the kingdom&lt;br /&gt;
     ╠═ creationTime : string(int) : unix timestamp, exact time of kingdom creation&lt;br /&gt;
     ╚═ victoryPoints : string(int)&lt;br /&gt;
   ╚═ map                         &lt;br /&gt;
     ╠═ radius : string(int) : current radius of the map&lt;br /&gt;
     ╠═ cells : array&lt;br /&gt;
       ╠═ id : string(int)&lt;br /&gt;
       ╠═ x : string(int)&lt;br /&gt;
       ╠═ y : string(int)&lt;br /&gt;
       ╠═ resType : string : if cell is an abandoned valley or village, then resource distribution (e.g. &amp;quot;4446&amp;quot;), otherwise &amp;quot;0&amp;quot; = wilderness, &amp;quot;1&amp;quot; = outside of map radius&lt;br /&gt;
       ╠═ oasis : string(int) : if cell is an oasis, then [[#Oases oasis type], otherwise &amp;quot;0&amp;quot;&lt;br /&gt;
       ╠═ landscape : string(int) : landscape id, see [[#Landscapes|Landscapes]]&lt;br /&gt;
       ╚═ kingdomId : string(int) / int : kingdom id (as string) of the village ('''not''' kingdom of the village's owner), 0 (as int) if not within kingdom borders&lt;br /&gt;
     ╚═ landscapes : object&lt;br /&gt;
       ╚═ [ landscape id : int ] : string : relative path to the corresponding image (e.g. &amp;quot;layout/images/map/wood0_0_0.png&amp;quot;), see [[#Landscapes|Landscapes]]&lt;br /&gt;
&lt;br /&gt;
==== Oases ==== &amp;lt;!--T:26--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:27--&amp;gt;&lt;br /&gt;
An oasis type consists of 2 digits. The first determines the main resource of the oasis according to the table below. If the second digit is a 1 the oasis has an addition 25% crop bonus, otherwise there is no secondary bonus.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:28--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! ID !! Type&lt;br /&gt;
|-&lt;br /&gt;
| 1 || wood&lt;br /&gt;
|-&lt;br /&gt;
| 2 || clay&lt;br /&gt;
|-&lt;br /&gt;
| 3 || iron&lt;br /&gt;
|-&lt;br /&gt;
| 4 || crop&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:29--&amp;gt;&lt;br /&gt;
Examples:&lt;br /&gt;
&amp;quot;20&amp;quot; is a 25% clay oasis.&lt;br /&gt;
&amp;quot;21&amp;quot; is a 25% clay and 25% crop oasis.&lt;br /&gt;
&amp;quot;41&amp;quot; is a 50% crop oasis.&lt;br /&gt;
&lt;br /&gt;
==== Landscapes ==== &amp;lt;!--T:17--&amp;gt;&lt;br /&gt;
Landscapes are the visualizations used on the ingame map (e.g. trees, mountains, lakes, clay pits). A landscape's id can be mapped to an image path using the ''landscapes'' object in the response. This path is relative to the static game files which can be found at https://cdn.traviantools.net/game/0.95/ for that specific version of the game. Example path: https://cdn.traviantools.net/game/0.95/layout/images/map/wood0_0_0.png&lt;br /&gt;
&lt;br /&gt;
== Authentication using publicSiteKey == &amp;lt;!--T:18--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:19--&amp;gt;&lt;br /&gt;
From https://forum.kingdoms.com/index.php?thread/4099-api-for-external-tools/:&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
With the ''externalLoginToken'' you can authenticate a player - without that the player needs to register for your tool.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:20--&amp;gt;&lt;br /&gt;
In your call to ''requestApiKey'' you were provided a ''privateApiKey'' and a ''publicSiteKey''. The ''privateApiKey'' should be.. guess what.. private. You shouldn't tell this to anyone. You will need it to make requests to our api's. In contrast your ''publicSiteKey'' can be public.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:21--&amp;gt;&lt;br /&gt;
If a player wants to log-in to your site, he needs first an ''accessToken'' for your site. The player needs your ''publicSiteKey''. The player can go to its Settings-Page in T5 and under point &amp;quot;External Tools&amp;quot; click on &amp;quot;Create Access&amp;quot;. He enters your ''publicSiteKey'' and get an ''accessToken'' back.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:22--&amp;gt;&lt;br /&gt;
If the player enters the ''accessToken'' on your site, you can calculate the players ''externalLoginToken'' by&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:23--&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;$externalLoginToken = md5($accessToken.$privateApiKey);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:24--&amp;gt;&lt;br /&gt;
Now you can search the player in your player table generated with the data from ''getMapData'' and - if you found him - log him into your site.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Einzelnachweise == &amp;lt;!--T:25--&amp;gt;&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;/div&gt;</summary>
		<author><name>ITob</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.binary-tools.de/index.php?title=Kingdoms_API&amp;diff=1311</id>
		<title>Kingdoms API</title>
		<link rel="alternate" type="text/html" href="http://wiki.binary-tools.de/index.php?title=Kingdoms_API&amp;diff=1311"/>
		<updated>2020-04-17T17:40:59Z</updated>

		<summary type="html">&lt;p&gt;ITob: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages/&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
{{Kingdoms Topic/en|legends=Legends API}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:2--&amp;gt;&lt;br /&gt;
Travian provides a [https://en.wikipedia.org/wiki/JSON JSON]-[https://en.wikipedia.org/wiki/Application_programming_interface API] to access some information about running game worlds.&amp;lt;ref&amp;gt;https://forum.kingdoms.com/index.php?thread/4099-api-for-external-tools/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Accessing the API == &amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
The base URL for all queries to the API is &amp;lt;pre&amp;gt;https://&amp;amp;lt;gameworld&amp;amp;gt;.kingdoms.com/api/external.php?action=&amp;amp;lt;action&amp;amp;gt;&amp;lt;/pre&amp;gt; (e.g. https:&amp;lt;nowiki /&amp;gt;//com1.kingdoms.com/api/external.php?action=...).&lt;br /&gt;
&lt;br /&gt;
=== Parameters === &amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
Depending on the value of ''action'' further parameters have to be specified. For most requests an [[#Action: requestApiKey |API key]] is required.&lt;br /&gt;
&lt;br /&gt;
=== Response format === &amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
 ╠═ time : int? : [https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#The_ECMAScript_epoch_and_timestamps javascript timestamp] (miliseconds since January 1, 1970, UTC), only present for some actions&lt;br /&gt;
 ╠═ error : object? : Indicates that an error occured. ''response'' will contain an empty array in this case.&lt;br /&gt;
   ╠═ type : string&lt;br /&gt;
   ╠═ number : int : error id&lt;br /&gt;
   ╚═ message : string&lt;br /&gt;
 ╚═ response : object | empty array&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
A question mark after a type indicates that this property is optional. ''object'' refers to the JSON meaning of the term (similar to dictionaries or maps in other languages). In the following sections, only the contents of the response object are shown.&lt;br /&gt;
''string(≤255)'' resp. ''string(32)'' indicates a string with a maximum resp. fixed length.&lt;br /&gt;
The type ''string(int)'' represents an integer that is formatted as a JSON string (surrounded by &amp;quot;) for unknown reasons.&lt;br /&gt;
&lt;br /&gt;
== Action: requestApiKey == &amp;lt;!--T:7--&amp;gt;&lt;br /&gt;
An API key can be requested using this action. The key is required for most other requests.&lt;br /&gt;
&lt;br /&gt;
=== Parameters === &amp;lt;!--T:8--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| email || string(≤255) || valid email address (may be used by Travian staff for questions)&lt;br /&gt;
|-&lt;br /&gt;
| siteName || string(≤255) || name of the tool&lt;br /&gt;
|-&lt;br /&gt;
| siteUrl || string(≤255) || URL of the tool&lt;br /&gt;
|-&lt;br /&gt;
| public || boolean || whether the tool should be available to the public (and may be used by Travian to create e.g. a tool list in the future)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Response === &amp;lt;!--T:9--&amp;gt;&lt;br /&gt;
 ╚═ response&lt;br /&gt;
   ╠═ privateApiKey : string(32)&lt;br /&gt;
   ╚═ publicSiteKey : string(32)&lt;br /&gt;
&lt;br /&gt;
== Action: updateSiteData == &amp;lt;!--T:10--&amp;gt;&lt;br /&gt;
This action can be used to update the data that was provided in the original ''requestApiKey'' request.&lt;br /&gt;
&lt;br /&gt;
=== Parameters === &amp;lt;!--T:11--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| privateApiKey || string(32) || private api key&lt;br /&gt;
|-&lt;br /&gt;
| email || string(≤255) || valid email address (may be used by Travian staff for questions)&lt;br /&gt;
|-&lt;br /&gt;
| siteName || string(≤255) || name of the tool&lt;br /&gt;
|-&lt;br /&gt;
| siteUrl || string(≤255) || URL of the tool&lt;br /&gt;
|-&lt;br /&gt;
| public || boolean || whether the tool should be available to the public (and may be used by Travian to create e.g. a tool list in the future)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Response === &amp;lt;!--T:12--&amp;gt;&lt;br /&gt;
 ╚═ response&lt;br /&gt;
   ╚═ data : boolean : always true (in case of an error, an error object is used instead as descried [[#Response_format|above]])&lt;br /&gt;
&lt;br /&gt;
== Action: getMapData == &amp;lt;!--T:13--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:14--&amp;gt;&lt;br /&gt;
The response to this action contains all available data including information about players, kingdoms and the map.&lt;br /&gt;
&lt;br /&gt;
=== Parameters === &amp;lt;!--T:15--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| privateApiKey || string(32) || private api key&lt;br /&gt;
|-&lt;br /&gt;
| date || string? || may be specified to request old data, the newest available data is returned if omitted, format is DD.MM.YYYY (e.g. 31.12.2020)&lt;br /&gt;
|}&lt;br /&gt;
The API has a bug when querying map data near midnight that leads to data for the wrong day getting returned.&amp;lt;ref&amp;gt;https://forum.kingdoms.com/index.php?thread/20863-suggestions-for-the-json-api/&amp;amp;postID=144462#post144462&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Response === &amp;lt;!--T:16--&amp;gt;&lt;br /&gt;
 ╚═ response&lt;br /&gt;
   ╠═ gameworld : object&lt;br /&gt;
     ╠═ name : string : (e.g. &amp;quot;com1&amp;quot;)&lt;br /&gt;
     ╠═ startTime : int : unix timestamp ('''seconds''' since January 1, 1970, UTC)&lt;br /&gt;
     ╠═ speed : int&lt;br /&gt;
     ╠═ speedTroops : int&lt;br /&gt;
     ╠═ lastUpdateTime : string(int) : unix timestamp, exact timestamp when returned data was generated&lt;br /&gt;
     ╠═ date : int : unix timestamp, start of the day (00:00:00) of returned data&lt;br /&gt;
     ╚═ version : string : always &amp;quot;1.0&amp;quot;&lt;br /&gt;
   ╠═ players : array&lt;br /&gt;
     ╠═ playerId : string(int)&lt;br /&gt;
     ╠═ name : string&lt;br /&gt;
     ╠═ tribeId : string(int) : 1 = Roman, 2 = Teuton, 3 = Gaul&lt;br /&gt;
     ╠═ kingdomId : string(int) : &amp;quot;0&amp;quot; for no kingdom&lt;br /&gt;
     ╠═ treasures : int : if player is king, then number of treasures of the kingdom, otherwise 0&lt;br /&gt;
     ╠═ role : int : 0 = Governor, 1 = King, 2 = Duke, 3 = Vice King, 0 if not part of any kingdom&lt;br /&gt;
     ╠═ externalLoginToken : string : see [[#Authentication using publicSiteKey|Authentication using publicSiteKey]]&lt;br /&gt;
     ╚═ villages : array&lt;br /&gt;
       ╠═ villageId : string(int)&lt;br /&gt;
       ╠═ x : string(int)&lt;br /&gt;
       ╠═ y : string(int)&lt;br /&gt;
       ╠═ population : string(int)&lt;br /&gt;
       ╠═ name : string&lt;br /&gt;
       ╠═ isMainVillage : boolean&lt;br /&gt;
       ╚═ isCity : boolean&lt;br /&gt;
   ╠═ kingdoms : array&lt;br /&gt;
     ╠═ kingdomId : string(int)&lt;br /&gt;
     ╠═ kingdomTag : string : name of the kingdom&lt;br /&gt;
     ╠═ creationTime : string(int) : unix timestamp, exact time of kingdom creation&lt;br /&gt;
     ╚═ victoryPoints : string(int)&lt;br /&gt;
   ╚═ map                         &lt;br /&gt;
     ╠═ radius : string(int) : current radius of the map&lt;br /&gt;
     ╠═ cells : array&lt;br /&gt;
       ╠═ id : string(int)&lt;br /&gt;
       ╠═ x : string(int)&lt;br /&gt;
       ╠═ y : string(int)&lt;br /&gt;
       ╠═ resType : string : if cell is an abandoned valley or village, then resource distribution (e.g. &amp;quot;4446&amp;quot;), otherwise &amp;quot;0&amp;quot; = wilderness, &amp;quot;1&amp;quot; = outside of map radius&lt;br /&gt;
       ╠═ oasis : string(int) : if cell is an oasis, then [[#Oases oasis type], otherwise &amp;quot;0&amp;quot;&lt;br /&gt;
       ╠═ landscape : string(int) : landscape id, see [[#Landscapes|Landscapes]]&lt;br /&gt;
       ╚═ kingdomId : string(int) / int : kingdom id (as string) of the village ('''not''' kingdom of the village's owner), 0 (as int) if not within kingdom borders&lt;br /&gt;
     ╚═ landscapes : object&lt;br /&gt;
       ╚═ [ landscape id : int ] : string : relative path to the corresponding image (e.g. &amp;quot;layout/images/map/wood0_0_0.png&amp;quot;), see [[#Landscapes]]&lt;br /&gt;
&lt;br /&gt;
==== Oases ==== &amp;lt;!--T:26--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:27--&amp;gt;&lt;br /&gt;
An oasis type consists of 2 digits. The first determines the main resource of the oasis according to the table below. If the second digit is a 1 the oasis has an addition 25% crop bonus, otherwise there is no secondary bonus.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:28--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! ID !! Type&lt;br /&gt;
|-&lt;br /&gt;
| 1 || wood&lt;br /&gt;
|-&lt;br /&gt;
| 2 || clay&lt;br /&gt;
|-&lt;br /&gt;
| 3 || iron&lt;br /&gt;
|-&lt;br /&gt;
| 4 || crop&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:29--&amp;gt;&lt;br /&gt;
Examples:&lt;br /&gt;
&amp;quot;20&amp;quot; is a 25% clay oasis.&lt;br /&gt;
&amp;quot;21&amp;quot; is a 25% clay and 25% crop oasis.&lt;br /&gt;
&amp;quot;41&amp;quot; is a 50% crop oasis.&lt;br /&gt;
&lt;br /&gt;
==== Landscapes ==== &amp;lt;!--T:17--&amp;gt;&lt;br /&gt;
Landscapes are the visualizations used on the ingame map (e.g. trees, mountains, lakes, clay pits). A landscape's id can be mapped to an image path using the ''landscapes'' object in the response. This path is relative to the static game files which can be found at https://cdn.traviantools.net/game/0.95/ for that specific version of the game. Example path: https://cdn.traviantools.net/game/0.95/layout/images/map/wood0_0_0.png&lt;br /&gt;
&lt;br /&gt;
== Authentication using publicSiteKey == &amp;lt;!--T:18--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:19--&amp;gt;&lt;br /&gt;
From https://forum.kingdoms.com/index.php?thread/4099-api-for-external-tools/:&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
With the ''externalLoginToken'' you can authenticate a player - without that the player needs to register for your tool.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:20--&amp;gt;&lt;br /&gt;
In your call to ''requestApiKey'' you were provided a ''privateApiKey'' and a ''publicSiteKey''. The ''privateApiKey'' should be.. guess what.. private. You shouldn't tell this to anyone. You will need it to make requests to our api's. In contrast your ''publicSiteKey'' can be public.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:21--&amp;gt;&lt;br /&gt;
If a player wants to log-in to your site, he needs first an ''accessToken'' for your site. The player needs your ''publicSiteKey''. The player can go to its Settings-Page in T5 and under point &amp;quot;External Tools&amp;quot; click on &amp;quot;Create Access&amp;quot;. He enters your ''publicSiteKey'' and get an ''accessToken'' back.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:22--&amp;gt;&lt;br /&gt;
If the player enters the ''accessToken'' on your site, you can calculate the players ''externalLoginToken'' by&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:23--&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;$externalLoginToken = md5($accessToken.$privateApiKey);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:24--&amp;gt;&lt;br /&gt;
Now you can search the player in your player table generated with the data from ''getMapData'' and - if you found him - log him into your site.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Einzelnachweise == &amp;lt;!--T:25--&amp;gt;&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;/div&gt;</summary>
		<author><name>ITob</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.binary-tools.de/index.php?title=Kingdoms_API&amp;diff=1308</id>
		<title>Kingdoms API</title>
		<link rel="alternate" type="text/html" href="http://wiki.binary-tools.de/index.php?title=Kingdoms_API&amp;diff=1308"/>
		<updated>2020-04-17T16:44:29Z</updated>

		<summary type="html">&lt;p&gt;ITob: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages/&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
{{Kingdoms Topic/en|legends=Legends API}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:2--&amp;gt;&lt;br /&gt;
Travian provides a [https://en.wikipedia.org/wiki/JSON JSON]-[https://en.wikipedia.org/wiki/Application_programming_interface API] to access some information about running game worlds.&amp;lt;ref&amp;gt;https://forum.kingdoms.com/index.php?thread/4099-api-for-external-tools/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Accessing the API == &amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
The base URL for all queries to the API is &amp;lt;pre&amp;gt;https://&amp;amp;lt;gameworld&amp;amp;gt;.kingdoms.com/api/external.php?action=&amp;amp;lt;action&amp;amp;gt;&amp;lt;/pre&amp;gt; (e.g. https:&amp;lt;nowiki /&amp;gt;//com1.kingdoms.com/api/external.php?action=...).&lt;br /&gt;
&lt;br /&gt;
=== Parameters === &amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
Depending on the value of ''action'' further parameters have to be specified. For most requests an [[#Action: requestApiKey |API key]] is required.&lt;br /&gt;
&lt;br /&gt;
=== Response format === &amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
 ╠═ time : int? : [https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#The_ECMAScript_epoch_and_timestamps javascript timestamp] (miliseconds since January 1, 1970, UTC), only present for some actions&lt;br /&gt;
 ╠═ error : object? : Indicates that an error occured. ''response'' will contain an empty array in this case.&lt;br /&gt;
   ╠═ type : string&lt;br /&gt;
   ╠═ number : int : error id&lt;br /&gt;
   ╚═ message : string&lt;br /&gt;
 ╚═ response : object | empty array&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
A question mark after a type indicates that this property is optional. ''object'' refers to the JSON meaning of the term (similar to dictionaries or maps in other languages). In the following sections, only the contents of the response object are shown.&lt;br /&gt;
''string(≤255)'' resp. ''string(32)'' indicates a string with a maximum resp. fixed length.&lt;br /&gt;
The type ''string(int)'' represents an integer that is formatted as a JSON string (surrounded by &amp;quot;) for unknown reasons.&lt;br /&gt;
&lt;br /&gt;
== Action: requestApiKey == &amp;lt;!--T:7--&amp;gt;&lt;br /&gt;
An API key can be requested using this action. The key is required for most other requests.&lt;br /&gt;
&lt;br /&gt;
=== Parameters === &amp;lt;!--T:8--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| email || string(≤255) || valid email address (may be used by Travian staff for questions)&lt;br /&gt;
|-&lt;br /&gt;
| siteName || string(≤255) || name of the tool&lt;br /&gt;
|-&lt;br /&gt;
| siteUrl || string(≤255) || URL of the tool&lt;br /&gt;
|-&lt;br /&gt;
| public || boolean || whether the tool should be available to the public (and may be used by Travian to create e.g. a tool list in the future)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Response === &amp;lt;!--T:9--&amp;gt;&lt;br /&gt;
 ╚═ response&lt;br /&gt;
   ╠═ privateApiKey : string(32)&lt;br /&gt;
   ╚═ publicSiteKey : string(32)&lt;br /&gt;
&lt;br /&gt;
== Action: updateSiteData == &amp;lt;!--T:10--&amp;gt;&lt;br /&gt;
This action can be used to update the data that was provided in the original ''requestApiKey'' request.&lt;br /&gt;
&lt;br /&gt;
=== Parameters === &amp;lt;!--T:11--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| privateApiKey || string(32) || private api key&lt;br /&gt;
|-&lt;br /&gt;
| email || string(≤255) || valid email address (may be used by Travian staff for questions)&lt;br /&gt;
|-&lt;br /&gt;
| siteName || string(≤255) || name of the tool&lt;br /&gt;
|-&lt;br /&gt;
| siteUrl || string(≤255) || URL of the tool&lt;br /&gt;
|-&lt;br /&gt;
| public || boolean || whether the tool should be available to the public (and may be used by Travian to create e.g. a tool list in the future)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Response === &amp;lt;!--T:12--&amp;gt;&lt;br /&gt;
 ╚═ response&lt;br /&gt;
   ╚═ data : boolean : always true (in case of an error, an error object is used instead as descried [[#Response_format|above]])&lt;br /&gt;
&lt;br /&gt;
== Action: getMapData == &amp;lt;!--T:13--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:14--&amp;gt;&lt;br /&gt;
The response to this action contains all available data including information about players, kingdoms and the map.&lt;br /&gt;
&lt;br /&gt;
=== Parameters === &amp;lt;!--T:15--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| privateApiKey || string(32) || private api key&lt;br /&gt;
|-&lt;br /&gt;
| date || string? || may be specified to request old data, the newest available data is returned if omitted, format is DD.MM.YYYY (e.g. 31.12.2020)&lt;br /&gt;
|}&lt;br /&gt;
The API has a bug when querying map data near midnight that leads to data for the wrong day getting returned.&amp;lt;ref&amp;gt;https://forum.kingdoms.com/index.php?thread/20863-suggestions-for-the-json-api/&amp;amp;postID=144462#post144462&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Response === &amp;lt;!--T:16--&amp;gt;&lt;br /&gt;
 ╚═ response&lt;br /&gt;
   ╠═ gameworld : object&lt;br /&gt;
     ╠═ name : string : (e.g. &amp;quot;com1&amp;quot;)&lt;br /&gt;
     ╠═ startTime : int : unix timestamp ('''seconds''' since January 1, 1970, UTC)&lt;br /&gt;
     ╠═ speed : int&lt;br /&gt;
     ╠═ speedTroops : int&lt;br /&gt;
     ╠═ lastUpdateTime : string(int) : unix timestamp, exact timestamp when returned data was generated&lt;br /&gt;
     ╠═ date : int : unix timestamp, start of the day (00:00:00) of returned data&lt;br /&gt;
     ╚═ version : string : always &amp;quot;1.0&amp;quot;&lt;br /&gt;
   ╠═ players : array&lt;br /&gt;
     ╠═ playerId : string(int)&lt;br /&gt;
     ╠═ name : string&lt;br /&gt;
     ╠═ tribeId : string(int) : 1 = Roman, 2 = Teuton, 3 = Gaul&lt;br /&gt;
     ╠═ kingdomId : string(int) : &amp;quot;0&amp;quot; for no kingdom&lt;br /&gt;
     ╠═ treasures : int : if player is king, then number of treasures of the kingdom, otherwise 0&lt;br /&gt;
     ╠═ role : int : 0 = Governor, 1 = King, 2 = Duke, 3 = Vice King, 0 if not part of any kingdom&lt;br /&gt;
     ╠═ externalLoginToken : string : see [[#Authentication using publicSiteKey]]&lt;br /&gt;
     ╚═ villages : array&lt;br /&gt;
       ╠═ villageId : string(int)&lt;br /&gt;
       ╠═ x : string(int)&lt;br /&gt;
       ╠═ y : string(int)&lt;br /&gt;
       ╠═ population : string(int)&lt;br /&gt;
       ╠═ name : string&lt;br /&gt;
       ╠═ isMainVillage : boolean&lt;br /&gt;
       ╚═ isCity : boolean&lt;br /&gt;
   ╠═ kingdoms : array&lt;br /&gt;
     ╠═ kingdomId : string(int)&lt;br /&gt;
     ╠═ kingdomTag : string : name of the kingdom&lt;br /&gt;
     ╠═ creationTime : string(int) : unix timestamp, exact time of kingdom creation&lt;br /&gt;
     ╚═ victoryPoints : string(int)&lt;br /&gt;
   ╚═ map                         &lt;br /&gt;
     ╠═ radius : string(int) : current radius of the map&lt;br /&gt;
     ╠═ cells : array&lt;br /&gt;
       ╠═ id : string(int)&lt;br /&gt;
       ╠═ x : string(int)&lt;br /&gt;
       ╠═ y : string(int)&lt;br /&gt;
       ╠═ resType : string : if cell is an abandoned valley or village, then resource distribution (e.g. &amp;quot;4446&amp;quot;), otherwise &amp;quot;0&amp;quot; = wilderness, &amp;quot;1&amp;quot; = outside of map radius&lt;br /&gt;
       ╠═ oasis : string(int) : if cell is an oasis, then [[#Oases oasis type], otherwise &amp;quot;0&amp;quot;&lt;br /&gt;
       ╠═ landscape : string(int) : landscape id, see [[#Landscapes]]&lt;br /&gt;
       ╚═ kingdomId : string(int) / int : kingdom id (as string) of the village ('''not''' kingdom of the village's owner), 0 (as int) if not within kingdom borders&lt;br /&gt;
     ╚═ landscapes : object&lt;br /&gt;
       ╚═ [ landscape id : int ] : string : relative path to the corresponding image (e.g. &amp;quot;layout/images/map/wood0_0_0.png&amp;quot;), see [[#Landscapes]]&lt;br /&gt;
&lt;br /&gt;
==== Oases ==== &amp;lt;!--T:26--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:27--&amp;gt;&lt;br /&gt;
An oasis type consists of 2 digits. The first determines the main resource of the oasis according to the table below. If the second digit is a 1 the oasis has an addition 25% crop bonus, otherwise there is no secondary bonus.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:28--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! ID !! Type&lt;br /&gt;
|-&lt;br /&gt;
| 1 || wood&lt;br /&gt;
|-&lt;br /&gt;
| 2 || clay&lt;br /&gt;
|-&lt;br /&gt;
| 3 || iron&lt;br /&gt;
|-&lt;br /&gt;
| 4 || crop&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:29--&amp;gt;&lt;br /&gt;
Examples:&lt;br /&gt;
&amp;quot;20&amp;quot; is a 25% clay oasis.&lt;br /&gt;
&amp;quot;21&amp;quot; is a 25% clay and 25% crop oasis.&lt;br /&gt;
&amp;quot;41&amp;quot; is a 50% crop oasis.&lt;br /&gt;
&lt;br /&gt;
==== Landscapes ==== &amp;lt;!--T:17--&amp;gt;&lt;br /&gt;
Landscapes are the visualizations used on the ingame map (e.g. trees, mountains, lakes, clay pits). A landscape's id can be mapped to an image path using the ''landscapes'' object in the response. This path is relative to the static game files which can be found at https://cdn.traviantools.net/game/0.95/ for that specific version of the game. Example path: https://cdn.traviantools.net/game/0.95/layout/images/map/wood0_0_0.png&lt;br /&gt;
&lt;br /&gt;
== Authentication using publicSiteKey == &amp;lt;!--T:18--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:19--&amp;gt;&lt;br /&gt;
From https://forum.kingdoms.com/index.php?thread/4099-api-for-external-tools/:&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
With the ''externalLoginToken'' you can authenticate a player - without that the player needs to register for your tool.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:20--&amp;gt;&lt;br /&gt;
In your call to ''requestApiKey'' you were provided a ''privateApiKey'' and a ''publicSiteKey''. The ''privateApiKey'' should be.. guess what.. private. You shouldn't tell this to anyone. You will need it to make requests to our api's. In contrast your ''publicSiteKey'' can be public.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:21--&amp;gt;&lt;br /&gt;
If a player wants to log-in to your site, he needs first an ''accessToken'' for your site. The player needs your ''publicSiteKey''. The player can go to its Settings-Page in T5 and under point &amp;quot;External Tools&amp;quot; click on &amp;quot;Create Access&amp;quot;. He enters your ''publicSiteKey'' and get an ''accessToken'' back.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:22--&amp;gt;&lt;br /&gt;
If the player enters the ''accessToken'' on your site, you can calculate the players ''externalLoginToken'' by&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:23--&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;$externalLoginToken = md5($accessToken.$privateApiKey);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:24--&amp;gt;&lt;br /&gt;
Now you can search the player in your player table generated with the data from ''getMapData'' and - if you found him - log him into your site.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Einzelnachweise == &amp;lt;!--T:25--&amp;gt;&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;/div&gt;</summary>
		<author><name>ITob</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.binary-tools.de/index.php?title=Kingdoms_API&amp;diff=1305</id>
		<title>Kingdoms API</title>
		<link rel="alternate" type="text/html" href="http://wiki.binary-tools.de/index.php?title=Kingdoms_API&amp;diff=1305"/>
		<updated>2020-04-17T16:42:36Z</updated>

		<summary type="html">&lt;p&gt;ITob: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages/&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
{{Kingdoms Topic/en|legends=Legends API}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:2--&amp;gt;&lt;br /&gt;
Travian provides a [https://en.wikipedia.org/wiki/JSON JSON]-[https://en.wikipedia.org/wiki/Application_programming_interface API] to access some information about running game worlds.&amp;lt;ref&amp;gt;https://forum.kingdoms.com/index.php?thread/4099-api-for-external-tools/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Accessing the API == &amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
The base URL for all queries to the API is &amp;lt;pre&amp;gt;https://&amp;amp;lt;gameworld&amp;amp;gt;.kingdoms.com/api/external.php?action=&amp;amp;lt;action&amp;amp;gt;&amp;lt;/pre&amp;gt; (e.g. https:&amp;lt;nowiki /&amp;gt;//com1.kingdoms.com/api/external.php?action=...).&lt;br /&gt;
&lt;br /&gt;
=== Parameters === &amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
Depending on the value of ''action'' further parameters have to be specified. For most requests an [[#Action: requestApiKey |API key]] is required.&lt;br /&gt;
&lt;br /&gt;
=== Response format === &amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
 ╠═ time : int? : [https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#The_ECMAScript_epoch_and_timestamps javascript timestamp] (miliseconds since January 1, 1970, UTC), only present for some actions&lt;br /&gt;
 ╠═ error : object? : Indicates that an error occured. ''response'' will contain an empty array in this case.&lt;br /&gt;
   ╠═ type : string&lt;br /&gt;
   ╠═ number : int : error id&lt;br /&gt;
   ╚═ message : string&lt;br /&gt;
 ╚═ response : object | empty array&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
A question mark after a type indicates that this property is optional. ''object'' refers to the JSON meaning of the term (similar to dictionaries or maps in other languages). In the following sections, only the contents of the response object are shown.&lt;br /&gt;
''string(≤255)'' resp. ''string(32)'' indicates a string with a maximum resp. fixed length.&lt;br /&gt;
The type ''string(int)'' represents an integer that is formatted as a JSON string (surrounded by &amp;quot;) for unknown reasons.&lt;br /&gt;
&lt;br /&gt;
== Action: requestApiKey == &amp;lt;!--T:7--&amp;gt;&lt;br /&gt;
An API key can be requested using this action. The key is required for most other requests.&lt;br /&gt;
&lt;br /&gt;
=== Parameters === &amp;lt;!--T:8--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| email || string(≤255) || valid email address (may be used by Travian staff for questions)&lt;br /&gt;
|-&lt;br /&gt;
| siteName || string(≤255) || name of the tool&lt;br /&gt;
|-&lt;br /&gt;
| siteUrl || string(≤255) || URL of the tool&lt;br /&gt;
|-&lt;br /&gt;
| public || boolean || whether the tool should be available to the public (and may be used by Travian to create e.g. a tool list in the future)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Response === &amp;lt;!--T:9--&amp;gt;&lt;br /&gt;
 ╚═ response&lt;br /&gt;
   ╠═ privateApiKey : string(32)&lt;br /&gt;
   ╚═ publicSiteKey : string(32)&lt;br /&gt;
&lt;br /&gt;
== Action: updateSiteData == &amp;lt;!--T:10--&amp;gt;&lt;br /&gt;
This action can be used to update the data that was provided in the original ''requestApiKey'' request.&lt;br /&gt;
&lt;br /&gt;
=== Parameters === &amp;lt;!--T:11--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| privateApiKey || string(32) || private api key&lt;br /&gt;
|-&lt;br /&gt;
| email || string(≤255) || valid email address (may be used by Travian staff for questions)&lt;br /&gt;
|-&lt;br /&gt;
| siteName || string(≤255) || name of the tool&lt;br /&gt;
|-&lt;br /&gt;
| siteUrl || string(≤255) || URL of the tool&lt;br /&gt;
|-&lt;br /&gt;
| public || boolean || whether the tool should be available to the public (and may be used by Travian to create e.g. a tool list in the future)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Response === &amp;lt;!--T:12--&amp;gt;&lt;br /&gt;
 ╚═ response&lt;br /&gt;
   ╚═ data : boolean : always true (in case of an error, an error object is used instead as descried [[#Response_format|above]])&lt;br /&gt;
&lt;br /&gt;
== Action: getMapData == &amp;lt;!--T:13--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:14--&amp;gt;&lt;br /&gt;
The response to this action contains all available data including information about players, kingdoms and the map.&lt;br /&gt;
&lt;br /&gt;
=== Parameters === &amp;lt;!--T:15--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| privateApiKey || string(32) || private api key&lt;br /&gt;
|-&lt;br /&gt;
| date || string? || may be specified to request old data, the newest available data is returned if omitted, format is DD.MM.YYYY (e.g. 31.12.2020)&lt;br /&gt;
|}&lt;br /&gt;
The API has a bug when querying map data near midnight that leads to data for the wrong day getting returned.&amp;lt;ref&amp;gt;https://forum.kingdoms.com/index.php?thread/20863-suggestions-for-the-json-api/&amp;amp;postID=144462#post144462&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Response === &amp;lt;!--T:16--&amp;gt;&lt;br /&gt;
 ╚═ response&lt;br /&gt;
   ╠═ gameworld : object&lt;br /&gt;
     ╠═ name : string : (e.g. &amp;quot;com1&amp;quot;)&lt;br /&gt;
     ╠═ startTime : int : unix timestamp ('''seconds''' since January 1, 1970, UTC)&lt;br /&gt;
     ╠═ speed : int&lt;br /&gt;
     ╠═ speedTroops : int&lt;br /&gt;
     ╠═ lastUpdateTime : string(int) : unix timestamp, exact timestamp when returned data was generated&lt;br /&gt;
     ╠═ date : int : unix timestamp, start of the day (00:00:00) of returned data&lt;br /&gt;
     ╚═ version : string : always &amp;quot;1.0&amp;quot;&lt;br /&gt;
   ╠═ players : array&lt;br /&gt;
     ╠═ playerId : string(int)&lt;br /&gt;
     ╠═ name : string&lt;br /&gt;
     ╠═ tribeId : string(int) : 1 = Roman, 2 = Teuton, 3 = Gaul&lt;br /&gt;
     ╠═ kingdomId : string(int) : &amp;quot;0&amp;quot; for no kingdom&lt;br /&gt;
     ╠═ treasures : int : if player is king, then number of treasures of the kingdom, otherwise 0&lt;br /&gt;
     ╠═ role : int : 0 = Governor, 1 = King, 2 = Duke, 3 = Vice King, 0 if not part of any kingdom&lt;br /&gt;
     ╠═ externalLoginToken : string : see [[#Authentication using publicSiteKey]]&lt;br /&gt;
     ╚═ villages : array&lt;br /&gt;
       ╠═ villageId : string(int)&lt;br /&gt;
       ╠═ x : string(int)&lt;br /&gt;
       ╠═ y : string(int)&lt;br /&gt;
       ╠═ population : string(int)&lt;br /&gt;
       ╠═ name : string&lt;br /&gt;
       ╠═ isMainVillage : boolean&lt;br /&gt;
       ╚═ isCity : boolean&lt;br /&gt;
   ╠═ kingdoms : array&lt;br /&gt;
     ╠═ kingdomId : string(int)&lt;br /&gt;
     ╠═ kingdomTag : string : name of the kingdom&lt;br /&gt;
     ╠═ creationTime : string(int) : unix timestamp, exact time of kingdom creation&lt;br /&gt;
     ╚═ victoryPoints : string(int)&lt;br /&gt;
   ╚═ map                         &lt;br /&gt;
     ╠═ radius : string(int) : current radius of the map&lt;br /&gt;
     ╠═ cells : array&lt;br /&gt;
       ╠═ id : string(int)&lt;br /&gt;
       ╠═ x : string(int)&lt;br /&gt;
       ╠═ y : string(int)&lt;br /&gt;
       ╠═ resType : string : if cell is an abandoned valley or village, then resource distribution (e.g. &amp;quot;4446&amp;quot;), otherwise &amp;quot;0&amp;quot; = wilderness, &amp;quot;1&amp;quot; = outside of map radius&lt;br /&gt;
       ╠═ oasis : string(int) : if cell is an oasis, then [[#Oases oasis type], otherwise &amp;quot;0&amp;quot;&lt;br /&gt;
       ╠═ landscape : string(int) : landscape id, see [[#Landscapes]]&lt;br /&gt;
       ╚═ kingdomId : string(int) / int : kingdom id (as string) of the village ('''not''' kingdom of the village's owner), 0 (as int) if not within kingdom borders&lt;br /&gt;
     ╚═ landscapes : object&lt;br /&gt;
       ╚═ [ landscape id : int ] : string : relative path to the corresponding image (e.g. &amp;quot;layout/images/map/wood0_0_0.png&amp;quot;), see [[#Landscapes]]&lt;br /&gt;
&lt;br /&gt;
==== Oases ==== &amp;lt;!--T:26--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:27--&amp;gt;&lt;br /&gt;
An oasis type consists of 2 digits. The first determines the main resource of the oasis according to the table below. If the second digit is a 1 the oasis has an addition 25% crop bonus, otherwise there is no secondary bonus.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:28--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! ID !! Type&lt;br /&gt;
|-&lt;br /&gt;
| 1 || wood&lt;br /&gt;
|-&lt;br /&gt;
| 2 || clay&lt;br /&gt;
|-&lt;br /&gt;
| 3 || iron&lt;br /&gt;
|-&lt;br /&gt;
| 4 || crop&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:29--&amp;gt;&lt;br /&gt;
Examples:&lt;br /&gt;
&amp;quot;20&amp;quot; is a 25% crop oasis.&lt;br /&gt;
&amp;quot;21&amp;quot; is a 25% clay and 25% crop oasis.&lt;br /&gt;
&amp;quot;41&amp;quot; is a 50% crop oasis.&lt;br /&gt;
&lt;br /&gt;
==== Landscapes ==== &amp;lt;!--T:17--&amp;gt;&lt;br /&gt;
Landscapes are the visualizations used on the ingame map (e.g. trees, mountains, lakes, clay pits). A landscape's id can be mapped to an image path using the ''landscapes'' object in the response. This path is relative to the static game files which can be found at https://cdn.traviantools.net/game/0.95/ for that specific version of the game. Example path: https://cdn.traviantools.net/game/0.95/layout/images/map/wood0_0_0.png&lt;br /&gt;
&lt;br /&gt;
== Authentication using publicSiteKey == &amp;lt;!--T:18--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:19--&amp;gt;&lt;br /&gt;
From https://forum.kingdoms.com/index.php?thread/4099-api-for-external-tools/:&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
With the ''externalLoginToken'' you can authenticate a player - without that the player needs to register for your tool.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:20--&amp;gt;&lt;br /&gt;
In your call to ''requestApiKey'' you were provided a ''privateApiKey'' and a ''publicSiteKey''. The ''privateApiKey'' should be.. guess what.. private. You shouldn't tell this to anyone. You will need it to make requests to our api's. In contrast your ''publicSiteKey'' can be public.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:21--&amp;gt;&lt;br /&gt;
If a player wants to log-in to your site, he needs first an ''accessToken'' for your site. The player needs your ''publicSiteKey''. The player can go to its Settings-Page in T5 and under point &amp;quot;External Tools&amp;quot; click on &amp;quot;Create Access&amp;quot;. He enters your ''publicSiteKey'' and get an ''accessToken'' back.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:22--&amp;gt;&lt;br /&gt;
If the player enters the ''accessToken'' on your site, you can calculate the players ''externalLoginToken'' by&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:23--&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;$externalLoginToken = md5($accessToken.$privateApiKey);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:24--&amp;gt;&lt;br /&gt;
Now you can search the player in your player table generated with the data from ''getMapData'' and - if you found him - log him into your site.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Einzelnachweise == &amp;lt;!--T:25--&amp;gt;&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;/div&gt;</summary>
		<author><name>ITob</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.binary-tools.de/index.php?title=Kingdoms_API&amp;diff=1297</id>
		<title>Kingdoms API</title>
		<link rel="alternate" type="text/html" href="http://wiki.binary-tools.de/index.php?title=Kingdoms_API&amp;diff=1297"/>
		<updated>2020-04-17T16:40:31Z</updated>

		<summary type="html">&lt;p&gt;ITob: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages/&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
{{Kingdoms Topic/en|legends=Legends API}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:2--&amp;gt;&lt;br /&gt;
Travian provides a [https://en.wikipedia.org/wiki/JSON JSON]-[https://en.wikipedia.org/wiki/Application_programming_interface API] to access some information about running game worlds.&amp;lt;ref&amp;gt;https://forum.kingdoms.com/index.php?thread/4099-api-for-external-tools/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Accessing the API == &amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
The base URL for all queries to the API is &amp;lt;pre&amp;gt;https://&amp;amp;lt;gameworld&amp;amp;gt;.kingdoms.com/api/external.php?action=&amp;amp;lt;action&amp;amp;gt;&amp;lt;/pre&amp;gt; (e.g. https:&amp;lt;nowiki /&amp;gt;//com1.kingdoms.com/api/external.php?action=...).&lt;br /&gt;
&lt;br /&gt;
=== Parameters === &amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
Depending on the value of ''action'' further parameters have to be specified. For most requests an [[#Action: requestApiKey |API key]] is required.&lt;br /&gt;
&lt;br /&gt;
=== Response format === &amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
 ╠═ time : int? : [https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#The_ECMAScript_epoch_and_timestamps javascript timestamp] (miliseconds since January 1, 1970, UTC), only present for some actions&lt;br /&gt;
 ╠═ error : object? : Indicates that an error occured. ''response'' will contain an empty array in this case.&lt;br /&gt;
   ╠═ type : string&lt;br /&gt;
   ╠═ number : int : error id&lt;br /&gt;
   ╚═ message : string&lt;br /&gt;
 ╚═ response : object | empty array&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
A question mark after a type indicates that this property is optional. ''object'' refers to the JSON meaning of the term (similar to dictionaries or maps in other languages). In the following sections, only the contents of the response object are shown.&lt;br /&gt;
''string(≤255)'' resp. ''string(32)'' indicates a string with a maximum resp. fixed length.&lt;br /&gt;
The type ''string(int)'' represents an integer that is formatted as a JSON string (surrounded by &amp;quot;) for unknown reasons.&lt;br /&gt;
&lt;br /&gt;
== Action: requestApiKey == &amp;lt;!--T:7--&amp;gt;&lt;br /&gt;
An API key can be requested using this action. The key is required for most other requests.&lt;br /&gt;
&lt;br /&gt;
=== Parameters === &amp;lt;!--T:8--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| email || string(≤255) || valid email address (may be used by Travian staff for questions)&lt;br /&gt;
|-&lt;br /&gt;
| siteName || string(≤255) || name of the tool&lt;br /&gt;
|-&lt;br /&gt;
| siteUrl || string(≤255) || URL of the tool&lt;br /&gt;
|-&lt;br /&gt;
| public || boolean || whether the tool should be available to the public (and may be used by Travian to create e.g. a tool list in the future)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Response === &amp;lt;!--T:9--&amp;gt;&lt;br /&gt;
 ╚═ response&lt;br /&gt;
   ╠═ privateApiKey : string(32)&lt;br /&gt;
   ╚═ publicSiteKey : string(32)&lt;br /&gt;
&lt;br /&gt;
== Action: updateSiteData == &amp;lt;!--T:10--&amp;gt;&lt;br /&gt;
This action can be used to update the data that was provided in the original ''requestApiKey'' request.&lt;br /&gt;
&lt;br /&gt;
=== Parameters === &amp;lt;!--T:11--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| privateApiKey || string(32) || private api key&lt;br /&gt;
|-&lt;br /&gt;
| email || string(≤255) || valid email address (may be used by Travian staff for questions)&lt;br /&gt;
|-&lt;br /&gt;
| siteName || string(≤255) || name of the tool&lt;br /&gt;
|-&lt;br /&gt;
| siteUrl || string(≤255) || URL of the tool&lt;br /&gt;
|-&lt;br /&gt;
| public || boolean || whether the tool should be available to the public (and may be used by Travian to create e.g. a tool list in the future)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Response === &amp;lt;!--T:12--&amp;gt;&lt;br /&gt;
 ╚═ response&lt;br /&gt;
   ╚═ data : boolean : always true (in case of an error, an error object is used instead as descried [[#Response_format|above]])&lt;br /&gt;
&lt;br /&gt;
== Action: getMapData == &amp;lt;!--T:13--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:14--&amp;gt;&lt;br /&gt;
The response to this action contains all available data including information about players, kingdoms and the map.&lt;br /&gt;
&lt;br /&gt;
=== Parameters === &amp;lt;!--T:15--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| privateApiKey || string(32) || private api key&lt;br /&gt;
|-&lt;br /&gt;
| date || string? || may be specified to request old data, the newest available data is returned if omitted, format is DD.MM.YYYY (e.g. 31.12.2020)&lt;br /&gt;
|}&lt;br /&gt;
The API has a bug when querying map data near midnight that leads to data for the wrong day getting returned.&amp;lt;ref&amp;gt;https://forum.kingdoms.com/index.php?thread/20863-suggestions-for-the-json-api/&amp;amp;postID=144462#post144462&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Response === &amp;lt;!--T:16--&amp;gt;&lt;br /&gt;
 ╚═ response&lt;br /&gt;
   ╠═ gameworld : object&lt;br /&gt;
     ╠═ name : string : (e.g. &amp;quot;com1&amp;quot;)&lt;br /&gt;
     ╠═ startTime : int : unix timestamp ('''seconds''' since January 1, 1970, UTC)&lt;br /&gt;
     ╠═ speed : int&lt;br /&gt;
     ╠═ speedTroops : int&lt;br /&gt;
     ╠═ lastUpdateTime : string(int) : unix timestamp, exact timestamp when returned data was generated&lt;br /&gt;
     ╠═ date : int : unix timestamp, start of the day (00:00:00) of returned data&lt;br /&gt;
     ╚═ version : string : always &amp;quot;1.0&amp;quot;&lt;br /&gt;
   ╠═ players : array&lt;br /&gt;
     ╠═ playerId : string(int)&lt;br /&gt;
     ╠═ name : string&lt;br /&gt;
     ╠═ tribeId : string(int) : 1 = Roman, 2 = Teuton, 3 = Gaul&lt;br /&gt;
     ╠═ kingdomId : string(int) : &amp;quot;0&amp;quot; for no kingdom&lt;br /&gt;
     ╠═ treasures : int : if player is king, then number of treasures of the kingdom, otherwise 0&lt;br /&gt;
     ╠═ role : int : 0 = Governor, 1 = King, 2 = Duke, 3 = Vice King, 0 if not part of any kingdom&lt;br /&gt;
     ╠═ externalLoginToken : string : see [[#Authentication using publicSiteKey]]&lt;br /&gt;
     ╚═ villages : array&lt;br /&gt;
       ╠═ villageId : string(int)&lt;br /&gt;
       ╠═ x : string(int)&lt;br /&gt;
       ╠═ y : string(int)&lt;br /&gt;
       ╠═ population : string(int)&lt;br /&gt;
       ╠═ name : string&lt;br /&gt;
       ╠═ isMainVillage : boolean&lt;br /&gt;
       ╚═ isCity : boolean&lt;br /&gt;
   ╠═ kingdoms : array&lt;br /&gt;
     ╠═ kingdomId : string(int)&lt;br /&gt;
     ╠═ kingdomTag : string : name of the kingdom&lt;br /&gt;
     ╠═ creationTime : string(int) : unix timestamp, exact time of kingdom creation&lt;br /&gt;
     ╚═ victoryPoints : string(int)&lt;br /&gt;
   ╚═ map                         &lt;br /&gt;
     ╠═ radius : string(int) : current radius of the map&lt;br /&gt;
     ╠═ cells : array&lt;br /&gt;
       ╠═ id : string(int)&lt;br /&gt;
       ╠═ x : string(int)&lt;br /&gt;
       ╠═ y : string(int)&lt;br /&gt;
       ╠═ resType : string : if cell is an abandoned valley or village, then resource distribution (e.g. &amp;quot;4446&amp;quot;), otherwise &amp;quot;0&amp;quot; = wilderness, &amp;quot;1&amp;quot; = outside of map radius&lt;br /&gt;
       ╠═ oasis : string(int) : if cell is an oasis, then [[#Oases oasis type], otherwise &amp;quot;0&amp;quot;&lt;br /&gt;
       ╠═ landscape : string(int) : landscape id, see [[#Landscapes]]&lt;br /&gt;
       ╚═ kingdomId : string(int) / int : kingdom id (as string) of the village ('''not''' kingdom of the village's owner), 0 (as int) if not within kingdom borders&lt;br /&gt;
     ╚═ landscapes : object&lt;br /&gt;
       ╚═ [ landscape id : int ] : string : relative path to the corresponding image (e.g. &amp;quot;layout/images/map/wood0_0_0.png&amp;quot;), see [[#Landscapes]]&lt;br /&gt;
&lt;br /&gt;
==== Oases ====&lt;br /&gt;
&lt;br /&gt;
An oasis type consists of 2 digits. The first determines the main resource of the oasis according to the table below. If the second digit is a 1 the oasis has an addition 25% crop bonus, otherwise there is no secondary bonus.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! ID !! Type&lt;br /&gt;
|-&lt;br /&gt;
| 1 || wood&lt;br /&gt;
|-&lt;br /&gt;
| 2 || clay&lt;br /&gt;
|-&lt;br /&gt;
| 3 || iron&lt;br /&gt;
|-&lt;br /&gt;
| 4 || crop&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&amp;quot;20&amp;quot; is a 25% crop oasis.&lt;br /&gt;
&amp;quot;21&amp;quot; is a 25% clay and 25% crop oasis.&lt;br /&gt;
&amp;quot;41&amp;quot; is a 50% crop oasis.&lt;br /&gt;
&lt;br /&gt;
==== Landscapes ==== &amp;lt;!--T:17--&amp;gt;&lt;br /&gt;
Landscapes are the visualizations used on the ingame map (e.g. trees, mountains, lakes, clay pits). A landscape's id can be mapped to an image path using the ''landscapes'' object in the response. This path is relative to the static game files which can be found at https://cdn.traviantools.net/game/0.95/ for that specific version of the game. Example path: https://cdn.traviantools.net/game/0.95/layout/images/map/wood0_0_0.png&lt;br /&gt;
&lt;br /&gt;
== Authentication using publicSiteKey == &amp;lt;!--T:18--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:19--&amp;gt;&lt;br /&gt;
From https://forum.kingdoms.com/index.php?thread/4099-api-for-external-tools/:&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
With the ''externalLoginToken'' you can authenticate a player - without that the player needs to register for your tool.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:20--&amp;gt;&lt;br /&gt;
In your call to ''requestApiKey'' you were provided a ''privateApiKey'' and a ''publicSiteKey''. The ''privateApiKey'' should be.. guess what.. private. You shouldn't tell this to anyone. You will need it to make requests to our api's. In contrast your ''publicSiteKey'' can be public.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:21--&amp;gt;&lt;br /&gt;
If a player wants to log-in to your site, he needs first an ''accessToken'' for your site. The player needs your ''publicSiteKey''. The player can go to its Settings-Page in T5 and under point &amp;quot;External Tools&amp;quot; click on &amp;quot;Create Access&amp;quot;. He enters your ''publicSiteKey'' and get an ''accessToken'' back.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:22--&amp;gt;&lt;br /&gt;
If the player enters the ''accessToken'' on your site, you can calculate the players ''externalLoginToken'' by&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:23--&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;$externalLoginToken = md5($accessToken.$privateApiKey);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:24--&amp;gt;&lt;br /&gt;
Now you can search the player in your player table generated with the data from ''getMapData'' and - if you found him - log him into your site.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Einzelnachweise == &amp;lt;!--T:25--&amp;gt;&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;/div&gt;</summary>
		<author><name>ITob</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.binary-tools.de/index.php?title=Kingdoms_API&amp;diff=1298</id>
		<title>Kingdoms API</title>
		<link rel="alternate" type="text/html" href="http://wiki.binary-tools.de/index.php?title=Kingdoms_API&amp;diff=1298"/>
		<updated>2020-04-17T16:40:31Z</updated>

		<summary type="html">&lt;p&gt;ITob: Marked this version for translation&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages/&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
{{Kingdoms Topic/en|legends=Legends API}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:2--&amp;gt;&lt;br /&gt;
Travian provides a [https://en.wikipedia.org/wiki/JSON JSON]-[https://en.wikipedia.org/wiki/Application_programming_interface API] to access some information about running game worlds.&amp;lt;ref&amp;gt;https://forum.kingdoms.com/index.php?thread/4099-api-for-external-tools/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Accessing the API == &amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
The base URL for all queries to the API is &amp;lt;pre&amp;gt;https://&amp;amp;lt;gameworld&amp;amp;gt;.kingdoms.com/api/external.php?action=&amp;amp;lt;action&amp;amp;gt;&amp;lt;/pre&amp;gt; (e.g. https:&amp;lt;nowiki /&amp;gt;//com1.kingdoms.com/api/external.php?action=...).&lt;br /&gt;
&lt;br /&gt;
=== Parameters === &amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
Depending on the value of ''action'' further parameters have to be specified. For most requests an [[#Action: requestApiKey |API key]] is required.&lt;br /&gt;
&lt;br /&gt;
=== Response format === &amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
 ╠═ time : int? : [https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#The_ECMAScript_epoch_and_timestamps javascript timestamp] (miliseconds since January 1, 1970, UTC), only present for some actions&lt;br /&gt;
 ╠═ error : object? : Indicates that an error occured. ''response'' will contain an empty array in this case.&lt;br /&gt;
   ╠═ type : string&lt;br /&gt;
   ╠═ number : int : error id&lt;br /&gt;
   ╚═ message : string&lt;br /&gt;
 ╚═ response : object | empty array&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
A question mark after a type indicates that this property is optional. ''object'' refers to the JSON meaning of the term (similar to dictionaries or maps in other languages). In the following sections, only the contents of the response object are shown.&lt;br /&gt;
''string(≤255)'' resp. ''string(32)'' indicates a string with a maximum resp. fixed length.&lt;br /&gt;
The type ''string(int)'' represents an integer that is formatted as a JSON string (surrounded by &amp;quot;) for unknown reasons.&lt;br /&gt;
&lt;br /&gt;
== Action: requestApiKey == &amp;lt;!--T:7--&amp;gt;&lt;br /&gt;
An API key can be requested using this action. The key is required for most other requests.&lt;br /&gt;
&lt;br /&gt;
=== Parameters === &amp;lt;!--T:8--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| email || string(≤255) || valid email address (may be used by Travian staff for questions)&lt;br /&gt;
|-&lt;br /&gt;
| siteName || string(≤255) || name of the tool&lt;br /&gt;
|-&lt;br /&gt;
| siteUrl || string(≤255) || URL of the tool&lt;br /&gt;
|-&lt;br /&gt;
| public || boolean || whether the tool should be available to the public (and may be used by Travian to create e.g. a tool list in the future)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Response === &amp;lt;!--T:9--&amp;gt;&lt;br /&gt;
 ╚═ response&lt;br /&gt;
   ╠═ privateApiKey : string(32)&lt;br /&gt;
   ╚═ publicSiteKey : string(32)&lt;br /&gt;
&lt;br /&gt;
== Action: updateSiteData == &amp;lt;!--T:10--&amp;gt;&lt;br /&gt;
This action can be used to update the data that was provided in the original ''requestApiKey'' request.&lt;br /&gt;
&lt;br /&gt;
=== Parameters === &amp;lt;!--T:11--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| privateApiKey || string(32) || private api key&lt;br /&gt;
|-&lt;br /&gt;
| email || string(≤255) || valid email address (may be used by Travian staff for questions)&lt;br /&gt;
|-&lt;br /&gt;
| siteName || string(≤255) || name of the tool&lt;br /&gt;
|-&lt;br /&gt;
| siteUrl || string(≤255) || URL of the tool&lt;br /&gt;
|-&lt;br /&gt;
| public || boolean || whether the tool should be available to the public (and may be used by Travian to create e.g. a tool list in the future)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Response === &amp;lt;!--T:12--&amp;gt;&lt;br /&gt;
 ╚═ response&lt;br /&gt;
   ╚═ data : boolean : always true (in case of an error, an error object is used instead as descried [[#Response_format|above]])&lt;br /&gt;
&lt;br /&gt;
== Action: getMapData == &amp;lt;!--T:13--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:14--&amp;gt;&lt;br /&gt;
The response to this action contains all available data including information about players, kingdoms and the map.&lt;br /&gt;
&lt;br /&gt;
=== Parameters === &amp;lt;!--T:15--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| privateApiKey || string(32) || private api key&lt;br /&gt;
|-&lt;br /&gt;
| date || string? || may be specified to request old data, the newest available data is returned if omitted, format is DD.MM.YYYY (e.g. 31.12.2020)&lt;br /&gt;
|}&lt;br /&gt;
The API has a bug when querying map data near midnight that leads to data for the wrong day getting returned.&amp;lt;ref&amp;gt;https://forum.kingdoms.com/index.php?thread/20863-suggestions-for-the-json-api/&amp;amp;postID=144462#post144462&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Response === &amp;lt;!--T:16--&amp;gt;&lt;br /&gt;
 ╚═ response&lt;br /&gt;
   ╠═ gameworld : object&lt;br /&gt;
     ╠═ name : string : (e.g. &amp;quot;com1&amp;quot;)&lt;br /&gt;
     ╠═ startTime : int : unix timestamp ('''seconds''' since January 1, 1970, UTC)&lt;br /&gt;
     ╠═ speed : int&lt;br /&gt;
     ╠═ speedTroops : int&lt;br /&gt;
     ╠═ lastUpdateTime : string(int) : unix timestamp, exact timestamp when returned data was generated&lt;br /&gt;
     ╠═ date : int : unix timestamp, start of the day (00:00:00) of returned data&lt;br /&gt;
     ╚═ version : string : always &amp;quot;1.0&amp;quot;&lt;br /&gt;
   ╠═ players : array&lt;br /&gt;
     ╠═ playerId : string(int)&lt;br /&gt;
     ╠═ name : string&lt;br /&gt;
     ╠═ tribeId : string(int) : 1 = Roman, 2 = Teuton, 3 = Gaul&lt;br /&gt;
     ╠═ kingdomId : string(int) : &amp;quot;0&amp;quot; for no kingdom&lt;br /&gt;
     ╠═ treasures : int : if player is king, then number of treasures of the kingdom, otherwise 0&lt;br /&gt;
     ╠═ role : int : 0 = Governor, 1 = King, 2 = Duke, 3 = Vice King, 0 if not part of any kingdom&lt;br /&gt;
     ╠═ externalLoginToken : string : see [[#Authentication using publicSiteKey]]&lt;br /&gt;
     ╚═ villages : array&lt;br /&gt;
       ╠═ villageId : string(int)&lt;br /&gt;
       ╠═ x : string(int)&lt;br /&gt;
       ╠═ y : string(int)&lt;br /&gt;
       ╠═ population : string(int)&lt;br /&gt;
       ╠═ name : string&lt;br /&gt;
       ╠═ isMainVillage : boolean&lt;br /&gt;
       ╚═ isCity : boolean&lt;br /&gt;
   ╠═ kingdoms : array&lt;br /&gt;
     ╠═ kingdomId : string(int)&lt;br /&gt;
     ╠═ kingdomTag : string : name of the kingdom&lt;br /&gt;
     ╠═ creationTime : string(int) : unix timestamp, exact time of kingdom creation&lt;br /&gt;
     ╚═ victoryPoints : string(int)&lt;br /&gt;
   ╚═ map                         &lt;br /&gt;
     ╠═ radius : string(int) : current radius of the map&lt;br /&gt;
     ╠═ cells : array&lt;br /&gt;
       ╠═ id : string(int)&lt;br /&gt;
       ╠═ x : string(int)&lt;br /&gt;
       ╠═ y : string(int)&lt;br /&gt;
       ╠═ resType : string : if cell is an abandoned valley or village, then resource distribution (e.g. &amp;quot;4446&amp;quot;), otherwise &amp;quot;0&amp;quot; = wilderness, &amp;quot;1&amp;quot; = outside of map radius&lt;br /&gt;
       ╠═ oasis : string(int) : if cell is an oasis, then [[#Oases oasis type], otherwise &amp;quot;0&amp;quot;&lt;br /&gt;
       ╠═ landscape : string(int) : landscape id, see [[#Landscapes]]&lt;br /&gt;
       ╚═ kingdomId : string(int) / int : kingdom id (as string) of the village ('''not''' kingdom of the village's owner), 0 (as int) if not within kingdom borders&lt;br /&gt;
     ╚═ landscapes : object&lt;br /&gt;
       ╚═ [ landscape id : int ] : string : relative path to the corresponding image (e.g. &amp;quot;layout/images/map/wood0_0_0.png&amp;quot;), see [[#Landscapes]]&lt;br /&gt;
&lt;br /&gt;
==== Oases ==== &amp;lt;!--T:26--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:27--&amp;gt;&lt;br /&gt;
An oasis type consists of 2 digits. The first determines the main resource of the oasis according to the table below. If the second digit is a 1 the oasis has an addition 25% crop bonus, otherwise there is no secondary bonus.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:28--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! ID !! Type&lt;br /&gt;
|-&lt;br /&gt;
| 1 || wood&lt;br /&gt;
|-&lt;br /&gt;
| 2 || clay&lt;br /&gt;
|-&lt;br /&gt;
| 3 || iron&lt;br /&gt;
|-&lt;br /&gt;
| 4 || crop&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:29--&amp;gt;&lt;br /&gt;
Examples:&lt;br /&gt;
&amp;quot;20&amp;quot; is a 25% crop oasis.&lt;br /&gt;
&amp;quot;21&amp;quot; is a 25% clay and 25% crop oasis.&lt;br /&gt;
&amp;quot;41&amp;quot; is a 50% crop oasis.&lt;br /&gt;
&lt;br /&gt;
==== Landscapes ==== &amp;lt;!--T:17--&amp;gt;&lt;br /&gt;
Landscapes are the visualizations used on the ingame map (e.g. trees, mountains, lakes, clay pits). A landscape's id can be mapped to an image path using the ''landscapes'' object in the response. This path is relative to the static game files which can be found at https://cdn.traviantools.net/game/0.95/ for that specific version of the game. Example path: https://cdn.traviantools.net/game/0.95/layout/images/map/wood0_0_0.png&lt;br /&gt;
&lt;br /&gt;
== Authentication using publicSiteKey == &amp;lt;!--T:18--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:19--&amp;gt;&lt;br /&gt;
From https://forum.kingdoms.com/index.php?thread/4099-api-for-external-tools/:&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
With the ''externalLoginToken'' you can authenticate a player - without that the player needs to register for your tool.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:20--&amp;gt;&lt;br /&gt;
In your call to ''requestApiKey'' you were provided a ''privateApiKey'' and a ''publicSiteKey''. The ''privateApiKey'' should be.. guess what.. private. You shouldn't tell this to anyone. You will need it to make requests to our api's. In contrast your ''publicSiteKey'' can be public.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:21--&amp;gt;&lt;br /&gt;
If a player wants to log-in to your site, he needs first an ''accessToken'' for your site. The player needs your ''publicSiteKey''. The player can go to its Settings-Page in T5 and under point &amp;quot;External Tools&amp;quot; click on &amp;quot;Create Access&amp;quot;. He enters your ''publicSiteKey'' and get an ''accessToken'' back.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:22--&amp;gt;&lt;br /&gt;
If the player enters the ''accessToken'' on your site, you can calculate the players ''externalLoginToken'' by&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:23--&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;$externalLoginToken = md5($accessToken.$privateApiKey);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:24--&amp;gt;&lt;br /&gt;
Now you can search the player in your player table generated with the data from ''getMapData'' and - if you found him - log him into your site.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Einzelnachweise == &amp;lt;!--T:25--&amp;gt;&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;/div&gt;</summary>
		<author><name>ITob</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.binary-tools.de/index.php?title=Kingdoms_API&amp;diff=1294</id>
		<title>Kingdoms API</title>
		<link rel="alternate" type="text/html" href="http://wiki.binary-tools.de/index.php?title=Kingdoms_API&amp;diff=1294"/>
		<updated>2020-04-17T16:27:10Z</updated>

		<summary type="html">&lt;p&gt;ITob: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages/&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
{{Kingdoms Topic/en|legends=Legends API}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:2--&amp;gt;&lt;br /&gt;
Travian provides a [https://en.wikipedia.org/wiki/JSON JSON]-[https://en.wikipedia.org/wiki/Application_programming_interface API] to access some information about running game worlds.&amp;lt;ref&amp;gt;https://forum.kingdoms.com/index.php?thread/4099-api-for-external-tools/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Accessing the API == &amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
The base URL for all queries to the API is &amp;lt;pre&amp;gt;https://&amp;amp;lt;gameworld&amp;amp;gt;.kingdoms.com/api/external.php?action=&amp;amp;lt;action&amp;amp;gt;&amp;lt;/pre&amp;gt; (e.g. https:&amp;lt;nowiki /&amp;gt;//com1.kingdoms.com/api/external.php?action=...).&lt;br /&gt;
&lt;br /&gt;
=== Parameters === &amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
Depending on the value of ''action'' further parameters have to be specified. For most requests an [[#Action: requestApiKey |API key]] is required.&lt;br /&gt;
&lt;br /&gt;
=== Response format === &amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
 ╠═ time : int? : [https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#The_ECMAScript_epoch_and_timestamps javascript timestamp] (miliseconds since January 1, 1970, UTC), only present for some actions&lt;br /&gt;
 ╠═ error : object? : Indicates that an error occured. ''response'' will contain an empty array in this case.&lt;br /&gt;
   ╠═ type : string&lt;br /&gt;
   ╠═ number : int : error id&lt;br /&gt;
   ╚═ message : string&lt;br /&gt;
 ╚═ response : object | empty array&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
A question mark after a type indicates that this property is optional. ''object'' refers to the JSON meaning of the term (similar to dictionaries or maps in other languages). In the following sections, only the contents of the response object are shown.&lt;br /&gt;
''string(≤255)'' resp. ''string(32)'' indicates a string with a maximum resp. fixed length.&lt;br /&gt;
The type ''string(int)'' represents an integer that is formatted as a JSON string (surrounded by &amp;quot;) for unknown reasons.&lt;br /&gt;
&lt;br /&gt;
== Action: requestApiKey == &amp;lt;!--T:7--&amp;gt;&lt;br /&gt;
An API key can be requested using this action. The key is required for most other requests.&lt;br /&gt;
&lt;br /&gt;
=== Parameters === &amp;lt;!--T:8--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| email || string(≤255) || valid email address (may be used by Travian staff for questions)&lt;br /&gt;
|-&lt;br /&gt;
| siteName || string(≤255) || name of the tool&lt;br /&gt;
|-&lt;br /&gt;
| siteUrl || string(≤255) || URL of the tool&lt;br /&gt;
|-&lt;br /&gt;
| public || boolean || whether the tool should be available to the public (and may be used by Travian to create e.g. a tool list in the future)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Response === &amp;lt;!--T:9--&amp;gt;&lt;br /&gt;
 ╚═ response&lt;br /&gt;
   ╠═ privateApiKey : string(32)&lt;br /&gt;
   ╚═ publicSiteKey : string(32)&lt;br /&gt;
&lt;br /&gt;
== Action: updateSiteData == &amp;lt;!--T:10--&amp;gt;&lt;br /&gt;
This action can be used to update the data that was provided in the original ''requestApiKey'' request.&lt;br /&gt;
&lt;br /&gt;
=== Parameters === &amp;lt;!--T:11--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| privateApiKey || string(32) || private api key&lt;br /&gt;
|-&lt;br /&gt;
| email || string(≤255) || valid email address (may be used by Travian staff for questions)&lt;br /&gt;
|-&lt;br /&gt;
| siteName || string(≤255) || name of the tool&lt;br /&gt;
|-&lt;br /&gt;
| siteUrl || string(≤255) || URL of the tool&lt;br /&gt;
|-&lt;br /&gt;
| public || boolean || whether the tool should be available to the public (and may be used by Travian to create e.g. a tool list in the future)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Response === &amp;lt;!--T:12--&amp;gt;&lt;br /&gt;
 ╚═ response&lt;br /&gt;
   ╚═ data : boolean : always true (in case of an error, an error object is used instead as descried [[#Response_format|above]])&lt;br /&gt;
&lt;br /&gt;
== Action: getMapData == &amp;lt;!--T:13--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:14--&amp;gt;&lt;br /&gt;
The response to this action contains all available data including information about players, kingdoms and the map.&lt;br /&gt;
&lt;br /&gt;
=== Parameters === &amp;lt;!--T:15--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| privateApiKey || string(32) || private api key&lt;br /&gt;
|-&lt;br /&gt;
| date || string? || may be specified to request old data, the newest available data is returned if omitted, format is DD.MM.YYYY (e.g. 31.12.2020)&lt;br /&gt;
|}&lt;br /&gt;
The API has a bug when querying map data near midnight that leads to data for the wrong day getting returned.&amp;lt;ref&amp;gt;https://forum.kingdoms.com/index.php?thread/20863-suggestions-for-the-json-api/&amp;amp;postID=144462#post144462&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Response === &amp;lt;!--T:16--&amp;gt;&lt;br /&gt;
 ╚═ response&lt;br /&gt;
   ╠═ gameworld : object&lt;br /&gt;
     ╠═ name : string : (e.g. &amp;quot;com1&amp;quot;)&lt;br /&gt;
     ╠═ startTime : int : unix timestamp ('''seconds''' since January 1, 1970, UTC)&lt;br /&gt;
     ╠═ speed : int&lt;br /&gt;
     ╠═ speedTroops : int&lt;br /&gt;
     ╠═ lastUpdateTime : string(int) : unix timestamp, exact timestamp when returned data was generated&lt;br /&gt;
     ╠═ date : int : unix timestamp, start of the day (00:00:00) of returned data&lt;br /&gt;
     ╚═ version : string : always &amp;quot;1.0&amp;quot;&lt;br /&gt;
   ╠═ players : array&lt;br /&gt;
     ╠═ playerId : string(int)&lt;br /&gt;
     ╠═ name : string&lt;br /&gt;
     ╠═ tribeId : string(int) : 1 = Roman, 2 = Teuton, 3 = Gaul&lt;br /&gt;
     ╠═ kingdomId : string(int) : &amp;quot;0&amp;quot; for no kingdom&lt;br /&gt;
     ╠═ treasures : int : if player is king, then number of treasures of the kingdom, otherwise 0&lt;br /&gt;
     ╠═ role : int : 0 = Governor, 1 = King, 2 = Duke, 3 = Vice King, 0 if not part of any kingdom&lt;br /&gt;
     ╠═ externalLoginToken : string : see [[#Authentication using publicSiteKey]]&lt;br /&gt;
     ╚═ villages : array&lt;br /&gt;
       ╠═ villageId : string(int)&lt;br /&gt;
       ╠═ x : string(int)&lt;br /&gt;
       ╠═ y : string(int)&lt;br /&gt;
       ╠═ population : string(int)&lt;br /&gt;
       ╠═ name : string&lt;br /&gt;
       ╠═ isMainVillage : boolean&lt;br /&gt;
       ╚═ isCity : boolean&lt;br /&gt;
   ╠═ kingdoms : array&lt;br /&gt;
     ╠═ kingdomId : string(int)&lt;br /&gt;
     ╠═ kingdomTag : string : name of the kingdom&lt;br /&gt;
     ╠═ creationTime : string(int) : unix timestamp, exact time of kingdom creation&lt;br /&gt;
     ╚═ victoryPoints : string(int)&lt;br /&gt;
   ╚═ map                         &lt;br /&gt;
     ╠═ radius : string(int) : current radius of the map&lt;br /&gt;
     ╠═ cells : array&lt;br /&gt;
       ╠═ id : string(int)&lt;br /&gt;
       ╠═ x : string(int)&lt;br /&gt;
       ╠═ y : string(int)&lt;br /&gt;
       ╠═ resType : string : if cell is abandoned valley or village, then resource distribution (e.g. &amp;quot;4446&amp;quot;), otherwise &amp;quot;0&amp;quot; = wilderness, &amp;quot;1&amp;quot; = outside of map radius&lt;br /&gt;
       ╠═ oasis : string(int) : if cell is oasis, then oasis type (TODO), otherwise &amp;quot;0&amp;quot;&lt;br /&gt;
       ╠═ landscape : string(int) : landscape id, see [[#Landscapes]]&lt;br /&gt;
       ╚═ kingdomId : string(int) / int : kingdom id (as string) of the village ('''not''' kingdom of the village's owner), 0 (as int) if not within kingdom borders&lt;br /&gt;
     ╚═ landscapes : object&lt;br /&gt;
       ╚═ [ landscape id : int ] : string : relative path to the corresponding image (e.g. &amp;quot;layout/images/map/wood0_0_0.png&amp;quot;), see [[#Landscapes]]&lt;br /&gt;
&lt;br /&gt;
==== Landscapes ==== &amp;lt;!--T:17--&amp;gt;&lt;br /&gt;
Landscapes are the visualizations used on the ingame map (e.g. trees, mountains, lakes, clay pits). A landscape's id can be mapped to an image path using the ''landscapes'' object in the response. This path is relative to the static game files which can be found at https://cdn.traviantools.net/game/0.95/ for that specific version of the game. Example path: https://cdn.traviantools.net/game/0.95/layout/images/map/wood0_0_0.png&lt;br /&gt;
&lt;br /&gt;
== Authentication using publicSiteKey == &amp;lt;!--T:18--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:19--&amp;gt;&lt;br /&gt;
From https://forum.kingdoms.com/index.php?thread/4099-api-for-external-tools/:&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
With the ''externalLoginToken'' you can authenticate a player - without that the player needs to register for your tool.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:20--&amp;gt;&lt;br /&gt;
In your call to ''requestApiKey'' you were provided a ''privateApiKey'' and a ''publicSiteKey''. The ''privateApiKey'' should be.. guess what.. private. You shouldn't tell this to anyone. You will need it to make requests to our api's. In contrast your ''publicSiteKey'' can be public.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:21--&amp;gt;&lt;br /&gt;
If a player wants to log-in to your site, he needs first an ''accessToken'' for your site. The player needs your ''publicSiteKey''. The player can go to its Settings-Page in T5 and under point &amp;quot;External Tools&amp;quot; click on &amp;quot;Create Access&amp;quot;. He enters your ''publicSiteKey'' and get an ''accessToken'' back.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:22--&amp;gt;&lt;br /&gt;
If the player enters the ''accessToken'' on your site, you can calculate the players ''externalLoginToken'' by&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:23--&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;$externalLoginToken = md5($accessToken.$privateApiKey);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:24--&amp;gt;&lt;br /&gt;
Now you can search the player in your player table generated with the data from ''getMapData'' and - if you found him - log him into your site.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Einzelnachweise == &amp;lt;!--T:25--&amp;gt;&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;/div&gt;</summary>
		<author><name>ITob</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.binary-tools.de/index.php?title=Kingdoms_API&amp;diff=1289</id>
		<title>Kingdoms API</title>
		<link rel="alternate" type="text/html" href="http://wiki.binary-tools.de/index.php?title=Kingdoms_API&amp;diff=1289"/>
		<updated>2020-04-17T16:04:01Z</updated>

		<summary type="html">&lt;p&gt;ITob: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages/&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
{{Kingdoms Topic/en|legends=Legends API}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:2--&amp;gt;&lt;br /&gt;
Travian provides a [https://en.wikipedia.org/wiki/JSON JSON]-[https://en.wikipedia.org/wiki/Application_programming_interface API] to access some information about running game worlds.&amp;lt;ref&amp;gt;https://forum.kingdoms.com/index.php?thread/4099-api-for-external-tools/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Accessing the API == &amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
The base URL for all queries to the API is &amp;lt;pre&amp;gt;https://&amp;amp;lt;gameworld&amp;amp;gt;.kingdoms.com/api/external.php?action=&amp;amp;lt;action&amp;amp;gt;&amp;lt;/pre&amp;gt; (e.g. https:&amp;lt;nowiki /&amp;gt;//com1.kingdoms.com/api/external.php?action=...).&lt;br /&gt;
&lt;br /&gt;
=== Parameters === &amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
Depending on the value of ''action'' further parameters have to be specified. For most requests an [[#Action: requestApiKey |API key]] is required.&lt;br /&gt;
&lt;br /&gt;
=== Response format === &amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
 ╠═ time : int? : [https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#The_ECMAScript_epoch_and_timestamps javascript timestamp] (miliseconds since January 1, 1970, UTC), only present for some actions&lt;br /&gt;
 ╠═ error : object? : Indicates that an error occured. ''response'' will contain an empty array in this case.&lt;br /&gt;
   ╠═ type : string&lt;br /&gt;
   ╠═ number : int : error id&lt;br /&gt;
   ╚═ message : string&lt;br /&gt;
 ╚═ response : object | empty array&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
A question mark after a type indicates that this property is optional. ''object'' refers to the JSON meaning of the term (similar to dictionaries or maps in other languages). In the following sections, only the contents of the response object are shown.&lt;br /&gt;
''string(≤255)'' resp. ''string(32)'' indicates a string with a maximum resp. fixed length.&lt;br /&gt;
The type ''string(int)'' represents an integer that is formatted as a JSON string (surrounded by &amp;quot;) for unknown reasons.&lt;br /&gt;
&lt;br /&gt;
== Action: requestApiKey == &amp;lt;!--T:7--&amp;gt;&lt;br /&gt;
An API key can be requested using this action. The key is required for most other requests.&lt;br /&gt;
&lt;br /&gt;
=== Parameters === &amp;lt;!--T:8--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| email || string(≤255) || valid email address (may be used by Travian staff for questions)&lt;br /&gt;
|-&lt;br /&gt;
| siteName || string(≤255) || name of the tool&lt;br /&gt;
|-&lt;br /&gt;
| siteUrl || string(≤255) || URL of the tool&lt;br /&gt;
|-&lt;br /&gt;
| public || boolean || whether the tool should be available to the public (and may be used by Travian to create e.g. a tool list in the future)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Response === &amp;lt;!--T:9--&amp;gt;&lt;br /&gt;
 ╚═ response&lt;br /&gt;
   ╠═ privateApiKey : string(32)&lt;br /&gt;
   ╚═ publicSiteKey : string(32)&lt;br /&gt;
&lt;br /&gt;
== Action: updateSiteData == &amp;lt;!--T:10--&amp;gt;&lt;br /&gt;
This action can be used to update the data that was provided in the original ''requestApiKey'' request.&lt;br /&gt;
&lt;br /&gt;
=== Parameters === &amp;lt;!--T:11--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| privateApiKey || string(32) || private api key&lt;br /&gt;
|-&lt;br /&gt;
| email || string(≤255) || valid email address (may be used by Travian staff for questions)&lt;br /&gt;
|-&lt;br /&gt;
| siteName || string(≤255) || name of the tool&lt;br /&gt;
|-&lt;br /&gt;
| siteUrl || string(≤255) || URL of the tool&lt;br /&gt;
|-&lt;br /&gt;
| public || boolean || whether the tool should be available to the public (and may be used by Travian to create e.g. a tool list in the future)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Response === &amp;lt;!--T:12--&amp;gt;&lt;br /&gt;
 ╚═ response&lt;br /&gt;
   ╚═ data : boolean : always true (in case of an error, an error object is used instead as descried [[#Response_format|above]])&lt;br /&gt;
&lt;br /&gt;
== Action: getMapData == &amp;lt;!--T:13--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:14--&amp;gt;&lt;br /&gt;
The response to this action contains all available data including information about players, kingdoms and the map.&lt;br /&gt;
&lt;br /&gt;
=== Parameters === &amp;lt;!--T:15--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| privateApiKey || string(32) || private api key&lt;br /&gt;
|-&lt;br /&gt;
| date || string? || may be specified to request old data, the newest available data is returned if omitted, format is DD.MM.YYYY (e.g. 31.12.2020)&lt;br /&gt;
|}&lt;br /&gt;
The API has a bug when querying map data near midnight that leads to data for the wrong day getting returned.&amp;lt;ref&amp;gt;https://forum.kingdoms.com/index.php?thread/20863-suggestions-for-the-json-api/&amp;amp;postID=144462#post144462&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Response === &amp;lt;!--T:16--&amp;gt;&lt;br /&gt;
 ╚═ response&lt;br /&gt;
   ╠═ gameworld : object&lt;br /&gt;
     ╠═ name : string : (e.g. &amp;quot;com1&amp;quot;)&lt;br /&gt;
     ╠═ startTime : int : unix timestamp ('''seconds''' since January 1, 1970, UTC)&lt;br /&gt;
     ╠═ speed : int&lt;br /&gt;
     ╠═ speedTroops : int&lt;br /&gt;
     ╠═ lastUpdateTime : string(int) : unix timestamp, exact timestamp when returned data was generated&lt;br /&gt;
     ╠═ date : int : unix timestamp, start of the day (00:00:00) of returned data&lt;br /&gt;
     ╚═ version : string : always &amp;quot;1.0&amp;quot;&lt;br /&gt;
   ╠═ players : array&lt;br /&gt;
     ╠═ playerId : string(int)&lt;br /&gt;
     ╠═ name : string&lt;br /&gt;
     ╠═ tribeId : string(int) : 1 = Roman, 2 = Teuton, 3 = Gaul&lt;br /&gt;
     ╠═ kingdomId : string(int) : &amp;quot;0&amp;quot; for no kingdom&lt;br /&gt;
     ╠═ treasures : int : if player is king, then number of treasures of the kingdom, otherwise 0&lt;br /&gt;
     ╠═ role : int : 0 = Governor, 1 = King, 2 = Duke, 0 if not part of any kingdom TODO: vice king?&lt;br /&gt;
     ╠═ externalLoginToken : string : see [[#Authentication using publicSiteKey]]&lt;br /&gt;
     ╚═ villages : array&lt;br /&gt;
       ╠═ villageId : string(int)&lt;br /&gt;
       ╠═ x : string(int)&lt;br /&gt;
       ╠═ y : string(int)&lt;br /&gt;
       ╠═ population : string(int)&lt;br /&gt;
       ╠═ name : string&lt;br /&gt;
       ╠═ isMainVillage : boolean&lt;br /&gt;
       ╚═ isCity : boolean&lt;br /&gt;
   ╠═ kingdoms : array&lt;br /&gt;
     ╠═ kingdomId : string(int)&lt;br /&gt;
     ╠═ kingdomTag : string : name of the kingdom&lt;br /&gt;
     ╠═ creationTime : string(int) : unix timestamp, exact time of kingdom creation&lt;br /&gt;
     ╚═ victoryPoints : string(int)&lt;br /&gt;
   ╚═ map                         &lt;br /&gt;
     ╠═ radius : string(int) : current radius of the map&lt;br /&gt;
     ╠═ cells : array&lt;br /&gt;
       ╠═ id : string(int)&lt;br /&gt;
       ╠═ x : string(int)&lt;br /&gt;
       ╠═ y : string(int)&lt;br /&gt;
       ╠═ resType : string : if cell is abandoned valley or village, then resource distribution (e.g. &amp;quot;4446&amp;quot;), otherwise &amp;quot;0&amp;quot; = wilderness, &amp;quot;1&amp;quot; = outside of map radius&lt;br /&gt;
       ╠═ oasis : string(int) : if cell is oasis, then oasis type (TODO), otherwise &amp;quot;0&amp;quot;&lt;br /&gt;
       ╠═ landscape : string(int) : landscape id, see [[#Landscapes]]&lt;br /&gt;
       ╚═ kingdomId : string(int) / int : kingdom id (as string) of the village ('''not''' kingdom of the village's owner), 0 (as int) if not within kingdom borders&lt;br /&gt;
     ╚═ landscapes : object&lt;br /&gt;
       ╚═ [ landscape id : int ] : string : relative path to the corresponding image (e.g. &amp;quot;layout/images/map/wood0_0_0.png&amp;quot;), see [[#Landscapes]]&lt;br /&gt;
&lt;br /&gt;
==== Landscapes ==== &amp;lt;!--T:17--&amp;gt;&lt;br /&gt;
Landscapes are the visualizations used on the ingame map (e.g. trees, mountains, lakes, clay pits). A landscape's id can be mapped to an image path using the ''landscapes'' object in the response. This path is relative to the static game files which can be found at https://cdn.traviantools.net/game/0.95/ for that specific version of the game. Example path: https://cdn.traviantools.net/game/0.95/layout/images/map/wood0_0_0.png&lt;br /&gt;
&lt;br /&gt;
== Authentication using publicSiteKey == &amp;lt;!--T:18--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:19--&amp;gt;&lt;br /&gt;
From https://forum.kingdoms.com/index.php?thread/4099-api-for-external-tools/:&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
With the ''externalLoginToken'' you can authenticate a player - without that the player needs to register for your tool.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:20--&amp;gt;&lt;br /&gt;
In your call to ''requestApiKey'' you were provided a ''privateApiKey'' and a ''publicSiteKey''. The ''privateApiKey'' should be.. guess what.. private. You shouldn't tell this to anyone. You will need it to make requests to our api's. In contrast your ''publicSiteKey'' can be public.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:21--&amp;gt;&lt;br /&gt;
If a player wants to log-in to your site, he needs first an ''accessToken'' for your site. The player needs your ''publicSiteKey''. The player can go to its Settings-Page in T5 and under point &amp;quot;External Tools&amp;quot; click on &amp;quot;Create Access&amp;quot;. He enters your ''publicSiteKey'' and get an ''accessToken'' back.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:22--&amp;gt;&lt;br /&gt;
If the player enters the ''accessToken'' on your site, you can calculate the players ''externalLoginToken'' by&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:23--&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;$externalLoginToken = md5($accessToken.$privateApiKey);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:24--&amp;gt;&lt;br /&gt;
Now you can search the player in your player table generated with the data from ''getMapData'' and - if you found him - log him into your site.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Einzelnachweise == &amp;lt;!--T:25--&amp;gt;&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;/div&gt;</summary>
		<author><name>ITob</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.binary-tools.de/index.php?title=Kingdoms_API&amp;diff=1287</id>
		<title>Kingdoms API</title>
		<link rel="alternate" type="text/html" href="http://wiki.binary-tools.de/index.php?title=Kingdoms_API&amp;diff=1287"/>
		<updated>2020-04-17T16:02:34Z</updated>

		<summary type="html">&lt;p&gt;ITob: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages/&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
{{Kingdoms Topic/en|legends=Legends API}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:2--&amp;gt;&lt;br /&gt;
Travian provides a [https://en.wikipedia.org/wiki/JSON JSON]-[https://en.wikipedia.org/wiki/Application_programming_interface API] to access some information about running game worlds&amp;lt;ref&amp;gt;https://forum.kingdoms.com/index.php?thread/4099-api-for-external-tools/&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Accessing the API == &amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
The base URL for all queries to the API is &amp;lt;pre&amp;gt;https://&amp;amp;lt;gameworld&amp;amp;gt;.kingdoms.com/api/external.php?action=&amp;amp;lt;action&amp;amp;gt;&amp;lt;/pre&amp;gt; (e.g. https:&amp;lt;nowiki /&amp;gt;//com1.kingdoms.com/api/external.php?action=...).&lt;br /&gt;
&lt;br /&gt;
=== Parameters === &amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
Depending on the value of ''action'' further parameters have to be specified. For most requests an [[#Action: requestApiKey |API key]] is required.&lt;br /&gt;
&lt;br /&gt;
=== Response format === &amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
 ╠═ time : int? : [https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#The_ECMAScript_epoch_and_timestamps javascript timestamp] (miliseconds since January 1, 1970, UTC), only present for some actions&lt;br /&gt;
 ╠═ error : object? : Indicates that an error occured. ''response'' will contain an empty array in this case.&lt;br /&gt;
   ╠═ type : string&lt;br /&gt;
   ╠═ number : int : error id&lt;br /&gt;
   ╚═ message : string&lt;br /&gt;
 ╚═ response : object | empty array&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
A question mark after a type indicates that this property is optional. ''object'' refers to the JSON meaning of the term (similar to dictionaries or maps in other languages). In the following sections, only the contents of the response object are shown.&lt;br /&gt;
''string(≤255)'' resp. ''string(32)'' indicates a string with a maximum resp. fixed length.&lt;br /&gt;
The type ''string(int)'' represents an integer that is formatted as a JSON string (surrounded by &amp;quot;) for unknown reasons.&lt;br /&gt;
&lt;br /&gt;
== Action: requestApiKey == &amp;lt;!--T:7--&amp;gt;&lt;br /&gt;
An API key can be requested using this action. The key is required for most other requests.&lt;br /&gt;
&lt;br /&gt;
=== Parameters === &amp;lt;!--T:8--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| email || string(≤255) || valid email address (may be used by Travian staff for questions)&lt;br /&gt;
|-&lt;br /&gt;
| siteName || string(≤255) || name of the tool&lt;br /&gt;
|-&lt;br /&gt;
| siteUrl || string(≤255) || URL of the tool&lt;br /&gt;
|-&lt;br /&gt;
| public || boolean || whether the tool should be available to the public (and may be used by Travian to create e.g. a tool list in the future)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Response === &amp;lt;!--T:9--&amp;gt;&lt;br /&gt;
 ╚═ response&lt;br /&gt;
   ╠═ privateApiKey : string(32)&lt;br /&gt;
   ╚═ publicSiteKey : string(32)&lt;br /&gt;
&lt;br /&gt;
== Action: updateSiteData == &amp;lt;!--T:10--&amp;gt;&lt;br /&gt;
This action can be used to update the data that was provided in the original ''requestApiKey'' request.&lt;br /&gt;
&lt;br /&gt;
=== Parameters === &amp;lt;!--T:11--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| privateApiKey || string(32) || private api key&lt;br /&gt;
|-&lt;br /&gt;
| email || string(≤255) || valid email address (may be used by Travian staff for questions)&lt;br /&gt;
|-&lt;br /&gt;
| siteName || string(≤255) || name of the tool&lt;br /&gt;
|-&lt;br /&gt;
| siteUrl || string(≤255) || URL of the tool&lt;br /&gt;
|-&lt;br /&gt;
| public || boolean || whether the tool should be available to the public (and may be used by Travian to create e.g. a tool list in the future)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Response === &amp;lt;!--T:12--&amp;gt;&lt;br /&gt;
 ╚═ response&lt;br /&gt;
   ╚═ data : boolean : always true (in case of an error, an error object is used instead as descried [[#Response_format|above]])&lt;br /&gt;
&lt;br /&gt;
== Action: getMapData == &amp;lt;!--T:13--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:14--&amp;gt;&lt;br /&gt;
The response to this action contains all available data including information about players, kingdoms and the map.&lt;br /&gt;
&lt;br /&gt;
=== Parameters === &amp;lt;!--T:15--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| privateApiKey || string(32) || private api key&lt;br /&gt;
|-&lt;br /&gt;
| date || string? || may be specified to request old data, the newest available data is returned if omitted, format is DD.MM.YYYY (e.g. 31.12.2020)&lt;br /&gt;
|}&lt;br /&gt;
The API has a bug when querying map data near midnight that leads to data for the wrong day getting returned&amp;lt;ref&amp;gt;https://forum.kingdoms.com/index.php?thread/20863-suggestions-for-the-json-api/&amp;amp;postID=144462#post144462&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Response === &amp;lt;!--T:16--&amp;gt;&lt;br /&gt;
 ╚═ response&lt;br /&gt;
   ╠═ gameworld : object&lt;br /&gt;
     ╠═ name : string : (e.g. &amp;quot;com1&amp;quot;)&lt;br /&gt;
     ╠═ startTime : int : unix timestamp ('''seconds''' since January 1, 1970, UTC)&lt;br /&gt;
     ╠═ speed : int&lt;br /&gt;
     ╠═ speedTroops : int&lt;br /&gt;
     ╠═ lastUpdateTime : string(int) : unix timestamp, exact timestamp when returned data was generated&lt;br /&gt;
     ╠═ date : int : unix timestamp, start of the day (00:00:00) of returned data&lt;br /&gt;
     ╚═ version : string : always &amp;quot;1.0&amp;quot;&lt;br /&gt;
   ╠═ players : array&lt;br /&gt;
     ╠═ playerId : string(int)&lt;br /&gt;
     ╠═ name : string&lt;br /&gt;
     ╠═ tribeId : string(int) : 1 = Roman, 2 = Teuton, 3 = Gaul&lt;br /&gt;
     ╠═ kingdomId : string(int) : &amp;quot;0&amp;quot; for no kingdom&lt;br /&gt;
     ╠═ treasures : int : if player is king, then number of treasures of the kingdom, otherwise 0&lt;br /&gt;
     ╠═ role : int : 0 = Governor, 1 = King, 2 = Duke, 0 if not part of any kingdom TODO: vice king?&lt;br /&gt;
     ╠═ externalLoginToken : string : see [[#Authentication using publicSiteKey]]&lt;br /&gt;
     ╚═ villages : array&lt;br /&gt;
       ╠═ villageId : string(int)&lt;br /&gt;
       ╠═ x : string(int)&lt;br /&gt;
       ╠═ y : string(int)&lt;br /&gt;
       ╠═ population : string(int)&lt;br /&gt;
       ╠═ name : string&lt;br /&gt;
       ╠═ isMainVillage : boolean&lt;br /&gt;
       ╚═ isCity : boolean&lt;br /&gt;
   ╠═ kingdoms : array&lt;br /&gt;
     ╠═ kingdomId : string(int)&lt;br /&gt;
     ╠═ kingdomTag : string : name of the kingdom&lt;br /&gt;
     ╠═ creationTime : string(int) : unix timestamp, exact time of kingdom creation&lt;br /&gt;
     ╚═ victoryPoints : string(int)&lt;br /&gt;
   ╚═ map                         &lt;br /&gt;
     ╠═ radius : string(int) : current radius of the map&lt;br /&gt;
     ╠═ cells : array&lt;br /&gt;
       ╠═ id : string(int)&lt;br /&gt;
       ╠═ x : string(int)&lt;br /&gt;
       ╠═ y : string(int)&lt;br /&gt;
       ╠═ resType : string : if cell is abandoned valley or village, then resource distribution (e.g. &amp;quot;4446&amp;quot;), otherwise &amp;quot;0&amp;quot; = wilderness, &amp;quot;1&amp;quot; = outside of map radius&lt;br /&gt;
       ╠═ oasis : string(int) : if cell is oasis, then oasis type (TODO), otherwise &amp;quot;0&amp;quot;&lt;br /&gt;
       ╠═ landscape : string(int) : landscape id, see [[#Landscapes]]&lt;br /&gt;
       ╚═ kingdomId : string(int) / int : kingdom id (as string) of the village ('''not''' kingdom of the village's owner), 0 (as int) if not within kingdom borders&lt;br /&gt;
     ╚═ landscapes : object&lt;br /&gt;
       ╚═ [ landscape id : int ] : string : relative path to the corresponding image (e.g. &amp;quot;layout/images/map/wood0_0_0.png&amp;quot;), see [[#Landscapes]]&lt;br /&gt;
&lt;br /&gt;
==== Landscapes ==== &amp;lt;!--T:17--&amp;gt;&lt;br /&gt;
Landscapes are the visualizations used on the ingame map (e.g. trees, mountains, lakes, clay pits). A landscape's id can be mapped to an image path using the ''landscapes'' object in the response. This path is relative to the static game files which can be found at https://cdn.traviantools.net/game/0.95/ for that specific version of the game. Example path: https://cdn.traviantools.net/game/0.95/layout/images/map/wood0_0_0.png&lt;br /&gt;
&lt;br /&gt;
== Authentication using publicSiteKey == &amp;lt;!--T:18--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:19--&amp;gt;&lt;br /&gt;
From https://forum.kingdoms.com/index.php?thread/4099-api-for-external-tools/:&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
With the ''externalLoginToken'' you can authenticate a player - without that the player needs to register for your tool.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:20--&amp;gt;&lt;br /&gt;
In your call to ''requestApiKey'' you were provided a ''privateApiKey'' and a ''publicSiteKey''. The ''privateApiKey'' should be.. guess what.. private. You shouldn't tell this to anyone. You will need it to make requests to our api's. In contrast your ''publicSiteKey'' can be public.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:21--&amp;gt;&lt;br /&gt;
If a player wants to log-in to your site, he needs first an ''accessToken'' for your site. The player needs your ''publicSiteKey''. The player can go to its Settings-Page in T5 and under point &amp;quot;External Tools&amp;quot; click on &amp;quot;Create Access&amp;quot;. He enters your ''publicSiteKey'' and get an ''accessToken'' back.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:22--&amp;gt;&lt;br /&gt;
If the player enters the ''accessToken'' on your site, you can calculate the players ''externalLoginToken'' by&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:23--&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;$externalLoginToken = md5($accessToken.$privateApiKey);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:24--&amp;gt;&lt;br /&gt;
Now you can search the player in your player table generated with the data from ''getMapData'' and - if you found him - log him into your site.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Einzelnachweise == &amp;lt;!--T:25--&amp;gt;&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;/div&gt;</summary>
		<author><name>ITob</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.binary-tools.de/index.php?title=Kingdoms_API&amp;diff=1284</id>
		<title>Kingdoms API</title>
		<link rel="alternate" type="text/html" href="http://wiki.binary-tools.de/index.php?title=Kingdoms_API&amp;diff=1284"/>
		<updated>2020-04-17T16:01:04Z</updated>

		<summary type="html">&lt;p&gt;ITob: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages/&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
{{Kingdoms Topic/en|legends=Legends API}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:2--&amp;gt;&lt;br /&gt;
Travian provides a [https://en.wikipedia.org/wiki/JSON JSON]-[https://en.wikipedia.org/wiki/Application_programming_interface API] to access some information about running game worlds&amp;lt;ref&amp;gt;https://forum.kingdoms.com/index.php?thread/4099-api-for-external-tools/&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Accessing the API == &amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
The base URL for all queries to the API is &amp;lt;pre&amp;gt;https://&amp;amp;lt;gameworld&amp;amp;gt;.kingdoms.com/api/external.php?action=&amp;amp;lt;action&amp;amp;gt;&amp;lt;/pre&amp;gt; (e.g. https:&amp;lt;nowiki /&amp;gt;//com1.kingdoms.com/api/external.php?action=...).&lt;br /&gt;
&lt;br /&gt;
=== Parameters === &amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
Depending on the value of ''action'' further parameters have to be specified. For most requests an [[#Action: requestApiKey |API key]] is required.&lt;br /&gt;
&lt;br /&gt;
=== Response format === &amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
 ╠═ time : int? : [https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#The_ECMAScript_epoch_and_timestamps javascript timestamp] (miliseconds since January 1, 1970, UTC), only present for some actions&lt;br /&gt;
 ╠═ error : object? : Indicates that an error occured. ''response'' will contain an empty array in this case.&lt;br /&gt;
   ╠═ type : string&lt;br /&gt;
   ╠═ number : int : error id&lt;br /&gt;
   ╚═ message : string&lt;br /&gt;
 ╚═ response : object | empty array&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
A question mark after a type indicates that this property is optional. ''object'' refers to the JSON meaning of the term (similar to dictionaries or maps in other languages). In the following sections, only the contents of the response object are shown.&lt;br /&gt;
''string(≤255)'' resp. ''string(32)'' indicates a string with a maximum resp. fixed length.&lt;br /&gt;
The type ''string(int)'' represents an integer that is formatted as a JSON string (surrounded by &amp;quot;) for unknown reasons.&lt;br /&gt;
&lt;br /&gt;
== Action: requestApiKey == &amp;lt;!--T:7--&amp;gt;&lt;br /&gt;
An API key can be requested using this action. The key is required for most other requests.&lt;br /&gt;
&lt;br /&gt;
=== Parameters === &amp;lt;!--T:8--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| email || string(≤255) || valid email address (may be used by Travian staff for questions)&lt;br /&gt;
|-&lt;br /&gt;
| siteName || string(≤255) || name of the tool&lt;br /&gt;
|-&lt;br /&gt;
| siteUrl || string(≤255) || URL of the tool&lt;br /&gt;
|-&lt;br /&gt;
| public || boolean || whether the tool should be available to the public (and may be used by Travian to create e.g. a tool list in the future)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Response === &amp;lt;!--T:9--&amp;gt;&lt;br /&gt;
 ╚═ response&lt;br /&gt;
   ╠═ privateApiKey : string(32)&lt;br /&gt;
   ╚═ publicSiteKey : string(32)&lt;br /&gt;
&lt;br /&gt;
== Action: updateSiteData == &amp;lt;!--T:10--&amp;gt;&lt;br /&gt;
This action can be used to update the data that was provided in the original ''requestApiKey'' request.&lt;br /&gt;
&lt;br /&gt;
=== Parameters === &amp;lt;!--T:11--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| privateApiKey || string(32) || private api key&lt;br /&gt;
|-&lt;br /&gt;
| email || string(≤255) || valid email address (may be used by Travian staff for questions)&lt;br /&gt;
|-&lt;br /&gt;
| siteName || string(≤255) || name of the tool&lt;br /&gt;
|-&lt;br /&gt;
| siteUrl || string(≤255) || URL of the tool&lt;br /&gt;
|-&lt;br /&gt;
| public || boolean || whether the tool should be available to the public (and may be used by Travian to create e.g. a tool list in the future)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Response === &amp;lt;!--T:12--&amp;gt;&lt;br /&gt;
 ╚═ response&lt;br /&gt;
   ╚═ data : boolean : always true (in case of an error, an error object is used instead as descried [[#Response_format|above]])&lt;br /&gt;
&lt;br /&gt;
== Action: getMapData == &amp;lt;!--T:13--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:14--&amp;gt;&lt;br /&gt;
The response to this action contains all available data including information about players, kingdoms and the map.&lt;br /&gt;
&lt;br /&gt;
=== Parameters === &amp;lt;!--T:15--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| privateApiKey || string(32) || private api key&lt;br /&gt;
|-&lt;br /&gt;
| date || string? || may be specified to request old data, the newest available data is returned if omitted, format is DD.MM.YYYY (e.g. 31.12.2020)&lt;br /&gt;
|}&lt;br /&gt;
The API has a bug when querying data near midnight &amp;lt;ref&amp;gt;https://forum.kingdoms.com/index.php?thread/20863-suggestions-for-the-json-api/&amp;amp;postID=144462#post144462&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Response === &amp;lt;!--T:16--&amp;gt;&lt;br /&gt;
 ╚═ response&lt;br /&gt;
   ╠═ gameworld : object&lt;br /&gt;
     ╠═ name : string : (e.g. &amp;quot;com1&amp;quot;)&lt;br /&gt;
     ╠═ startTime : int : unix timestamp ('''seconds''' since January 1, 1970, UTC)&lt;br /&gt;
     ╠═ speed : int&lt;br /&gt;
     ╠═ speedTroops : int&lt;br /&gt;
     ╠═ lastUpdateTime : string(int) : unix timestamp, exact timestamp when returned data was generated&lt;br /&gt;
     ╠═ date : int : unix timestamp, start of the day (00:00:00) of returned data&lt;br /&gt;
     ╚═ version : string : always &amp;quot;1.0&amp;quot;&lt;br /&gt;
   ╠═ players : array&lt;br /&gt;
     ╠═ playerId : string(int)&lt;br /&gt;
     ╠═ name : string&lt;br /&gt;
     ╠═ tribeId : string(int) : 1 = Roman, 2 = Teuton, 3 = Gaul&lt;br /&gt;
     ╠═ kingdomId : string(int) : &amp;quot;0&amp;quot; for no kingdom&lt;br /&gt;
     ╠═ treasures : int : if player is king, then number of treasures of the kingdom, otherwise 0&lt;br /&gt;
     ╠═ role : int : 0 = Governor, 1 = King, 2 = Duke, 0 if not part of any kingdom TODO: vice king?&lt;br /&gt;
     ╠═ externalLoginToken : string : see [[#Authentication using publicSiteKey]]&lt;br /&gt;
     ╚═ villages : array&lt;br /&gt;
       ╠═ villageId : string(int)&lt;br /&gt;
       ╠═ x : string(int)&lt;br /&gt;
       ╠═ y : string(int)&lt;br /&gt;
       ╠═ population : string(int)&lt;br /&gt;
       ╠═ name : string&lt;br /&gt;
       ╠═ isMainVillage : boolean&lt;br /&gt;
       ╚═ isCity : boolean&lt;br /&gt;
   ╠═ kingdoms : array&lt;br /&gt;
     ╠═ kingdomId : string(int)&lt;br /&gt;
     ╠═ kingdomTag : string : name of the kingdom&lt;br /&gt;
     ╠═ creationTime : string(int) : unix timestamp, exact time of kingdom creation&lt;br /&gt;
     ╚═ victoryPoints : string(int)&lt;br /&gt;
   ╚═ map                         &lt;br /&gt;
     ╠═ radius : string(int) : current radius of the map&lt;br /&gt;
     ╠═ cells : array&lt;br /&gt;
       ╠═ id : string(int)&lt;br /&gt;
       ╠═ x : string(int)&lt;br /&gt;
       ╠═ y : string(int)&lt;br /&gt;
       ╠═ resType : string : if cell is abandoned valley or village, then resource distribution (e.g. &amp;quot;4446&amp;quot;), otherwise &amp;quot;0&amp;quot; = wilderness, &amp;quot;1&amp;quot; = outside of map radius&lt;br /&gt;
       ╠═ oasis : string(int) : if cell is oasis, then oasis type (TODO), otherwise &amp;quot;0&amp;quot;&lt;br /&gt;
       ╠═ landscape : string(int) : landscape id, see [[#Landscapes]]&lt;br /&gt;
       ╚═ kingdomId : string(int) / int : kingdom id (as string) of the village ('''not''' kingdom of the village's owner), 0 (as int) if not within kingdom borders&lt;br /&gt;
     ╚═ landscapes : object&lt;br /&gt;
       ╚═ [ landscape id : int ] : string : relative path to the corresponding image (e.g. &amp;quot;layout/images/map/wood0_0_0.png&amp;quot;), see [[#Landscapes]]&lt;br /&gt;
&lt;br /&gt;
==== Landscapes ==== &amp;lt;!--T:17--&amp;gt;&lt;br /&gt;
Landscapes are the visualizations used on the ingame map (e.g. trees, mountains, lakes, clay pits). A landscape's id can be mapped to an image path using the ''landscapes'' object in the response. This path is relative to the static game files which can be found at https://cdn.traviantools.net/game/0.95/ for that specific version of the game. Example path: https://cdn.traviantools.net/game/0.95/layout/images/map/wood0_0_0.png&lt;br /&gt;
&lt;br /&gt;
== Authentication using publicSiteKey == &amp;lt;!--T:18--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:19--&amp;gt;&lt;br /&gt;
From https://forum.kingdoms.com/index.php?thread/4099-api-for-external-tools/:&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
With the ''externalLoginToken'' you can authenticate a player - without that the player needs to register for your tool.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:20--&amp;gt;&lt;br /&gt;
In your call to ''requestApiKey'' you were provided a ''privateApiKey'' and a ''publicSiteKey''. The ''privateApiKey'' should be.. guess what.. private. You shouldn't tell this to anyone. You will need it to make requests to our api's. In contrast your ''publicSiteKey'' can be public.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:21--&amp;gt;&lt;br /&gt;
If a player wants to log-in to your site, he needs first an ''accessToken'' for your site. The player needs your ''publicSiteKey''. The player can go to its Settings-Page in T5 and under point &amp;quot;External Tools&amp;quot; click on &amp;quot;Create Access&amp;quot;. He enters your ''publicSiteKey'' and get an ''accessToken'' back.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:22--&amp;gt;&lt;br /&gt;
If the player enters the ''accessToken'' on your site, you can calculate the players ''externalLoginToken'' by&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:23--&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;$externalLoginToken = md5($accessToken.$privateApiKey);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:24--&amp;gt;&lt;br /&gt;
Now you can search the player in your player table generated with the data from ''getMapData'' and - if you found him - log him into your site.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Einzelnachweise == &amp;lt;!--T:25--&amp;gt;&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;/div&gt;</summary>
		<author><name>ITob</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.binary-tools.de/index.php?title=Kingdoms_API&amp;diff=1281</id>
		<title>Kingdoms API</title>
		<link rel="alternate" type="text/html" href="http://wiki.binary-tools.de/index.php?title=Kingdoms_API&amp;diff=1281"/>
		<updated>2020-04-17T15:58:14Z</updated>

		<summary type="html">&lt;p&gt;ITob: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages/&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
{{Kingdoms Topic/en|legends=Legends API}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:2--&amp;gt;&lt;br /&gt;
Travian provides a [https://en.wikipedia.org/wiki/JSON JSON]-[https://en.wikipedia.org/wiki/Application_programming_interface API] to access some information about running game worlds&amp;lt;ref&amp;gt;https://forum.kingdoms.com/index.php?thread/4099-api-for-external-tools/&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Accessing the API == &amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
The base URL for all queries to the API is &amp;lt;pre&amp;gt;https://&amp;amp;lt;gameworld&amp;amp;gt;.kingdoms.com/api/external.php?action=&amp;amp;lt;action&amp;amp;gt;&amp;lt;/pre&amp;gt; (e.g. https:&amp;lt;nowiki /&amp;gt;//com1.kingdoms.com/api/external.php?action=...).&lt;br /&gt;
&lt;br /&gt;
=== Parameters === &amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
Depending on the value of ''action'' further parameters have to be specified. For most requests an [[#Action: requestApiKey |API key]] is required.&lt;br /&gt;
&lt;br /&gt;
=== Response format === &amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
 ╠═ time : int? : [https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#The_ECMAScript_epoch_and_timestamps javascript timestamp] (miliseconds since January 1, 1970, UTC), only present for some actions&lt;br /&gt;
 ╠═ error : object? : Indicates that an error occured. ''response'' will contain an empty array in this case.&lt;br /&gt;
   ╠═ type : string&lt;br /&gt;
   ╠═ number : int : error id&lt;br /&gt;
   ╚═ message : string&lt;br /&gt;
 ╚═ response : object | empty array&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
A question mark after a type indicates that this property is optional. ''object'' refers to the JSON meaning of the term (similar to dictionaries or maps in other languages). In the following sections, only the contents of the response object are shown.&lt;br /&gt;
''string(≤255)'' resp. ''string(32)'' indicates a string with a maximum resp. fixed length.&lt;br /&gt;
The type ''string(int)'' represents an integer that is formatted as a JSON string (surrounded by &amp;quot;) for unknown reasons.&lt;br /&gt;
&lt;br /&gt;
== Action: requestApiKey == &amp;lt;!--T:7--&amp;gt;&lt;br /&gt;
An API key can be requested using this action. The key is required for most other requests.&lt;br /&gt;
&lt;br /&gt;
=== Parameters === &amp;lt;!--T:8--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| email || string(≤255) || valid email address (may be used by Travian staff for questions)&lt;br /&gt;
|-&lt;br /&gt;
| siteName || string(≤255) || name of the tool&lt;br /&gt;
|-&lt;br /&gt;
| siteUrl || string(≤255) || URL of the tool&lt;br /&gt;
|-&lt;br /&gt;
| public || boolean || whether the tool should be available to the public (and may be used by Travian to create e.g. a tool list in the future)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Response === &amp;lt;!--T:9--&amp;gt;&lt;br /&gt;
 ╚═ response&lt;br /&gt;
   ╠═ privateApiKey : string(32)&lt;br /&gt;
   ╚═ publicSiteKey : string(32)&lt;br /&gt;
&lt;br /&gt;
== Action: updateSiteData == &amp;lt;!--T:10--&amp;gt;&lt;br /&gt;
This action can be used to update the data that was provided in the original ''requestApiKey'' request.&lt;br /&gt;
&lt;br /&gt;
=== Parameters === &amp;lt;!--T:11--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| privateApiKey || string(32) || private api key&lt;br /&gt;
|-&lt;br /&gt;
| email || string(≤255) || valid email address (may be used by Travian staff for questions)&lt;br /&gt;
|-&lt;br /&gt;
| siteName || string(≤255) || name of the tool&lt;br /&gt;
|-&lt;br /&gt;
| siteUrl || string(≤255) || URL of the tool&lt;br /&gt;
|-&lt;br /&gt;
| public || boolean || whether the tool should be available to the public (and may be used by Travian to create e.g. a tool list in the future)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Response === &amp;lt;!--T:12--&amp;gt;&lt;br /&gt;
 ╚═ response&lt;br /&gt;
   ╚═ data : boolean : always true (in case of an error, an error object is used instead as descried [[#Response_format|above]])&lt;br /&gt;
&lt;br /&gt;
== Action: getMapData == &amp;lt;!--T:13--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:14--&amp;gt;&lt;br /&gt;
The response to this action contains all available data including information about players, kingdoms and the map.&lt;br /&gt;
&lt;br /&gt;
=== Parameters === &amp;lt;!--T:15--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| privateApiKey || string(32) || private api key&lt;br /&gt;
|-&lt;br /&gt;
| date || string? || may be specified to request old data, the newest available data is returned if omitted, format is DD.MM.YYYY (e.g. 31.12.2020)&lt;br /&gt;
|}&lt;br /&gt;
The API has a bug when querying data near midnight, see https://forum.kingdoms.com/index.php?thread/20863-suggestions-for-the-json-api/&amp;amp;postID=144462#post144462.&lt;br /&gt;
&lt;br /&gt;
=== Response === &amp;lt;!--T:16--&amp;gt;&lt;br /&gt;
 ╚═ response&lt;br /&gt;
   ╠═ gameworld : object&lt;br /&gt;
     ╠═ name : string : (e.g. &amp;quot;com1&amp;quot;)&lt;br /&gt;
     ╠═ startTime : int : unix timestamp ('''seconds''' since January 1, 1970, UTC)&lt;br /&gt;
     ╠═ speed : int&lt;br /&gt;
     ╠═ speedTroops : int&lt;br /&gt;
     ╠═ lastUpdateTime : string(int) : unix timestamp, exact timestamp when returned data was generated&lt;br /&gt;
     ╠═ date : int : unix timestamp, start of the day (00:00:00) of returned data&lt;br /&gt;
     ╚═ version : string : always &amp;quot;1.0&amp;quot;&lt;br /&gt;
   ╠═ players : array&lt;br /&gt;
     ╠═ playerId : string(int)&lt;br /&gt;
     ╠═ name : string&lt;br /&gt;
     ╠═ tribeId : string(int) : 1 = Roman, 2 = Teuton, 3 = Gaul&lt;br /&gt;
     ╠═ kingdomId : string(int) : &amp;quot;0&amp;quot; for no kingdom&lt;br /&gt;
     ╠═ treasures : int : if player is king, then number of treasures of the kingdom, otherwise 0&lt;br /&gt;
     ╠═ role : int : 0 = Governor, 1 = King, 2 = Duke, 0 if not part of any kingdom TODO: vice king?&lt;br /&gt;
     ╠═ externalLoginToken : string : see [[#Authentication using publicSiteKey]]&lt;br /&gt;
     ╚═ villages : array&lt;br /&gt;
       ╠═ villageId : string(int)&lt;br /&gt;
       ╠═ x : string(int)&lt;br /&gt;
       ╠═ y : string(int)&lt;br /&gt;
       ╠═ population : string(int)&lt;br /&gt;
       ╠═ name : string&lt;br /&gt;
       ╠═ isMainVillage : boolean&lt;br /&gt;
       ╚═ isCity : boolean&lt;br /&gt;
   ╠═ kingdoms : array&lt;br /&gt;
     ╠═ kingdomId : string(int)&lt;br /&gt;
     ╠═ kingdomTag : string : name of the kingdom&lt;br /&gt;
     ╠═ creationTime : string(int) : unix timestamp, exact time of kingdom creation&lt;br /&gt;
     ╚═ victoryPoints : string(int)&lt;br /&gt;
   ╚═ map                         &lt;br /&gt;
     ╠═ radius : string(int) : current radius of the map&lt;br /&gt;
     ╠═ cells : array&lt;br /&gt;
       ╠═ id : string(int)&lt;br /&gt;
       ╠═ x : string(int)&lt;br /&gt;
       ╠═ y : string(int)&lt;br /&gt;
       ╠═ resType : string : if cell is abandoned valley or village, then resource distribution (e.g. &amp;quot;4446&amp;quot;), otherwise &amp;quot;0&amp;quot; = wilderness, &amp;quot;1&amp;quot; = outside of map radius&lt;br /&gt;
       ╠═ oasis : string(int) : if cell is oasis, then oasis type (TODO), otherwise &amp;quot;0&amp;quot;&lt;br /&gt;
       ╠═ landscape : string(int) : landscape id, see [[#Landscapes]]&lt;br /&gt;
       ╚═ kingdomId : string(int) / int : kingdom id (as string) of the village ('''not''' kingdom of the village's owner), 0 (as int) if not within kingdom borders&lt;br /&gt;
     ╚═ landscapes : object&lt;br /&gt;
       ╚═ [ landscape id : int ] : string : relative path to the corresponding image (e.g. &amp;quot;layout/images/map/wood0_0_0.png&amp;quot;), see [[#Landscapes]]&lt;br /&gt;
&lt;br /&gt;
==== Landscapes ==== &amp;lt;!--T:17--&amp;gt;&lt;br /&gt;
Landscapes are the visualizations used on the ingame map (e.g. trees, mountains, lakes, clay pits). A landscape's id can be mapped to an image path using the ''landscapes'' object in the response. This path is relative to the static game files which can be found at https://cdn.traviantools.net/game/0.95/ for that specific version of the game. Example path: https://cdn.traviantools.net/game/0.95/layout/images/map/wood0_0_0.png&lt;br /&gt;
&lt;br /&gt;
== Authentication using publicSiteKey == &amp;lt;!--T:18--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:19--&amp;gt;&lt;br /&gt;
From https://forum.kingdoms.com/index.php?thread/4099-api-for-external-tools/:&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
With the ''externalLoginToken'' you can authenticate a player - without that the player needs to register for your tool.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:20--&amp;gt;&lt;br /&gt;
In your call to ''requestApiKey'' you were provided a ''privateApiKey'' and a ''publicSiteKey''. The ''privateApiKey'' should be.. guess what.. private. You shouldn't tell this to anyone. You will need it to make requests to our api's. In contrast your ''publicSiteKey'' can be public.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:21--&amp;gt;&lt;br /&gt;
If a player wants to log-in to your site, he needs first an ''accessToken'' for your site. The player needs your ''publicSiteKey''. The player can go to its Settings-Page in T5 and under point &amp;quot;External Tools&amp;quot; click on &amp;quot;Create Access&amp;quot;. He enters your ''publicSiteKey'' and get an ''accessToken'' back.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:22--&amp;gt;&lt;br /&gt;
If the player enters the ''accessToken'' on your site, you can calculate the players ''externalLoginToken'' by&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:23--&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;$externalLoginToken = md5($accessToken.$privateApiKey);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:24--&amp;gt;&lt;br /&gt;
Now you can search the player in your player table generated with the data from ''getMapData'' and - if you found him - log him into your site.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Einzelnachweise == &amp;lt;!--T:25--&amp;gt;&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;/div&gt;</summary>
		<author><name>ITob</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.binary-tools.de/index.php?title=Kingdoms_API&amp;diff=1252</id>
		<title>Kingdoms API</title>
		<link rel="alternate" type="text/html" href="http://wiki.binary-tools.de/index.php?title=Kingdoms_API&amp;diff=1252"/>
		<updated>2020-04-17T15:54:32Z</updated>

		<summary type="html">&lt;p&gt;ITob: Created page with &amp;quot;&amp;lt;languages/&amp;gt; &amp;lt;translate&amp;gt;  {{Kingdoms Topic/en|legends=Legends API}}  Travian provides a [https://en.wikipedia.org/wiki/JSON JSON]-[https://en.wikipedia.org/wiki/Application_pr...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages/&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Kingdoms Topic/en|legends=Legends API}}&lt;br /&gt;
&lt;br /&gt;
Travian provides a [https://en.wikipedia.org/wiki/JSON JSON]-[https://en.wikipedia.org/wiki/Application_programming_interface API] to access some information about running game worlds&amp;lt;ref&amp;gt;https://forum.kingdoms.com/index.php?thread/4099-api-for-external-tools/&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Accessing the API ==&lt;br /&gt;
The base URL for all queries to the API is &amp;lt;pre&amp;gt;https://&amp;amp;lt;gameworld&amp;amp;gt;.kingdoms.com/api/external.php?action=&amp;amp;lt;action&amp;amp;gt;&amp;lt;/pre&amp;gt; (e.g. https:&amp;lt;nowiki /&amp;gt;//com1.kingdoms.com/api/external.php?action=...).&lt;br /&gt;
&lt;br /&gt;
=== Parameters ===&lt;br /&gt;
Depending on the value of ''action'' further parameters have to be specified. For most requests an [[#Action: requestApiKey |API key]] is required.&lt;br /&gt;
&lt;br /&gt;
=== Response format ===&lt;br /&gt;
 ╠═ time : int? : [https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#The_ECMAScript_epoch_and_timestamps javascript timestamp] (miliseconds since January 1, 1970, UTC), only present for some actions&lt;br /&gt;
 ╠═ error : object? : Indicates that an error occured. ''response'' will contain an empty array in this case.&lt;br /&gt;
   ╠═ type : string&lt;br /&gt;
   ╠═ number : int : error id&lt;br /&gt;
   ╚═ message : string&lt;br /&gt;
 ╚═ response : object | empty array&lt;br /&gt;
&lt;br /&gt;
A question mark after a type indicates that this property is optional. ''object'' refers to the JSON meaning of the term (similar to dictionaries or maps in other languages). In the following sections, only the contents of the response object are shown.&lt;br /&gt;
''string(≤255)'' resp. ''string(32)'' indicates a string with a maximum resp. fixed length.&lt;br /&gt;
The type ''string(int)'' represents an integer that is formatted as a JSON string (surrounded by &amp;quot;) for unknown reasons.&lt;br /&gt;
&lt;br /&gt;
== Action: requestApiKey ==&lt;br /&gt;
An API key can be requested using this action. The key is required for most other requests.&lt;br /&gt;
&lt;br /&gt;
=== Parameters ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| email || string(≤255) || valid email address (may be used by Travian staff for questions)&lt;br /&gt;
|-&lt;br /&gt;
| siteName || string(≤255) || name of the tool&lt;br /&gt;
|-&lt;br /&gt;
| siteUrl || string(≤255) || URL of the tool&lt;br /&gt;
|-&lt;br /&gt;
| public || boolean || whether the tool should be available to the public (and may be used by Travian to create e.g. a tool list in the future)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Response ===&lt;br /&gt;
 ╚═ response&lt;br /&gt;
   ╠═ privateApiKey : string(32)&lt;br /&gt;
   ╚═ publicSiteKey : string(32)&lt;br /&gt;
&lt;br /&gt;
== Action: updateSiteData ==&lt;br /&gt;
This action can be used to update the data that was provided in the original ''requestApiKey'' request.&lt;br /&gt;
&lt;br /&gt;
=== Parameters ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| privateApiKey || string(32) || private api key&lt;br /&gt;
|-&lt;br /&gt;
| email || string(≤255) || valid email address (may be used by Travian staff for questions)&lt;br /&gt;
|-&lt;br /&gt;
| siteName || string(≤255) || name of the tool&lt;br /&gt;
|-&lt;br /&gt;
| siteUrl || string(≤255) || URL of the tool&lt;br /&gt;
|-&lt;br /&gt;
| public || boolean || whether the tool should be available to the public (and may be used by Travian to create e.g. a tool list in the future)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Response ===&lt;br /&gt;
 ╚═ response&lt;br /&gt;
   ╚═ data : boolean : always true (in case of an error, an error object is used instead as descried [[#Response_format|above]])&lt;br /&gt;
&lt;br /&gt;
== Action: getMapData ==&lt;br /&gt;
&lt;br /&gt;
The response to this action contains&lt;br /&gt;
&lt;br /&gt;
=== Parameters ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| privateApiKey || string(32) || private api key&lt;br /&gt;
|-&lt;br /&gt;
| date || string? || may be specified to request old data, the newest available data is returned if omitted, format is DD.MM.YYYY (e.g. 31.12.2020)&lt;br /&gt;
|}&lt;br /&gt;
The API has a bug when querying data near midnight, see https://forum.kingdoms.com/index.php?thread/20863-suggestions-for-the-json-api/&amp;amp;postID=144462#post144462.&lt;br /&gt;
&lt;br /&gt;
=== Response ===&lt;br /&gt;
 ╚═ response&lt;br /&gt;
   ╠═ gameworld : object&lt;br /&gt;
     ╠═ name : string : (e.g. &amp;quot;com1&amp;quot;)&lt;br /&gt;
     ╠═ startTime : int : unix timestamp ('''seconds''' since January 1, 1970, UTC)&lt;br /&gt;
     ╠═ speed : int&lt;br /&gt;
     ╠═ speedTroops : int&lt;br /&gt;
     ╠═ lastUpdateTime : string(int) : unix timestamp, exact timestamp when returned data was generated&lt;br /&gt;
     ╠═ date : int : unix timestamp, start of the day (00:00:00) of returned data&lt;br /&gt;
     ╚═ version : string : always &amp;quot;1.0&amp;quot;&lt;br /&gt;
   ╠═ players : array&lt;br /&gt;
     ╠═ playerId : string(int)&lt;br /&gt;
     ╠═ name : string&lt;br /&gt;
     ╠═ tribeId : string(int) : 1 = Roman, 2 = Teuton, 3 = Gaul&lt;br /&gt;
     ╠═ kingdomId : string(int) : &amp;quot;0&amp;quot; for no kingdom&lt;br /&gt;
     ╠═ treasures : int : if player is king, then number of treasures of the kingdom, otherwise 0&lt;br /&gt;
     ╠═ role : int : 0 = Governor, 1 = King, 2 = Duke, 0 if not part of any kingdom TODO: vice king?&lt;br /&gt;
     ╠═ externalLoginToken : string : see [[#Authentication using publicSiteKey]]&lt;br /&gt;
     ╚═ villages : array&lt;br /&gt;
       ╠═ villageId : string(int)&lt;br /&gt;
       ╠═ x : string(int)&lt;br /&gt;
       ╠═ y : string(int)&lt;br /&gt;
       ╠═ population : string(int)&lt;br /&gt;
       ╠═ name : string&lt;br /&gt;
       ╠═ isMainVillage : boolean&lt;br /&gt;
       ╚═ isCity : boolean&lt;br /&gt;
   ╠═ kingdoms : array&lt;br /&gt;
     ╠═ kingdomId : string(int)&lt;br /&gt;
     ╠═ kingdomTag : string : name of the kingdom&lt;br /&gt;
     ╠═ creationTime : string(int) : unix timestamp, exact time of kingdom creation&lt;br /&gt;
     ╚═ victoryPoints : string(int)&lt;br /&gt;
   ╚═ map                         &lt;br /&gt;
     ╠═ radius : string(int) : current radius of the map&lt;br /&gt;
     ╠═ cells : array&lt;br /&gt;
       ╠═ id : string(int)&lt;br /&gt;
       ╠═ x : string(int)&lt;br /&gt;
       ╠═ y : string(int)&lt;br /&gt;
       ╠═ resType : string : if cell is abandoned valley or village, then resource distribution (e.g. &amp;quot;4446&amp;quot;), otherwise &amp;quot;0&amp;quot; = wilderness, &amp;quot;1&amp;quot; = outside of map radius&lt;br /&gt;
       ╠═ oasis : string(int) : if cell is oasis, then oasis type (TODO), otherwise &amp;quot;0&amp;quot;&lt;br /&gt;
       ╠═ landscape : string(int) : landscape id, see [[#Landscapes]]&lt;br /&gt;
       ╚═ kingdomId : string(int) / int : kingdom id (as string) of the village ('''not''' kingdom of the village's owner), 0 (as int) if not within kingdom borders&lt;br /&gt;
     ╚═ landscapes : object&lt;br /&gt;
       ╚═ [ landscape id : int ] : string : relative path to the corresponding image (e.g. &amp;quot;layout/images/map/wood0_0_0.png&amp;quot;), see [[#Landscapes]]&lt;br /&gt;
&lt;br /&gt;
==== Landscapes ====&lt;br /&gt;
Landscapes are the visualizations used on the ingame map (e.g. trees, mountains, lakes, clay pits). A landscape's id can be mapped to an image path using the ''landscapes'' object in the response. This path is relative to the static game files which can be found at https://cdn.traviantools.net/game/0.95/ for that specific version of the game. Example path: https://cdn.traviantools.net/game/0.95/layout/images/map/wood0_0_0.png&lt;br /&gt;
&lt;br /&gt;
== Authentication using publicSiteKey ==&lt;br /&gt;
&lt;br /&gt;
From https://forum.kingdoms.com/index.php?thread/4099-api-for-external-tools/:&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
With the ''externalLoginToken'' you can authenticate a player - without that the player needs to register for your tool.&lt;br /&gt;
&lt;br /&gt;
In your call to ''requestApiKey'' you were provided a ''privateApiKey'' and a ''publicSiteKey''. The ''privateApiKey'' should be.. guess what.. private. You shouldn't tell this to anyone. You will need it to make requests to our api's. In contrast your ''publicSiteKey'' can be public.&lt;br /&gt;
&lt;br /&gt;
If a player wants to log-in to your site, he needs first an ''accessToken'' for your site. The player needs your ''publicSiteKey''. The player can go to its Settings-Page in T5 and under point &amp;quot;External Tools&amp;quot; click on &amp;quot;Create Access&amp;quot;. He enters your ''publicSiteKey'' and get an ''accessToken'' back.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the player enters the ''accessToken'' on your site, you can calculate the players ''externalLoginToken'' by&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$externalLoginToken = md5($accessToken.$privateApiKey);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can search the player in your player table generated with the data from ''getMapData'' and - if you found him - log him into your site.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Einzelnachweise ==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;/div&gt;</summary>
		<author><name>ITob</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.binary-tools.de/index.php?title=Kingdoms_API&amp;diff=1253</id>
		<title>Kingdoms API</title>
		<link rel="alternate" type="text/html" href="http://wiki.binary-tools.de/index.php?title=Kingdoms_API&amp;diff=1253"/>
		<updated>2020-04-17T15:54:32Z</updated>

		<summary type="html">&lt;p&gt;ITob: Marked this version for translation&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages/&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
{{Kingdoms Topic/en|legends=Legends API}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:2--&amp;gt;&lt;br /&gt;
Travian provides a [https://en.wikipedia.org/wiki/JSON JSON]-[https://en.wikipedia.org/wiki/Application_programming_interface API] to access some information about running game worlds&amp;lt;ref&amp;gt;https://forum.kingdoms.com/index.php?thread/4099-api-for-external-tools/&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Accessing the API == &amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
The base URL for all queries to the API is &amp;lt;pre&amp;gt;https://&amp;amp;lt;gameworld&amp;amp;gt;.kingdoms.com/api/external.php?action=&amp;amp;lt;action&amp;amp;gt;&amp;lt;/pre&amp;gt; (e.g. https:&amp;lt;nowiki /&amp;gt;//com1.kingdoms.com/api/external.php?action=...).&lt;br /&gt;
&lt;br /&gt;
=== Parameters === &amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
Depending on the value of ''action'' further parameters have to be specified. For most requests an [[#Action: requestApiKey |API key]] is required.&lt;br /&gt;
&lt;br /&gt;
=== Response format === &amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
 ╠═ time : int? : [https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#The_ECMAScript_epoch_and_timestamps javascript timestamp] (miliseconds since January 1, 1970, UTC), only present for some actions&lt;br /&gt;
 ╠═ error : object? : Indicates that an error occured. ''response'' will contain an empty array in this case.&lt;br /&gt;
   ╠═ type : string&lt;br /&gt;
   ╠═ number : int : error id&lt;br /&gt;
   ╚═ message : string&lt;br /&gt;
 ╚═ response : object | empty array&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
A question mark after a type indicates that this property is optional. ''object'' refers to the JSON meaning of the term (similar to dictionaries or maps in other languages). In the following sections, only the contents of the response object are shown.&lt;br /&gt;
''string(≤255)'' resp. ''string(32)'' indicates a string with a maximum resp. fixed length.&lt;br /&gt;
The type ''string(int)'' represents an integer that is formatted as a JSON string (surrounded by &amp;quot;) for unknown reasons.&lt;br /&gt;
&lt;br /&gt;
== Action: requestApiKey == &amp;lt;!--T:7--&amp;gt;&lt;br /&gt;
An API key can be requested using this action. The key is required for most other requests.&lt;br /&gt;
&lt;br /&gt;
=== Parameters === &amp;lt;!--T:8--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| email || string(≤255) || valid email address (may be used by Travian staff for questions)&lt;br /&gt;
|-&lt;br /&gt;
| siteName || string(≤255) || name of the tool&lt;br /&gt;
|-&lt;br /&gt;
| siteUrl || string(≤255) || URL of the tool&lt;br /&gt;
|-&lt;br /&gt;
| public || boolean || whether the tool should be available to the public (and may be used by Travian to create e.g. a tool list in the future)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Response === &amp;lt;!--T:9--&amp;gt;&lt;br /&gt;
 ╚═ response&lt;br /&gt;
   ╠═ privateApiKey : string(32)&lt;br /&gt;
   ╚═ publicSiteKey : string(32)&lt;br /&gt;
&lt;br /&gt;
== Action: updateSiteData == &amp;lt;!--T:10--&amp;gt;&lt;br /&gt;
This action can be used to update the data that was provided in the original ''requestApiKey'' request.&lt;br /&gt;
&lt;br /&gt;
=== Parameters === &amp;lt;!--T:11--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| privateApiKey || string(32) || private api key&lt;br /&gt;
|-&lt;br /&gt;
| email || string(≤255) || valid email address (may be used by Travian staff for questions)&lt;br /&gt;
|-&lt;br /&gt;
| siteName || string(≤255) || name of the tool&lt;br /&gt;
|-&lt;br /&gt;
| siteUrl || string(≤255) || URL of the tool&lt;br /&gt;
|-&lt;br /&gt;
| public || boolean || whether the tool should be available to the public (and may be used by Travian to create e.g. a tool list in the future)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Response === &amp;lt;!--T:12--&amp;gt;&lt;br /&gt;
 ╚═ response&lt;br /&gt;
   ╚═ data : boolean : always true (in case of an error, an error object is used instead as descried [[#Response_format|above]])&lt;br /&gt;
&lt;br /&gt;
== Action: getMapData == &amp;lt;!--T:13--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:14--&amp;gt;&lt;br /&gt;
The response to this action contains&lt;br /&gt;
&lt;br /&gt;
=== Parameters === &amp;lt;!--T:15--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| privateApiKey || string(32) || private api key&lt;br /&gt;
|-&lt;br /&gt;
| date || string? || may be specified to request old data, the newest available data is returned if omitted, format is DD.MM.YYYY (e.g. 31.12.2020)&lt;br /&gt;
|}&lt;br /&gt;
The API has a bug when querying data near midnight, see https://forum.kingdoms.com/index.php?thread/20863-suggestions-for-the-json-api/&amp;amp;postID=144462#post144462.&lt;br /&gt;
&lt;br /&gt;
=== Response === &amp;lt;!--T:16--&amp;gt;&lt;br /&gt;
 ╚═ response&lt;br /&gt;
   ╠═ gameworld : object&lt;br /&gt;
     ╠═ name : string : (e.g. &amp;quot;com1&amp;quot;)&lt;br /&gt;
     ╠═ startTime : int : unix timestamp ('''seconds''' since January 1, 1970, UTC)&lt;br /&gt;
     ╠═ speed : int&lt;br /&gt;
     ╠═ speedTroops : int&lt;br /&gt;
     ╠═ lastUpdateTime : string(int) : unix timestamp, exact timestamp when returned data was generated&lt;br /&gt;
     ╠═ date : int : unix timestamp, start of the day (00:00:00) of returned data&lt;br /&gt;
     ╚═ version : string : always &amp;quot;1.0&amp;quot;&lt;br /&gt;
   ╠═ players : array&lt;br /&gt;
     ╠═ playerId : string(int)&lt;br /&gt;
     ╠═ name : string&lt;br /&gt;
     ╠═ tribeId : string(int) : 1 = Roman, 2 = Teuton, 3 = Gaul&lt;br /&gt;
     ╠═ kingdomId : string(int) : &amp;quot;0&amp;quot; for no kingdom&lt;br /&gt;
     ╠═ treasures : int : if player is king, then number of treasures of the kingdom, otherwise 0&lt;br /&gt;
     ╠═ role : int : 0 = Governor, 1 = King, 2 = Duke, 0 if not part of any kingdom TODO: vice king?&lt;br /&gt;
     ╠═ externalLoginToken : string : see [[#Authentication using publicSiteKey]]&lt;br /&gt;
     ╚═ villages : array&lt;br /&gt;
       ╠═ villageId : string(int)&lt;br /&gt;
       ╠═ x : string(int)&lt;br /&gt;
       ╠═ y : string(int)&lt;br /&gt;
       ╠═ population : string(int)&lt;br /&gt;
       ╠═ name : string&lt;br /&gt;
       ╠═ isMainVillage : boolean&lt;br /&gt;
       ╚═ isCity : boolean&lt;br /&gt;
   ╠═ kingdoms : array&lt;br /&gt;
     ╠═ kingdomId : string(int)&lt;br /&gt;
     ╠═ kingdomTag : string : name of the kingdom&lt;br /&gt;
     ╠═ creationTime : string(int) : unix timestamp, exact time of kingdom creation&lt;br /&gt;
     ╚═ victoryPoints : string(int)&lt;br /&gt;
   ╚═ map                         &lt;br /&gt;
     ╠═ radius : string(int) : current radius of the map&lt;br /&gt;
     ╠═ cells : array&lt;br /&gt;
       ╠═ id : string(int)&lt;br /&gt;
       ╠═ x : string(int)&lt;br /&gt;
       ╠═ y : string(int)&lt;br /&gt;
       ╠═ resType : string : if cell is abandoned valley or village, then resource distribution (e.g. &amp;quot;4446&amp;quot;), otherwise &amp;quot;0&amp;quot; = wilderness, &amp;quot;1&amp;quot; = outside of map radius&lt;br /&gt;
       ╠═ oasis : string(int) : if cell is oasis, then oasis type (TODO), otherwise &amp;quot;0&amp;quot;&lt;br /&gt;
       ╠═ landscape : string(int) : landscape id, see [[#Landscapes]]&lt;br /&gt;
       ╚═ kingdomId : string(int) / int : kingdom id (as string) of the village ('''not''' kingdom of the village's owner), 0 (as int) if not within kingdom borders&lt;br /&gt;
     ╚═ landscapes : object&lt;br /&gt;
       ╚═ [ landscape id : int ] : string : relative path to the corresponding image (e.g. &amp;quot;layout/images/map/wood0_0_0.png&amp;quot;), see [[#Landscapes]]&lt;br /&gt;
&lt;br /&gt;
==== Landscapes ==== &amp;lt;!--T:17--&amp;gt;&lt;br /&gt;
Landscapes are the visualizations used on the ingame map (e.g. trees, mountains, lakes, clay pits). A landscape's id can be mapped to an image path using the ''landscapes'' object in the response. This path is relative to the static game files which can be found at https://cdn.traviantools.net/game/0.95/ for that specific version of the game. Example path: https://cdn.traviantools.net/game/0.95/layout/images/map/wood0_0_0.png&lt;br /&gt;
&lt;br /&gt;
== Authentication using publicSiteKey == &amp;lt;!--T:18--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:19--&amp;gt;&lt;br /&gt;
From https://forum.kingdoms.com/index.php?thread/4099-api-for-external-tools/:&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
With the ''externalLoginToken'' you can authenticate a player - without that the player needs to register for your tool.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:20--&amp;gt;&lt;br /&gt;
In your call to ''requestApiKey'' you were provided a ''privateApiKey'' and a ''publicSiteKey''. The ''privateApiKey'' should be.. guess what.. private. You shouldn't tell this to anyone. You will need it to make requests to our api's. In contrast your ''publicSiteKey'' can be public.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:21--&amp;gt;&lt;br /&gt;
If a player wants to log-in to your site, he needs first an ''accessToken'' for your site. The player needs your ''publicSiteKey''. The player can go to its Settings-Page in T5 and under point &amp;quot;External Tools&amp;quot; click on &amp;quot;Create Access&amp;quot;. He enters your ''publicSiteKey'' and get an ''accessToken'' back.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:22--&amp;gt;&lt;br /&gt;
If the player enters the ''accessToken'' on your site, you can calculate the players ''externalLoginToken'' by&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:23--&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;$externalLoginToken = md5($accessToken.$privateApiKey);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:24--&amp;gt;&lt;br /&gt;
Now you can search the player in your player table generated with the data from ''getMapData'' and - if you found him - log him into your site.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Einzelnachweise == &amp;lt;!--T:25--&amp;gt;&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;/div&gt;</summary>
		<author><name>ITob</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.binary-tools.de/index.php?title=Template:Kingdoms_Topic&amp;diff=1249</id>
		<title>Template:Kingdoms Topic</title>
		<link rel="alternate" type="text/html" href="http://wiki.binary-tools.de/index.php?title=Template:Kingdoms_Topic&amp;diff=1249"/>
		<updated>2020-04-17T11:45:52Z</updated>

		<summary type="html">&lt;p&gt;ITob: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages/&amp;gt;&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot; style=&amp;quot;display: inline-block; width: 100%;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
{{Icon:Kingdoms|size=32px}}&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
This article is about a feature in Travian Kingdoms. {{#if: {{{legends|}}} | For information on the {{Icon:Legends}} Travian: Legends counterpart visit [[{{{legends}}}]]. |}}&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>ITob</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.binary-tools.de/index.php?title=Template:Kingdoms_Topic&amp;diff=1246</id>
		<title>Template:Kingdoms Topic</title>
		<link rel="alternate" type="text/html" href="http://wiki.binary-tools.de/index.php?title=Template:Kingdoms_Topic&amp;diff=1246"/>
		<updated>2020-04-17T11:44:10Z</updated>

		<summary type="html">&lt;p&gt;ITob: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages/&amp;gt;&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot; style=&amp;quot;display: inline-block; width: 100%;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
{{Icon:Kingdoms|size=32px}}&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
This article is about a feature in Travian Kingdoms. {{#if: {{{legends|}}} | For information on the {{Icon:Legends}} Travian: Legends counterpart visit [[{{{legends}}}]] |}}&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>ITob</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.binary-tools.de/index.php?title=Template:Kingdoms_Topic&amp;diff=1241</id>
		<title>Template:Kingdoms Topic</title>
		<link rel="alternate" type="text/html" href="http://wiki.binary-tools.de/index.php?title=Template:Kingdoms_Topic&amp;diff=1241"/>
		<updated>2020-04-17T11:40:49Z</updated>

		<summary type="html">&lt;p&gt;ITob: Created page with &amp;quot;&amp;lt;languages/&amp;gt; &amp;lt;div align=&amp;quot;center&amp;quot; style=&amp;quot;display: inline-block; width: 100%;&amp;quot;&amp;gt; &amp;lt;hr&amp;gt; {{Icon:Kingdoms|size=32px}} &amp;lt;translate&amp;gt; This article is about a feature in Travian Kingdoms....&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages/&amp;gt;&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot; style=&amp;quot;display: inline-block; width: 100%;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
{{Icon:Kingdoms|size=32px}}&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
This article is about a feature in Travian Kingdoms. {{#ifeq: {{{legends|}}} | For information on the {{Icon:Legends}} Travian: Legends counterpart visit [[{{{legends}}}]] |}}&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>ITob</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.binary-tools.de/index.php?title=Template:Kingdoms_Topic&amp;diff=1242</id>
		<title>Template:Kingdoms Topic</title>
		<link rel="alternate" type="text/html" href="http://wiki.binary-tools.de/index.php?title=Template:Kingdoms_Topic&amp;diff=1242"/>
		<updated>2020-04-17T11:40:49Z</updated>

		<summary type="html">&lt;p&gt;ITob: Marked this version for translation&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages/&amp;gt;&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot; style=&amp;quot;display: inline-block; width: 100%;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
{{Icon:Kingdoms|size=32px}}&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
This article is about a feature in Travian Kingdoms. {{#ifeq: {{{legends|}}} | For information on the {{Icon:Legends}} Travian: Legends counterpart visit [[{{{legends}}}]] |}}&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>ITob</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.binary-tools.de/index.php?title=Template:SwitchVersion&amp;diff=1240</id>
		<title>Template:SwitchVersion</title>
		<link rel="alternate" type="text/html" href="http://wiki.binary-tools.de/index.php?title=Template:SwitchVersion&amp;diff=1240"/>
		<updated>2020-04-17T11:37:37Z</updated>

		<summary type="html">&lt;p&gt;ITob: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{#if: {{{legends|}}} | {{Icon:Legends}} {{{legends}}} }}{{#if: {{{legends|}}} | {{#if: {{{kingdoms|}}} | {{sp}}/{{sp}} }} }}{{#if: {{{kingdoms|}}} | {{Icon:Kingdoms}} {{{kingdoms}}} }}&lt;/div&gt;</summary>
		<author><name>ITob</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.binary-tools.de/index.php?title=Template:Icon:Legends&amp;diff=1239</id>
		<title>Template:Icon:Legends</title>
		<link rel="alternate" type="text/html" href="http://wiki.binary-tools.de/index.php?title=Template:Icon:Legends&amp;diff=1239"/>
		<updated>2020-04-17T11:35:31Z</updated>

		<summary type="html">&lt;p&gt;ITob: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Legends Logo.png|{{{size|16px}}}|{{{caption|Travian: Legends}}}]]&lt;/div&gt;</summary>
		<author><name>ITob</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.binary-tools.de/index.php?title=Template:Icon:Kingdoms&amp;diff=1238</id>
		<title>Template:Icon:Kingdoms</title>
		<link rel="alternate" type="text/html" href="http://wiki.binary-tools.de/index.php?title=Template:Icon:Kingdoms&amp;diff=1238"/>
		<updated>2020-04-17T11:35:16Z</updated>

		<summary type="html">&lt;p&gt;ITob: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Kingdoms Logo.png|{{{size|16px}}}|{{{caption|Travian Kingdoms}}}]]&lt;/div&gt;</summary>
		<author><name>ITob</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.binary-tools.de/index.php?title=Expansion&amp;diff=1237</id>
		<title>Expansion</title>
		<link rel="alternate" type="text/html" href="http://wiki.binary-tools.de/index.php?title=Expansion&amp;diff=1237"/>
		<updated>2020-04-17T11:10:47Z</updated>

		<summary type="html">&lt;p&gt;ITob: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages/&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:29--&amp;gt;&lt;br /&gt;
{{Legends Kingdoms Topic/en}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:2--&amp;gt;&lt;br /&gt;
Expansion is to found new villages, conquer enemy villages and [[File:Kingdoms Logo.png|16px]] cities as well as [[File:Kingdoms Logo.png|16px]] found cities. &lt;br /&gt;
&lt;br /&gt;
== General == &amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
There are three different types of expansion: Founding new villages, conquering existing villages and [[File:Kingdoms Logo.png|16px]] upgrading villages to cities. All of them require free culture point slots and possibly the training of an expansion unit.  Here is a quick overview for the different types of expansions:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Expansion || Availability|| # Culture Slots || Expansion Units&lt;br /&gt;
|-&lt;br /&gt;
| Founding a new village || [[File:Legends Logo.png|16px]] [[File:Kingdoms Logo.png|16px]] || 1 || 3 Settlers&lt;br /&gt;
|-&lt;br /&gt;
| Conquering a village || [[File:Legends Logo.png|16px]] [[File:Kingdoms Logo.png|16px]] || 1 || 1 Chief of your tribe&lt;br /&gt;
|-&lt;br /&gt;
| Conquering a city || [[File:Kingdoms Logo.png|16px]] || 2 || 1 Chief of your tribe&lt;br /&gt;
|-&lt;br /&gt;
| Upgrading to a city || [[File:Kingdoms Logo.png|16px]] || 1 || - &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
Note, that cities are exclusive to Kingdoms and do not exist in Travian: Legends, therefore the corresponding expansion types do not exist in Travian: Legends either.&lt;br /&gt;
&lt;br /&gt;
== Settling == &amp;lt;!--T:7--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:8--&amp;gt;&lt;br /&gt;
The easiest way to expand is to found a new village, also called settling. This is the way you will expand at the start of the game, as the other options are infeasible for young accounts. In order to found a new village you need to train three settlers and gather a free culture slot first. If you aquired both, you can look at the map to search for a suitable field to send your settlers to. As soon as they arrive, they found a new village for you to control. Your new village will adapt the field's resource field distribution, so it's definitely worth to pay attention to it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:9--&amp;gt;&lt;br /&gt;
[[File:Legends Logo.png|16px]] In Travian: Legends, a freshly settled village will start with no buildings and all resource fields level 0, except for a main building level 1. In the birthday special Codex Victoria, the resource fields start on level 5 for the first two settlements.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:10--&amp;gt;&lt;br /&gt;
[[File:Legends Logo.png|16px]] In Travian: Legends, you need to pay 750 resources per type to send the settlers on their way. This is '''not''' required in Kingdoms.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:11--&amp;gt;&lt;br /&gt;
[[File:Kingdoms Logo.png|16px]] In Kingdoms, a freshly settled village will start with a main building level 1 and all resource fields level 1.&lt;br /&gt;
&lt;br /&gt;
== Conquering == &amp;lt;!--T:12--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:13--&amp;gt;&lt;br /&gt;
Conquering is more challanging than settling, but also more rewarding, because you get to keep the buildings and resource fields of the previous owner. In order to conquer a village (or city) from another player, you need to lower its loyalty to 0 by attacking (not raiding) with conquering units (commonly called chiefs). If your chiefs survive the attack, they will lower the loyalty afterwards.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:14--&amp;gt;&lt;br /&gt;
However, in order to be able to lower the loyalty, you need to meet certain requirements:&lt;br /&gt;
* The target village (or city) may not have a residence, palace, wonder of the world or [[File:Legends Logo.png|16px]] command center.&lt;br /&gt;
* You must have at least one culture point for villages and [[File:Kingdoms Logo.png|16px]] at least two for cities.&lt;br /&gt;
* You may not be restricted by the pushing protection.&lt;br /&gt;
* [[File:Kingdoms Logo.png|16px]] In Kingdoms, your kingdom may not have [[Kingdom#grant_protection|granted protection]] in the past 72 hours.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:15--&amp;gt;&lt;br /&gt;
As soon as the loyalty hits 0, following happens:&lt;br /&gt;
* The village (or city) changes its owner and you are in control of it now.&lt;br /&gt;
* The conquered village (or city) loses all of its research progress in academy and smithy.&lt;br /&gt;
* All troops, that had their home there, die immediately. &lt;br /&gt;
* The village adapts its tribe to the conquering player ([[File:Legends Logo.png|16px]] except for birthday special versions).&lt;br /&gt;
* If the conquering player has more inhabitants than the victim, every resource field and every building loses one level, if it's at least level 2.&lt;br /&gt;
* One chief will join the village as leader and not be useable or visible anymore.&lt;br /&gt;
* The survivors of the attack will stay in the village as regular reinforcement.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:18--&amp;gt;&lt;br /&gt;
After conquering, the loyalty stays at 0 at first. You can gain the loyalty back by building a residence or palace ([[File:Legends Logo.png|16px]] or command center). The higher its level, the faster the loyalty increase. The loyalty will naturally increase only up to 100% ([[File:Kingdoms Logo.png|16px]] 200% for cities).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:19--&amp;gt;&lt;br /&gt;
[[File:Legends Logo.png|16px]] In Travian: Legends, you can use tables of law to increase loyalty instantly and to up to 125% for villages.&lt;br /&gt;
&lt;br /&gt;
=== Loyalty Mechanics === &amp;lt;!--T:24--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:25--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;float: right; margin-left: 18px;&amp;quot;&lt;br /&gt;
|+ Base loyalty ranges:&lt;br /&gt;
|-&lt;br /&gt;
! Tribe || Min || Max&lt;br /&gt;
|- &lt;br /&gt;
| Romans || 20 || 30&lt;br /&gt;
|- &lt;br /&gt;
| Teutons || 20 || 25&lt;br /&gt;
|-&lt;br /&gt;
| Gauls || 20 || 25 &lt;br /&gt;
|-&lt;br /&gt;
| [[File:Legends Logo.png|16px]] Egypts || 20 || 25&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Legends Logo.png|16px]] Huns || 15 || 30&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:26--&amp;gt;&lt;br /&gt;
There are many factors to consider, when it comes to lowering loyalty. You can see all factors in the order they are applied in the following table with this example: An teuton attacker with 3000 population, big party, active brewery and 2 surviving chiefs attacks a defender with 1000 population, without parties.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:27--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! Factor || Explaination || Example&lt;br /&gt;
|-&lt;br /&gt;
| Tribe of the attacker || Each tribe has different chiefs which have different minimum and maximum values. || 20-25 base loyalty&lt;br /&gt;
|-&lt;br /&gt;
| Randomness || Each chief has a minimum and maximum value of loyalty he can lower. The actual amount is purely random between those values. || e.g. 23 is selected by random&lt;br /&gt;
|-&lt;br /&gt;
| Big Parties on both sides || A big party of the attacking village increases the base loyalty lowering per chief by 5 while a big party of the defending village decreases the base loyalty by the same amount. || +5 for attacker (big party) = 28&amp;lt;br /&amp;gt;&amp;amp;plusmn;0 for defender (no parties) = 28&lt;br /&gt;
|-&lt;br /&gt;
| Amount of surviving chiefs || The base loyalty is multiplied by the amount of surviving chiefs. || 2 * 28 = 56&lt;br /&gt;
|-&lt;br /&gt;
| Brewery || A running brewery party in the account of the attacker halfes the effectiveness of all surviving chiefs. || 56 / 2 = 28&lt;br /&gt;
|-&lt;br /&gt;
| Morale || If the attacker has more population than the defender, chiefs only &amp;lt;math&amp;gt;(\frac{defender\ population}{attacker\ population})^{0.2}&amp;lt;/math&amp;gt; effective, up to a malus of 33.3%. || 28 * (1000/3000)^(0.2) &amp;amp;asymp; 22.5&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:30--&amp;gt;&lt;br /&gt;
{{SwitchVersion|kingdoms='''Special rule for the [[Halloween Hunt]]:''' Big parties that are held within the mist will give a loyalty bonus of +11 or -11 instead of &amp;amp;plusmn;5.}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:28--&amp;gt;&lt;br /&gt;
In this example, the chiefs would have lowered the loyalty by 22.5.&lt;br /&gt;
&lt;br /&gt;
== Founding Cities == &amp;lt;!--T:20--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:31--&amp;gt;&lt;br /&gt;
''{{SwitchVersion|kingdoms=This feature is exclusive to Travian Kingdoms}}''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:32--&amp;gt;&lt;br /&gt;
Founding cities is a new way to expand and was introduced in Travian Kingdoms, as an alternative to founding a new village. Cities are basically upgraded villages. Upgrading a village to a city grants the following benefits:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:33--&amp;gt;&lt;br /&gt;
* Resource fields can be upgraded to up to level 12 (instead of usually 10) - this does not apply for the capital, as fields can be upgraded indefinitely there anyway.&lt;br /&gt;
* Loyalty can be increased up to 200 and will be increased by 100 instantly upon upgrading a village to a city.&lt;br /&gt;
* A city has 500 bonus inhabitants&lt;br /&gt;
* A city gets +200 culture points per day (+500 if it's the capital)&lt;br /&gt;
* A city can build a water ditch, great barracks and great stable&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:34--&amp;gt;&lt;br /&gt;
Upgrading a village to a city is simple, you just need to click the upgrade button in the main building and confirm your decision. There are a few requirements to meet though:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:35--&amp;gt;&lt;br /&gt;
* You need a free culture slot&lt;br /&gt;
* The village has to have at least 500 inhabitants&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:36--&amp;gt;&lt;br /&gt;
Upgrading can only be undone by decreasing its population to below 1000. Then, the city is automatically downgraded to a village.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:37--&amp;gt;&lt;br /&gt;
''See also: [[City vs. 2 Villages]]''&lt;br /&gt;
&lt;br /&gt;
== Culture Slots == &amp;lt;!--T:21--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:38--&amp;gt;&lt;br /&gt;
You need culture points in order to grow your empire and obtain more villages {{SwitchVersion|kingdoms=and cities}}. After certain tresholds, a new culture slot is unlocked, which allows the control of an additional village. [[Culture Points|Culture points]] and slots are never consumed, but only occupied as long as the village or city belongs to you. Losing a village or city, or downgrading a city back to a village, will free the corresponding culture slots, such that they can be used again.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:39--&amp;gt;&lt;br /&gt;
You can see your culture points in the residence, palace {{SwitchVersion|legends=or command centre}}. There, you can see how many culture points you need for the next culture slot aswell.&lt;br /&gt;
&lt;br /&gt;
== Expansion Slots == &amp;lt;!--T:22--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Trivia == &amp;lt;!--T:16--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:17--&amp;gt;&lt;br /&gt;
* You can send away your settlers, then use the culture slot and then gather a new slot before they arrive, and they will settle as usual.&lt;br /&gt;
* If you send your settlers to a free field, which gets occupied by another player before your settlers arrive, they will return upon arriving.&lt;br /&gt;
* Troops, that are killed, because their home village is conquered, do not grant offpoints.&lt;br /&gt;
* It is possible for a roman attacker to conquer a village in one attack, if he's celebrating a large party while the attacker isn't. When conquering a larger player (in terms of population), this has a chance of 19.4% to work. {{SwitchVersion|kingdoms=[[Halloween Hunt]]'s mist bonus increases this chance to 77.4%.}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:23--&amp;gt;&lt;br /&gt;
[[Category:Travian Kingdoms Feature (EN)]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;/div&gt;</summary>
		<author><name>ITob</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.binary-tools.de/index.php?title=Main_Page&amp;diff=930</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://wiki.binary-tools.de/index.php?title=Main_Page&amp;diff=930"/>
		<updated>2019-11-17T14:51:55Z</updated>

		<summary type="html">&lt;p&gt;ITob: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages/&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
Welcome to the unofficial wiki for the browser games [https://www.kingdoms.com Travian Kingdoms] and [https://www.travian.com/ Travian: Legends].&lt;br /&gt;
&lt;br /&gt;
== Work in Progress ==&lt;br /&gt;
&lt;br /&gt;
This wiki is still mostly Work in Progress. Don't expect the given information to be complete.&lt;br /&gt;
&lt;br /&gt;
== Goal ==&lt;br /&gt;
&lt;br /&gt;
The goal of this wiki is to provide a fan made alternative to the official Travian wikis ([https://wiki.kingdoms.com/ Travian Kingdoms] and [https://t4.answers.travian.com/ Travian: Legends]). Eventually, it should be your first place to find answers to questions about both games as well as guides and other related information. In addition, this wiki will contain explanations of the tools found on Binary-Tools.&lt;br /&gt;
&lt;br /&gt;
== Disclaimer ==&lt;br /&gt;
This wiki is a private fan project for the browser games [https://www.kingdoms.com Travian Kingdoms] and [https://www.travian.com/ Travian: Legends] according to the [https://forum.kingdoms.com/index.php?thread/3058-fan-site-policy/ fan site policy]. It is in no way related to or endorsed by [https://www.traviangames.com Travian Games GmbH]. The rights to the names &amp;quot;Travian Kingdoms&amp;quot; and &amp;quot;Travian: Legends&amp;quot; as well as to most of the used icons and pictures belong to Travian Games GmbH.&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;/div&gt;</summary>
		<author><name>ITob</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.binary-tools.de/index.php?title=Main_Page&amp;diff=931</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://wiki.binary-tools.de/index.php?title=Main_Page&amp;diff=931"/>
		<updated>2019-11-17T14:51:55Z</updated>

		<summary type="html">&lt;p&gt;ITob: Marked this version for translation&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages/&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
Welcome to the unofficial wiki for the browser games [https://www.kingdoms.com Travian Kingdoms] and [https://www.travian.com/ Travian: Legends].&lt;br /&gt;
&lt;br /&gt;
== Work in Progress == &amp;lt;!--T:2--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
This wiki is still mostly Work in Progress. Don't expect the given information to be complete.&lt;br /&gt;
&lt;br /&gt;
== Goal == &amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
The goal of this wiki is to provide a fan made alternative to the official Travian wikis ([https://wiki.kingdoms.com/ Travian Kingdoms] and [https://t4.answers.travian.com/ Travian: Legends]). Eventually, it should be your first place to find answers to questions about both games as well as guides and other related information. In addition, this wiki will contain explanations of the tools found on Binary-Tools.&lt;br /&gt;
&lt;br /&gt;
== Disclaimer == &amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
This wiki is a private fan project for the browser games [https://www.kingdoms.com Travian Kingdoms] and [https://www.travian.com/ Travian: Legends] according to the [https://forum.kingdoms.com/index.php?thread/3058-fan-site-policy/ fan site policy]. It is in no way related to or endorsed by [https://www.traviangames.com Travian Games GmbH]. The rights to the names &amp;quot;Travian Kingdoms&amp;quot; and &amp;quot;Travian: Legends&amp;quot; as well as to most of the used icons and pictures belong to Travian Games GmbH.&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;/div&gt;</summary>
		<author><name>ITob</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.binary-tools.de/index.php?title=Main_Page&amp;diff=929</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://wiki.binary-tools.de/index.php?title=Main_Page&amp;diff=929"/>
		<updated>2019-11-17T14:51:41Z</updated>

		<summary type="html">&lt;p&gt;ITob: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Welcome to the unofficial wiki for the browser games [https://www.kingdoms.com Travian Kingdoms] and [https://www.travian.com/ Travian: Legends].&lt;br /&gt;
&lt;br /&gt;
== Work in Progress ==&lt;br /&gt;
&lt;br /&gt;
This wiki is still mostly Work in Progress. Don't expect the given information to be complete.&lt;br /&gt;
&lt;br /&gt;
== Goal ==&lt;br /&gt;
&lt;br /&gt;
The goal of this wiki is to provide a fan made alternative to the official Travian wikis ([https://wiki.kingdoms.com/ Travian Kingdoms] and [https://t4.answers.travian.com/ Travian: Legends]). Eventually, it should be your first place to find answers to questions about both games as well as guides and other related information. In addition, this wiki will contain explanations of the tools found on Binary-Tools.&lt;br /&gt;
&lt;br /&gt;
== Disclaimer ==&lt;br /&gt;
This wiki is a private fan project for the browser games [https://www.kingdoms.com Travian Kingdoms] and [https://www.travian.com/ Travian: Legends] according to the [https://forum.kingdoms.com/index.php?thread/3058-fan-site-policy/ fan site policy]. It is in no way related to or endorsed by [https://www.traviangames.com Travian Games GmbH]. The rights to the names &amp;quot;Travian Kingdoms&amp;quot; and &amp;quot;Travian: Legends&amp;quot; as well as to most of the used icons and pictures belong to Travian Games GmbH.&lt;/div&gt;</summary>
		<author><name>ITob</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.binary-tools.de/index.php?title=Binary-Tools_Wiki:About&amp;diff=928</id>
		<title>Binary-Tools Wiki:About</title>
		<link rel="alternate" type="text/html" href="http://wiki.binary-tools.de/index.php?title=Binary-Tools_Wiki:About&amp;diff=928"/>
		<updated>2019-11-17T14:50:07Z</updated>

		<summary type="html">&lt;p&gt;ITob: Redirected page to Main Page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Main_Page]]&lt;/div&gt;</summary>
		<author><name>ITob</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.binary-tools.de/index.php?title=Binary-Tools_Wiki:General_disclaimer&amp;diff=927</id>
		<title>Binary-Tools Wiki:General disclaimer</title>
		<link rel="alternate" type="text/html" href="http://wiki.binary-tools.de/index.php?title=Binary-Tools_Wiki:General_disclaimer&amp;diff=927"/>
		<updated>2019-11-17T14:49:33Z</updated>

		<summary type="html">&lt;p&gt;ITob: Redirected page to Main Page#Disclaimer&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Main_Page#Disclaimer]]&lt;/div&gt;</summary>
		<author><name>ITob</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.binary-tools.de/index.php?title=Main_Page&amp;diff=926</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://wiki.binary-tools.de/index.php?title=Main_Page&amp;diff=926"/>
		<updated>2019-11-17T14:48:00Z</updated>

		<summary type="html">&lt;p&gt;ITob: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Welcome to the unofficial wiki for the browser games [https://www.kingdoms.com Travian Kingdoms] and [https://www.travian.com/ Travian: Legends].&lt;br /&gt;
&lt;br /&gt;
== Work in Progress ==&lt;br /&gt;
&lt;br /&gt;
This wiki is still mostly Work in Progress. Don't expect the given information to be complete.&lt;br /&gt;
&lt;br /&gt;
== Goal ==&lt;br /&gt;
&lt;br /&gt;
The goal of this wiki is to provide a fan made alternative to the official Travian wikis ([https://wiki.kingdoms.com/ Travian Kingdoms] and [https://t4.answers.travian.com/ Travian: Legends]). Eventually, it should be your first place to find answers to questions about both games as well as guides and other related information. In addition, this wiki will contain explanations of the tools found on Binary-Tools.&lt;br /&gt;
&lt;br /&gt;
== Disclaimer ==&lt;br /&gt;
This wiki is a private fan project for the browser games [https://www.kingdoms.com Travian Kingdoms] and [https://www.travian.com/ Travian: Legends] according to the [https://forum.kingdoms.com/index.php?thread/3058-fan-site-policy/ fan site policy]. It is in no way related to or endorsed by [https://www.traviangames.com Travian Games GmbH]. The rights to the names &amp;quot;Travian Kingdoms&amp;quot; and &amp;quot;Travian: Legends&amp;quot; as well as most of the used icons and pictures belong to Travian Games GmbH.&lt;/div&gt;</summary>
		<author><name>ITob</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.binary-tools.de/index.php?title=Starvation&amp;diff=925</id>
		<title>Starvation</title>
		<link rel="alternate" type="text/html" href="http://wiki.binary-tools.de/index.php?title=Starvation&amp;diff=925"/>
		<updated>2019-11-17T14:04:52Z</updated>

		<summary type="html">&lt;p&gt;ITob: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages/&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
If you have an empty granary and a negative crop production in a village, troops will start to starve there. Starved troops return {{SwitchVersion|kingdoms=(100 * their crop consumption)|legends=the crop training cost of the unit}} crop to feed the remaining troops for a while, until the granary becomes empty again. Troops starve in a specific order, however Kingdoms and Legends have different rules.&lt;br /&gt;
&lt;br /&gt;
== Starve order == &amp;lt;!--T:2--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== {{Icon:Kingdoms}} Kingdoms === &amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
Kingdoms distinguishes between five starvation classes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
# Foreign units, that support the starving village.&lt;br /&gt;
# Own units from other villages, that support the starving village.&lt;br /&gt;
# Own units from the starving village, that are trapped in some gaul's traps.&lt;br /&gt;
# Own units from the starving village, that are at home.&lt;br /&gt;
# Own units from the starving village, that aren't at home (e.g. reinforcing an oasis or moving troops).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
Troops of the first class starve completely before troops of any other classes, i.e. troops of the 2nd-5th class can only starve if no troops of the first class exist. Analogously, no troops of the 3rd-5th class can only starve if no troops of the first or second class exist, and so on.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:7--&amp;gt;&lt;br /&gt;
Within one class, the biggest troop compound starves first, counting by numbers, not by crop consumption. If e.g. one player sends 5000 phalanxes and another player sends 3000 druidriders, the phalanxes will starve first, if both compounds fit into the same class.&lt;br /&gt;
Within one compound, the most common troop type starves first, again counted by numbers, not by crop consumption. If the compound to starve has 2000 phalanxes and 1500 druidriders, its phalanxes will starve first. In case of a tie, the &amp;quot;leftmost&amp;quot; unit will starve, e.g. phalanxes before swordsmen.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:8--&amp;gt;&lt;br /&gt;
These rules are applied unit by unit.&lt;br /&gt;
&lt;br /&gt;
==== Notes ==== &amp;lt;!--T:9--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:10--&amp;gt;&lt;br /&gt;
* It doesn't matter whether troops come from the same kingdom, NAP, confed or an enemy. All are treated equally concerning starvation.&lt;br /&gt;
* Unlike in T:L, sending a hammer into a WW may lead to significant starvation losses, as it's most likely the biggest troop compound and will therefore starve first. At a usual 6-digit negative production this means a 4-digit loss of infantry units per hour.&lt;br /&gt;
* Starvation does not generate any reports, but starved troops are mentioned in the welcome screen.&lt;br /&gt;
&lt;br /&gt;
=== {{Icon:Legends}} Legends === &amp;lt;!--T:11--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;/div&gt;</summary>
		<author><name>ITob</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.binary-tools.de/index.php?title=Template:SwitchVersion&amp;diff=924</id>
		<title>Template:SwitchVersion</title>
		<link rel="alternate" type="text/html" href="http://wiki.binary-tools.de/index.php?title=Template:SwitchVersion&amp;diff=924"/>
		<updated>2019-11-17T13:45:05Z</updated>

		<summary type="html">&lt;p&gt;ITob: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{#if: {{{legends|}}} | {{Icon:Legends|caption=Travian: Legends}} {{{legends}}} }}{{#if: {{{legends|}}} | {{#if: {{{kingdoms|}}} | {{sp}}/{{sp}} }} }}{{#if: {{{kingdoms|}}} | {{Icon:Kingdoms|caption=Travian: Kingdoms}} {{{kingdoms}}} }}&lt;/div&gt;</summary>
		<author><name>ITob</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.binary-tools.de/index.php?title=Template:SwitchVersion&amp;diff=923</id>
		<title>Template:SwitchVersion</title>
		<link rel="alternate" type="text/html" href="http://wiki.binary-tools.de/index.php?title=Template:SwitchVersion&amp;diff=923"/>
		<updated>2019-11-17T13:44:48Z</updated>

		<summary type="html">&lt;p&gt;ITob: Reverted edits by ITob (talk) to last revision by Be2-e4&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{#if: {{{legends|}}} | {{Icon:Legends|caption=Travian: Legends}} {{{legends}}} }}{{#if: {{{legends|}}} | {{#if: {{{kingdoms|}}} |  /  }} }}{{#if: {{{kingdoms|}}} | {{Icon:Kingdoms|caption=Travian: Kingdoms}} {{{kingdoms}}} }}&lt;/div&gt;</summary>
		<author><name>ITob</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.binary-tools.de/index.php?title=Template:Sp&amp;diff=922</id>
		<title>Template:Sp</title>
		<link rel="alternate" type="text/html" href="http://wiki.binary-tools.de/index.php?title=Template:Sp&amp;diff=922"/>
		<updated>2019-11-17T13:43:29Z</updated>

		<summary type="html">&lt;p&gt;ITob: Created page with &amp;quot;&amp;amp;#32;&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;amp;#32;&lt;/div&gt;</summary>
		<author><name>ITob</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.binary-tools.de/index.php?title=Template:SwitchVersion&amp;diff=921</id>
		<title>Template:SwitchVersion</title>
		<link rel="alternate" type="text/html" href="http://wiki.binary-tools.de/index.php?title=Template:SwitchVersion&amp;diff=921"/>
		<updated>2019-11-17T13:40:19Z</updated>

		<summary type="html">&lt;p&gt;ITob: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{#if: {{{legends|}}} | {{Icon:Legends|caption=Travian: Legends}} {{{legends}}} }}{{#if: {{{legends|}}} | {{#if: {{{kingdoms|}}} | {{sp}}/{{sp}} }} }}{{#if: {{{kingdoms|}}} | {{Icon:Kingdoms|caption=Travian: Kingdoms}} {{{kingdoms}}} }}&lt;/div&gt;</summary>
		<author><name>ITob</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.binary-tools.de/index.php?title=Starvation&amp;diff=917</id>
		<title>Starvation</title>
		<link rel="alternate" type="text/html" href="http://wiki.binary-tools.de/index.php?title=Starvation&amp;diff=917"/>
		<updated>2019-11-16T18:17:27Z</updated>

		<summary type="html">&lt;p&gt;ITob: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages/&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
If you have an empty granary and a negative crop production in a village, troops will start to starve there. Starved troops return {{SwitchVersion|kingdoms=(100 * their crop consumption)|legends=the crop training cost of the unit}} crop to feed the remaining troops for a while, until the granary becomes empty again. Troops strave in a specific order, however Kingdoms and Legends have different rules.&lt;br /&gt;
&lt;br /&gt;
== Starve order == &amp;lt;!--T:2--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== {{Icon:Kingdoms}} Kingdoms === &amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
Kingdoms distinguishes between five starvation classes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
# Foreign units, that support the starving village.&lt;br /&gt;
# Own units from other villages, that support the starving village.&lt;br /&gt;
# Own units from the starving village, that are trapped in some gaul's traps.&lt;br /&gt;
# Own units from the starving village, that are at home.&lt;br /&gt;
# Own units from the starving village, that aren't at home (e.g. reinforcing an oasis or moving troops).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
Troops of the first class starve completely before troops of any other classes, i.e. troops of the 2nd-5th class can only starve if no troops of the first class exist. Analogously, no troops of the 3rd-5th class can only starve if no troops of the first or second class exist, and so on.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:7--&amp;gt;&lt;br /&gt;
Within one class, the biggest troop compound starves first, counting by numbers, not by crop consumption. If e.g. one player sends 5000 phalanxes and another player sends 3000 druidriders, the phalanxes will starve first, if both compounds fit into the same class.&lt;br /&gt;
Within one compound, the most common troop type starves first, again counted by numbers, not by crop consumption. If the compound to starve has 2000 phalanxes and 1500 druidriders, its phalanxes will starve first. In case of a tie, the &amp;quot;leftmost&amp;quot; unit will starve, e.g. phalanxes before swordsmen.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:8--&amp;gt;&lt;br /&gt;
These rules are applied unit by unit.&lt;br /&gt;
&lt;br /&gt;
==== Notes ==== &amp;lt;!--T:9--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:10--&amp;gt;&lt;br /&gt;
* It doesn't matter whether troops come from the same kingdom, NAP, confed or an enemy. All are treated equally concerning starvation.&lt;br /&gt;
* Unlike in T:L, sending a hammer into a WW may lead to significant starvation losses, as it's most likely the biggest troop compound and will therefore starve first. At a usual 6-digit negative production this means a 4-digit loss of infantry units per hour.&lt;br /&gt;
* Starvation does not generate any reports, but starved troops are mentioned in the welcome screen.&lt;br /&gt;
&lt;br /&gt;
=== {{Icon:Legends}} Legends === &amp;lt;!--T:11--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;/div&gt;</summary>
		<author><name>ITob</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.binary-tools.de/index.php?title=Template:SwitchVersion&amp;diff=889</id>
		<title>Template:SwitchVersion</title>
		<link rel="alternate" type="text/html" href="http://wiki.binary-tools.de/index.php?title=Template:SwitchVersion&amp;diff=889"/>
		<updated>2019-11-02T11:57:06Z</updated>

		<summary type="html">&lt;p&gt;ITob: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{#if: {{{legends|}}} | {{Icon:Legends|caption=Travian: Legends}} {{{legends}}} }}{{#if: {{{legends|}}} | {{#if: {{{kingdoms|}}} | / }} }}{{#if: {{{kingdoms|}}} | {{Icon:Kingdoms|caption=Travian: Kingdoms}} {{{kingdoms}}} }}&lt;/div&gt;</summary>
		<author><name>ITob</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.binary-tools.de/index.php?title=Template:SwitchVersion&amp;diff=888</id>
		<title>Template:SwitchVersion</title>
		<link rel="alternate" type="text/html" href="http://wiki.binary-tools.de/index.php?title=Template:SwitchVersion&amp;diff=888"/>
		<updated>2019-11-02T11:55:12Z</updated>

		<summary type="html">&lt;p&gt;ITob: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{#if: {{{legends|}}} | {{Icon:Legends|caption=Travian: Legends}} {{{legends}}} }}&lt;br /&gt;
{{#if: {{{legends|}}} | {{#if: {{{kingdoms|}}} | / }} }}&lt;br /&gt;
{{#if: {{{kingdoms|}}} | {{Icon:Kingdoms|caption=Travian: Kingdoms}} {{{kingdoms}}} }}&lt;/div&gt;</summary>
		<author><name>ITob</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.binary-tools.de/index.php?title=Fake&amp;diff=834</id>
		<title>Fake</title>
		<link rel="alternate" type="text/html" href="http://wiki.binary-tools.de/index.php?title=Fake&amp;diff=834"/>
		<updated>2019-10-30T16:04:12Z</updated>

		<summary type="html">&lt;p&gt;ITob: Created page with &amp;quot;&amp;lt;languages/&amp;gt; &amp;lt;translate&amp;gt; A '''fake attack''' ('''fake''') is an attack sent to hide the real target of a larger operation. Its goal is to reduce losses in battle by reducing t...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages/&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
A '''fake attack''' ('''fake''') is an attack sent to hide the real target of a larger operation. Its goal is to reduce losses in battle by reducing the amount of defending troops. Therefore the real attack is usually accompanied by multiple fake attacks with different target villages. The defender then has to choose to either distribute the defensive troops on multiple villages or choose one village to defend and leave the others undefended.&lt;br /&gt;
&lt;br /&gt;
== Amount of troops ==&lt;br /&gt;
&lt;br /&gt;
For a fake to be effective it needs to be indistinguishable from the real attack. Therefore a minimal amount of troops is required depending on the level of the [[rally point]] of the defending village and {{SwitchVersion|kingdoms=the [[spyglass]] of the defender}}.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\text{Amount of troops required} = \text{Level of rally point} + \text{Spyglass} + \text{Spyglass upgrade}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Given that these values are usually unknown to the attacker the highest possible values have to be assumed. These are fixed for the rally point (20) and spyglass upgrade (5) but depend on the current [[item tier]] for the spyglass. The required numbers of troops can be seen in the following table.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Hero item tier !! Amount of troops (Calculation)&lt;br /&gt;
|-&lt;br /&gt;
| Tier 1 || 32 (20 + 7 + 5)&lt;br /&gt;
|-&lt;br /&gt;
| Tier 2 || 37 (20 + 12 + 5)&lt;br /&gt;
|-&lt;br /&gt;
| Tier 3 || 45 (20 + 20 + 5)&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;/div&gt;</summary>
		<author><name>ITob</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.binary-tools.de/index.php?title=Fake&amp;diff=835</id>
		<title>Fake</title>
		<link rel="alternate" type="text/html" href="http://wiki.binary-tools.de/index.php?title=Fake&amp;diff=835"/>
		<updated>2019-10-30T16:04:12Z</updated>

		<summary type="html">&lt;p&gt;ITob: Marked this version for translation&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages/&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
A '''fake attack''' ('''fake''') is an attack sent to hide the real target of a larger operation. Its goal is to reduce losses in battle by reducing the amount of defending troops. Therefore the real attack is usually accompanied by multiple fake attacks with different target villages. The defender then has to choose to either distribute the defensive troops on multiple villages or choose one village to defend and leave the others undefended.&lt;br /&gt;
&lt;br /&gt;
== Amount of troops == &amp;lt;!--T:2--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
For a fake to be effective it needs to be indistinguishable from the real attack. Therefore a minimal amount of troops is required depending on the level of the [[rally point]] of the defending village and {{SwitchVersion|kingdoms=the [[spyglass]] of the defender}}.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\text{Amount of troops required} = \text{Level of rally point} + \text{Spyglass} + \text{Spyglass upgrade}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
Given that these values are usually unknown to the attacker the highest possible values have to be assumed. These are fixed for the rally point (20) and spyglass upgrade (5) but depend on the current [[item tier]] for the spyglass. The required numbers of troops can be seen in the following table.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Hero item tier !! Amount of troops (Calculation)&lt;br /&gt;
|-&lt;br /&gt;
| Tier 1 || 32 (20 + 7 + 5)&lt;br /&gt;
|-&lt;br /&gt;
| Tier 2 || 37 (20 + 12 + 5)&lt;br /&gt;
|-&lt;br /&gt;
| Tier 3 || 45 (20 + 20 + 5)&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;/div&gt;</summary>
		<author><name>ITob</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.binary-tools.de/index.php?title=Template:SwitchVersion&amp;diff=833</id>
		<title>Template:SwitchVersion</title>
		<link rel="alternate" type="text/html" href="http://wiki.binary-tools.de/index.php?title=Template:SwitchVersion&amp;diff=833"/>
		<updated>2019-10-30T15:22:18Z</updated>

		<summary type="html">&lt;p&gt;ITob: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{#if: {{{legends|}}} | {{Icon:Legends|caption=Travian: Legends}} {{{legends}}} }}&lt;br /&gt;
{{#if: {{{legends|}}} | {{#if: {{{kingdoms|}}} | / }} }}&lt;br /&gt;
{{#if: {{{legends|}}} | {{Icon:Kingdoms|caption=Travian: Kingdoms}} {{{kingdoms}}} }}&lt;/div&gt;</summary>
		<author><name>ITob</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.binary-tools.de/index.php?title=Capital&amp;diff=831</id>
		<title>Capital</title>
		<link rel="alternate" type="text/html" href="http://wiki.binary-tools.de/index.php?title=Capital&amp;diff=831"/>
		<updated>2019-10-18T12:40:38Z</updated>

		<summary type="html">&lt;p&gt;ITob: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{stub}}&lt;br /&gt;
{{Legends Kingdoms Topic/en}}&lt;br /&gt;
&amp;lt;languages/&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== 1-1-1-15 as capital == &amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
Many high ranked players choose a 1-1-1-15 village as their capital. There are multiple reasons for this decision.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:2--&amp;gt;&lt;br /&gt;
'''Troops:''' Having a lot of troops requires a lot of crop to feed them. One can use the [[NPC trader]] to turn other resources into crop, but producing crop in the first place saves a lot of gold.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
'''Efficiency:''' The capital is the only village where resource fields can be expanded above level {{SwitchVersion|legends=10|kingdoms=12}}. To make the best use of this, one has to choose a 1-1-1-15 village because it yields the highest production compared to other village types.&lt;br /&gt;
:: ''Example:'' The best possible bonus for wood is {{SwitchVersion|legends=175% (25% Sawmill + 3x 50% from oases)|kingdoms=100% (25% Sawmill + 3x 25% from oases)}}. This bonus increases the production of at most 5 resource fields as there is no village type with more than 5 wood fields. The same applies to clay and iron. For crop the highest achievable bonus is 200% (25% Grain Mill + 25% Bakery + 3x 50% from oases) and this bonus increases the production of all 15 crop fields in a 1-1-1-15 village.&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;/div&gt;</summary>
		<author><name>ITob</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.binary-tools.de/index.php?title=Capital&amp;diff=826</id>
		<title>Capital</title>
		<link rel="alternate" type="text/html" href="http://wiki.binary-tools.de/index.php?title=Capital&amp;diff=826"/>
		<updated>2019-10-18T12:37:40Z</updated>

		<summary type="html">&lt;p&gt;ITob: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{stub}}&lt;br /&gt;
&amp;lt;languages/&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== 1-1-1-15 as capital == &amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Many high ranked players choose a 1-1-1-15 village as their capital. There are multiple reasons for this decision.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:2--&amp;gt;&lt;br /&gt;
'''Troops:''' Having a lot of troops requires a lot of crop to feed them. One can use the [[NPC trader]] to turn other resources into crop, but producing crop in the first place saves a lot of gold.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
'''Efficiency:''' The capital is the only village where resource fields can be expanded above level {{SwitchVersion|legends=10|kingdoms=12}}. To make the best use of this, one has to choose a 1-1-1-15 village because it yields the highest production compared to other village types.&lt;br /&gt;
:: ''Example:'' The best possible bonus for wood is {{SwitchVersion|legends=175% (25% Sawmill + 3x 50% from oases)|kingdoms=100% (25% Sawmill + 3x 25% from oases)}}. This bonus increases the production of at most 5 resource fields as there is no village type with more than 5 wood fields. The same applies to clay and iron. For crop the highest achievable bonus is 200% (25% Grain Mill + 25% Bakery + 3x 50% from oases) and this bonus increases the production of all 15 crop fields in a 1-1-1-15 village.&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;/div&gt;</summary>
		<author><name>ITob</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.binary-tools.de/index.php?title=Capital&amp;diff=827</id>
		<title>Capital</title>
		<link rel="alternate" type="text/html" href="http://wiki.binary-tools.de/index.php?title=Capital&amp;diff=827"/>
		<updated>2019-10-18T12:37:40Z</updated>

		<summary type="html">&lt;p&gt;ITob: Marked this version for translation&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{stub}}&lt;br /&gt;
&amp;lt;languages/&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== 1-1-1-15 as capital == &amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
Many high ranked players choose a 1-1-1-15 village as their capital. There are multiple reasons for this decision.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:2--&amp;gt;&lt;br /&gt;
'''Troops:''' Having a lot of troops requires a lot of crop to feed them. One can use the [[NPC trader]] to turn other resources into crop, but producing crop in the first place saves a lot of gold.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
'''Efficiency:''' The capital is the only village where resource fields can be expanded above level {{SwitchVersion|legends=10|kingdoms=12}}. To make the best use of this, one has to choose a 1-1-1-15 village because it yields the highest production compared to other village types.&lt;br /&gt;
:: ''Example:'' The best possible bonus for wood is {{SwitchVersion|legends=175% (25% Sawmill + 3x 50% from oases)|kingdoms=100% (25% Sawmill + 3x 25% from oases)}}. This bonus increases the production of at most 5 resource fields as there is no village type with more than 5 wood fields. The same applies to clay and iron. For crop the highest achievable bonus is 200% (25% Grain Mill + 25% Bakery + 3x 50% from oases) and this bonus increases the production of all 15 crop fields in a 1-1-1-15 village.&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;/div&gt;</summary>
		<author><name>ITob</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.binary-tools.de/index.php?title=Template:Stub&amp;diff=825</id>
		<title>Template:Stub</title>
		<link rel="alternate" type="text/html" href="http://wiki.binary-tools.de/index.php?title=Template:Stub&amp;diff=825"/>
		<updated>2019-10-18T12:32:26Z</updated>

		<summary type="html">&lt;p&gt;ITob: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;display:flex&amp;quot;&amp;gt;&amp;lt;div class=&amp;quot;{{#ifeq:{{NAMESPACE}}|{{TALKSPACE}}|standard-talk}} messagebox-pnutshell plainlinks&amp;quot; style=&amp;quot;position:relative;clear:both;margin:2px auto;border:1px solid #AAA;background:#F9F9F9;padding:0 0.5em;&amp;quot;&amp;gt;&lt;br /&gt;
This article is a stub. You can help by [{{fullurl:{{FULLPAGENAME}}|action=edit}} expanding it].&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;includeonly&amp;gt;{{{category|[[Category:Stubs]]}}}&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>ITob</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.binary-tools.de/index.php?title=Template:Stub&amp;diff=824</id>
		<title>Template:Stub</title>
		<link rel="alternate" type="text/html" href="http://wiki.binary-tools.de/index.php?title=Template:Stub&amp;diff=824"/>
		<updated>2019-10-18T12:27:29Z</updated>

		<summary type="html">&lt;p&gt;ITob: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;{{#ifeq:{{NAMESPACE}}|{{TALKSPACE}}|standard-talk}} messagebox-pnutshell plainlinks&amp;quot; style=&amp;quot;position:relative;clear:both;margin:2px auto;border:1px solid #AAA;background:#F9F9F9;padding:2px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;margin-left:0.5em&amp;quot;&amp;gt;This article is a stub. You can help by [{{fullurl:{{FULLPAGENAME}}|action=edit}} expanding it].&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;includeonly&amp;gt;{{{category|[[Category:Stubs]]}}}&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>ITob</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.binary-tools.de/index.php?title=Category:Stubs&amp;diff=823</id>
		<title>Category:Stubs</title>
		<link rel="alternate" type="text/html" href="http://wiki.binary-tools.de/index.php?title=Category:Stubs&amp;diff=823"/>
		<updated>2019-10-18T12:25:53Z</updated>

		<summary type="html">&lt;p&gt;ITob: Created page with &amp;quot;A stub is a page that is missing important details of the subject.&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A stub is a page that is missing important details of the subject.&lt;/div&gt;</summary>
		<author><name>ITob</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.binary-tools.de/index.php?title=Capital&amp;diff=816</id>
		<title>Capital</title>
		<link rel="alternate" type="text/html" href="http://wiki.binary-tools.de/index.php?title=Capital&amp;diff=816"/>
		<updated>2019-10-18T12:21:56Z</updated>

		<summary type="html">&lt;p&gt;ITob: Created page with &amp;quot;{{stub}} &amp;lt;languages/&amp;gt; &amp;lt;translate&amp;gt; == Why do many high ranked players choose a 1-1-1-15 as capital? ==  '''Troops:''' Having a lot of troops requires a lot of crop to feed them...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{stub}}&lt;br /&gt;
&amp;lt;languages/&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Why do many high ranked players choose a 1-1-1-15 as capital? ==&lt;br /&gt;
&lt;br /&gt;
'''Troops:''' Having a lot of troops requires a lot of crop to feed them. One can use the [[NPC trader]] to turn other resources into crop, but producing crop in the first place saves a lot of gold.&lt;br /&gt;
&lt;br /&gt;
'''Efficiency:''' The capital is the only village where resource fields can be expanded above level {{SwitchVersion|legends=10|kingdoms=12}}. To make the best use of this, one has to choose a 1-1-1-15 village because it yields the highest production compared to other village types.&lt;br /&gt;
:: ''Example:'' The best possible bonus for wood is {{SwitchVersion|legends=175% (25% Sawmill + 3x 50% from oases)|kingdoms=100% (25% Sawmill + 3x 25% from oases)}}. This bonus increases the production of at most 5 resource fields as there is no village type with more than 5 wood fields. The same applies to clay and iron. For crop the highest achievable bonus is 200% (25% Grain Mill + 25% Bakery + 3x 50% from oases) and this bonus increases the production of all 15 crop fields in a 1-1-1-15 village.&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;/div&gt;</summary>
		<author><name>ITob</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.binary-tools.de/index.php?title=Capital&amp;diff=817</id>
		<title>Capital</title>
		<link rel="alternate" type="text/html" href="http://wiki.binary-tools.de/index.php?title=Capital&amp;diff=817"/>
		<updated>2019-10-18T12:21:56Z</updated>

		<summary type="html">&lt;p&gt;ITob: Marked this version for translation&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{stub}}&lt;br /&gt;
&amp;lt;languages/&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Why do many high ranked players choose a 1-1-1-15 as capital? == &amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:2--&amp;gt;&lt;br /&gt;
'''Troops:''' Having a lot of troops requires a lot of crop to feed them. One can use the [[NPC trader]] to turn other resources into crop, but producing crop in the first place saves a lot of gold.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
'''Efficiency:''' The capital is the only village where resource fields can be expanded above level {{SwitchVersion|legends=10|kingdoms=12}}. To make the best use of this, one has to choose a 1-1-1-15 village because it yields the highest production compared to other village types.&lt;br /&gt;
:: ''Example:'' The best possible bonus for wood is {{SwitchVersion|legends=175% (25% Sawmill + 3x 50% from oases)|kingdoms=100% (25% Sawmill + 3x 25% from oases)}}. This bonus increases the production of at most 5 resource fields as there is no village type with more than 5 wood fields. The same applies to clay and iron. For crop the highest achievable bonus is 200% (25% Grain Mill + 25% Bakery + 3x 50% from oases) and this bonus increases the production of all 15 crop fields in a 1-1-1-15 village.&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;/div&gt;</summary>
		<author><name>ITob</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.binary-tools.de/index.php?title=Template:SwitchVersion&amp;diff=815</id>
		<title>Template:SwitchVersion</title>
		<link rel="alternate" type="text/html" href="http://wiki.binary-tools.de/index.php?title=Template:SwitchVersion&amp;diff=815"/>
		<updated>2019-10-18T12:19:58Z</updated>

		<summary type="html">&lt;p&gt;ITob: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Icon:Legends|caption=Travian: Legends}} {{{legends}}} / {{Icon:Kingdoms|caption=Travian: Kingdoms}} {{{kingdoms}}}&lt;/div&gt;</summary>
		<author><name>ITob</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.binary-tools.de/index.php?title=Template:Icon:Legends&amp;diff=814</id>
		<title>Template:Icon:Legends</title>
		<link rel="alternate" type="text/html" href="http://wiki.binary-tools.de/index.php?title=Template:Icon:Legends&amp;diff=814"/>
		<updated>2019-10-18T12:19:06Z</updated>

		<summary type="html">&lt;p&gt;ITob: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Legends Logo.png|{{{size|16px}}}|{{{caption|}}}]]&lt;/div&gt;</summary>
		<author><name>ITob</name></author>
		
	</entry>
</feed>