• My Pages
  • Comments
  • Add Link
  • Subscribe
  • Subscribe User
  • Edit (GUI)
  • Edit (Text)
  • Rename Page
  • Copy Page
  • Load Page
  • Save Page
  • Delete Page
  • Attachments
  • Check Spelling
  • Diffs
  • Info
  • Revert to this revision
  • XML
  • Render as Docbook
  • Print View
  • Raw Text
  • Delete Cache
  • Like Pages
  • Local Site Map
  • Remove Spam
  • Package Pages
  • Sync Pages
    • Diff for "CategoryScripts"
    Differences between revisions 6 and 7
    Revision 6 as of 2012-09-18 17:15:21
    Size: 1813
    Editor: Inanna
    Comment:
    Revision 7 as of 2012-09-18 17:42:11
    Size: 34
    Editor: Inanna
    Comment:
    Deletions are marked like this. Additions are marked like this.
    Line 1: Line 1:
    Scripting allows you to enter commands to the bot that will be performed immediately line by line, as opposed to goals which are gradually worked towards. For instance, the directive ''troop a:5000'' in the goals window tells the bot to build archers until you have 5000 then move to the next goal. If you already have 5000 or more archers, it is disregarded. The script command ''train a:5000'' will immediately queue 5000 archers in your barracks regardless of how many you have already, provided of course you have the population and resources needed.

    The Script window is similar to the Goals window, and is found by selecting the ''Script'' tab on the upper left hand window. There are 10 individual script 'saves' per city, allowing you to build up to 10 command sets per city, that will be saved (provided you select the ''save'' button) along with your goals. Individual scripts are selected by way of the ''Load'' button.

    The commands available give you the ability to perform all of the the same functions the bot works towards in the goals window, as well as add to or alter those goals. Note that goals modified or added in the script window will not be reflected in the goals window, or saved with them.

    The script set includes ''ifgosub'' and ''ifgoto'' statements allowing you to automatically make decisions based on conditions in your city, such as the amount of lumber or number of warriors you have on hand. You can use [[References]] to make these two script commands even more powerful.

    Scripts are executed from the top down, beginning at the line number specified in the ''Run'' box. If no number is entered, or the number is greater than the number of lines in the script, you can make the script begin at line #1 by checking "Always start scripts line 1" in Global Settings.
    <<Include(ScriptingForDummies)>>

    CategoryScripts (last edited 2014-02-10 18:00:28 by Inanna)