ERM Extensions for WoG 3.57 NEW TRIGGERS 1. Object post-visit trigger: This trigger works identically to any of the formats of the !?OB trigger but instead of occurring before the regular object function, it occurs after. For example. a post-visit trigger used with a dwelling will occur after any creatures have been recruited from the dwelling. A post-visit trigger on a castle would occur after the battle is over if the castle was attacked. Syntax is !$OB... then all as usual. 2. Local Event post-visit trigger: This trigger works identical to any of the formats of the !?LE trigger but instead of occurring before the event trigger, it occurs after. Syntax is !$LE... then all as usual. 3. Equip/Unequip artifact triggers: These triggers are used to check if an artifact is being equipped or unequipped by a hero. The triggers occur when a player equips or unequips an artifact and also when an artifact is picked up and automatically equipped. These triggers may be useful for making custom-scripted artifacts that add or subtract primary or secondary skills. Syntax is !?AE0; take off an artifact !?AE1; put on an artifact The current Hero (!!HE-1) is a Hero-owner v998 keeps an artifact number v999 keeps a position (slot) number Comments. It does not work for backpack. If you change one artifact to another, it produces some extra triggers call. Here it is: 1. AE0 (prev) 2. AE1 (prev) 3. AE0 (prev) 4. AE1 (new) 5. AE0 (new) 6. AE1 (new) If you take an artifact from a backpack and a slot that this artifact may be placed is busy, you will get the next sequence for every slot this artifact may be placed: 1. AE0 (prev) 2. AE1 (prev) So be careful and do not count that if a specific artifact is not taken off, you will not have AE0 trigger switched for this art. 4. Mouse click triggers are expanded to include the town screen, hero screen, hero visiting screen, and combat screen. Syntax is !?CM0; as for trigger for adventure map (the same as !?CM;) !?CM1; for town screen. !?CM2; for hero screen. !?CM3; for hero meeting screen. !?CM4; for combat screen. You can also use !!CM receivers with any of the following commands: TSIFAR and cannot use P. These trigger works for a left mouse push (subtype=12), left mouse release (subtype=13) and right mouse push (subtype=14 and also have a corresponding bit in flags). To show a message on right mouse-click that will vanish after the mouse button is released, use IF:Q with a value of 4 for the message type. For the Hero Information screen, the current hero !!HE-1:... is an active one. For the Hero Meeting screen, you can give the number of heroes with a new command: !!CM:H$1/$2; $1 is a number of the left hero $2 is a number of the right hero You can only check or get them. You can also use this command for !?CM2; section to get the left hero as an active. The second one is a phantom (there is no second one). For the Combat screen, you can get the number of the position on the battle field (and heroes image). To do so, use the new CM receiver: !!CM:D$; $ is a number of position. You can get/check/set it. For a listing of all parts of the Town, Hero, Hero Meeting, and Combat screens as well as the CM:D numbers for the combat screen, please check the end of this file, or refer to the full HTML ERM document. NEW RECEIVERS 1. New Receiver: AI (AI movement control) The AI receiver gives you a measure of control over AI movement. You can use it to influence or even force AI heroes to move to certain map locations. Depending on the value you set, the AI may deviate along the way to pick up treasures, attack weaker monsters or heroes, claim mines or even take over a castle. Even using a maximum importance value, the AI can't ALWAYS be controlled if circumstances weigh heavily against it moving in a certain direction (e.g., it has 500 phoenixes, has lost its last town and there is an undefended castle nearby), but usually it can be counted on. One possible use of this receiver is to set up a sequence of way points so that an AI hero will patrol in a fixed pattern. Another more devious use is to reset the destination points each turn or each time a hero movement trigger is called, linking them to the position of a player's hero. This will cause an AI hero to pursue the player's hero relentlessly. New Receiver/instruction: AI Commands: S#hero/#owner/#setnum/$x/$y/$l/$value/$flags #1 = Number of the hero (See Format H). (-1=any) #2 = Owner of the hero (Format E1) (-1=any) #3 = Sequence Number (in the sequence of destination points) $1 = x position $2 = y position $3 = map level $4 = Value is an Importance value for the AI: 5000000 - very important 500000 - valuable $5 = Flags. Value means: 0 - no flag set 1 - start with this position first 2 - do not delete the position after arriving 3 - start with this position and do not delete the position after arriving Comments: 1. The sequence works this way. If you set destination points with seqnums: 2,4,5,6,88,99 and set flag 1 for seqnum 6, the hero will run the next points: 6,88,99,2,4,5 and then if some of them have "do not delete" flag (example 88,4,5), the hero will run to: 88,4,5,88,4,5,88,4,5... 2. You can set any owner (-1) and this mean that the hero will run the destination point whoever owns the hero. 3. You can set any hero (-1) and this means that all heroes of the owner will run to destination points. 4. If the last position is also the first position and is set to not delete after arriving, a phantom clone of the hero may appear on the map. If you need to make a patrol circuit, you can avoid this by setting an extra position one square over from the start position as the end position instead. 5. If a specific hero isn't specified and there are multiple destination points, the first AI hero will move towards the first one. After that hero's movement is done, the second hero will continue where it left off, perhaps moving towards the next destination point. For this reason, it's often a good idea to specify a specific hero to avoid too much chaos. D#1/#2/#3; Delete a destination point for the AI. #1 = Number of the hero. (Format H) (-1=any) #2 = Owner of the hero (Format E1) (-1=any) #3 = Number of a sequence of destination points If #=-1, delete all points in sequence for this hero and owner 2. New Receiver: CO (Commander Support) This receiver lets you set, check and change many aspects of Commanders through ERM. Syntax: !!CO$:... or !#CO$:... $=-2 apply to all Commanders $=-1 apply to current Commander (for current hero) $>=0 apply to specific Commander Every Commander has the same number that a hero-owner Commands: E$ - enable(1)/disable(0) Commander(s) D$ - dead(1)/alive(1) Commander(s) T$ - Commander type (0...8) H$ - Owner Hero's type (0...8) P#/$ - Commander statistics # - type of statistics 0=Attack 1=Defense 2=Hit Points 3=Damage 4=Magic Power 5=Speed 6=Magic Resistance $ - value You can set/check/get the "Custom Primary Skill Control". If you set it to 1 (yes), the primary skill will not change with Commander improvement, they will stay as you set them. It applied only to the basic values, so if you have one of the basic skill improved, it will add the value to the primary skill you set. If it is 0, the HP and DM primary value will grow automatically with Commander levels. CO:P$; $=1 (custom control enabled) =0(disabled) S#/$ - Commander basic skills level # - type of the basic skill 0=Attack 1=Defense 2=Hit Points 3=Damage 4=Magic Power 5=Speed 6=Magic Resistance $ - value (Magic Resistance usually has the same level Magic Power, but you can change this; but they will grow both simultaneously) A - artifacts (not supported yet) N - Name. You can set or get the name of Commander. N$; $ is a number of z vars (1...1000,-1...-10) You can change z vars after the usage (the name is copied inside Commander structure). You cannot use this command for all Commanders at once (-2 option). X#/$ - Commander experience # - type of epx 0=Hero's Exp taken as a basic for the next level 1=Current Commander exp 2=Current Commander Level B#/$1/$2 - spec bonus # - type of set 0=all spec bonuses at once 1=one specific spec bonus 2=all spec bonuses disabling at once 3=one specific spec bonus disabling B0/$ $ - mask as a sum of (bit dependent): 0=AT+DF bonus bit value is 1 1=AT+HP bonus bit value is 2 2=AT+DM bonus bit value is 4 3=AT+MP bonus bit value is 8 4=AT+SP bonus bit value is 16 5=DF+HP bonus bit value is 32 6=DF+DM bonus bit value is 64 7=DF+MP bonus bit value is 128 8=DF+SP bonus bit value is 256 9=HP+DM bonus bit value is 512 10=HP+MP bonus bit value is 1024 11=HP+SP bonus bit value is 2048 12=DM+MP bonus bit value is 4096 13=DM+SP bonus bit value is 8192 14=MP+SP bonus bit value is 16384 bit=1 if has and 0 if not B1/$1/$2 $1 - number of bonus (0...14) $2 - has(1) or not(0) B2/$ $ - mask as a sum of (bit dependent): bit=1 if may have and 0 if not B3/$1/$2 $1 - number of bonus (0...14) $2 - may have(1) or not(0) Comments. You may apply any command to all Commanders but only to set values. For every specific Commander you can set/check/get as usual. NEW COMMANDS FOR EXISTING RECEIVERS 1. CA Receiver: New syntax: !!CA-1:... - the current town. Warning!! You can use this syntax in the Town screen. !!CA:H#/$; # = 0 - hero in the town garrison # = 1 - hero - a town visitor $ - the number of hero (-1 = no one) You can get/check or set heroes. If you set it, do not forget to move the previous to somewhere. 2. HE Receiver: !!HE...:B2/$; $ is a hero's class (0...17). Divide $ to 2 and you will get a town/class type. You can get, check or even set the class. Extended syntax for no redrawing: For standard syntax some of them called redrawing always even if you checked only. HE:I$/1 the same as HE:I$ but without redrawing HE:W$/1 the same as HE:W$ but without redrawing HE:K$/1 the same as HE:K$ but without redrawing HE:E$/?$/1 the same as HE:E$/?$ but without redrawing The HE:R commands have been changed to redraw the adventure screen only if you use a set syntax. Moreover, an extender syntax has been added: HE:R#1/$/#2; #2 - is a redraw flag (1-make redraw, 0-do not make) Add a stack of monsters to a Hero. !!HE...:C2/#1/#2/#3; #1 - type of the monsters #2 - number of the monsters #3 - =1 - ask human to find room in the army if there is not =0 - use AI to add it Comments: This function add creatures silently if there is a stack of the same creatures or there is an empty slot. If there is no room and #3=1, it will ask human player to find the room for new creatures. If #3=0, AI will estimate the significance of the new stack and add this or not. 3. MN Receiver (Mines): Extended syntax for no redrawing: For standard syntax some of them called redrawing always even if you checked only. MN:O$/1 the same as MN:O$ but without redrawing MN:R$/1 the same as MN:R$ but without redrawing 4. MW Receiver (Wandering Monsters): MW:Cx/y/l/?var; check for WM at a position x,y,l - position coordinates var - var that receives a number of WM (1...) or 0 if there is no WM at the position A new flag has been added for WM. If you set it to 0 (default), it will go over the land only. If you set it to 1, it will go over water only. If you set it to 2, it will go ove land and water. You can set this flag as a seventh parameter in MW:A3/... command. 5. UN Receiver: You can now disable some WoG specific features. Additional syntax: !!UN:P#/$; # is a number of option $ is an option state # = 0 $ = Lvl8 dwelling SoD (1) or WoG (0) [doubling for !!UN:P$] # = 1 $ = Towers Experience SoD (1) or WoG (0) # = 2 $ = Leave Monsters on the map SoD (1) or WoG (0) # = 3 $ = Disable Commanders (1) or Enable Commanders (0) # = 4 $ = Disable Town Demolition by a player (1) or Enable Town Demolition by a player (0) # = 5 $ = WoGify: random maps and maps beginning "wogify_" (0), all WoG format maps (1), all Heroes 3 maps of any format (2) # = 6 $ = Heroes start with Commanders (0) or they must be hired (1) Automatically win or lose the game for CURRENT player. !!UN:Q#; # = 0 to lose the game # = 1 to win Now you can set Secondary Skill text. UN:G0/#1/#2/$3; #1 is a skill number (0...27) #2 is a type of text (0...3) 0 - name of skill 1 - basic level description 2 - advanced level description 3 - expert level description $3 is a number of z vars (1...1000) or 0 0 means to restore original text Comments. All is similar to artifacts. You should set z vars to correspondent text (you can use only global z vars z1...z1000) Then set the the text. If you change the text in this used z var - it will immediately appear as a new text for this skill. So do not use this var for other tasks. Example: !#VRz10:S^My new Name^; !#VRz11:S^My new Basic Description^; !$LE7/5/0; !!UN:G0/2/0/10; !!UN:G0/2/1/11; !$LE8/5/0; !!UN:G0/2/1/0; It will set the Logistic skill name and description to the new texts if you visit a local event at 7/5/0. The description of the basic level of the Logistic vill be restored if you visit a local event at 8/5/0. Now you can change Monster names. !!UN:G1/#1/#2/$; or !#UN:G1/#1/#2/$; #1 is a number of Monster #2 is a type of text 0 - singular name 1 - plural name 2 - specialty text $ - z variable (or its number) that keep the new text 0 means restore original Spell Disabling. UN:J0/#/$; Spells disabling # - number of spell 0...69 $ - 0 = Enabled 1 = Disabled Comments: This disabling only works for mage guilds and pyramids, but you can check the value set here and use in any ERM script. Since mage guild and pyramid spells are set at the start of a map (before it fully loads), it makes sense to use this command in an instruction or in a function called from an instruction. There is another internal structure that is changing when shrines are being placed (every placed shrine marks a corresponding spell as disabled), so for shrines, this disabling will not work. However, you could set a disabled spell and then disable it in the shrine with a shrine receiver after checking the value with this command. Set/check/get Obelisk visited. !!UN:L#1/#2/$; (this is a new syntax for UN:L -- we have already !!UN:L#/#/#/#;) #1 - player number (-2,-1,0...7) -2 = to all -1 = to current #2 - Obelisk index (-1,0...47) -1 = to all; $ = Obelisk visited 1 or not 0; Redraw function for hero screen: !!UN:R3/#; # is a hero number (-1 = current). This command only works in a CM2 trigger while the hero screen is displayed. Trying to use it elsewhere will cause a game crash. You can redraw the screen with every mouse click if you need to update it. e.g. if you change a hero's skills or picture while the hero screen is displayed. NEW VARIABLES 1. The number of v vars is increased to 10000 (v1...v10000). Do not forget though that the vars v998, v999, v1000 has a specific functionality. 2. 10 local z vars (z-1...z-10) have been added. These vars can be used inside functions. If you set any of them and them call a function or loop that set them as well to other values, when you go back, you will have your vars as you had before a call. So they are an analog of y vars. They also has a size of 512 chars. They keep their values when you call any function or loop. So it may be used to pass strings to the function but cannot be used to return values. You can use them everywhere like z1...z500. Though the local z vars are not stored in the saved game and you cannot expect that they will keep values from trigger to trigger. Inside global trigger (not function or loop) you should be careful in using them the same way as for y vars. You cannot use local z vars in artifact names and descriptions and in papirus. Remember that only v501-v1000 keep their values between maps. 3. 500 z vars have been added. Now you can use up to 1000. (z1...z1000). These new vars are completely identical the first ones (512 chars) and may be used in any situation the first set may be used. Remember that only z301-z500 keep their values between maps. MOUSE CLICK LOCATIONS FOR TOWN, HERO, HERO VISITING & COMBAT SCREENS 1. Here are the numbers returned by !!CM:I when clicking on various spots on a town screen. Some notes follow the item list. 0: Level 1 Mage Guild 1: Level 2 Mage Guild 2: Level 3 Mage Guild 3: Level 4 Mage Guild 4: Level 5 Mage Guild 5: Tavern 6: Shipyard (Castle, Fortress, Necropolis) 7: Fort 8: Citadel 9: Castle 10: Village Hall 11: Town Hall 12: City Hall 13: Capitol 14: Marketplace 15: Resource Silo 16: Blacksmith 17: Special Building: Mystic Pond (Rampart), Cover of Darkness (Necropolis), Artifact Merchant (Tower, Dungeon and Conflux), Escape Tunnel (Stronghold), Cage of Warlords (Fortress), Lighthouse (Castle) 18: Horde Building: Miner's Guild (Rampart), Griffin Bastion (Castle), Mushroom Rings (Dungeon), Unearthed Graves (Necropolis), Birthing Pools (Inferno), Garden of Life (Conflux), Sculptor's Wings (Tower), Mess Hall (Stronghold), Captain's Quarters (Fortress) 19: Upgraded Dwelling with Horde Building (see 18 for particulars). 21: Special Building: Glyths of Fear (Fortress), Necromancy Amplifier (Necropolis), Lookout Tower (Tower), Mana Vortex (Dungeon), Stables (Castle), Brimstone Stormclouds (Inferno), Fountain of Fortune (Rampart), Freelancer's Guild (Stronghold), Magic University (Conflux) 22: Special Buildings: Ballista Yard (Stronghold), Portal of Summoning (Dungeon), Blood Obelisk (Fortress), Library (Tower), Skeleton Transformer (Necropolis), Treasury (Rampart), Brotherhood of the Sword (Castle), Castle Gate (Inferno), NFA: Waterfall (Conflux) 23: Special Building: Battle Scholar Academy (Dungeon), Order of Fire (Inferno), Wall of Knowledge (Tower), Hall of Valhalla (Stronghold), NFA: Waterfall (Castle), NFA: Little Huts (Rampart), NFA: Swamp (Fortress), NFA: Graveyard (Necropolis), NFA: Much of the foreground area that isn't built on (Conflux) 24: Horde Building 2: Dendroid Saplings (Rampart), Cages (Inferno) 25: Upgraded Dwelling with Horde Building 2 (see 24 for particulars) 26: Grail Building 27: NFA: Waterfall (Stronghold) 28: NFA: Area just in front of the Resource Silo and Marketplace in Necropolis. 29: NFA: Much of the inbetween foreground area of Conflux once buildings have been built. 30: Level 1 Dwelling (Basic) 31: Level 2 Dwelling (Basic) 32: Level 3 Dwelling (Basic) 33: Level 4 Dwelling (Basic) 34: Level 5 Dwelling (Basic) 35: Level 6 Dwelling (Basic) 36: Level 7 Dwelling (Basic) 37: Level 1 Dwelling (Upgraded) 38: Level 2 Dwelling (Upgraded) 39: Level 3 Dwelling (Upgraded) 40: Level 4 Dwelling (Upgraded) 41: Level 5 Dwelling (Upgraded) 42: Level 6 Dwelling (Upgraded) 43: Level 7 Dwelling (Upgraded) 115: Garrison Creature Slot 1 116: Garrison Creature Slot 2 117: Garrison Creature Slot 3 118: Garrison Creature Slot 4 119: Garrison Creature Slot 5 120: Garrison Creature Slot 6 121: Garrison Creature Slot 7 123: Garrison Hero Slot 125: Visiting Hero Slot 140: Visiting Hero Creature Slot 1 141: Visiting Hero Creature Slot 2 142: Visiting Hero Creature Slot 3 143: Visiting Hero Creature Slot 4 144: Visiting Hero Creature Slot 5 145: Visiting Hero Creature Slot 6 146: Visiting Hero Creature Slot 7 147: Town Screen Background (no specific object) 148: Below Town Screen Background (between slots and icons) 149: Town Name 150: Town Icon Picture 151: Rollover Bar (hint messages) 152: Town List Scroll Up Arrow 153: Town List Scroll Down Arrow 154: Split Creature Stack Button 155: 1st (top) Town in Town List 156: 2nd (middle) Town in Town List 157: 3rd (bottom) Town in Town List 158: Hall Icon 159: Castle Icon 160: Daily Income (produced by town) 164: Level 1 Troop Icon 165: Level 2 Troop Icon 166: Level 3 Troop Icon 167: Level 4 Troop Icon 168: Level 5 Troop Icon 169: Level 6 Troop Icon 170: Level 7 Troop Icon 171: Extra Troop Icon (Portal of Summoning) 172: Level 1 Troop Daily Growth 173: Level 2 Troop Daily Growth 174: Level 3 Troop Daily Growth 175: Level 4 Troop Daily Growth 176: Level 5 Troop Daily Growth 177: Level 6 Troop Daily Growth 177: Level 7 Troop Daily Growth 179: Extra Troop Daily Growth (Portal of Summoning) 1001: Player's Total Wood 1002: Player's Total Mercury 1003: Player's Total Ore 1004: Player's Total Sulfur 1005: Player's Total Crystal 1006: Player's Total Gems 1007: Player's Total Gold 1008: Date (Month/Week/Day) 1009: Wood Icon 1010: Mercury Icon 1011: Ore Icon 1012: Sulfur Icon 1013: Crystal Icon 1014: Gems Icon 1015: Gold Icon 30720: OK Button (Checkmark) Notes: 1. NFA stands for Non Functional Area. These are areas of the Town Screen that produce a distinct number when clicked, but have no actual game function. NFAs vary between different town types and not every town has them. They sometimes occur in a town that doesn't have a special building using that number. 2. Many buildings numbers overlap each other. For example, the lower part of the Mage Guild in the Rampart has the Hall on the right (#10, 11 or 12) and the NFA huts on the left (#23) and clicking will often produce these numbers instead of the Mage Guild number. In a few cases, it may even be impossible to produce the actual building number when clicking due to the overlaps. 3. The number produced by clicking on a Mage Guild is always for the highest level of guild currently build. Likewise, an upgraded Dwelling number replaces a basic Dwelling number when the upgraded dwelling is built. Furthermore, the number of a horde building (when built) replaces that of the corresponding Dwelling. Other upgrades behave the same, such as the Castle's Tavern (#5) being replaced by the Brotherhood of Sword (#22) when built. 2. Here's the mouse-click locations for the Hero screen. Hero Screen 0 Empty Areas 1 Name 2 Head Slot 3 Shoulder Slot 4 Neck Slot 5 Right Hand Slot 6 Left Hand Slot 7 Torso Slot 8 Right Ring Slot 9 Left Ring Slot 10 Feet Slot 11 Misc. Slot 1 12 Misc. Slot 2 13 Misc. Slot 3 14 Misc. Slot 4 15 Ballista Slot 16 Ammo Cart Slot 17 First Aid Tent Slot 18 Catapult Slot 19 Spell Book Slot 20 Misc. Slot 5 40 Backpack Slot 1 41 Backpack Slot 2 42 Backpack Slot 3 43 Backpack Slot 4 44 Backpack Slot 5 45 Hero Portrait 46 Attack (value) 47 Defense (value) 48 Power (value) 49 Knowledge (value) 50 Attack Icon 51 Defense Icon 52 Power Icon 53 Knowledge Icon 68 Troop Slot 1 69 Troop Slot 2 70 Troop Slot 3 71 Troop Slot 4 72 Troop Slot 5 73 Troop Slot 6 74 Troop Slot 7 77 Backpack Scroll Left Arrow 78 Backpack Scroll Right Arrow 79 1st Skill Icon 80 2nd Skill Icon 81 3rd Skill Icon 82 4th Skill Icon 83 5th Skill Icon 84 6th Skill Icon 85 7th Skill Icon 86 8th Skill Icon 87 1st Skill Name 88 2nd Skill Name 89 3rd Skill Name 90 4th Skill Name 91 5th Skill Name 92 6th Skill Name 93 7th Skill Name 94 8th Skill Name 95 1st Skill Level 96 2nd Skill Level 97 3rd Skill Level 98 4th Skill Level 99 5th Skill Level 100 6th Skill Level 101 7th Skill Level 102 8th Skill Level 103 Attack (text) 104 Defense (text) 105 Power (text) 106 Knowledge (text) 107 Blessings and Curses Icon 108 Experience (text) 109 Spell Points (text) 110 Quest Log (text) 111 Dismiss Hero (text) 112 Experience 113 Spell Points 115 Rollover Bar (hint text) 116 Morale Icon 117 Luck Icon 118 Specialty Icon 119 Experience Icon 120 Spell Points Icon 122 Loose Combat Formation Button 124 Tight Combat Formation Button 126 Disable/Enable Tactics Button 127 Split Creature Stack Button 128 Quest Log Button 129 Dismiss Hero Button 130 1st Hero in Hero List 131 2nd Hero in Hero List 132 3rd Hero in Hero List 133 4th Hero in Hero List 134 5th Hero in Hero List 135 6th Hero in Hero List 136 7th Hero in Hero List 137 8th Hero in Hero List 138 Current Hero in Hero List (regardless of position) 139 God Bonus Icon 140 Level and Class 141 Flag above Hero List 30720 OK Button (Checkmark) 3. Here's the mouse click item numbers for the Visiting Heroes screen. I've divided it into three sections: Common, Left Hero, Right Hero. Hero Visiting Screen Common 0 Empty Areas 115 Attack Icon 116 Defense Icon 117 Power Icon 118 Knowledge Icon 300 Rollover Bar (hint text) 301 Central Area with Double Arrows 30720 OK Button (Checkmark) Left Hero 1 Hero Portrait 3 Attack 4 Defense 5 Power 6 Knowledge 13 1st Troop Slot 14 2nd Troop Slot 15 3rd Troop Slot 16 4th Troop Slot 17 5th Troop Slot 18 6th Troop Slot 19 7th Troop Slot 27 Head Slot 28 Shoulder Slot 29 Neck Slot 30 Right Hand Slot 31 Left Hand Slot 32 Torso Slot 33 Right Ring Slot 34 Left Ring Slot 35 Feet Slot 36 Misc. Slot 1 37 Misc. Slot 2 38 Misc. Slot 3 39 Misc. Slot 4 40 Ballista Slot 41 Ammo Cart Slot 42 First Aid Tent Slot 43 Catapult Slot 44 Spell Book Slot 45 Misc. Slot 5 65 Number of Troops in Slot 1 66 Number of Troops in Slot 2 67 Number of Troops in Slot 3 68 Number of Troops in Slot 4 69 Number of Troops in Slot 5 70 Number of Troops in Slot 6 71 Number of Troops in Slot 7 81 Experience 83 Spell Points 85 Quest Log Button 87 Name, Level and Class 89 Backpack Slot 1 90 Backpack Slot 2 91 Backpack Slot 3 92 Backpack Slot 4 93 Backpack Slot 5 99 Backpack Scroll Left Arrow 101 Backpack Scroll Right Arrow 103 Split Creature Stack Button 105 Specialty Icon 107 Morale Icon 109 Luck Icon 111 Experience Icon 113 Spell Points Icon 200 1st Skill Icon 201 2nd Skill Icon 202 3rd Skill Icon 203 4th Skill Icon 204 5th Skill Icon 205 6th Skill Icon 206 7th Skill Icon 207 8th Skill Icon Right Hero 2 Hero Portrait 8 Attack 9 Defense 10 Power 11 Knowledge 20 1st Troop Slot 21 2nd Troop Slot 22 3rd Troop Slot 23 4th Troop Slot 24 5th Troop Slot 25 6th Troop Slot 26 7th Troop Slot 46 Head Slot 47 Shoulder Slot 48 Neck Slot 49 Right Hand Slot 50 Left Hand Slot 51 Torso Slot 52 Right Ring Slot 53 Left Ring Slot 54 Feet Slot 55 Misc. Slot 1 56 Misc. Slot 2 57 Misc. Slot 3 58 Misc. Slot 4 59 Ballista Slot 60 Ammo Cart Slot 61 First Aid Tent Slot 62 Catapult Slot 63 Spell Book Slot 64 Misc. Slot 5 72 Number of Troops in Slot 1 73 Number of Troops in Slot 2 74 Number of Troops in Slot 3 75 Number of Troops in Slot 4 76 Number of Troops in Slot 5 77 Number of Troops in Slot 6 78 Number of Troops in Slot 7 82 Experience 84 Spell Points 86 Quest Log Button 88 Name, Level and Class 94 Backpack Slot 1 95 Backpack Slot 2 96 Backpack Slot 3 97 Backpack Slot 4 98 Backpack Slot 5 100 Backpack Scroll Left Arrow 102 Backpack Scroll Right Arrow 104 Split Creature Stack Button 106 Specialty Icon 108 Morale Icon 110 Luck Icon 112 Experience Icon 113 Spell Points Icon 208 1st Skill Icon 209 2nd Skill Icon 210 3rd Skill Icon 211 4th Skill Icon 212 5th Skill Icon 213 6th Skill Icon 214 7th Skill Icon 215 8th Skill Icon 4. Here's the Combat Screen Mouse Click Item Codes. There's fewer than other screens. Clicking on a creature stack does *not* produce any special code. 0 Background and spaces outside the Hex Grid plus some spaces near the edge of the Hex Grid 1 Hex Grid spaces (except some have a value of 0) 2000 Border Area around Buttons 2001 Surrender Button 2002 Retreat Button 2003 Combat Options Button 2004 Auto Combat Button 2005 Combat Text Window 2006 Scroll Up Arrow for Combat Text Window 2007 Scroll Down Arrow for Combat Text Window 2008 Cast Spell Button 2009 Wait Button 2010 Defend Button 2200 Statistics/Active Spell Box 2205 Primary Skills in Statistics/Active Spell Box 2207 Primary Skills in Statistics/Active Spell Box 2214 Troop Picture in Statistics/Active Spell Box 2216 Middle Slot in Statistic/Active Spell Box 2217 Lower Slot in Statistics/Active Spell Box 2218 Upper Slot in Statistics/Active Spell Box Notes: 1. The Statistics/Active Spell Box only appears if this option is selected in the Combat Options screen. The box is rather tricky to click on and probably not of much use in this fashion. The information for parts of the box is probably incomplete due to the almost impossible nature of clicking on all parts of it. For CM:D The hex grid follows the numbers we already have for it (0-186) in the docs for setting up the battlefields. The background and outside the grid is number -1. The left hero's number is 252. The right hero's number is 253. There's also some 254 areas along the extreme right edge of the screen below the right side hero but it only goes down about half way and the rest is -1.