<?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>Castle</title><revhistory><revision><revnumber>11</revnumber><date>2015-02-21 05:36:28</date><authorinitials>tech</authorinitials></revision><revision><revnumber>10</revnumber><date>2015-02-17 23:01:17</date><authorinitials>LKD70</authorinitials></revision><revision><revnumber>9</revnumber><date>2014-02-10 18:47:02</date><authorinitials>Inanna</authorinitials></revision><revision><revnumber>8</revnumber><date>2014-02-10 18:40:32</date><authorinitials>Inanna</authorinitials></revision><revision><revnumber>7</revnumber><date>2013-08-02 02:46:49</date><authorinitials>tech</authorinitials></revision><revision><revnumber>6</revnumber><date>2013-08-02 02:35:35</date><authorinitials>tech</authorinitials></revision><revision><revnumber>5</revnumber><date>2013-02-28 03:02:36</date><authorinitials>Inanna</authorinitials></revision><revision><revnumber>4</revnumber><date>2012-11-29 17:25:37</date><authorinitials>Inanna</authorinitials></revision><revision><revnumber>3</revnumber><date>2012-11-29 17:23:07</date><authorinitials>Inanna</authorinitials></revision><revision><revnumber>2</revnumber><date>2012-11-29 17:22:50</date><authorinitials>Inanna</authorinitials></revision><revision><revnumber>1</revnumber><date>2012-11-29 17:22:11</date><authorinitials>Inanna</authorinitials></revision></revhistory></articleinfo><para>The Castle objects can reference details about the city the script is run in. </para><para><emphasis role="strong">Castle objects can be referenced as:</emphasis> </para><itemizedlist><listitem override="none"><para><emphasis>m_city.cityManager.castle.property <emphasis role="strong">or</emphasis> city.castle.property</emphasis> </para></listitem></itemizedlist><para>The .property at the end is how you will specify which detail you are referencing. Using the table below, you can for example get the name of the city with <emphasis>city.castle.name</emphasis>. Some castle properties are aliased via the city object as well, for example city.castle.name and city.name are the same thing. </para><para><emphasis role="strong">Properties</emphasis> </para><informaltable><tgroup cols="3"><colspec colname="col_0"/><colspec colname="col_1"/><colspec colname="col_2"/><tbody><row rowsep="1"><entry colsep="1" rowsep="1"><para><emphasis role="strong">Property </emphasis> </para></entry><entry colsep="1" rowsep="1"><para><emphasis role="strong">Type</emphasis> </para></entry><entry colsep="1" rowsep="1"><para><emphasis role="strong">Description </emphasis> </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>allowAlliance </para></entry><entry colsep="1" rowsep="1"><para>Boolean </para></entry><entry colsep="1" rowsep="1"><para>Returns true if the embassy is open. </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>buffs </para></entry><entry colsep="1" rowsep="1"><para>Object </para></entry><entry colsep="1" rowsep="1"><para>Returns an object of the current castles buffs. </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>buildingQueuesArray </para></entry><entry colsep="1" rowsep="1"><para>Array </para></entry><entry colsep="1" rowsep="1"><para>Returns information on the current castles building queues. </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>buildingsArray </para></entry><entry colsep="1" rowsep="1"><para>Array of Objects </para></entry><entry colsep="1" rowsep="1"><para>Returns infromation on the current castles buildings. </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>fieldId </para></entry><entry colsep="1" rowsep="1"><para>Integer </para></entry><entry colsep="1" rowsep="1"><para>Returns the Field ID of the cuttent Castle. </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>fieldsArray </para></entry><entry colsep="1" rowsep="1"><para>Array </para></entry><entry colsep="1" rowsep="1"><para>Returns infromation on the castles fields. </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>fortification </para></entry><entry colsep="1" rowsep="1"><para>Object </para></entry><entry colsep="1" rowsep="1"><para>Returns infromation on the castles fortifications. </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>hasEnemy </para></entry><entry colsep="1" rowsep="1"><para>Boolean </para></entry><entry colsep="1" rowsep="1"><para>Returns true if the castle has incoming attacks. </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>herosArray </para></entry><entry colsep="1" rowsep="1"><para>Array of Objects </para></entry><entry colsep="1" rowsep="1"><para>Returns information on the heroes in the castle. </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>id </para></entry><entry colsep="1" rowsep="1"><para>Integer </para></entry><entry colsep="1" rowsep="1"><para>Returns the unique ID of the castle. </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>logUrl </para></entry><entry colsep="1" rowsep="1"><para>String </para></entry><entry colsep="1" rowsep="1"><para>Returns the path of the Castle image. </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>name </para></entry><entry colsep="1" rowsep="1"><para>String </para></entry><entry colsep="1" rowsep="1"><para>Returns the name of the current castle. </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>oid </para></entry><entry colsep="1" rowsep="1"><para>Integer </para></entry><entry colsep="1" rowsep="1"><para>Returns the old Castle ID. </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para><ulink url="http://guide.neatportal.com/wiki/Castle/wiki/CityResource#">resource</ulink> </para></entry><entry colsep="1" rowsep="1"><para>Object </para></entry><entry colsep="1" rowsep="1"><para>Returns an object containing the current castles resource information. </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>support </para></entry><entry colsep="1" rowsep="1"><para>Boolean </para></entry><entry colsep="1" rowsep="1"><para>Returns true if supporting troops exist. </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>tradesArray </para></entry><entry colsep="1" rowsep="1"><para>Array Of Objects </para></entry><entry colsep="1" rowsep="1"><para>Returns information on current trades in the castle. </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>transingTradesArray </para></entry><entry colsep="1" rowsep="1"><para>Array </para></entry><entry colsep="1" rowsep="1"><para>Returns infromation on successful ongoing trades. </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>troop </para></entry><entry colsep="1" rowsep="1"><para>Object </para></entry><entry colsep="1" rowsep="1"><para>Returns infroamtion on the current castles troops. </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>usePACIFY_SUCCOUR_OR_PACIFY_PRAY </para></entry><entry colsep="1" rowsep="1"><para>boolean </para></entry><entry colsep="1" rowsep="1"><para>Returns true if conforting is in cooldown. </para></entry></row></tbody></tgroup></informaltable><!--rule (<hr>) is not applicable to DocBook--><para> <ulink url="http://guide.neatportal.com/wiki/Castle/wiki/ScriptObjects#">ScriptObjects</ulink> </para></article>