Size: 3876
Comment:
|
← Revision 7 as of 2014-02-10 18:51:06 ⇥
Size: 1910
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
||<tablestyle="margin: 1em 1em 1em 0px; background-color: rgb(249, 249, 249); border-style: solid; border-color: rgb(170, 170, 170); color: rgb(0, 0, 0); font-family: sans-serif; font-size: 13px; line-height: 19.5px; text-align: start; " tableclass="wikitable"style="border-style: solid; border-color: rgb(170, 170, 170); padding: 0.2em; background-color: rgb(242, 242, 242); ">Usage:||<style="border-style: solid; border-color: rgb(170, 170, 170); padding: 0.2em; ">fortification type:quantity,type:quantity,type:quantity || ||<style="border-style: solid; border-color: rgb(170, 170, 170); padding: 0.2em; background-color: rgb(242, 242, 242); ">Example:||<style="border-style: solid; border-color: rgb(170, 170, 170); padding: 0.2em; ">fortification tra:1 || ||<style="border-color: rgb(170, 170, 170); padding: 0.2em; background-color: rgb(242, 242, 242); "> ||<style="border-style: solid; border-color: rgb(170, 170, 170); padding: 0.2em; ">fortification tra:1,ab:1,at:1 || ||<style="border-color: rgb(170, 170, 170); padding: 0.2em; background-color: rgb(242, 242, 242); "> ||<style="border-style: solid; border-color: rgb(170, 170, 170); padding: 0.2em; ">fortification tra:10,ab:10,at:10 || ||<style="border-color: rgb(170, 170, 170); padding: 0.2em; background-color: rgb(242, 242, 242); "> ||<style="border-style: solid; border-color: rgb(170, 170, 170); padding: 0.2em; ">fortification tra:100,ab:100,at:100,tre:10 || ||<style="border-color: rgb(170, 170, 170); padding: 0.2em; background-color: rgb(242, 242, 242); "> ||<style="border-style: solid; border-color: rgb(170, 170, 170); padding: 0.2em; ">fortification tra:3000,ab:3000,at:15000,tre:200 || ||<style="border-style: solid; border-color: rgb(170, 170, 170); padding: 0.2em; background-color: rgb(242, 242, 242); ">Types:||<style="border-style: solid; border-color: rgb(170, 170, 170); padding: 0.2em; ">Trap - tra || ||<style="border-color: rgb(170, 170, 170); padding: 0.2em; background-color: rgb(242, 242, 242); "> ||<style="border-style: solid; border-color: rgb(170, 170, 170); padding: 0.2em; ">Abatis - ab || ||<style="border-color: rgb(170, 170, 170); padding: 0.2em; background-color: rgb(242, 242, 242); "> ||<style="border-style: solid; border-color: rgb(170, 170, 170); padding: 0.2em; ">Archer Tower - at || ||<style="border-color: rgb(170, 170, 170); padding: 0.2em; background-color: rgb(242, 242, 242); "> ||<style="border-style: solid; border-color: rgb(170, 170, 170); padding: 0.2em; ">Rolling Log - r || ||<style="border-style: solid; border-color: rgb(170, 170, 170); padding: 0.2em; background-color: rgb(242, 242, 242); "> ||<style="border-style: solid; border-color: rgb(170, 170, 170); padding: 0.2em; ">Trebuchet - tre || |
## page was renamed from Fortifications Fortification objects can reference details about the wall defenses of your cities. |
Line 13: | Line 4: |
'''Fortification objects can be referenced as as: ''' | |
Line 14: | Line 6: |
This directive will tell the bot to build wall defenses for your city. Just like the troop goal, fortification is read line by line in sequential order. In the example above, the bot is told to build 1 trap, 1 abatis, and 1 AT, then build 10 traps, 10 abatis, and 10 ATs, then build 100 traps, 100 abatis, 100 ATs, and 10 trebs, then build 3000 traps, 3000 abatis, 15000 ATs, and 200 trebs. | . ''m_city.cityManager.fortification.property '''or''' city.fortification.property'' |
Line 16: | Line 8: |
If the bot is currently working on building the 4th line of fortification goals, and you get attacked and you lose part or all of your wall defenses, with the above settings, the bot will stop queuing the 4th line and instead complete the goal of 1 trap/abatis/AT again from the 1st line, then go to the 2nd line and build the 10 traps/abatis/ATs, then go to the 3rd line and build the 100 traps/abatis/ATs and 10 trebs, then resume where it left off on the 4th line. | 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 ''city.fortification.rockfall''. '''Properties''' ||<tablewidth="796px" tableheight="123px"#cccccc>'''Property ''' ||<#cccccc>'''Type''' ||<#cccccc>'''Description ''' || ||fortification.arrowTower ||int ||Get the current number of ATs on the walls. || ||fortification.abatis ||int ||Get the current number of abatis on the walls. || ||fortification.rockfall ||int ||Get the current number of trebs on the walls. || ||fortification.rollingLogs ||int ||Get the current number of logs on the walls. || ||fortification.trap ||int ||Get the current number of traps on the walls. || ||fortificationsRequirement.arrowTower ||int ||Get the number of ATs to be built in the city's goals. || ||fortificationsRequirement.abatis ||int ||Get the number of abatis to be built in the city's goals. || ||fortificationsRequirement.rockfall ||int ||Get the number of trebs to be built in the city's goals. || ||fortificationsRequirement.rollingLogs ||int ||Get the number of logs to be built in the city's goals. || ||fortificationsRequirement.trap ||int ||Get the number of traps to be built in the city's goals. || |
Line 18: | Line 23: |
During an attack on you, the bot will read and build 1 of each type of wall defense listed on the 1st line of fortification goals with emergency priority. By setting these queue goals wisely, you can make yourself quite hard to break. | '''Examples''' . {{{ // 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 }}} |
Line 20: | Line 33: |
CategoryAllGoals CategoryCityGoals | ScriptObjects |
Fortification objects can reference details about the wall defenses of your cities.
Fortification objects can be referenced as as:
m_city.cityManager.fortification.property or city.fortification.property
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 city.fortification.rockfall.
Properties
Property |
Type |
Description |
fortification.arrowTower |
int |
Get the current number of ATs on the walls. |
fortification.abatis |
int |
Get the current number of abatis on the walls. |
fortification.rockfall |
int |
Get the current number of trebs on the walls. |
fortification.rollingLogs |
int |
Get the current number of logs on the walls. |
fortification.trap |
int |
Get the current number of traps on the walls. |
fortificationsRequirement.arrowTower |
int |
Get the number of ATs to be built in the city's goals. |
fortificationsRequirement.abatis |
int |
Get the number of abatis to be built in the city's goals. |
fortificationsRequirement.rockfall |
int |
Get the number of trebs to be built in the city's goals. |
fortificationsRequirement.rollingLogs |
int |
Get the number of logs to be built in the city's goals. |
fortificationsRequirement.trap |
int |
Get the number of traps to be built in the city's goals. |
Examples
// 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