<?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>Fortification</title><revhistory><revision><revnumber>7</revnumber><date>2014-02-10 18:51:06</date><authorinitials>Inanna</authorinitials></revision><revision><revnumber>6</revnumber><date>2014-02-10 18:50:33</date><authorinitials>Inanna</authorinitials></revision><revision><revnumber>5</revnumber><date>2013-05-30 14:14:49</date><authorinitials>Inanna</authorinitials></revision><revision><revnumber>4</revnumber><date>2012-08-23 22:49:56</date><authorinitials>Inanna</authorinitials></revision><revision><revnumber>3</revnumber><date>2012-08-21 13:58:29</date><authorinitials>Inanna</authorinitials></revision><revision><revnumber>2</revnumber><date>2012-08-21 13:57:33</date><authorinitials>Inanna</authorinitials></revision><revision><revnumber>1</revnumber><date>2012-08-21 13:55:35</date><authorinitials>Inanna</authorinitials></revision></revhistory></articleinfo><para>Fortification objects can reference details about the wall defenses of your cities. </para><para><emphasis role="strong">Fortification objects can be referenced as as: </emphasis> </para><itemizedlist><listitem override="none"><para><emphasis>m_city.cityManager.fortification.property <emphasis role="strong">or</emphasis> city.fortification.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 current count of trebs built on your walls with <emphasis>city.fortification.rockfall</emphasis>. </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>fortification.arrowTower </para></entry><entry colsep="1" rowsep="1"><para>int </para></entry><entry colsep="1" rowsep="1"><para>Get the current number of ATs on the walls. </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>fortification.abatis  </para></entry><entry colsep="1" rowsep="1"><para>int </para></entry><entry colsep="1" rowsep="1"><para>Get the current number of abatis on the walls. </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>fortification.rockfall  </para></entry><entry colsep="1" rowsep="1"><para>int </para></entry><entry colsep="1" rowsep="1"><para>Get the current number of trebs on the walls. </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>fortification.rollingLogs  </para></entry><entry colsep="1" rowsep="1"><para>int </para></entry><entry colsep="1" rowsep="1"><para>Get the current number of logs on the walls. </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>fortification.trap  </para></entry><entry colsep="1" rowsep="1"><para>int </para></entry><entry colsep="1" rowsep="1"><para>Get the current number of traps on the walls. </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>fortificationsRequirement.arrowTower  </para></entry><entry colsep="1" rowsep="1"><para>int </para></entry><entry colsep="1" rowsep="1"><para>Get the number of ATs to be built in the city's goals. </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>fortificationsRequirement.abatis  </para></entry><entry colsep="1" rowsep="1"><para>int </para></entry><entry colsep="1" rowsep="1"><para>Get the number of abatis to be built in the city's goals. </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>fortificationsRequirement.rockfall  </para></entry><entry colsep="1" rowsep="1"><para>int </para></entry><entry colsep="1" rowsep="1"><para>Get the number of trebs to be built in the city's goals. </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>fortificationsRequirement.rollingLogs  </para></entry><entry colsep="1" rowsep="1"><para>int </para></entry><entry colsep="1" rowsep="1"><para>Get the number of logs to be built in the city's goals. </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>fortificationsRequirement.trap  </para></entry><entry colsep="1" rowsep="1"><para>int </para></entry><entry colsep="1" rowsep="1"><para>Get the number of traps to be built in the city's goals. </para></entry></row></tbody></tgroup></informaltable><para><emphasis role="strong">Examples</emphasis> </para><itemizedlist><listitem override="none"><screen><![CDATA[// Find the current number of trebs in the city, and build enough more to total 11k.
current = city.fortification.rockfall
need = 11000 - current
echo "We have " + current + " trebs, and need to build " + need + " more to total 11k."
execute "walldefense tre " + need]]></screen></listitem></itemizedlist><!--rule (<hr>) is not applicable to DocBook--><para> <ulink url="http://guide.neatportal.com/wiki/Fortification/wiki/ScriptObjects#">ScriptObjects</ulink> </para></article>