Difference between revisions of "External Services and Tools/API Documentation"

From BattleMaster Wiki
Jump to navigation Jump to search
(New page: All scripts are located at ''<nowiki>http://battlemaster.org/data/</nowiki>''. So, for example, to get the region data of Akesh Temple, you would access the URL http://battlemaster.org...)
 
m
Line 2: Line 2:
  
 
== region.php ==
 
== region.php ==
Parameters:
+
{| style="background:silver;"
;World : Game world ID you access, see [[#World IDs]]
+
|-
;ID : ID number of the region in question. You can find this for example by examining the URL of the "Details" link on the Region List page, or (if the page is already set up correctly) on the region's page here in the wiki.
+
! Parameter
 +
! Type
 +
! Meaning
 +
|-valign="top"
 +
| World
 +
| integer
 +
| Game world ID you access, see [[#World IDs]]
 +
|-valign="top"
 +
| ID
 +
| integer
 +
| ID number of the region in question. You can find this for example by examining the URL of the "Details" link on the Region List page, or (if the page is already set up correctly) on the region's page here in the wiki.
 +
|}
 +
 
  
 
Output:
 
Output:
 
  <regiondata>
 
  <regiondata>
     <continent>East Continent</continent>
+
     <continent> ''string'' </continent>
     <name>Akesh Temple</name>
+
     <name> ''string'' </name>
     <type>Stronghold</type>
+
     <type> ''string'' </type>
     <area>South Highlands</area>
+
     <area> ''string'' </area>
     <population>3900</population>
+
     <population> ''number'' </population>
     <economy>Stoneworks, Administration</economy>
+
     <economy> ''comma-seperated list of strings'' </economy>
     <realm>Caligus</realm>
+
     <realm> ''string'' </realm>
     <duchy>Akesh Temple</duchy>
+
     <duchy> ''string'' </duchy>
     <lord>Arak</lord>
+
     <lord> ''string'' </lord>
 
  </regiondata>
 
  </regiondata>
  
Line 24: Line 36:
 
=== World IDs ===
 
=== World IDs ===
 
The various game worlds of BattleMaster are internally accessed through ID numbers. Here is the mapping:
 
The various game worlds of BattleMaster are internally accessed through ID numbers. Here is the mapping:
;1:[[East Island]]
+
{| style="background:silver;"
;2:[[Atamara]]
+
|-
;4:[[Beluaterra]]
+
! ID
;6:[[Colonies]]
+
! WorldType
;7:[[Far East]]
+
|-
;8:[[Dwilight]]
+
| 1
 +
| [[East Island]]
 +
|-
 +
| 2
 +
| [[Atamara]]
 +
|-
 +
| 4
 +
| [[Beluaterra]]
 +
|-
 +
| 6
 +
| [[Colonies]]
 +
|-
 +
| 7
 +
| [[Far East]]
 +
|-
 +
| 8
 +
| [[Dwilight]]
 +
|}
 
Yes, 3 and 5 are missing. They used to be the IDs of South-West and South-East Island.
 
Yes, 3 and 5 are missing. They used to be the IDs of South-West and South-East Island.

Revision as of 14:31, 25 March 2009

All scripts are located at http://battlemaster.org/data/. So, for example, to get the region data of Akesh Temple, you would access the URL http://battlemaster.org/data/region.php?World=1&ID=1.

region.php

Parameter Type Meaning
World integer Game world ID you access, see #World IDs
ID integer ID number of the region in question. You can find this for example by examining the URL of the "Details" link on the Region List page, or (if the page is already set up correctly) on the region's page here in the wiki.


Output:

<regiondata>
   <continent> string </continent>
   <name> string </name>
   <type> string </type>
   <area> string </area>
   <population> number </population>
   <economy> comma-seperated list of strings </economy>
   <realm> string </realm>
   <duchy> string </duchy>
   <lord> string </lord>
</regiondata>


Additional Information

World IDs

The various game worlds of BattleMaster are internally accessed through ID numbers. Here is the mapping:

ID WorldType
1 East Island
2 Atamara
4 Beluaterra
6 Colonies
7 Far East
8 Dwilight

Yes, 3 and 5 are missing. They used to be the IDs of South-West and South-East Island.