HERO
(HE)
RECEIVER
Used to modify characteristics, troops,
inventory, skills, location and just about everything imaginable for a specified hero.
Also used for setting blessings and curses.
When any hero steps !?HM trigger occurs
Note:
v998/v999/v1000 variables will store the location
of the current hero visited.
For a more detailed and explained version of HE receiver, read
the HE receiver easily
explained (ERM for dummies, by Qurqirish Dragon)
!!HE#:XXXX; | The hero number of # (see Format H - each hero has a unique number in the game). |
!!HE#1/#2/#3:XXXX; |
The hero at x,y,l
coordinates #1 = x #2 = y #3 = level (0-Surface, 1-Underground) |
!!HE-1:XXXX; |
The hero who activated the trigger. Using this
format simplifies things greatly as you do not need to keep changing the
coordinates for every !!HE command if you move the trigger event or
object. Note: When you load a saved game, the top Hero in the Hero scroll list appears to be active, but the MGO trigger (Spell Book) will not have a valid Hero number for HE-1 at this point! Use OW:A to check whether there is an active Hero, to avoid error messages. |
COMMANDS
A1/$1/$2 A2/$1/$2/$3 A3/$1/$2/$3 |
These commands let you equip, check, calculate, or
delete one or more artifacts from a hero. (When you equip/take off an artifact, !?AE trigger occurs.) For now you cannot add combo artifacts this way -- there is only one way to add them, to the hero's backpack: !!HE-1:A129; All artifacts start from 7 (Centaur's Axe) on. 1000 is a magic book 1001 on means a scroll with a spell 0 on (1001=0, 1002=1,...) A1/$1/$2 - Equip an artifact $1 - number of artifact. (see Format A1). $2 - position on the body where to place (see Format AP). Notes: - If the slot is busy, the ERM Flag1 will be set to 0 otherwise to 1. - If you use HE:A1 to equip an artifact that gives spells, such as a Tome, Spell Scroll or Spellbinder's Hat, the spell won't be added. It will only be added if the player unequips and reequips the artifact. Note: this is solved using the new A4 parameter, which is availlable in WoG game versions 3.58 and later - If you use the HE:A1 command to equip an artifact, it will equip into a locked slot and the slot won't register as busy. Note: this is solved using the new A4 parameter, which is availlable in WoG game versions 3.58 and later The HE#:A1 command is extended so it now supports backpack slots. A2/$1/$2/$3
- Calculate numbers of an artifact (get or check) A3/$1/$2/$3
- Remove several copies of artifact |
||||||||||||||||||||||||||||||||||||||||||||
Equip
an artifact
You can now automaticaly add spells
from artifacts. Also, the locked slots problem solved Uses an internal function for this so artifact will be equipped if possible and not equipped (put to backpack) otherwise. Example: !?LE4/2/0; !!HE-1:A4/129; [equip Angelic Alliance] !!HE-1:A4/15; [try to equip a shield but put to backpack] !!HE-1:A4/1016; [equip Magic Arrow scroll] !!HE-1:A4/1000; [equip Magic Book] |
|||||||||||||||||||||||||||||||||||||||||||||
Control artifact locks $1 - slot lock index (see below) $2 - number of locks in slot ?$3 - (optional) returns the number of free artifact slots for the lock slot ($2 shouldn't exceed ?3) ?$4 - (optional) returns the total number of artifact slots for the lock slot Here's the list of slot lock indexes (it's not the same as format AP): 0 head 1 shoulders 2 neck 3 right hand 4 left hand 5 torso 6 rings 7 feet 8 misc. slots 9 ballista (war machine 1) 10 ammo cart (war machine 2) 11 first aid tent (war machine 3) 12 catapult 13 spell book |
|||||||||||||||||||||||||||||||||||||||||||||
Give/remove/check an artifact. # is the artifact's number (see Format A1). If # > 0 the artifact will be added to the hero's backpack. If # < 0 removes the artifact from all slots. Comments: An artifact given with this command will not be automatically equipped and will be placed in the hero's backpack. HE:A-1 command will delete all scrolls from the hero. Example: !!HE106:A-1; [Remove all scrolls in Lydorie's possession] |
|||||||||||||||||||||||||||||||||||||||||||||
B0/$ |
Set/get the name of a hero. |
||||||||||||||||||||||||||||||||||||||||||||
B1/$ |
Set/get the bios of a hero. Comments: If it has a default name or bio, you will get a void string not default text. Example: !!IFv10:S3; !!IVz15:S^This is a new bios.^; !!HE-1:B1/?v10; get the old bios of current hero to z[v10] -> z3 string var !!HE-1:B1/z15; set the new bios to z15 string var |
||||||||||||||||||||||||||||||||||||||||||||
B2/$ |
Set/get the class of a hero. $ is a class (0...17) (Format HC) Divide $ to 2 and you will get a town/class type |
||||||||||||||||||||||||||||||||||||||||||||
B3/?$![]() |
Read a hero's default biography. Get a hero's default biography text to a string variable. This will always return the same text whether you changed the hero's biography text or not. You may use only get syntax, like this: !!HE0:B3/?z25; This will store Orin's default biography in the z25 variable. |
||||||||||||||||||||||||||||||||||||||||||||
Change monsters: format 1. #1 = hero's slot number (slots are numbered 0..6) $2 = new monster type (Format C) $3 = number of monsters You may not use any variable indexed -1 or -2 in parameter $3. Other negative indexes (f.e. y-3) are fine. |
|||||||||||||||||||||||||||||||||||||||||||||
Change monsters: format 2. All monsters of type #1 will change into: $2 (type: Format C) $3 (number). Example: !!HE-1:C1/0/1/d; (all pikemen change to halberdiers) |
|||||||||||||||||||||||||||||||||||||||||||||
Add a new stack of monsters to a hero. #1 = type of monsters (Format C) #2 = number of monsters #3 = 1 - ask human to find room in the army if all slots are filled. = 0 - use AI to add it (if it feels the addition is more valuable than an existing stack) |
|||||||||||||||||||||||||||||||||||||||||||||
|
Change monsters : Give to player a choice of monsters set. Use C command with 14 parameters: #1 = type of monster 1 (-1 = no) (Format C) #2 = number of monsters 1 #3 = type of monster 2 (-1 = no) (Format C) #4 = number of monsters 2 #5 = type of monster 3 (-1 = no) (Format C) #6 = number of monsters 3 #7 = type of monster 4 (-1 = no) (Format C) #8 = number of monsters 4 #9 = type of monster 5 (-1 = no) (Format C) #10 = number of monsters 5 #11 = type of monster 6 (-1 = no) (Format C) #12 = number of monsters 6 #13 = type of monster 7 (-1 = no) (Format C) #14 = number of monsters 7 Now supports check syntax that lets you find out which troops were left. No idea what this exactly means right now, to be tested Example: This will be a dialog like when you leave creatures. !!HE-1:C5/6/7/8/9/10/11/12/13/14/15/16/17/18; !!HE-1:C1/2/-1/0/-1/0/-1/0/-1/0/-1/0/-1/0; |
||||||||||||||||||||||||||||||||||||||||||||
C...![]() (experience support) |
Extended !!HE:C0, !!HE:C1 and !!HE:C2 syntax for setting or retaining Stack Experience. (Note: does not work with HE:C). Now these commands may have 5 or 6 parameters: !!HE...:C#/#1/$2/$3/$4/$5; # = 0 - change monsters (by slot) # = 1 - change monsters (by type) # = 2 - add monsters $4 = experience value (default is 0) $5 = experience modifier (default is 0) Supported $5 modifier values:
| ||||||||||||||||||||||||||||||||||||||||||||
D |
Call upgrade dialog for hero's army (no parameters) | ||||||||||||||||||||||||||||||||||||||||||||
E$ |
Set/check/get experience# to the hero (Format HL) |
||||||||||||||||||||||||||||||||||||||||||||
Set/check/get hero's experience (additional syntax) $1 - Experience points $2 - Hero's level (Format HL) |
|||||||||||||||||||||||||||||||||||||||||||||
|
Additional Syntax The same as HE:E$/?$ but without redrawing For standard syntax some of them called redrawing always even if you check only. |
||||||||||||||||||||||||||||||||||||||||||||
Set/check/get primary skills. $1 = Attack $2 = Defence $3 = Power $4 = Knowledge (Format PK) |
|||||||||||||||||||||||||||||||||||||||||||||
G$;![]() |
Set initial hero's movement points $ - initial hero's movement points. Comment: If you set both HE:W and HE:G options to the same value (any), you may dig for the Grail. | ||||||||||||||||||||||||||||||||||||||||||||
Additional syntax for primary skill checking. Adding /1 at the end of the command returns the base value of a hero's primary skill without including artifact bonuses. $1 = Attack $2 = Defence $3 = Power $4 = Knowledge (Format PK) Comments: You can use only get or check syntax. You can also set it but it will do nothing. e.g., !!HE-1:F?v100/?v101/?v102/?v103/1; |
|||||||||||||||||||||||||||||||||||||||||||||
Set army type for newly hired heroes. $1 = Slot number (0,1,2) $2 = Monster type (-1 means no monster) (Format C) $3 = Minimum value of monsters number $4 = Maximum value of monsters number (may be equal to min number for fixed number) Comments: Then, when you hire a hero that appears in a Tavern in the beginning of the week, he will have 2 or 3 slots of army (it's not possible to set 2 or 3 exactly). So you can set 1st and 2nd slots to desired monsters and 3rd slot to -1 monster type. This will result in the hero always having 2 slots of monsters. Then if you hire a Hero, he or she will have only one slot of monsters and number 1. Example:
This may be used later during a
game. |
|||||||||||||||||||||||||||||||||||||||||||||
Set/check/get spell points. Be sure to use d for relative change if you wish to add or subtract rather than set. Example: !!HE-1:Id-1; This will reduce the hero's current spell points by 1. |
|||||||||||||||||||||||||||||||||||||||||||||
|
Additional Syntax The same as HE:I$ but without redrawing For standard syntax some of them called redrawing always even if you check only. |
||||||||||||||||||||||||||||||||||||||||||||
K |
Instantly kills the hero (put this to a well - all fall inside :-) | ||||||||||||||||||||||||||||||||||||||||||||
|
Additional Syntax The same as HE:I$ but without redrawing For standard syntax some of them called redrawing always even if you check only. |
||||||||||||||||||||||||||||||||||||||||||||
L#^file.pcx^ |
Sets a hero's portrait to an external image file. # = 1 - Set small picture to file.pcx # = 2 - Set large picture to file.pcx # = 3 - Reset both pictures to default (no ^...^ allowed) Comments: file.pcx will be searched for in heroes DATA directory. But you can use subdirectory. Example ^c\name.pcx^ - in "c" subdirectory of the DATA dir. Or ^..\maps\1.1^ - in MAPS dir of Heroes. Important! The full length of file name (with subdirectory path) cannot be more than 12 characters. The screen will be redrawn automatically if you change the hero's portrait. |
||||||||||||||||||||||||||||||||||||||||||||
L0/$; | Set hero's portrait to portrait number $. (Cf.CMD file). | ||||||||||||||||||||||||||||||||||||||||||||
L4/$ |
Sets both the small and large portrait to the game portrait equal to $. | ||||||||||||||||||||||||||||||||||||||||||||
L5/$1/$2 |
Set a hero portraits. $1 - String variable for large pic (0-do not change) $2 - String variable for small pic (0-do not change) |
||||||||||||||||||||||||||||||||||||||||||||
Set/check/get spell: only for spellbook spell #1 (see Format SP) at level $2 (0 = remove spell, 1 = give spell) Note: To check if spell is learned/gained or just learned use the two ways described bellow: - You can check for a spell that the hero has learned *or* that he/she knows due to a scroll or spell-giving artifact by using HE:M#/?$; In *either* case, the variable will have a value of 1 if the hero has the spell. - You can check for a spell that the hero has learned but NOT one he/she only knows from a scroll or spell-giving artifact by using HE:M=#/1; with flag 1 set to 1 the hero has learned the spell. If the hero has the spell from a scroll or spell-giving artifact, flag 1 will still be set to 0 |
|||||||||||||||||||||||||||||||||||||||||||||
Check or get the hero's number. Comments: Don't try to set the hero's number to something else. It won't work or will cause instability. Example: !!HE-1:N?v100; |
|||||||||||||||||||||||||||||||||||||||||||||
Set/check/get the hero's owner (see
Format
E1). $ - player number that controls hero. If a hero isn't on the map and thus has no owner, the number returned will be -1. Comments: This command should work properly to let you change the owner of a player, unlike in previous versions where the changeover didn't work completely. Note: If you try to give a hero to an owner that has 8 active heroes already, the command will be just canceled. Check a hero's owner to be sure that he/she was transferred successfully. |
|||||||||||||||||||||||||||||||||||||||||||||
O... ![]() |
Extended HE:O command syntax to use a "neutral" hero in a battle. Use a dummy second parameter in HE:O command (like HE...:O5/1; ) to use this way. If you use a two parameters syntax, it will directly change the hero's owner. You can use this to set an unowned hero to defend a neutral monster stack, but make sure that the owner is changed back to -1 after the battle is over. Note: if you change an unowned hero in this way to temporarily give it an owner (number 0..7), it can be read with HE:O, but BA:O will still return -1. | ||||||||||||||||||||||||||||||||||||||||||||
Set/check/get the hero to X = $1, Y = $2, level = $3.
(Move) Comments: In addition to its normal use of moving a hero on the map, this command can also be used to bring a hero from the hero pool (not currently "in play" into the game. After you bring the hero onto the map with this command, you should then set the hero's owner with the HE:O command. |
|||||||||||||||||||||||||||||||||||||||||||||
Move an opponent hero (not one of your
colour) with
sound and redraw operation: |
|||||||||||||||||||||||||||||||||||||||||||||
R0/$ |
Set/check/get hero's moral (until next battle) | ||||||||||||||||||||||||||||||||||||||||||||
R1/$ |
Set/check/get hero's luck (until next battle) | ||||||||||||||||||||||||||||||||||||||||||||
R2/$ |
Set/check/get sex
of a Hero Male=0, Female=1. |
||||||||||||||||||||||||||||||||||||||||||||
R3/$ |
Set hero's availability in the hero pool for
all players $ - (set/check/get) enabled (1) or disabled (0) hero to hire to all |
||||||||||||||||||||||||||||||||||||||||||||
R3/$1/$2 |
Set hero's availability in the hero pool for
each player $1 - (set/check/get) enabled (1) or disabled (0) hero to hire $2 - (set/check/get) players that may hire (one bit - one colour) Comments: $2 makes sense (will be set) only if you enable a hero. If you disable a hero that is owned by any player, the hero will be killed. |
||||||||||||||||||||||||||||||||||||||||||||
R4/$ |
Set/check/get a hero's Tactic control -1 = Enable 0 = Disable |
||||||||||||||||||||||||||||||||||||||||||||
R5/$ |
Maximum morale 1 = maximum morale set 0 = maximum morale not set |
||||||||||||||||||||||||||||||||||||||||||||
R6/$ |
Maximum luck 1 = maximum luck set 0 = maximum luck not set |
||||||||||||||||||||||||||||||||||||||||||||
R7/$ |
Set/get/check "visited object" flag $ - modifiers word In most cases, setting or clearing these bits won't change Luck, Morale, movement or spell points--they only set (or clear) the record of whether the hero has already visited a given type of structure in a given period, e.g., this week, for next battle, etc. However, it will set or clear any text associated with these structure if you click on the hero's Luck or Morale in the hero screen (e.g., "Temple Visited +1"), but you'll still have to set the hero's temporary Luck or Morale with the HE:R0 and HE:R1 commands. Slava writes; I think it is correct for THIS current day. If you set a "affect a few days" like a Stable, I think the effect will be applied automatically on every next day until the effect ends up. Bits: 00000001 = 1 MAGIC WELL 00000002 = 2 stable 00000004 = 4 BOUY 00000008 = 8 swan pond 00000010 = 16 IDOL OF FORTUNE (DAY 1-6) 00000020 = 32 fountain of fortune (-1 LUCK) 00000040 = 64 WATERING HOLE 00000080 = 128 oasis 00000100 = 256 TEMPLE (DAY 1-6) 00000200 = 512 SHIPWRECK 00000400 = 1024 CRYPT 00000800 = 2048 DERELICT SHIP 00001000 = 4096 PYRAMID 00002000 = 8192 faerie ring 00004000 = 16384 FOUNTAIN OF YOUTH 00008000 = 32768 MERMAID 00010000 = 65536 RALLY FLAG 00020000 = 131072 ? (NO IDEA) 00040000 = 262144 in a boat (ONLY SET THIS IF HERO IS ON WATER OR IT CRASHES) 00080000 = 524288 ? (NO IDEA) 00100000 = 1048576 SIRENS 00200000 = 2097152 Warrior's Tomb 00400000 = 4194304 Maximum Luck (the same as HE:R6) 00800000 = 8388608 Maximum Moral (the same as HE:R5) 01000000 = 16772216 WOGSHADOWFAX (THIS RESETS MOVE TO ONE MILLION EACH TURN) 02000000 = 33554432 IDOL OF FORTUNE (DAY 7) 04000000 = 67108864 TEMPLE (DAY 7) 08000000 = 134217728 +1 LUCK FOUNTAIN OF FORTUNE 10000000 = 268435456 +2 LUCK FOUNTAIN OF FORTUNE 20000000 = 536870912 +3 LUCK FOUNTAIN OF FORTUNE (38000000 = 939524096 mask for a type of fountain of fortune, total of the three values above) |
||||||||||||||||||||||||||||||||||||||||||||
R command with redraw control (for all
HE:R commands) #1 - R command number $ - value #2 - redraw flag (1=redraw, 0=no redraw) Comments: The adventure screen will no longer be redrawn automatically after an HE:R command. If you wish it to redraw, use this syntax with a redraw flag of 1. |
|||||||||||||||||||||||||||||||||||||||||||||
S$;![]() |
Check
or set the number of known skills that are displayed $ - number of skills to show (0..8). Comments: If you want to display only one skill, first swap it's display position to slot number 1 and then limit the display to only 1 skill with this command. |
||||||||||||||||||||||||||||||||||||||||||||
S |
Set/check/get secondary skill #1 - Skill number (see Format SS) $2 - Skill level (0=none, 1=basic, 2 =advanced, 3 =expert). Comments: You can even set all(!) secondary skills (28 altogether) but only the first eight will show on the hero screen. |
||||||||||||||||||||||||||||||||||||||||||||
S$1/$2/1;
![]() |
Set/check/get secondary skill.
Extended syntax. $1 - is a number in display sequence (0 = not shown, 1..8 = slot index) $2 - is a skill index (0...27) Comments: You may use three types of syntax: !!HE#:S?#1/#2/1; ask what display slot takes #2 skill to #1 var !!HE#:S#1/?#2/1; ask what skill occupies display slot #1 to #2 var !!HE#:S#1/#2/1; set display slot #1 to #2 skill In the last case if another skill takes this slot, it will be set to "no slot". You can use the command twice to swap two skill positions. When setting skills with this command, you must use the following rules: - you may move any two displayed skills to exchange their position; - you must NOT set a skill to display if it's below Basic level (no skill); - you must set skills to display in order (no empty spaces); Therefore you cannot use the command to hide a skill that's already displayed. You also can't use it to set a skill to display if the hero doesn't know the skill. Attempting either will usually display a different "phantom" skill (perhaps Basic Wisdom) that will crash if clicked on. |
||||||||||||||||||||||||||||||||||||||||||||
T$1/$2/$3/$4/$5 |
Provoke a battle but only with one
type of monsters. $1 = x position of the battle $2 = y position of the battle $3 = level of the battle $4 = type of monsters to fight (Format C) $5 = number of monsters to fight Comments: x,y and level are used only for choosing the type of the ground and corresponding bonuses. |
||||||||||||||||||||||||||||||||||||||||||||
Set/check/get hero's patrol position and radius. Patrol position will be set to X($1), Y($2) (the level is fixed). The radius will be set to $3 ("set free" if $3 = -1). |
|||||||||||||||||||||||||||||||||||||||||||||
V#1/$2 V#1/#2/$3 |
V#1/$2 - set/check/get if hero visited (1) or not (0) $2 all objects of type #1 ($2 is used as a bit mask)
V#1/#2/$3
Types of objects (#1): |
||||||||||||||||||||||||||||||||||||||||||||
W$ |
Change Hero's movement points |
||||||||||||||||||||||||||||||||||||||||||||
|
Additional Syntax The same as HE:W$ but without redrawing For standard syntax some of them called redrawing always even if you check only. |
||||||||||||||||||||||||||||||||||||||||||||
Change hero's specialty. (see Table 1 below). # from 0 to 6. The number of other parameters depends on a type of specialization #. |
|||||||||||||||||||||||||||||||||||||||||||||
X...![]() |
Extended HE:X command to control specialty settings: !!HE#:X$1/$2/$3/$4/$5/$6/$7; - get/set/check all speciality settings. $1...$7 - parameters. Speciality types (defined by $1) $1=0 Secondary skills $2=secondary skill number (see Format SS ) ($3...$7 ignored, preferably 0) $1=1 Creatures $2=creature type number (see Format C ) ($3...$7 ignored, preferably 0) $1=2 Resources $2=resource type (see Format R ) ($3...$7 ignored, preferably 0) $1=3 Spells $2=spell number (see Format SP) ($3...$7 ignored, preferably 0) $1=4 Creatures extra $2=creature type number (see Format C ) $3=attack bonus $4=defence bonus $5=damage bonus ($6...$7 ignored, preferably 0) $1=5 Speed +2 to all units ($2...$7 ignored, preferably 0) $1=6 Upgrades $2=creature 1 to upgrade(see Format C ) $6=creature 2 to upgrade(see Format C ) $7=creature to upgrade to(see Format C ) ($3...$5 ignored, preferably 0) $1=7 Dragons $2=attack bonus $3=defense bonus ($4...$7 ignored, preferably 0) $1=8 Extra WoG speciality $2=subtype ($3...$7 ignored, preferably 0) Comment: You may use 'd' modifier to ignore unchanged settings: HE:...:X8/2/d/d/d/d/d; The original syntax (number of parameters < 7) should work as before. Example. To check the current settings use: !!HE#:X?y5/?y6/?y7/?y8/?y9/?y10/?y11; Note: If you set it X7/???/$1/$2/$3 (so it will be compatible with X4 syntax), so ??? - no matter (it is a placeholder for a creature type) $1 is an attack bonus $2 is a defence bonus $3 is a damage (low and high) bonus. |
||||||||||||||||||||||||||||||||||||||||||||
Y$1/$2/$3/$4 |
See Bless and Curse Section |
Syntax X options for HE
receiver:
0/$; | To give to a hero a secondary skill $ (see. Format SS) |
1/$; | To make the hero by the master of creatures $(and possibly $+1) (see. Format C). |
2/$; | To generate the resources $ each day. (see. Format R). |
3/$; | To give to the hero a spell $ (see. Format SP). |
Another way to make the hero by the master of creatures $1(and possibly $1+1) (see Format C). $2 - bonus of monster's attack, $3 - bonus of monster's defence, $4 - bonus of monster's damage. | |
5/2; | Set hero's additional specialty to Sir Mullich's one (All troops' speed +2) |
6/$1/$2/$3; | Upgrade of creatures type $1 and $2 ($1+1 and $2+1 possible as well) to creatures type $3. Upgrade's price is counted as difference between the prices of the creatures (if its more than zero:-) |
7/$1/$2; |
Dragon Master. $1 = attack bonus. $2 = defence bonus. |
8/#; |
# = 1 - Walking Darkness. Shroud is replaced for
all other players as hero moves. # = 2 - Town Builder. Hero may choose which type to rebuild a destroyed town as from any of the 9 available town types. |
Comments:
For "couple"
creatures (basic and upgraded), if the first is changed, the second will also be changed.
In the line, options should not be separated by other symbols and may be repeated with the last cancelling all the previous. The same receiver can occur several times. There might be comments between trigger's and receivers' descriptions.