<?xml version="1.0" encoding="utf-8"?><!DOCTYPE article  PUBLIC '-//OASIS//DTD DocBook XML V4.4//EN'  'http://www.docbook.org/xml/4.4/docbookx.dtd'><article><articleinfo><title>FieldId</title><revhistory><revision><revnumber>9</revnumber><date>2015-05-23 20:05:55</date><authorinitials>Inanna</authorinitials></revision><revision><revnumber>8</revnumber><date>2015-05-23 20:04:02</date><authorinitials>tech</authorinitials></revision><revision><revnumber>7</revnumber><date>2015-05-23 20:03:42</date><authorinitials>tech</authorinitials></revision><revision><revnumber>6</revnumber><date>2015-05-23 20:02:35</date><authorinitials>tech</authorinitials></revision><revision><revnumber>5</revnumber><date>2013-08-06 06:10:30</date><authorinitials>tech</authorinitials></revision><revision><revnumber>4</revnumber><date>2013-08-02 02:18:48</date><authorinitials>tech</authorinitials></revision><revision><revnumber>3</revnumber><date>2013-08-02 02:03:11</date><authorinitials>tech</authorinitials></revision><revision><revnumber>2</revnumber><date>2013-08-02 02:01:33</date><authorinitials>tech</authorinitials></revision><revision><revnumber>1</revnumber><date>2013-08-02 01:49:46</date><authorinitials>tech</authorinitials></revision></revhistory></articleinfo><para>The FieldId is a number between 0-63999 (at least on 800x800 grid servers) </para><para>Each FieldId is directly related to a coordinate pair, the game server uses <ulink url="http://guide.neatportal.com/wiki/FieldId/wiki/MapFunctions#GetFieldId">FieldIds</ulink> to reference all the squares on the map... 0,0 has fieldId of 0.... 1,0 has fieldId of 1... 799,0 has fieldId of 799... 1,1 is fieldId 800... there is a direct mathematical relationship between the coords and the fieldId. Many of the advanced scripting functions require you to convert your coordinates into fieldIds to use them. </para><para>You can convert x and y into FieldId using this forumla: </para><para>FieldId = x+(y*800) </para><para>Alternately, you can use the NEAT <ulink url="http://guide.neatportal.com/wiki/FieldId/wiki/MapFunctions#GetFieldId">GetFieldId(coords)</ulink> function to convert a set of coords into a FieldId </para><para>You can convert fieldId back into x and y using this forumla: </para><para>x = fieldId MOD 800 </para><para>y = floor(fieldId / 800) </para><para>Or you can use </para><para><ulink url="http://guide.neatportal.com/wiki/FieldId/wiki/FieldIdToCoords#">FieldIdToCoords</ulink>(fieldId) </para><!--rule (<hr>) is not applicable to DocBook--><!--rule (<hr>) is not applicable to DocBook--><para> <ulink url="http://guide.neatportal.com/wiki/FieldId/wiki/CategoryConstants#">CategoryConstants</ulink> </para></article>