From NEAT Portal Wiki
Jump to: navigation, search
(Created page with "=How to Use and Write Goals= 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...")
(No difference)

Revision as of 15:00, 24 May 2011

How to Use and Write Goals

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 to do.

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, fortification:1, trainpol:0, buildnpc:20, keepatthome:1, reservedbarrack:1, troopsusepopmax:1, troop:1, feastinghallspace:1, valley:10, wallqueuetime:0.5, comfort:1, troopqueuetime:2, trade:0, 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 Y.A.E.B. forums, read the entire error first to see if the solution may be obvious, then use this wiki's search feature or the Y.A.E.B. 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 "City 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, 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 Y.A.E.B. forums.