ERM Help
Version: 2.03

Design Removed animations for the original fast browsing.
Overall..........:.  The entire interface changed. Top frame table and images rearanged and made smaller. New section added, lots of sections updated and/or fixed.
 
About ERM  This section.
 
ERM Tutorials  A Tutorial section, divided into basic, advanced, trained. It also contains an Interface description.
Lots of info from Anders and Qurqirish Dragon
 
Script Samples Some scripts as guiding examples for any ERM programmer.
Claimed List of allready claimed flags, variables, timers, functions and such
 
Index A general index as basic search suport
 
Format HC New Hero Classes Format
 
Format HL New Hero/Commander Experience/Levels Format
 
Format CC New Commander Class Format



UPDATES:
 WOG 358
and beta versions along the way

HE:A4/#;  New version is A4/# - equip an artifact.
 Uses an internal function for this, so artifact will be equipped if possible and not equipped (put to backpack) otherwise.



UPDATES:
 WOG 357m, 357f 
and beta versions along the way

Script_Editor  For making a saved game smaller you can use now the Script Editor feature that is called "anti comment". This will remove all non-functional parts of any script making it up to two times smaller.
 
 HE:X HE:X command bug fixed. If you had a lot of HE:X commands, the game may not be loaded later.
 
 IF:Q IF:Q works with Mercury correctly now. Before there was a problem with
two pictures and a yes/no type question--if one picture was mercury it
wouldn't set the flag.
 
 !!UN:P New features for WoG map may be controlled now with instructions
(!#UN:P). Now if a map has internal scripts and does not have !#UN:P3/#
command (Commander enabling/disabling), the map is running in WoG 3.56 environment (without Commanders and all). But if the map has this command (no matter !#UN:P3/0 or !#UN:P3/1), the map is treated as a new one and runs in WoG 3.57 environment (so all hard coded WoG features are taken from WoGification setup or installed by !#UN:P instructions).
This will fix the problem with the impossibility to enable Commanders
with !#UN:P3/0 instructions unless used in the timer trigger section.
 
!!VC New ERM Receiver: VC - control of ERM variable usage (Variable Logging).
This receiver may be used in instruction (!#VC:...) syntax otherwise it
does not make sense.
Commands:
C - clear the list of used ERM variables
B - start logging used ERM variables
E - stop logging used ERM variables.
W - write log to ERMVarsUsed.LOG file.
Y - start a cross-reference checking section
N - stop a cross-reference checking section
 
 !!BA Extended !!BA syntax. New command is added 'A'.
A$ - get or check (NOT set) an AI only battle
$ = 1 if this battle is theoretical only (complete AI battle)
$ = 0 if this is a real battle or quick battle.
So you can always check whether you can use battle receivers for this
battle or not
 
 battle receivers Now a usage of !!BG, !!BM, !!BH, !!BU, !!BF in complete AI battle is
controlled in the ERM interpreter and you will get the corresponding error
message.
 
 !?CO New Trigger !?CO - Commander
!?CO0; is called before opening the Commander Dialog
!?CO1; is called after closing the Commander Dialog
!?CO2; is called after buying a Commander in a Town
!?CO3; is called after reviving a Commander in a Town
Flag 1000 set to 1 only if the owner of the hero is a human player who
sits before the screen.
Flag 999 as usual shows whether this turn is a human player who sits
before the screen.
You can use !!HE-1:... to get the current hero info and !!CO-1:... to
get current Commander info.
Vars v998,v999,v1000 as usual shows the position of the current hero
on the map.
 
 e1..e100 New variable types - floating point: e1...e100
They are used the same way as y vars:
- not stored in the saved game;
- are local in every function;
- filled with 0 at every function/cycle start;
- restored when return from other function call.
You may use them to set parameters but the main feature is to use it to
calculate floating point expression and then store it to integer variable.
You can use +,-,* and : commands of VR receiver for e vars in floating
point calculations though all numbers should be integer in the expression.
You can also put e vars in the message with %E# command. In this case
only 3 digits after dot is shown.
 
 !!UN:P7 New hardcoded flag to make all external dwelling accumulate creatures
every week.
You can turn it on !#UN:P7/1; or off !#UN:P7/0; (default).
 
 !!UN:P8 New hardcoded flag to make all external dwelling guards accumulate creatures every week.
You can turn it on !#UN:P8/1; or off !#UN:P8/0; (default).
 
 !!PO Extended syntax for !!PO receiver.
!!PO...:V#/$;
!!PO...:B#/$;
First V#/$ - set/check/get an integer value (-32768...32767).
You can use up to 4 values.
# - index of the value to set (0...3)
$ - value to set/check/get
Second B#/$ - set/check/get a big integer value (-2147483648...2147483647).
You can use up to 2 values.
# - index of the value to set (0...1)
$ - value to set/check/get
Comments.
All integer values in the ERM are big so if you store it with a command
like this !!PO...:V1/y4; the value of y4 will be truncated in the internal
PO storage (y4 itself stay unchangeable) you should be sure that you have
a correct value before set. Command B has no such nuance.
 
 ERT files To simplify a way to localize scripts.
The point is that if an author change something in his script, it takes
much time to check all script and change all massages to other language.
You can make a separate file for every script (optional) that
will keep all texts from the script.
Now you can make a file Script##.ert that has a specific format:
Index(integer) [tab delimiter] Text [tab delimiter]
(more info here)

 
 !!OW:H I extended a syntax for OW:H. Now you may use three arguments:
H#1/#2/#3;
As before:
#1 is an owner index (0...7,-1 as currently active)
#2 is an index of v variable
Additional:
#3 is an index of a hero the owner has.
= 0 - store number of all heroes the owner has in v[#2]
> 0 - index, store the number of a hero the owner has to v[#2]
if there is no hero with index, the v[#2] is not changed
There is NO check or get syntax!
 
 !!BA:H !!BA:H will return now -2 instead of -1 if there is no hero.
 
 !!FU:E New !!FU:E; command allows you now to exit the current function immediately
 
 !!UN:G2 UN:G2 command. Lets you set the text and picture for hero specialities.
!!UN:G2/#1/#2/#3;
#1-number of hero.
#2-type of settings:
2=description text
3=picture (see below)
#3-z variable index (0 to restore)

You can also set a picture for specialty.
!!UN:G2/#1/3/#2;
#1-number of hero.
#2-number of the picture (0-155)
 
 !?IP# !?IP# trigger - multiplayer support.