• 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 "CategoryGoals"
    Differences between revisions 1 and 9 (spanning 8 versions)
    Revision 1 as of 2012-08-16 19:30:37
    Size: 6
    Editor: Inanna
    Comment:
    Revision 9 as of 2012-08-16 22:08:42
    Size: 4469
    Editor: Inanna
    Comment:
    Deletions are marked like this. Additions are marked like this.
    Line 1: Line 1:
    .... <<TableOfContents>>

    Goals are where you tell the bot what you want it to do. Each city has it's own individual goals window for editing. Configurations, directives, and policies are all entered in the goals window to tell the bot what you want it to do.

    {{attachment:Goals_Scripts_City_Settings.png}}

    == Syntax Highlighting ==
    You will notice the words you type in are colored. These colors are to guide you through proper goals writing. Some things you type will show up in red. Normally this means you have typed something invalid into your goals and should fix it, but sometimes it can also be a valid line that just isn't added to the bot's internal syntax highlighting list yet. New features may show up red for awhile until they are added.

    == Config switches ==
    Certain config goals in the bot can be turned on and off with a 0 or 1. Still others have a 2 or higher number as an option. Each configuation goal will be explained in the guide later, but for general knowledge:

     . 0 means off/no/false
     . 1 means on/yes/true

    == Notes and Comments ==
    You may "comment" out certain lines by adding a // or # at the beginning of the line. The bot will not perform any goals written on a commented line. This is a good way to remind yourself what a line does, eg:

    {{{
    // Tell my bot not to fire any hero I capture of lvl 100 or higher
    capturedfirelimit 100
    // Tell my bot to farm lvl 5 npcs
    config npc:5
    }}}
    or a good way to temporarily turn off a feature in your goals, eg:

    {{{
    // Tell my bot to send resources from this city to AnotherTown
    #keepresource AnotherTown w:20000000,i:20000000 5000000
    }}}
    == Formatting the lines ==
    Configs may be written one per line, eg:

    {{{
    config comfort:1
    config trade:0
    config valley:10
    }}}
    or all together on one line, eg:

    {{{
    config comfort:1,trade:0,valley:10
    }}}
    Directives and policies are written one per line with a space between them and the input, eg:

    {{{
    capturedfirelimit 70
    traininghero BigGuy 120
    resourcelimits 2b 50m 1b 30m
    distancepolicy 7 15 5 20 15
    }}}
    == Errors in Goals ==
    Sometimes when you save changes and set goals, the log window will show you an error. I have found that at least 75% of all users will read the bottom line of the error, eg:

    {{{
    21:05:16 (City) - setting goals
    21:05:16 (City) - SENDTROOPS: Invalid parameters: asdf
    21:05:16 (City) - expected: sendtroops coords trooptype local_min remote_min quantity
    21:05:16 (City) - examples: sendtroops 50,50 archer 500k 100k 100k
    21:05:16 (City) - sendtroops 50,50 scout 200k 100k -1
    21:05:16 (City) - comfort policy set to: popraise in every 15 to 18 minutes
    21:05:16 (City) - Config: hero:1, buildnpc:20, keepatthome:1, reservedbarrack:1, troopsusepopmax:1, valley:10, comfort:1, troopqueuetime:2, npc:5
    21:05:16 (City) - ERROR IN GOALS, please check!!!
    }}}
    The error in this case is not ''"21:05:16 (City) - ERROR IN GOALS, please check!!!"'' but instead it is ''"21:05:16 (City) - SENDTROOPS: Invalid parameters: asdf"''

    Please when posting questions or requests for help on the forums, read the entire error first to see if the solution may be obvious, then use this wiki's search feature or the forum's search for a solution, and finally paste the entire error as I have above along with the debugging log (explained below) and your goals script if you still can't figure it out.

    == Debugging ==
    The bot has powerful built-in debugging features. When you encounter an error that you're unable to figure out from the given clues, click on the "Debug Settings" tab in the city window with the problem.

    {{attachment:Debugsettings.PNG}}

    In this window you will see the individual features of the bot listed out. Simply check the relevant box or boxes, check Verbose, and wait for the problem/error to happen again. For example, if your bot is not farming npcs and you can't figure out why, check '''Verbose''' and '''Npc Farming''' boxes and uncheck the others. '''Normal''' can remain checked, it will not affect it.

    The bot should describe the processes it's working through in great detail for you. Remember that the bot only performs actions in one city at a time. The city currently "in focus" may not be the one with the problem. Wait a few minutes until you see the city in question gain focus, you'll know it because there will be a lot of spam with Verbose debugging. Copy and paste this debug log with your post for help on the forums.

    Goals are where you tell the bot what you want it to do. Each city has it's own individual goals window for editing. Configurations, directives, and policies are all entered in the goals window to tell the bot what you want it to do.

    Syntax Highlighting

    You will notice the words you type in are colored. These colors are to guide you through proper goals writing. Some things you type will show up in red. Normally this means you have typed something invalid into your goals and should fix it, but sometimes it can also be a valid line that just isn't added to the bot's internal syntax highlighting list yet. New features may show up red for awhile until they are added.

    Config switches

    Certain config goals in the bot can be turned on and off with a 0 or 1. Still others have a 2 or higher number as an option. Each configuation goal will be explained in the guide later, but for general knowledge:

    • 0 means off/no/false
    • 1 means on/yes/true

    Notes and Comments

    You may "comment" out certain lines by adding a // or # at the beginning of the line. The bot will not perform any goals written on a commented line. This is a good way to remind yourself what a line does, eg:

    // Tell my bot not to fire any hero I capture of lvl 100 or higher
    capturedfirelimit 100
    // Tell my bot to farm lvl 5 npcs
    config npc:5

    or a good way to temporarily turn off a feature in your goals, eg:

    // Tell my bot to send resources from this city to AnotherTown
    #keepresource AnotherTown w:20000000,i:20000000 5000000

    Formatting the lines

    Configs may be written one per line, eg:

    config comfort:1
    config trade:0
    config valley:10

    or all together on one line, eg:

    config comfort:1,trade:0,valley:10

    Directives and policies are written one per line with a space between them and the input, eg:

    capturedfirelimit 70
    traininghero BigGuy 120
    resourcelimits 2b 50m 1b 30m
    distancepolicy 7 15 5 20 15

    Errors in Goals

    Sometimes when you save changes and set goals, the log window will show you an error. I have found that at least 75% of all users will read the bottom line of the error, eg:

    21:05:16 (City) - setting goals
    21:05:16 (City) - SENDTROOPS: Invalid parameters: asdf
    21:05:16 (City) - expected: sendtroops coords trooptype local_min remote_min quantity
    21:05:16 (City) - examples: sendtroops 50,50 archer 500k 100k 100k
    21:05:16 (City) -           sendtroops 50,50 scout  200k 100k -1
    21:05:16 (City) - comfort policy set to: popraise  in every 15 to 18 minutes
    21:05:16 (City) - Config: hero:1, buildnpc:20, keepatthome:1, reservedbarrack:1, troopsusepopmax:1, valley:10, comfort:1, troopqueuetime:2, npc:5
    21:05:16 (City) - ERROR IN GOALS, please check!!!

    The error in this case is not "21:05:16 (City) - ERROR IN GOALS, please check!!!" but instead it is "21:05:16 (City) - SENDTROOPS: Invalid parameters: asdf"

    Please when posting questions or requests for help on the forums, read the entire error first to see if the solution may be obvious, then use this wiki's search feature or the forum's search for a solution, and finally paste the entire error as I have above along with the debugging log (explained below) and your goals script if you still can't figure it out.

    Debugging

    The bot has powerful built-in debugging features. When you encounter an error that you're unable to figure out from the given clues, click on the "Debug Settings" tab in the city window with the problem.

    In this window you will see the individual features of the bot listed out. Simply check the relevant box or boxes, check Verbose, and wait for the problem/error to happen again. For example, if your bot is not farming npcs and you can't figure out why, check Verbose and Npc Farming boxes and uncheck the others. Normal can remain checked, it will not affect it.

    The bot should describe the processes it's working through in great detail for you. Remember that the bot only performs actions in one city at a time. The city currently "in focus" may not be the one with the problem. Wait a few minutes until you see the city in question gain focus, you'll know it because there will be a lot of spam with Verbose debugging. Copy and paste this debug log with your post for help on the forums.

    CategoryGoals (last edited 2012-09-18 16:28:45 by Inanna)