BATTLEFIELD (BF)
RECEIVER
This command lets you customize a battlefield and should be used with the !?BF trigger to prepare it before the first round of combat begins, although placing obstacles is also possible during the combat itself.
Note: 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.
!!BF:XXXX; | Sets up a battlefield with custom placement of obstacles. |
OPTIONS
C; | Clear the battlefield (every square is accessible) |
M#1/#2/.../(/#12); | Places a rock at specific
positions on the battlefield #1 - bitimage of position 0...16 #2 - bitimage of position 17...33 #3 - bitimage of position 34... . .. #12 - type of obstacle to place (0...90) Comments: If a battle field is not filled, it still will have inaccessible squares - e.g., drawbridge in a town siege screen. The M command automatically includes the C command. If #12 is omitted, the M command places obstacle 84 (rock). |
O#1/#2; | Place a particular object #1 - type of obstacle to place (0...90). For the moment no Water object #2 - position (0...184) |
Comments:
Also we've noticed that VR:R doesn't work inside a BF trigger; or rather, it always produces the same series of numbers, every battle. The
first number generated in battle is always the same as the first number generated in any other battle. VR:T is fine, but of course can only be used once per BF trigger. Answer of Slava : I think this is made on purpose so you could use the same pattern of a battle whenever you load this map. And this is reasonable, I think. As I stated before, the way you use VR:T and VR:R is good. 1. Generate the number with VR:T ->n 2. Now generate n random numbers with VR:R and skip them. 3. Now all is ready to use VR:R for your script. I think this is quite simple, random and may be organized like one function :-) |
The GridExample: A Battlefield with BF:M
ZVSE !?BF; !!BF:M131071/65537/65537/65537/65537/65537/65537/65537/65537/65537/131071; Every number is a line from top down and is a bits combination for every position: First and last lines bits: 11111111111111111 = 131071 (1+2+4+8+...+65536) Other lines bits: 10000000000000001 = 65537 (65536 + 1)
List of Heroes III Combat Obstacles The number is the number to pass to BF:O. "R" means an obstacle hex, "-" or nothing means an empty hex. There is a space between adjacent hexes to show up/down hex relationships. The leftmost symbol on the same line as the title is the position number hex. As you will see, not all obstacles block their starting position. All objects proceed to the right and up from the starting position, never left or down. Cliffs are not numbered obstacles (except for one medium-sized cliff).
# | Name | Relief | Appearance |
0 | Skull-junk | R R |
![]() |
1 | Ribs | R R R R |
![]() |
2 | Ribs | R R R |
![]() |
3 | Skeleton | R R |
![]() |
4 | Skeleton | R R |
![]() |
5 | Tree/Rock | R R R |
![]() |
6 | Rock | R R |
![]() |
7 | Rock | R R |
![]() |
8 | Rock | R |
![]() |
9 | Rock | R R |
![]() |
10 | Bush | R R |
![]() |
11 | Branch/Rock | R R |
![]() |
12 | Tree/Rocks | R R R R |
![]() |
13 | Branch/Rock | R R |
![]() |
14 | Brush/Rocks | R R R |
![]() |
15 | Brush | R R R |
![]() |
16 | Lake | R R R R R R R R R |
![]() |
17 | Brush | R R R |
![]() |
18 |
Rock/ Brush/ Skull |
R R R R R |
![]() |
19 | Log | R R |
![]() |
20 | Gray Rocks | R R |
![]() |
21 | Stump | R |
![]() |
22 | Pond | - R R R R - R R R R |
![]() |
23 | Rocks | R R |
![]() |
24 | Ice Pond | R R R |
![]() |
25 | Snow Rocks | - R R R R |
![]() |
26 | Snow Log | R R R |
![]() |
27 | Snow Log | R R R |
![]() |
28 | Snow Stump | R |
![]() |
29 | Snow Stump | - - - - R R |
![]() |
30 | Snow Rock | R R |
![]() |
31 | Snow Rock | - - - R R R |
![]() |
32 | Ice Lake | R R R R R R R R |
![]() |
33 | Snow Logs | R R R - R R R R R |
![]() |
34 | Tree | - R |
![]() |
35 | Cliff |
![]() |
|
36 | Rock | R R |
![]() |
37 | Rock | R R R |
![]() |
38 | Swamp Pond | R R R R R R R R |
![]() |
39 | Log | R R R R R R |
![]() |
40 | Rock/Barrel | R R R R R R R |
![]() |
41 | Rock/Debris | R R R |
![]() |
42 | Rocks | R R R R |
![]() |
43 | Rocks | T R R R T T |
![]() |
44 | Rocks | R R R |
![]() |
45 |
Stalagmites/ Mushrooms |
R R R R |
![]() |
46 | Mushroom/ Rock |
R R R |
![]() |
47 |
Stalagmites/ Mushrooms |
R R R R R R R |
![]() |
48 | Lava Cracks | R R R R R R R |
![]() |
49 | Crater | R R R R R R R R |
![]() |
50 | Lava | R R R R R R R |
![]() |
51 | Crater | R R R |
![]() |
52 | Cracks | R R R R R R |
![]() |
53 | Cracks | R R R R R |
![]() |
54 | Lava | R R R R R R R |
![]() |
55 | Rope | R R R |
![]() |
56 | Jaw | R R R |
![]() |
57 | Bones | R R R |
![]() |
58 | Waterhole |
R R R R R R |
![]() |
59 | Waterhole |
- R R R R - |
![]() |
60 | Rocks |
- R - R R |
![]() |
61 | Tombstone | R |
![]() |
62 | Grave marker | R R |
![]() |
63 | Cross Grave | R |
![]() |
64 | Crypt | R R R |
![]() |
65 | Big Crypt | R R R R |
![]() |
66 | Evil Weeds | R |
![]() |
67 | Evil Weeds | R R |
![]() |
68 | Evil Weeds | R R R R |
![]() |
69 | Evil Weeds | R R R R R |
![]() |
70 | Evil Weeds | R R R R R R R R |
![]() |
71 | Clover | R |
![]() |
72 | Clover | R R R |
![]() |
73 | Clover | R R R R |
![]() |
74 | Clover | - R R R R |
![]() |
75 | Lucid Rock | R |
![]() |
76 | Lucid Rock | R R |
![]() |
77 | Lucid Rock | - R R R |
![]() |
78 | Lucid Rock | R R R R R R R R |
![]() |
79 | Hot Rock | R |
![]() |
80 | Hot Rock | R R |
![]() |
81 | Hot Rock | R R R R |
![]() |
82 | Hot Rock | R R R R R |
![]() |
83 | Hot Rock | R R R R R R R |
![]() |
84 | Earth Rock | R |
![]() |
85 | Earth Rock | R R |
![]() |
86 | Earth Rock | R R R |
![]() |
87 | Earth Rock | R R R |
![]() |
88 | Cloud Hole | R |
![]() |
89 | Cloud Hole | R R |
![]() |
90 | Cloud Hole | R R |
R R
![]() |
Example by Donald
Every time your hero moves, you get attacked by 1 Pikemen. It displays what the
number of the first obstacle is, and then you get a battlefield with 4 obstacles
(3 for the last 3). That obstacle number is displayed in the upper left, then it
goes upper right, lower left, lower right. So the first screen shows obstacles
0-3, with 2 in the lower left.
ZVSE
* pikemen at every step!
!?HM-1;
!!HE-1:T0/0/0/0/1;
* place 4 obstacles
!#VRv1:S0; [obstacle number]
!?BA0;
!!IF:M^Obstacles starting from #%V1^;
!?BF;
!!BF:C; [start with empty except for phantom cliff]
!!BF:Ov1/69;
!!VRv1:+1;
!!BF:Ov1/77;
!!VRv1:+1;
!!BF:Ov1/171;
!!VRv1:+1;
!!BF&v1<>91:Ov1/179;
!!VRv1:+1;
!!VRv1&v1=92:S0;
Last update - 23.02 04.00 10.19.04