Goals are where you tell the bot what you want it to do. This includes configurations, directives, and policies. Goals come in two flavors, global and city specific. Global goals are shared and can be included in the goals of individual cities. City specific goals can include the global goals by including the line:
They can then redefine and add other goals as well. Global goals are edited in the global goals window which appears under Settings.
Once the goals are set, they can be saved by clicking OK. You can apply them to all cities by pressing the Re-Apply button.
City specific goals are entered in the city's goal window.
Note the inclusion of the global goals in the example. Once set, the goals can be saved or applied using the right-click menu in the window.
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.
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
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
Configs may be written one per line, eg:
config comfort:1 config trade:0 config valley:10
or all together on one line, eg:
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
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 YAEB forums, read the entire error first to see if the solution may be obvious, then use this wiki's search feature or the YAEB 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.
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" button next to 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, and wait for the problem/error to happen again. The bot should describe the processes it's working through in great detail for you. Copy and paste this debug log with your post for help on the YAEB forums.