Heroes of Might and Magic Community
visiting hero! Register | Today's Posts | Games | Search! | FAQ/Rules | AvatarList | MemberList | Profile

<a href="http://www.game-advertising-online.com/" target=_blank>Game Advertising Online</a><br> banner requires iframes

LOGIN:     Username:     Password:         [ Register ]
HOMM1: info forum | HOMM2: info forum | HOMM3: info forum | HOMM4: info forum | HOMM5: info forum | MMH6: wiki forum | MMH7: wiki forum
Heroes Community > Heroes 3.5 - WoG and Beyond > Thread: ERM help and discussion
Thread: ERM help and discussion [ This thread is 237 pages long: 1 2 3 4 (5) 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 ]
Fnord
Fnord


Promising
Famous Hero
posted September 05, 2003 01:40 AM

Thanks for the clarifications to your previous message.

Quote:

I also have a few questions. I have gone through the list of receivers and still only at the beginning of it but I have some questions concerning some of the commands etc there.

About the !!BM receiver.

There is a B command and an N command. Both of which appear to give the initial count of monsters in a given stack.

However, the N command is listed as N$; (only one value) but the doc refer to N1, N2 and N3 so I assume that the value given is not the count but the type of info you want to get. If you really have three different numbers (and yes, they are all interesting) shouldn't the N command rather be:

N#/$; where the # refer to the 1, 2 or 3 and the $ is the count which you can set/get. Also, if you have this command, why then have a B$; command in addition which appear to do almost the same thing?

I have possibly misunderstood something here but please guide me



The B command returns the initial count. The N command returns the current count.

The N1, N2, N3 were just discussion comments about Vampire Lords (I think this was written by Slava) and not part of the command syntax. N1 would be the current number derived from the N command. N2 would be the current number prior to the Vampire stack attacking, again derived from the N command. N3 would be the initial number derived from the B command. He used N1, N2, N3 but they're just arbritrary..could have been a, b and c.

Quote:

Also, about the !!BF receiver there's an O command which accept a position in the range 0..184. I see many commands with that range. Yet the battle field is pictured below with hexes up to 188. So how do you place anything in hexes from 185 to 188 then?



Actually, it goes 0..186 in the picture (it's a little blurry so you may have thought that last number was 188). I'm not sure about the O command. Either it's an error and you can use up to 186 (or at least 185) or it's impossible to place obstacles in those last two hexes.

Quote:

The M command also appear to suffer from this problem in the doc but not in the command. The command take 17 bits for each 11 arguments to fill 17 * 11 = 187 hexes and that is almost up to 188, I guess that last hex or so can then be filled with O if you want or some such.



Well now that you know it's 0..186 (check the picture again closely) that should clear up the mystery.

Quote:

I also have a question concerning the !!AR receiver, it has an M command and an M1 command I have problems to tell them apart.

M-1;   restore message
M1/-1; also (!?) restore message

Mz#;    set messsage to z variable
M1/$;  set/get message from/to z variable.

I really don't understand what's the difference between M and M1 here.



Assuming they both work correctly (I haven't tested them lately since this isn't a command that I have much use for), they're just alternate ways of doing the same thing and (in theory) there's no difference in the result.


 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
IRh
IRh


Famous Hero
Lizard
posted September 05, 2003 08:07 AM

Quote:
However, since I'm probably not going to use it (having gotten comfortable with ERM)...


We'll see

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Alf
Alf

Tavern Dweller
posted September 09, 2003 06:52 AM

Ok, it is me again, I have a few questions...

I am reading through the ERM doc and gotten as far as the !!MA receiver...

Question 1: What is "Adventure map high/low"????? What do those values mean?

Question 2: What is the difference between Grow H and growth rate? I mean, what is the difference between G#/$; and $#/$;

Question 3: What is "fight value"????

And after the doc itself there's a paragraph to a certain Tim and one line says:

Quote:

due to the idea of +20% monster growth per combat round



Does that means that monsters can find the time in the middle of the battle to give birth while they are smashing the opponent???? Oh yeah, let me hit you oh there came a baby and he's already grown oh well, let me hit you again, wow, another baby... err...looks a bit strange to me...

I really found all that discussion rather puzzling and didn't quite follow what was dicsussed there...

Please feel free to enlighten me

Alf

____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Alf
Alf

Tavern Dweller
posted September 09, 2003 08:16 AM

Ok, about the !!OW receiver I also have a few questions.

Q1 The H command utterly confuses me. It is obviously used to get the indices to a given player's heroes into some variables. The first variable get the count and then the following variables get the heroes.

However, the third argument confuses me. The comments about it isn't really helping either....

I would presume it would try to get the index of a specific hero instead of all heroes, so you can say:

H1/20/1; // to get the first hero into v20
H1/22/2; // to get the second hero into v22

etc, this will not affect any variable other than those you specify.

Is it possible to get the count without getting the heroes?
I.e. get the count into a variable but not affecting variables after it with the value?

____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Alf
Alf

Tavern Dweller
posted September 09, 2003 10:13 AM

Quote:

Question 2: What is the difference between Grow H and growth rate? I mean, what is the difference between G#/$; and $#/$;



A typo there, I meant of course G#/$; and S#/$;

____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Fnord
Fnord


Promising
Famous Hero
posted September 09, 2003 04:03 PM

Quote:
Ok, it is me again, I have a few questions...

I am reading through the ERM doc and gotten as far as the !!MA receiver...

Question 1: What is "Adventure map high/low"????? What do those values mean?
Quote:


Okay, in the editor if you right-click on a monster in the list, you see it shows its name, level and a range next to quantity that will appear when you place a stack on the map? I think this is what "Adventure map high/low" refers to -- the low and high numbers in that range. I haven't tested it.

Quote:

Question 2: What is the difference between Grow H and growth rate? I mean, what is the difference between G#/$; and $#/$;



Grow is the weekly growth rate. I think Grow H may be for Horde generators but I'm not certain.

Quote:

Question 3: What is "fight value"????



I think this is the value the AI uses when assessing a monster's overall power in battles (whether it owns it or fights against it). By contrast, I think "AI value" is the value the AI uses when deciding if a monster's worth buying or should replace another monster if its hero has all its slows full. I'm not 100% certain of either of these but I think that's how it works.

Quote:

And after the doc itself there's a paragraph to a certain Tim and one line says:

Quote:

due to the idea of +20% monster growth per combat round



Does that means that monsters can find the time in the middle of the battle to give birth while they are smashing the opponent???? Oh yeah, let me hit you oh there came a baby and he's already grown oh well, let me hit you again, wow, another baby... err...looks a bit strange to me...

I really found all that discussion rather puzzling and didn't quite follow what was dicsussed there...

Please feel free to enlighten me
Quote:


This refers to a script I was writing awhile back but never finished. The 20% growth per combat round was a magical effect. The values listed below are showing that with certain monsters, if the growth rate per combat round was set too high, it would be virtually impossible to make the battle end because they would grow more than they could damage each other. (Or something like that.)


____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Fnord
Fnord


Promising
Famous Hero
posted September 09, 2003 04:20 PM bonus applied.
Edited By: Gangrail on 23 Sep 2003

Quote:
Ok, about the !!OW receiver I also have a few questions.

Q1 The H command utterly confuses me. It is obviously used to get the indices to a given player's heroes into some variables. The first variable get the count and then the following variables get the heroes.

However, the third argument confuses me. The comments about it isn't really helping either....



Yes, it really needs rewriting sometime. It's quite confusing. For one thing, there are two different syntaxes for using the command and I don't think that's very clear in the help file. The older one stored hero numbers in consecuative variables, but since a player could potentially have 30 or 40 heroes if he or she had a lot of garrisons, it was impossible to know how many variables you needed to reserve. I requested a format similar to UN:U where you could find out the number first and then get the hero numbers into variables after. Slava made the new syntax that effectively does this but it also works differently from UN:U. I'll try to explain below.

Quote:

I would presume it would try to get the index of a specific hero instead of all heroes, so you can say:

H1/20/1; // to get the first hero into v20
H1/22/2; // to get the second hero into v22

etc, this will not affect any variable other than those you specify.

Is it possible to get the count without getting the heroes?
I.e. get the count into a variable but not affecting variables after it with the value?



Okay, using syntax 1 (the old way), you could put:

!!OW:H-1/100;

(Just two parameters I think...)

This would store the number of heroes the current player has in v100 and the first hero (for the current player) in v101, 2nd hero in v102, and so on for all the player's heroes (however many).

Using syntax 2 (the new way), you could put either:

a)  !!OW:H-1/100/0;

This would store the number of heroes that the current player has in v100.

or b) !!OW:H-1/100/1;

This would store the first hero that the player has in v100.

!!OW:H-1/100/2;

This would store the second hero that the player has in v100.

As you can see, using the 2nd method not only lets you check the number of heroes a player has without using additional variables, you can also use a single variable (if you like) to store the number of each hero (perhaps checking them in a loop).

I hope I got the syntax right (I still get confused with this one myself).


*edited by Gangrail*  +Qp applied for spending so much of your busy schedule to help out in this thread.  And I know you don't care about the Qp's

____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Garrett
Garrett

Tavern Dweller
posted September 12, 2003 01:10 PM

ERM Help

How do I get creature stacks to start on a certain hexagon on the battlefield for a certain battle?

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Odvin
Odvin


Promising
Famous Hero
posted September 13, 2003 07:30 AM

Hi all,

To Alf & IRh:
I have no time to look through all your posts, cuz they are very long I just wanted to know: how are you doing? What's the progress?

I'm writing my own translator now... Not that it will feature a really good high-level object-oriented language... It'll be a simple, but readable language that can be easily and straightly translated into ERM. IMHO WoG doesn't need more for its scripting language.
But I can't tell for sure whether I'll finish it at all Cuz it's my first experience in writing translators... Anyway, we'll see...

GL
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
IRh
IRh


Famous Hero
Lizard
posted September 13, 2003 10:31 AM

Quote:
How do I get creature stacks to start on a certain hexagon on the battlefield for a certain battle?

Hmm... may be RTFM - is it makes sense to write parts of ERM help in this topic? Try searching at WoG site... 8(

Hi Odvin,
I'm glad to hear you're going to make another compiler! I hope you'll succeed.
Some clarifications: we don't work together. Alf is working on his project alone.
My own work stopped - and now, I don't think I'll finish it - for it seems Alf will make his language faster (and may be better). Or, do we need two or three scripting languages?
Quote:

IMHO WoG doesn't need more for its scripting language.


And IMHO no. Better the language - more possibilities, isn't it?


 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Garrett
Garrett

Tavern Dweller
posted September 13, 2003 05:43 PM

Additionally, how do I control/modify a stack of Neutral creatures? I mean, how do I get their number?

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Odvin
Odvin


Promising
Famous Hero
posted September 14, 2003 03:46 PM

IRh wrote:
do we need two or three scripting languages?
I don't think we do. Actually, I started it just for my own interest in creating programs of that type. But if it will be interesting or useful to anyone... well, that's only better.

Better the language - more possibilities, isn't it?
Remember that unless you make that HLL the actual language used inside WoG, all the possibilities of it are limited by the possibilities of ERM. You can just make it more or less easy to use. The biggest problem of ERM, imho, is its abbreviations and format values, so you always need to have a documentation at hand to read and/or write scripts. The scripts are not too complicated themselves, so probably a true object-oriented language is not that needed.
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Alf
Alf

Tavern Dweller
posted September 15, 2003 05:31 AM



Quote:
The scripts are not too complicated themselves, so probably a true object-oriented language is not that needed.


I mostly agree with you. The main problem is that a script writer have to lookup all those format tables etc so a simple translator that have those tables built in so you can use "Solmyr" or Solmyr or some such to refer to that hero and "red" to mean the red player or perhaps even redplayer in order to disambiguate it with the border gates etc is of help.

However, the reason why I chose an object oriented language approach wasn't really that a full fledged object oriented language is needed for a typical short script but because ERM itself has an underlying object oriented model. (I think Slava also pointed that out).

You have objects belonging to a certain "type" or "class". The type or class is called "receiver" in ERM but that's just a name. For each type or class you define a set of "messages" or "methods". Again, ERM call it commands or options but it is really just another name for messages or commands.

You can only interact with an object through the defined set of commands.

So yes, it is essentialy object oriented. Which is why I chose to use a C++-like model for the high level language.

The features of ERM which I do NOT appreciate is:

1. That many operations tend to be bundled together. A typical symptom is that operations tend to have many parameters.

For example, it is impossible to set the hero's knowledge without also affecting his power, attack and defense. Well you can use 'd0' to say 'no change' but the point is that you MUST specify something and as far as I know, the 'd0' isn't even default, if you don't specify all four parameters, they will be set to 0!

2. The IF receiver have some commands which takes an obscene number of parameters. The various dialog boxes really should  have receivers of their own with commands to set their properties and then a method to "display yourself" that you can call in the end or "query" to display and report back a button click or other response and with properties to reeport the user's selections etc.

3. The VR receiver isn't really a proper receiver. It doesn't correspond to an object like most other receivers. It is an artificial construct to do arithmetic.

4. The FU and DO receivers are also such "artificial" receivers. Although the FU receiver can be thought of representing a function and the method P means to call it with those parameters etc...

5. The flag variables really should be variables like every other variable, i.e. you should have b2 or b9 etc to refer to flag 2 and flag 9 respectively. Actually, as they are flags they probably really should have been 'f' variables but f is already used.

6. In general there are many things which aren't "streamlined" in ERM. Almost all places you can use a single parameter to use indirect reference to a position. The parameter give a register number x and v[x], v[x+1], v[x+2] are used to hold position. However, the problem is exactly that it is _almost_ all places. It would be nice if it were all places. Many places -1 means "current hero" but also many places a hero number of -1 means "no hero" etc. These kinds of things causes troubles for a poor script writer who essentially have to read the manual for each receiver, trigger and parameter he is using. It would be nice if for example -1 means "current hero", -2 means "other hero" (for the situations when there are two heroes involved and -3 means "any hero" and -4 means "no hero" etc and that was made throughout, all over.

This is "problems" that probably doesn't matter much when you write the script but it makes it harder to write a good translator and it also forces script writers to "think wrong" when they program.

This is also why I would prefer a stack oriented approach. For such a stack engine you would have one instruction to pop an argument from stack and store it in hero's knowledge or pop 2 arguments from stack and consider one of them to be monster and the other to be a count and create a monster stack from it etc. However, I assume that Slava had thought over it and have his reasons as to why ERM is the way it is and no matter what, that's the way it is and currently nobody can do anything about that (except perhaps Slava and he probably don't have time and even if he did, the current format works and works fine, so why change?)

I'd wish that the WoG engine had been open source so that one could write a stack engine with scripts written in a stack based language but as far as I know, that source code isn't publicly available and that's that.

Therefore I am working on the next best thing which is to try to write a translator to convert from a high level to ERM. The goal is to have the translator output ERM which you can then copy and paste into the events just as you do with hand-written ERM code.

About the progress.... well, this weekend I have been busy with work related things (I need to fill my wallet too!) all weekend and haven't done a thing with respect to the translator and the coming weekend I will be away so I won't be able to do any further work on the translator until end of this month I think. Maybe I can sneak in some time and work on it if I get home earlier than usual a day or too before then but that's it.

Alf

____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
IRh
IRh


Famous Hero
Lizard
posted September 16, 2003 01:22 PM

2Garrett:
http://heroes.diaspora.ru/hmm3/addon/erm_help.zip
Quote:
How do I get creature stacks to start on a certain hexagon on the battlefield for a certain battle?

!!BM#$; (# - number of a stack (0...41))
Usually it is used like 0...20 for a first (0) player and 21...41 for a second (1) player.
$ = x + y * 17

!!MO#1/#2/#3:G$; The monsters in the specified position (affects monster at x,y,l coordinates, l = 0/1).  
$ = number

2Odvin:
Quote:
Or, do we need two or three scripting languages?
etc...

It referred to both us, not only you. Are we able to make something better?
Quote:
Better the language - more possibilities, isn't it?

All the possibilities of C++ are limited by Assembler ones. But, I wonder, why most ppl prefer C++?
Higher the language - higher the effectiveness of coding. This is even more important for creating (in leisure time) - we are limited by our free time, not a TODO. (hope you`ll understand what I meant)

Quote:

The main problem is that a script writer have to lookup all those format tables etc


IMHO the main problem is readbility (poor mnemonics, including these numerical constants ofcos) and hard coding of simple algorithmical language features.

Quote:
This is also why I would prefer a stack oriented approach.

BTW, I used fixed stack in local y variables.

About OO: remember, ZVS wrote:
- do you know that ERM meets the Object Oriented theory requariments?


 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Lich_King
Lich_King


Honorable
Supreme Hero
posted January 02, 2004 07:33 AM

I was wondering... is there a possibility to change town music theme, just for one map, using erm. If yes, how ?
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Fnord
Fnord


Promising
Famous Hero
posted January 03, 2004 01:32 AM

Quote:
I was wondering... is there a possibility to change town music theme, just for one map, using erm. If yes, how ?


Yes, it is possible. I think it was added for the very final build of 3.57f (May 15, 2003) although never documented. If your 3.57f has a different (earlier) date, the MP command may not be implemented (I haven't checked and don't remember for sure). Documentation should appear in 3.58 and the MP receiver may be extended but for now you can try this:

!!MP receiver

Commands:
 S#/^filename^;
 S#/$;  where $ is the index of a z variable

# = number of game event that plays an MP3 file (e.g., town music)
^filename^ = name of your custom MP3 file in the MP3 folder with an .mp3 extension.

Important: do NOT put the .mp3 extension in the erm command  as it will be added automatically. If you put in the mp3 extension it may crash or give an error.

The towns have the following numbers:
1="cstletown"
2="rampart"
3="towertown"
4="infernotown"
5="necrotown"
6="dungeon"
7="stronghold"
8="fortresstown"
9="elemtown"

Example:

Place an mp3 file named "custom.mp3" in the MP3 folder. Then have the following code in a map:

!#TM1:S1/1/1/255;

!?TM1;
!!MP:S3/^custom^;

This should replace the Tower music with your "custom.mp3" music.


____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Sarkain_Stor...
Sarkain_Stormrage

Tavern Dweller
posted February 19, 2004 02:04 PM

How the hell do you understand how to use the erm editor? I do not understand how to use it for sure.
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Sarkain_Stor...
Sarkain_Stormrage

Tavern Dweller
posted February 19, 2004 02:09 PM

And how do you make creatures talk instead of fighting? But of course i have only own WoG for about a month or so, but it took about 3 weeks to understand how to install the erm editor. So i'm not so experienced of the erm. (by the way, what do all those letters and numbers mean in the erm codes?)
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
KittenAngel
KittenAngel


Supreme Hero
Lee's wifey
posted March 01, 2004 11:52 PM

@ TOP
____________
Never wear anything that panics
the cat.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Odvin
Odvin


Promising
Famous Hero
posted March 06, 2004 12:53 PM
Edited By: Odvin on 6 Mar 2004

Thanks for sticking this thread to the top, KittenAngel. This is my first thread that was sticked
As for myself, I have gave up the idea of making a translator long ago. I even don't play Heroes lately at all  No news from IRh and Alf as well. Is anybody still interested in writing a translator?

To Sarakin_Stormrage
Did you try to read the ERM help? If not, then it's no wonder that you can't understand the ERM editor  Try reading the manuals located in the erm_help subdirectory of your WOG directory.
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
[ This thread is 237 pages long: 1 2 3 4 (5) 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 ] < Prev Thread . . . Next Thread >
Post New Poll    Post New Topic    Post New Reply

Page compiled in 2.4988 seconds