English

Kontakt

Gästebuch

Impressum

Farbauswahl

52903 Besucher
seit 15.11.04

Kontakt

Gästebuch

Impressum

Farbauswahl

52903 Besucher
seit 15.11.04

  • ECheck
  • English
  • Download
  • Eressea
  • Faroul

ECheck   V 4.1.4

What ECheck can do       What ECheck can not do       Installation of ECheck       Running ECheck       Environment Variables
ECheck Commands in Orders Template       Meta-Commands       Test Example       Miscellaneous

ECheck is a Syntax/Error-Checker for the PBeM game "Eressea". ECheck tests your orders for various possible errors and then reports the errors to you, so that you can fix the errors before you send in your orders to the Eressea Game Server.

ECheck is also found on the Eressea Game Server, but only does a limited test of you orders. Therefore, it is imperative you use ECheck at your computer to check all your orders. Here is a Test Example. shown below, that will help you understand more about ECheck..

to top of page

What ECheck Can Do

Mainly ECheck checks your orders for syntax errors, incorrect orders, and other various game related errors.

In your orders template there are notations for each unit telling ECheck how many men and how much silver the unit has. This information allows ECheck to check if your unit has enough silver to survive, if there is enough silver to do any recruiting that you have ordered, to pay the maintenance upkeep for any buildings in the region you command, or if you have enough silver to pay for learning skills (when applicable).
However, ECheck, of course, can not check how much silver you will earn nor can it check if you receive silver from an ally.

ECheck can also see from your orders template if a unit is on a ship or controls a ship. (for example, on the orders template this looks like "s124" when the unit is on ship number 124 or like "S124" when the unit is on board ship number 124 and also commands that ship.) Additionally, ECheck can also see from your orders template if a unit is in a building. controls a building, or controls a building with responsibility to pay the weekly maintenance upkeep for that building (for example, "U200" means that the unit must pay 200 silver per week to maintain the building, and U250+ would mean 250 silver per week plus some additional requirement, like 1 piece of wood per week for a Smithy.) Undead and Illusion units are noted with the "I" symbol on your orders template.

ECheck does the following error checking tests:

to top of page

What ECheck Can Not Do

ECheck has only limited data concerning your units. Therefore, the following checks and tests are not possible, in most situations, for ECheck to do:

Since ECheck can not read many real unit statistics it is possible that ECheck gives you warning that is not true.

The Silverpool Mode (ECheck Option -l) is not always applicable: for example, if one's unit is on a ship that is controlled and moved by another faction! In such a case the unit actually does move but ECheck does not know it. This can also result in situations where movement by "other means" occurs, such as with magic.

Donations of silver by (HELP SILVER) and (GIVE xxx yyy SILVER) from other factions is completely unseen by ECheck. Therefore warnings based on this can result.

Also the DEFAULT order can lead to certain error results when in reality there is no error.

However, some of the effects specified above can be limited with use of the Meta-commands.

to top of page

Installation

For a complete installation of ECheck you need these Additional Data Files. These files give ECheck lists of items, talents, >and magic spells for syntax checking. The format of these files is shown to >you inside the data files (they are .txt files, simple to read).

Where you store (save) these files is really not so important, as long as ECheck can find them. In this regard there are 3 ways you can inform ECheck where these additional data files are.

to top of page

Running ECheck

      ECheck [-<Options>] orders_template_file

Options:

-
Uses stdin in place of an input file.
-b
suppresses warnings and errors (short format)
-q
suppresses other outputs (quiet)
-rnnn
Sets recruiting costs per man to nnn silver
-c
writes the warnings and errors into a compiler-similar format:
file name|(line)|warning level|text
HIGHLIGHTED text stays, the rest, in general should be fixed. Warning level 0 = Errors only.
-m
writes the warnings and errors into a format understandable for Magellan Eressea client program:
file name|line|warning level|text
HIGHLIGHTED text stays, the rest, in general should be fixed. Warning level 0 = Errors only.
-e
writes the checked file to stdout, errors sent to stderr
-E
writes the checked file to stdout, errors also sent to stdout
-h
displays this help list
-hb
displays the orders listed found in the commands.txt file
-hp
displays the parameters listed found in the params.txt file
-hr
displays the directions listed found in the directions.txt file
-hm
displays the messages listed found in the messages.txt file
-hf
displays a list of the files that ECheck tried to read.
-s
uses stderr for warnings, errors etc. not stdout
-p
(together with -e) generates a "Piping-suited" output: only the first part of the name is output for items, potions, and herbs.
This is for the DEFAULT orders necessary if the output is used by ECheck as input for a further ECheck run. This option does NOT work with magic spells as the for word is not always unique.
-n
counts lines with NameMe-comments (;;) not with
-l
Silverpool-Mode: missing silver will be taken from another unit in the region
-noship
this warning "Unit moves ship and may lack control" is disabled
-nolost
this warning "Unit %s may lose silver and/or items" is disabled
-noroute
this warning "ROUTE is not cyclic" is disabled
-w[n]
Warning Level n (default: 4)
  1. - no warnings shown
  2. - syntax errors
  3. - level 1 + missing text, total/number missing, no long order, logical errors (e.g. TEACH without LEARN etc.)
  4. - level 2 + not enough silver/men in unit/region, no command etc.
  5. - level 3 + "Cautions"; all other warnings
  6. - level 4 + Teacher-Student counting check
-x
Normally ECheck begins counting lines at the start of the file. If you use -x, the line counting starts with the FACTION line of the file.
-Ppfad
directory location of the additional data files.
This is written for example so: (-P c:/Eressea/ECheck/en/...).
-Lloc
Sets the ECheck location to loc.
-vMainversion.Level
Since many players use older versions of ECheck this mechanism was designed to inform them. The Eressea server to which you send in your orders template always uses the latest version of ECheck.

Examples:

echeck -r80 orders_template_file
Checks the file orders_template_file. The recruiting cost per man is set at 80 silver.
echeck -c -e orders_template_file >errors_list_file
Checks the file "orders_template_file". The error and warning messages, as well as the tested file, are written to the file errors_list_file

to top of page

Enviorment Variables

Right after starting, ECheck reads the environment variables ECHECKPATH (which points to the ECheck folder) and ECHECKOPTS (which can be used to set all options.) Examples:

  setenv ECHECKOPTS "-c -l -r75"
  setenv ECHECKPATH "~/Eressea/zug:/usr/local/lib/ECheck:."

to top of page

ECheck Commands in Orders Template

Most of the ECheck options can also be given directly in your orders template. To do so you must set the ECheck options before the first command line in your orders template that starts with the order REGION. The command line you use to set ECheck options must always begin with this:
; ECHECK

  ; ECHECK -r80 -w2
The following ECheck options can not be set inside your orders template -e, -E, -P, -s, -h und -?.

You can set the "version" of ECheck, for example directly after the line, shown above. The line will be shown on the screen and is also reported in the output from the server:

  ; VERSION .....
or
  ; ECHECK VERSION .....

In Eressea a line ends with the start of another line (started with a command or order). So that you can write very long lines, to avoid your mail program setting a false line break, ECheck recognizes the backslash \ as a "Line Continuation Punctuation Mark".

Additionally, ECheck can recognize some abbreviations or word shortcuts. But it is the player's responsibility to "correctly" write any abbreviations or shortcuts. I find NA U "Teacher" and G 76 70 Si much more difficult to understand than Name Unit "Teacher" and Give 76 7 Silver.

to top of page

There are many good "Meta-commands" for ECheck. These commands are set after a comment mark // or ; at the beginning of a line.

ECHECK NACH x y
This can be used to tell ECheck, for example, when a unit on a ship is moved to another region, so that ECheck can see this will happen.
ECHECK ROUTE
This changes the "noroute" flag to on or off, based on the previous flag setting. If that flag was off before, it will now be turned on. If that flag was on before, it is then turned off.
ECHECK CONTROL [number]
This tells ECheck that this unit is going to receive control of the ship/building it is on/in or the ship/building number listed. This prevents the warning "has no control" from being reported by ECheck.
ECHECK EMPTY
The unit is considered by ECheck to have no silver by ECheck. This helps avoiding the "loses silver" warning from ECheck when the unit gives away all of it's men.
ECHECK silver-amount
The unit is considered by ECheck to have received the silver listed. This can, for example, be set for an ambassador unit that is supplied with upkeep (food) silver from another faction that has HELP SILVER set to your faction, in order to avoid an ECheck warning.
ECHECK LOHN silver-amount
With this you can set the amount, for ECheck silver calculations, units receive in the region when they do the WORK command. This Meta-command must be listed between the REGION command line and the first UNIT command line of each region.
ECHECK NOWARN
This turns off the direct warnings for the next command line on the orders template. "Indirect warnings" such as not enough silver and the teacher-student counting check will not be effected.

to top of page

"A Test Example"

The following orders are an example. I have listed the errors and warnings as comments.

FACTION 123 "Xandrils Legacy"

 ; ECHECK -l -w4 -r100

 REGION 9,10 ; Xandrilia

 UNIT ki8;          Mr Miller [1,0$]
    Entertain
    Give 4800 1 Men
 UNIT 7530;         Mrs Miller and her son [2,60$]
    Learn Entertainment
 UNIT alf;          Alfred E. Neumann [1,0$]
    Entertain
 UNIT h3z;          A Worker [1,0$]
    Taehc 1234 uh4q Temp 77              ; syntax error: TEACH
    Enter Castle 4r
 UNIT 5045;         Trader [1,110$]
    Learn Etertinment                    ; syntax error: ENTERTAINMENT
    Give 4jL 1000 Silver                 ; unit does not that much silver
    Enter Castle 4r

 REGION 6,10 ; Scoobydo

 UNIT 43f;          Nomad [1,110$]
    Move West

 REGION 1,10 ; Summerland

 UNIT rt4a;         Gardener Lady [1,0$]  ; unit has no silver
    Make Herb
 UNIT bote;         Hero [1,$30]          ; unit has enough silver for both
    Move Southeast                        ; but it is leaving the region!

 NEXT

The errors/warnings from the server look then like this:

ECheck (Version 4.1.4, Sep 16 2001), Zug-Checker für Eressea - Freeware!

Verarbeite Datei `name@email.de,0'.
The above is the e-mail address from which the orders template was sent to the server. The number after the comma is the number of times an orders template was sent into the server from that e-mail address that week.
Recruiting cost set to 100 Silver per man, Warning Level 4.
Silverpool is active.
Error in Line 17: Unrecognized order.
        `Taehc 1234 uh4q Temp 77'
Warning in line 16: Unit h3z hasn't got a long order.
        `UNIT h3z; A Worker [1,0$]'
This is a "follow-on" error. The incorrect order Taehc, should be, of course, Teach. Because the syntax error also is a long order both of the above errors are reported to you by ECheck.
Error in line 20: Unrecognized skill.
        `Learn Etertinment '
Here the skill is not recognized, but the order Learn is correctly written and is therefore accepted as a long order.
Warning in line 21: UNIT 5045 may have not enough silver.
        `Give 4jL 1000 Silver'
You are told that you do not have enough silver to give. It is possible that this unit receives silver from another unit or faction to live (upkeep). However, that is not relevant to this error, as this unit simply does not have 1000 silver to give. If you know, for example, that this unit gets 800 silver from another faction in the region you can note that with this Meta-command ; ECHECK: 800 if you wish.
Warning in line 30: There is not enough silver in Summerland (1,10) for upkeep;
10 silver is missing.
Here we see it is "possible" that there is not enough silver in the region. Of course, it is possible you receive silver from another allied faction in the region by the silverpool.

ECheck also takes into account ship movement, but this is only with ships that your faction controls and is moving.

Units that are on ships controlled by other factions are considered to stay in the region they are at by ECheck for error checking purposes. You can, however, use the Meta-command ; ECHECK NACH x y to inform ECheck that the unit is going to be moved to Region x,y so that ECheck can check if there is enough silver in that region.

Warning in line 19: Unit 5045 has -900 Silver
This is another messages concerning Give 4jL 1000 Silver. The unit has 110 silver, from that the unit needs 10 silver for upkeep (food), therefore it can give 100 silver away. It has then minus 900 silver.
There were orders for 1 faction and 7 units read.
There were 2 errors and 4 warnings found.
If ECheck reports a region without a name (only coordinates) then you know that you had no unit in that region. Because ECheck reads the names of the regions from your orders template, it will not know the region names of any regions you are not in.

to top of page

Miscellaneous

If anyone finds an error in ECheck please send an E-Mail with version number and the orders template (at least the applicable part of the orders template from which the error is generated) and as exact of a description of the error as possible to me.

ECheck should be able to function on all systems. Example call with the gcc:

      gcc -s -O2 -o ECheck echeck.c

ECheck can be downloaded in various formats.

© 2005 Henning Peters