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

Age of Heroes Headlines:  
16 Dec 2014: Introducing Shapers of Lore, Academy Line-Up Detailed - read more
10 Dec 2014: Heroes III HD Remake Announced for January 29th! - read more
5 Dec 2014: Website Update delayed, Community Q&A, new Vote on the way! - read more
24 Nov 2014: The Wizardsí Armies Have Arrived! - read more
14 Nov 2014: Dungeon Line-up Vote #2 Results! - read more
11 Nov 2014: HC Icon Contest, Sylvan Townscreen Vote #2 - read more
7 Nov 2014: Dungeon Line-up Vote Round 2, Sylvan Townscreen Part 1! - read more
2 Nov 2014: Dungeon wins, line-up vote starts! - read more
18 Oct 2014: Tidbits of Information from Twitch.tv Stream! - read more
9 Oct 2014: Heroes 7 Wiki is Open, HC Design & Games - read more
16 Dec 2014: Introducing Shapers of Lore, Academy Line-Up Detailed - read more
[X] Remove Ads
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 251 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 238 239 240 241 242 243 244 245 246 247 248 249 250 251 ]
JimV
JimV


Responsible
Supreme Hero
posted November 28, 2011 02:13 PM

Quote:
Though I meant something a bit more random, and not only spells.
A funny example would be "messengers" that appear for a second, "say" something at you, then disappear again.



For appearing and disappearing messengers or other graphical events, see my XFiles demo, mentioned previously on this thread.

I am slowly (as I learn Windows programming) working on an addition to XFiles, to play an external (compressed), timed .avi file, or other media file.  This could easily produce Salamandre's timed animation display.  An animation can also be done using TL0, as also illustrated in the current XFiles demo, but requires a bit too much scripting.

The basic idea of a timed animation is:  a) know in advance how long it will take to complete an animation; b) start the animation (e.g., place an object which has an animated DEF), and enable TL0 (flagged) at the same time; c) count elapsed time by the number of TL0 triggers which occur; d) stop the animation (delete the object), and disable the TL0 triggers when enough time has elapsed to complete the animation.  The TL0 can count in increments of either 1 second or about 20 milliseconds.  If there is a bit of stationary padding at the end of the animation, one second should be fine enough.  The 20 millisecond version is good for making one event occur instantaneously after another, but does not leave a lot of time for the computer to perform other things simultaneously.

An easier way to show an animation (once I have completed my DLL addition) is to make a media file of it (.avi, .wmv, etc.), and use a DLL to play it.  Era will load DLL's.  The media file contains information about itself, including its time length, so the the DLL routine can do all the timing logistics and all the user has to do is call the routine with the name of the media file.

As for coming up with random ideas for real-time events, personally I think it is better to use one's imagination to come up with ideas for interesting maps, such as a story which the map will follow, then work on implementing the map ideas with the tools from ERM and other sources.  Working on events first and then building a map around them is the wrong way around, for me - like building a house by slapping together interesting architectural details, rather than planning the house as a whole.

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


Adventuring Hero
posted November 28, 2011 05:43 PM


Quote:



Problem 2:  here is how ERM Help explains the !!HE:S command:
--------------------------------
S#1/$2;  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.
----------------------------------



So I can even set the secondary skills of a hero before they  get them? Is this the correct trigger to use then? I noticed others using the CM2 for their heroes in their maps.  

ZVSE

!?CM2;
!!HE-1:N?v1; [Get current hero #]
!!HE15:S1/2;
!!HE15:S2/2;

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


Responsible
Supreme Hero
posted November 28, 2011 06:13 PM

Quote:


So I can even set the secondary skills of a hero before they  get them?


Yes, that is what ERM Help is saying.  The HE:S receiver gives you access to the internal data tables of the Heroes 3 program and lets you set them to whatever legal values you wish.  Once they are set, the program has no way to know whether the Hero gained the skill honestly through level promotion, or whether a hacker hex-edited the values, or whether you used the receiver to set them in an ERM script.

You could have read this yourself, directly from ERM Help, and also learned the difference between triggers and receivers, and what triggers are available under various conditions, and what receivers will work under those conditions, and what Heroes data those receivers will allow you to change.

Then, having learned those tools, and practiced with them a bit, ask yourself what you want a map to be about, then what sort of events or features would contribute to the map's intended purposes, then finally what triggers and receivers you could use to implement those features.

No one but you knows exactly what you want to do in your maps (well, I certainly don't), so you are the best person to plan your scripts - once you have read ERM Help.

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


Adventuring Hero
posted November 28, 2011 06:41 PM

Where can I read this ERM help info? Is there a specific file name?

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


Honorable
Undefeatable Hero
posted November 28, 2011 07:06 PM

"C:\Program Files\3DO\Myheroesfolder\Help\Erm Help 2.81\index.htm"
____________

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


Responsible
Supreme Hero
posted November 28, 2011 08:14 PM

Quote:
Where can I read this ERM help info? Is there a specific file name?


As Salamandre's reply indicated, an "original" version of the ERM Help is installed in your Heroes 3 folder when you install either WoG 3.58f or Era.  The Era version, referenced by Salamandre, includes new commands added for WoG 3.59, which will work under Era (but not under WoG 3.58f).

I have made several small corrections and additions to the WoG 3.58f ERM Help, which can be downloaded here:

http://www.box.net/s/nv038pb3shsgnsuuum5a

Solitaire345 has done similar work on the Era version.  He gives download links in his second post on page 115 of this thread.

The ERM Help includes tutorials and sample scripts, as well as descriptions of all the receivers and triggers.  I learned 99% of what I know about scripting by reading it - which was why it was created by the WoG team.  It is the best Help manual I have ever seen.  (Of course, all the Help documents which I have read previously were on paper or were word-processor files, not HTML documents with links to tables and cross-references.  Still it amazes me that a group of amateur computer hackers took the trouble to put together such a valuable document.)

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


Honorable
Undefeatable Hero
posted November 29, 2011 01:12 AM
Edited by Salamandre at 01:26, 29 Nov 2011.

I have a strange issue in DL:

It is said that H#1/#2 is parsed before showing. In my script I have 3 functions, each one changes all the items defs and hints. In the first function, then one which opens the first dialog, I set all the H#1/#2. In other functions I don't need to set them again (will crash if I do), and the hints are updated, hence my dilemma, how are they updated?

Example;

!?FU1;*coming from game and open dialog
!!VRz1:S^Lightning Bolt^;
!!DL#:H5/z1; set this hint on item 5

!?FU2; coming from FU1
!!VRz1:S^magic arrow^;
Item 5 shows magic arrow without any H5/z1 command.

All further functions will have items hints updated correctly, no idea how, as all H commands are in FU1. How the game knows z1 is for item 5?
____________

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


Responsible
Supreme Hero
posted November 29, 2011 01:59 AM
Edited by JimV at 02:00, 29 Nov 2011.

Quote:
I have a strange issue in DL:
...
How the game knows z1 is for item 5?


Let me quote an expert on this subject:

Quote:
posted by Salamandre (Honorable Legendary Hero) at 14:11, 26 Aug 2011

...

And if someone had the pleasure of getting endless crashes with DL, please tell me now to change hint txt for a def item inside a function.

!?FU300;
!!VRz1:S^Hint^;
!!DL10:H1/z1;

!?FU301;
!!VRz1:S^It will crash^;
!!DL10:H1/z1;

So far, setting hint txt in template will override any H$/# text. If text in template is left empty, the H$/# hint will display correctly but no way to change it later without instant crash.

Edit: solved second. You don't have to change hint show, but only z var stored text. The DL will read from first function.


I understood from the second quote that the DL:H command stores the z-variable number in association with the hint item, so that when the contents of that z-variable change, that hint item is also updated.

(It would be good to add this information to the Era ERM Help.  I must have had dozens of crashes due to disobeying rules which are not in the DL:H description.)

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


Honorable
Undefeatable Hero
posted November 29, 2011 02:01 AM

Yes I know I posted this, just was confused why it does so...I am always scared that my work-around things will generate later errors if I don't get the the logic 100%.
____________

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


Adventuring Hero
posted November 29, 2011 09:15 AM



Quote:
"C:\Program Files\3DO\Myheroesfolder\Help\Erm Help 2.81\index.htm"


Cool thanks! I've been testing some easy scripts to get the hang of it, with some success, and failures, namely secondary skills.  Here's what I have:


!?HM0; (Identify Orrin as hero)
!!HE-1:S1/22/1; (use hero who triggered event, orrin, and in slot 1 give skill of offense)
!!HE-1:S2/21/1;(use hero who triggered event, orrin, and in slot 2 give skill of learning)


I was using the format:
S$1/$2/1

I used the !?HM trigger because it was on the top of the page for the HE receivers, but for some reason it's not working? Should I use another trigger?

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


Known Hero
posted November 29, 2011 09:54 AM

Quote:

I was using the format:
S$1/$2/1


As I remember this command controls mainly the arrangement of skills. When you execute !!HE-1:S1/22/1; you force the game to show this skill in the first slot, but not actually give it to the hero. Moreover, this slot is already occupied with one of the default skills. All this can cause fatal errors.

If you don't care which place in the table a new skill will take you should use !!HE-1:Sx/y; syntax. If you do care you still have to use it in order to give the skill. After that you can find out its position and swap it with any other skill making it first or second in the table if you need.

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


Honorable
Undefeatable Hero
posted November 29, 2011 02:10 PM

In mapsforheroes.com there is a map you can get when word searching for "Luna".

Inside you have a script which sets pretty well the leveling, hope is what you want:

ZVSE

!#VRv313:S0;               *** set v313 to 0   . Counter
!#VRv314:S2;               *** set v314 to 2

!?HL136;                  *** TRIGGER when Luna gains a level

!!VRv315:S0 T3;      *** Set v315 to random # 0 to 3 atk/def/pwr/kwn

!!VRv314&v313=1:S5;     *** 2 Navigation
!!VRv314&v313=2:S9;     *** 3 Luck
!!VRv314&v313=4:S13;   *** 4 Estates
!!VRv314&v313=5:S20;   *** 5 Artillery
!!VRv314&v313=6:S23;   *** 6 Armorer
!!VRv314&v313=7:S25;   *** 7 Sorcery
!!VRv314&v313=8:S26;   *** 8 Resistence
!!VRv314&v313=9:S27;   *** 9 1st Aid

!!HL:Sv315/-2/v314;  *** Skill selection Logistic 1st time
!!VRv313:Sd1;          *** add 1 to v313
____________

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


Adventuring Hero
Outcast Fire Witch
posted November 29, 2011 03:12 PM

I want to change some heroes's unique abitities.
As we know, with script 39, Adrienne can cast curse on all enemy stacks at start of combat. I want to change it. Can I make a hero with ability that cast benefit spell on all friendly, or bad spell on enemies?
____________
My HoMM3 Maps
Sorry for my bad English.

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


Adventuring Hero
posted November 29, 2011 04:55 PM

Neither the Luna script, or the !!HE-1:sx/y; seem to work, and I tried them on new maps that don't have any other ERM codes for overlap.

 The leveling I can use with the !?HL trigger and then use !!HL receiver to display the next set of skills when gaining a level.  That I figured out last night (my first step! lol).  

What I would like to have is the skills already in place, including the hidden skills.  Because there's a problem when you use the HL receiver and all 8 skill slots are full.  When you gain a level it shows basic x and basic y, and if you jump 10 levels for example, you won't acquire the skills and your selection will still be basic x/y.  What I'm doing right now, is having the hero with the 8 skills open a pandora's box of experience, and hope that the 2 hidden skills I'd like (resistance and intelligence) appear.  But then from day 1 I have a hero starting at level 16 lol.  The rest of the hidden skills I can get from battle academy (script 16), but for some reason, I can never find those 2 in the academy I'd like.  

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


Honorable
Undefeatable Hero
posted November 29, 2011 05:06 PM

I have no idea what you want, but if you want all skills in place on first day, without any experience bonus:

!?PI;
!!DO15611/0/27/1:P;

!?FU15611;
!!HE0:Sx16/1;

Orrin will have all skills on first day. Of course, you need script "hidden skills" to be activated, otherwise you can't view them.
____________

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


Adventuring Hero
posted November 29, 2011 05:46 PM

Quote:
I have no idea what you want, but if you want all skills in place on first day, without any experience bonus:

!?PI;
!!DO15611/0/27/1:P;

!?FU15611;
!!HE0:Sx16/1;

Orrin will have all skills on first day. Of course, you need script "hidden skills" to be activated, otherwise you can't view them.



I would like these skills to appear in the 8 slots,

Fire Magic
Sorcery
Wisdom
Learning
Air Magic
Earth Magic
Pathfinding
Logistics

and these two to appear in the hidden skills

intelligence
resistance

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


Adventuring Hero
posted November 29, 2011 05:52 PM

that actually worked well, and they all did appear in the hidden skill set. I just need to find a way to narrow the skills attached, and if i can put them in order..

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


Honorable
Undefeatable Hero
posted November 29, 2011 06:03 PM

What's the problem? The skills will be offered in the order you put them.

If HE-1:S0/1; gives pathfinding, then use same command for all skills, placing the ones you want in hidden in last two positions.
____________

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


Known Hero
posted November 29, 2011 06:07 PM
Edited by Aleee at 18:11, 29 Nov 2011.

Quote:
that actually worked well, and they all did appear in the hidden skill set. I just need to find a way to narrow the skills attached, and if i can put them in order..


!?PI;
!!DO15611/0/27/1:P;
!!HE0:S[1]/1;
!!HE0:S[2]/1;
...
!!HE0:S[n]/1;

!?FU15611;
!!HE0:Sx16/0;


where [1], [2],..., [n] - are skills' IDs from the ERM-help. In order to make the two skills hidden you just need to place them at the end: [n-1] and [n].

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


Adventuring Hero
posted November 30, 2011 04:24 AM

Yay! I got it! Thank you all! Now time to play for hours upon hours!

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
[ This thread is 251 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 238 239 240 241 242 243 244 245 246 247 248 249 250 251 ] < Prev Thread . . . Next Thread >
Post New Poll †† Post New Topic †† Post New Reply

Page compiled in 0.1917 seconds