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


Age of Heroes Headlines:  
5 Oct 2016: Heroes VII development comes to an end.. - read more
6 Aug 2016: Troubled Heroes VII Expansion Release - read more
26 Apr 2016: Heroes VII XPack - Trial by Fire - Coming out in June! - read more
17 Apr 2016: Global Alternative Creatures MOD for H7 after 1.8 Patch! - read more
7 Mar 2016: Romero launches a Piano Sonata Album Kickstarter! - read more
19 Feb 2016: Heroes 5.5 RC6, Heroes VII patch 1.7 are out! - read more
13 Jan 2016: Horn of the Abyss 1.4 Available for Download! - read more
17 Dec 2015: Heroes 5.5 update, 1.6 out for H7 - read more
23 Nov 2015: H7 1.4 & 1.5 patches Released - read more
31 Oct 2015: First H7 patches are out, End of DoC development - read more
5 Oct 2016: Heroes VII development comes to an end.. - read more
[X] Remove Ads
LOGIN:     Username:     Password:         [ Register ]
HOMM1: info forum | HOMM2: info forum | HOMM3: info mods forum | HOMM4: info CTG forum | HOMM5: info mods 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 Popular Thread is 407 pages long: 1 50 100 150 ... 159 160 161 162 163 ... 200 250 300 350 400 407 · «PREV / NEXT»
Salamandre
Salamandre


Admirable
Omnipresent Hero
Wog refugee
posted August 31, 2012 01:50 PM

UN:I can't handle type 40 -or other unknown types- objects

!!HE-1:P?y1/?y2/?y3; check hero position
!!TRy1/y2/y3:T$1/$2/$3/$4/$5/$6/$7/$8;
____________
Era II mods and utilities

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


Hired Hero
posted August 31, 2012 02:51 PM

I tried changing custom object's type - 49 10 (magic well).
It still has problems.
And how to use this script for terrain? Ex: every hero's step on underground, it acticates !!HE-1:G1000;.
____________

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


Responsible
Supreme Hero
posted August 31, 2012 03:10 PM
Edited by JimV at 15:16, 31 Aug 2012.

General answer:  read ERM Help (completely) before starting to write ERM scripts - otherwise you are like a carpenter trying to build a house without knowing that there such things as hammers, nails, saws, et cetera.

More specific answer on placing objects:  read the section at the end of the UN page which describes in detail which objects can and cannot be placed with UN:I.  It will tell you that no object of type 40 can be successfully placed.*

Most specific answer on terrain:

!?HM95&12/-138; Darkstorm (Bron) (f138 set in Adv Twr)
!!HE95:P?v1/?v2/?v3;
!!TRv1/v2/v3:T?v9/d/d/d/d/d/d/d;
!!FU&v9=8:E; avoid hunting crash on landing (anchor point)

This example exits the HM trigger when Hero 95 is on terrain type 8, which is water.  Look up each command in ERM Help to understand it.

This thread is so humungously long because most of the time we are repeating information which is already in ERM Help, over and over and over.

* Note:  you will need the most current version of ERM Help for the most complete information on UN:I.  Era 2 comes with an updated version, and links to updated version are given in Master_Learn's "Index to ERM Help Post" (or something like that) thread.

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


Hired Hero
posted August 31, 2012 04:38 PM
Edited by Rytelier at 16:38, 31 Aug 2012.

ERM language is difficult to understand for me.
I have the newest ERM help, from ERA. So there's no any way to place decorations with ERM?
And about terrain: I analyzed this script and I tried to place test command to display text. I changed water to underground in function. After studying ERM help I don't know how to display this text (I know command, but how to do it in this script?). And I don't know, what means -138 in HE. ERM help had only one number which is hero's number (I also changed it to -1).
____________

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


Admirable
Omnipresent Hero
Wog refugee
posted August 31, 2012 05:06 PM

It will be easier to understand if you simply explain the effect you try to achieve. For instance, H-1:G1000 will  have no effect on daily movement.
____________
Era II mods and utilities

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


Responsible
Supreme Hero
posted August 31, 2012 05:29 PM

Quote:
So there's no any way to place decorations with ERM?).


Here are some of the decorative objects which can be placed with ERM, based on my tests:

120/0 1x1 flower
121/0 2x1 frozen lake
124/0 1x1 dirt hole
125/0 2x1 kelp
126/0 2x1 swampy lake
129/0 2x1 bunch of mushrooms
130/0 1x1 log
131/0 1x1 mandrake
132/0 1x1 mossy rock
133/0 2x1 rough mound
135/0 stand of oak trees with green leaves
150/0 2x1 green ferns
...

More can be found the same way I found these:  write a script to get object type and subtype numbers as input and place the object on a test map.  Run the script in a test map and see what crashes and what doesn't.  (You will have to read more of ERM Help before writing this script.)

Quote:
I don't know how to display this text.


Open ERM Help.  Click on the "Flags and Variables" tab.  Under "Variables" on the left-side menu, click on "Display" and read the section:

Displaying Variables in Messages
Like flags, the values of variables may be displayed in messages by using special codes for the type of variable followed by the variable number as shown below:

%V#  Shows a quick or v variable of the specified number. # = f to t or 1 to 10000.
%W# Shows a hero variable of the specified number. # = 1 to 100.
%X#  Shows a parameter variable of the specified number. # = 1 to 16.
%Y#  Shows a local function variable of the specified number. # = 1 to 100.
%Z#  Shows a string variable of the specified number. # = 1 to 500.
... (examples follow)...


Quote:
I don't know, what means -138 in HE.


Under "Flags and Variables" read the section on Flags.

Actually, as I said before, I think you should read all of "Flags and Variables", as well as every other tab in ERM Help, rather than reading isolated things for specific purposes.  Learn all your tools first, then start doing scripts.  There are usually more than one way of doing things in ERM, and the specific way you are focused on may not be the best.

Correction:  referring to my test notes, I see that there are a few type-40 objects which can be placed: subtypes 0-2.

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


Hired Hero
posted August 31, 2012 06:24 PM

I want to make infinite hero's move on underground terrain, he get full move points every step.
Saying that about text, I mean I tried to display message every step (for testing).
____________

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


Admirable
Omnipresent Hero
Wog refugee
posted August 31, 2012 07:03 PM

Which hero
____________
Era II mods and utilities

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


Hired Hero
posted August 31, 2012 07:11 PM

This hero, which I am controlling. Does script changes for diffirent heroes? I thought it's only one number.
____________

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


Admirable
Omnipresent Hero
Wog refugee
posted August 31, 2012 07:14 PM

Bah, if you don't use precise hero ID, ALL heroes will get unlimited movement.
____________
Era II mods and utilities

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


Hired Hero
posted August 31, 2012 07:21 PM

That can be problem... But my map will use only one hero for controlling - it's ID 11.
____________

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


Admirable
Omnipresent Hero
Wog refugee
posted August 31, 2012 07:36 PM

ZVSE

!?HM11;
!!HE-1:P?v1/?v2/?v3;
!!TRv1/v2/v3:T?v4/d/d/d/d/d/d/d;
!!HE-1:W?y1;
!!HE-1&v4=6/y1<10000:Wd150;

____________
Era II mods and utilities

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


Responsible
Supreme Hero
posted August 31, 2012 07:45 PM

Quote:
Saying that about text, I mean I tried to display message every step (for testing).


There are many examples of displaying text in ERM Help.  The very first sample script in the Tutorials contains an example, using !!IF:M^(text)^;

I guess that is the last time I will mention ERM Help, but I very much doubt that there is anything which you need to know to write your script which is not contained in it, probably using better words than I can think of.

I will also say that adding IF:M statements to see what your script is doing is a good idea.  However, another way is use Bersy's EVME program (Heroes-Era Folder/Tools/EVME) to display the values of variables.  It will display v-variables, w-variables, z-variables (strings), I think e-variables, and flags (f).  Unfortunately it will not display y- or x-variables, so you must put numeric values which you wish to display in v-variables, for testing.

Note: if you are running Heroes in full-screen mode, you can use Windows-D (hold down the Windows key and press the D key) to minimize Heroes and display the desktop (to see EVME's display).  Then click on the minimized Heroes tab to bring up its screen again, take another step, etc..

If your underground section is not too large, another option besides checking each Hero step is to use a trigger for entering the underground (Subterranean Gate object or Portal object, !?OB trigger) and at that point give the Hero enough movement points to do all of its necessary exploring, e.g.,

!!HE0:Wd10000; (give Hero #0 +10,000 movement points)

With this method the green path errors will be accurate, whereas if you add movement points each step, brown path arrows will not turn green until the Hero moves, which can seem like a glitch.


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


Hired Hero
posted August 31, 2012 07:46 PM
Edited by Rytelier at 19:48, 31 Aug 2012.

Thanks, this script works, but there's one problem. When hero it looks like game has lags. I should find other way to make unlimited movement... I'll think about this.
Edit: I know how to display text, but I needed help in this script. But now that's not important for me
____________

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


Admirable
Omnipresent Hero
Wog refugee
posted August 31, 2012 07:47 PM
Edited by Salamandre at 22:02, 31 Aug 2012.

Strange issues you get, maybe upgrade Amiga to some PC?
____________
Era II mods and utilities

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


Admirable
Omnipresent Hero
Wog refugee
posted September 06, 2012 08:21 PM
Edited by Salamandre at 20:33, 06 Sep 2012.

A bug was reported when using 28 wog enhanced monsters. It looks like they forgot to remove towers from possible stack attacking, thus the target tried to retaliate back by casting a spell, then crashes if on towers.

I found where to fix it, but if someone better could take a look, then script will be definitely fixed because the script is HUGE.

Line 1018

!?FU7064;
add check for towers ID
!!BMv7010:T?y1;
!!FU&y1=149:E;
[...]

SAVE showing error


Btw, split stack script should be disabled before testing this save (then F12) because it causes even bigger bug. Save requires a lot of graphical mods, but will run after the usual errors, didn't bother to enable them.
____________
Era II mods and utilities

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


Promising
Undefeatable Hero
My BS sensor is tingling again
posted September 09, 2012 03:02 PM

i'm not sure if this thread is the place to ask this but is it possible to write a spell mod for era 2 that re-balances them. i was thinking like blind & slayer switching places, blind being a much better spell moving to level 4. also magic mirror and hypnotize switching places, but with a much more powered hypnotize. i never thought magic mirror was even close to good enough for level 5, and the level 3 hypnotize is de facto useless most of the time. imagine a level 5 hypnotize that actually works and a modest cheaper magic mirror which can be a pretty decent level 3 spell. is  this mod possible to do, if it is is it small work or hours of work. there's no new spell, hence no new graphics or animation, just a slight modification of  hierarchy...

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


Admirable
Omnipresent Hero
Wog refugee
posted September 09, 2012 03:57 PM
Edited by Salamandre at 16:26, 09 Sep 2012.

About balancing spells, you can do the mod of your dreams, but only you can. Switching them among magic schools levels and change hypnotize power is a few lines commands, but then you have to set your hypnotize power to your needs. It can't be a 100% working spell for obvious reasons, so the question is how powerful.

Such mod can be done, but then you will have to play with values until you get what you want. I would go for a dynamic hypnotize, regardless hero spell level rather than absolute power. (in my map TEW 4, hypnotize can be upgradeable endlessly if you provide enough resources for example)

What I fear most is about chances of appearing in every town and this probably will need the most work. Blind as level 2 has high chances but moving it to level 4 will (maybe, can't be sure) make it appear every time, and you will never see town portal or others. This needs test.
____________
Era II mods and utilities

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


Admirable
Omnipresent Hero
Wog refugee
posted September 13, 2012 09:44 AM
Edited by Salamandre at 10:40, 13 Sep 2012.

I have a question:

I am updating TEW 3 for era release and added some handy scripts to help navigation. As creature banks re-spawn every 28 days, the script will find the ones not taken thus we don't have to browse all map for hours. There are two options, one to stop on first found, second to loop through all (only those visible for red faction obviously).

I was wondering if there is a way to stop second search on a simple click, intercepting it. So lets say the program loops, and we wish to exit on a precise CB found. Here is the script:

!?CM0;  Find CB no taken
!!CM:I?y1;
!!FU&y1<>5:E;
!!VRz1:S^Choose your search method^;
!!VRz2:S^Loop briefly through all CB not taken (only in visible areas)^;
!!VRz3:S^Stop on first not taken CB found^;
!!VRz4:S^Exit^;
!!IF:G1/4620/1/1/2/3/4;
!!FU&v4620=4:E;
!!UN:U16/-1/?y-1;  creature banks number
!!VRv1:S-1;
!!DO251111/1/y-1/1:P16;  Run through
!!CM:R0;

!?FU251111;
!!UN:Ux1/-1/-1/1; [Creature Bank coordinates in v1/v2/v3]
!!TRv1/v2/v3:V?y1; check visibility for red player
!!FU&y1<>1:E;
!!OBv1/v2/v3:U?y2;  check subtype
!!FU&y2>12/y2<17:E; exit if citadels
!!FU&y2=19:E; exit if lost bottle
!!CBv1/v2/v3:T?y1;   check if taken
!!FU&y1=1:E;
!!UN:Lv1/v2/v3/1000;  stop view on for one second
!!VRx16&v4620=2:S999;  exit after first found if second choice

Another information I found: if using warfare script, catapult is subtype 124, the one specified as [reserved] in help section. I was going nuts trying to disable its shot for one battle and nothing worked, until I had the idea to check for "obvious" subtype and wasn't the expected one.

@Edit: found a simple solution, added at the end:
!!IF:Q1^Next one?^;
!!VRx16&-1:S999;

Probably a click can not interrupt a script anyway.
____________
Era II mods and utilities

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


Responsible
Supreme Hero
posted September 13, 2012 04:23 PM

XFiles has a function to detect a mouse-click (or a key press), so (under Era) a script could check for a click and, if one is detected, exit from a search loop (perhaps checking with the player via IF:Q first).  However, accidental mouse clicks might annoy players, so I think your method is as good or better.

The latest XFile functions are not documented yet because I added them for a new map which I am working on ("Lost Temples, Hidden Spells"--working title).  This requires creating 2x144x144 worth of terrain and objects which will take a lot of time to complete (if ever).  The mouse-click function has been used to add new (hidden) spells to a Spell Book, by detecting clicks on certain locations.  (Chain of Fire, demonstrated previously, Wave of Destruction, Eye of the Whirlwind, and Huorn Grove).  E.g., "After you hear the following chime, click on my fiery mane," to unleash the Chain of Fire.

Anyway, as the saying goes, "In Era, all things are possible."

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Jump To: « Prev Thread . . . Next Thread » This Popular Thread is 407 pages long: 1 50 100 150 ... 159 160 161 162 163 ... 200 250 300 350 400 407 · «PREV / NEXT»
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.5497 seconds