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 ... 160 161 162 163 164 ... 200 250 300 350 400 407 · «PREV / NEXT»
wog_edn
wog_edn

Promising

The Nothingness
posted September 13, 2012 04:30 PM

It will seem I do not have the ERM help file, though I have the ERM Editor downloaded .. could anyone provide a link so I could try and see if I get some of it at least
____________

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


Legendary Hero
walking to the library
posted September 13, 2012 04:43 PM

Erm Help by Jim Vogan
http://www.box.com/s/nv038pb3shsgnsuuum5a
and by solitaire345
http://www.4shared.com/rar/1VV1FuKZ/Erm_Help_281.html

____________
"I heard the latest HD version disables playing Heroes. Please reconsider."-Salamandre

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

Promising

The Nothingness
posted September 13, 2012 05:23 PM

I'll try and read both tonight after work, thanks a lot (and of course a thanks to the authors)!

Is it possible by any command to force a battle at X day (Garrison owned by a player), and if the battle is lost then several mines loses their owner?

Any idea as to good first scripts for a newbie to try and make? The only ones I know are the ones to change avaliable creatures for hire in towns (with upgrade and moral). I guess I could manage some of the guides in this place too, cause they're so extremely informative.
____________

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


Admirable
Omnipresent Hero
Wog refugee
posted September 13, 2012 08:12 PM
Edited by Salamandre at 20:35, 13 Sep 2012.

I don't get what you mean by force a battle. For example, day x as soon as player moves a step, get a battle suddenly? is weird if a scout is moving first

@Edit, ok I got it. You want AI to attack one of your garrisons. That's easy, just move an AI hero in front and force his priority with !!AI receiver
____________
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 08:37 PM
Edited by JimV at 20:38, 13 Sep 2012.

See the HE:T command in ERM help (forces a battle with a specific Hero and its army, against specified creatures - to which an enemy Hero can be added, using other commands).  However, instead of asking question after question here, it would save a lot of time both for us and for you if you were to read all of ERM Help and see what commands are available - like a carpenter learning what tools are available before trying to build something.

Note:  the authors of ERM Help were the WoG Team (as listed in the WoG credits)(although a few corrections/updates have been added).  If you don't have ERM Help you probably haven't downloaded all the ERM Tools - see the "Introduction to Modding and Scripting" post here.

The best scripts to start on for practice are the tutorial scripts in ERM Help.  After that, you must decide what it is you want to do, and then think of the ERM commands which might be involved, and then look them up again in ERM Help.

Don't give up if your first try doesn't work.  Check all your commands in ERM Help again, add some "debug displays (IF:M)" to see what is happening during the script, and if one approach doesn't work the way you hoped it would, think of a different approach.  We all had to do this, none of us was born knowing ERM.

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

Promising

The Nothingness
posted September 13, 2012 08:42 PM

I'll 'explain' better with a picture.



Say you have 40 marksmen in your garrison.

Every 14 day the garrison will be attacked by an increasing number of enemies (in this case lets say they are dwarves, miners .. local uprising ftw).
If the battle is won, nothing happens. If the battle is lost then the player will lose control of the gold mines.
____________

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


Admirable
Omnipresent Hero
Wog refugee
posted September 13, 2012 08:51 PM
Edited by Salamandre at 21:08, 13 Sep 2012.

In 300 spartans map, I scripted 48 AI heroes to attack a precise location, here is an example:

!#VRv607:S0; day counter
!#TM46:S1/999/1/255; each day timer
!?TM46;
!!VRv607:+1; this is timer which regulates the order they come
!!HE152&v607=3:P50/21/0; this moves the hero 152 at coord on the third day
!!AI&v607=3:S152/0/1/81/23/0/5000000/3; this say to AI hero he has to go/attack the location specified*. (81/23/0)
* this script may cause crash if the pathfinding in the area is too complicated for AI, in this case was a straight line, no problem. But it failed in TEW 4 while in complex labyrinth.

Repeat for as many heroes you need. Don't forget to check that AI has never 8 heroes active or script will not work when trying to add a 9th one. Post result.

@Comment 1: battle at garrisons are very frustrating for a player, because they are sitting ducks. If I were you, I would replace the garrison  by one hero with zero movement.

@Comment 2: many things can be set up directly in editor, without any need of erm, mapmakers are aware of this. For instance, placing an endless event boosting stats which AI is likely to take every time he attacks your garrison, will result in stronger AI attacks every x days.
____________
Era II mods and utilities

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

Promising

The Nothingness
posted September 13, 2012 09:07 PM

@JimV; I will read through the ERM Help once I find it, I've downloaded everything I can find (ERA with tools, ERM tools archives, etc..) without finding any actual ERM help or tutorial. When I try and open ERM Help (html) in the ERM Scripter I simply get a message that the file couldn't be found. I do not really want to bother with questions, which is why I want to try and find it so that I can manage to write at least something simple myself.
____________

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


Admirable
Omnipresent Hero
Wog refugee
posted September 13, 2012 09:10 PM

Open "C:\Program Files\3DO\Mygame\Tools\Era Start Menu\start.exe"

then click on erm help, you try to get it in editor, it never worked.
____________
Era II mods and utilities

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

Promising

The Nothingness
posted September 13, 2012 09:24 PM

Trouble is I do not have the ERA Start Menu



Redownloading the entire ERA complete package to see if it helps reinstalling, maybe I'll find something then.
____________

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


Responsible
Supreme Hero
posted September 13, 2012 09:48 PM

ERM Help is an HTML file so it can only be opened in a browser, such as Google Chrome or Internet Explorer.  You can click on it in Windows Explorer to open it with your default browser, then add it to your bookmarks.  You can search it with browser tools, such as Ctrl-F (Find).  If you installed ERM Tools from the original WoG site (now defunct, I think), it would show up in your Start Menu under New Life of Heroes.

I don't know of anyone who uses ERM without ERM Help, so opening it should be your first priority (and test).

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

Promising

The Nothingness
posted September 13, 2012 09:51 PM

Found it! In a folder named "Help" ... can't believe I didn't notice it at once. Now to read between sets!
____________

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


Admirable
Omnipresent Hero
Wog refugee
posted September 13, 2012 10:27 PM
Edited by Salamandre at 01:47, 14 Sep 2012.

I don't know what could be wrong with check not visited CB's script, it finds 99% of CB's but there are a few ones he can't spot, never.

It looks like the problem is here:

!!TRv1/v2/v3:V?y1; check visibility for red player
!!FU&y1<>1:E;


I add checks and for those and found the problem, visibility for those not found is 255. I am not 100% sure what TR:V says about bits.

I get values either of 1 and 255 (surely AI visited, they are all in one team) for all visible CB, 254 for others (which confirms that AI sees the map-cheat?). So what is the value I must use? Is this  similar as monsters bits, thus if I check for red bit only I will get correct?

!!TRv1/v2/v3:V?i; check visibility for red player
!!VRi:&1;
!!if&i=1:;
[...]
!!en:;

Or

!!TRv1/v2/v3:V?y1; check visibility for red player
!!FU&y1<>1/y1<>255:E; ?

Both ok?

____________
Era II mods and utilities

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


Responsible
Supreme Hero
posted September 14, 2012 02:07 AM
Edited by JimV at 02:12, 14 Sep 2012.

Yes, TR:V is a set of bit flags, like MA:X, where Red is 1, Blue is 2, Tan is 4, etc.  If I recall from ERM Help, neutral monsters are 256.  This only shows whether a square of terrain is visible to a player, though, not whether a player has actually visited that square (V stands for visibility, not visited).  So if an AI Hero walks close to the square (but not on it), the bit should be set for that player.  255 = 1+2+4+8+16+32+64+128 => the square is visible to all players.  If a monster was next to the square, a value of 511 is possible. Note that allied players can see all the squares which any of the individual players can see.  By "see", I mean the Fog of War has been removed (for the benefit of third-party novice readers).

CB:V gives visited status, according to ERM Help:

 T$ - set/get/check whether CrBank is taken already (1) or not yet (0). Note, that if you reset a bank to not taken (set to 0), you still should set at least one guard stack unless you want the next hero that visits to get the treasure for free.
  V$ - set/check/get a word of visiting of a player. This is a bit mask, so red is 1, blue is 2, tan is 4, green is 8 and so on.

ERM users who don't understand what bit flags are and what the VR:& and VR:| commands do might get some insight by reading about binary numbers and binary logic, in their own languages.  Essentially, numbers in computers are stored in binary with each "bit" representing a power of two, so to store multiple pieces of yes/no information in a computer byte, each piece of information is assigned to a different power of two.

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


Admirable
Omnipresent Hero
Wog refugee
posted September 14, 2012 02:31 AM
Edited by Salamandre at 02:43, 14 Sep 2012.

Thanks, got it. When I wrote AI has visited, I meant that area, not the CB itself. The script seems working correctly now, hope I solved the bits problem, it still remains a dilemma for me, no matter what I read-we all have our limits-:

!?CM0;  Find CB no taken
!!CM:I?y1;
!!FU&y1<>5:E;
!!VRz1:S^Let me find not taken creature banks for you^;
!!VRz2:S^DO IT! (will show only in visible areas, ground CB)^;
!!VRz3:S^I want to see not taken crypts, shipwrecks and derelict ships!^;
!!VRz4:S^Exit^;
!!IF:G1/4620/1/1/2/3/4;
!!FU&v4620=4:E;
!!if&v4620=1:;
!!UN:U16/-1/?y-1;  creature banks number
!!VRv1:S-1;
!!DO251111/1/y-1/1:P16;  Run through
!!en:;
!!if&v4620=2:;
!!UN:U84/-1/?y-1;  creature banks number
!!VRv1:S-1;
!!DO251112/1/y-1/1:P84;  Run through
!!UN:U24/-1/?y-1;  creature banks number
!!VRv1:S-1;
!!DO251112/1/y-1/1:P24;  Run through
!!UN:U85/-1/?y-1;  creature banks number
!!VRv1:S-1;
!!DO251112/1/y-1/1:P85;  Run through
!!en:;
!!CM:R0;

!?FU251111; type 16
!!UN:Ux1/-1/-1/1; [Creature Bank coordinates in v1/v2/v3]
!!TRv1/v2/v3:V?i; check visibility for red player
!!VRi:&1;
!!if&i=1:;
!!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/100;  stop view on for 1/10 second
!!IF:Q1^Next one?^;
!!VRx16&-1:S999;
!!en:;

!?FU251112; crypts, derelict, shipwrecks
!!UN:Ux1/-1/-1/1; [Creature Bank coordinates in v1/v2/v3]
!!TRv1/v2/v3:V?i; check visibility for red player
!!VRi:&1;
!!if&i=1:;
!!CBv1/v2/v3:T?y1;   check if taken
!!FU&y1=1:E;
!!UN:Lv1/v2/v3/100;  stop view on for 1/10 second
!!IF:Q1^Next one?^;
!!VRx16&-1:S999;
!!en:;
____________
Era II mods and utilities

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


Adventuring Hero
posted September 17, 2012 02:45 AM

This probably won't go anywhere but I was wondering, if I wanted to take a new model, and replace a old unit with it, change the units stats, and it's name etc, How would I do this?

(Like what things to open etc, etc, I'm new to this so I'll probably have more questions for later also.)

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


Responsible
Supreme Hero
posted September 17, 2012 07:21 AM
Edited by JimV at 07:29, 17 Sep 2012.

I am not sure what you mean (unit=creature?) (never mind, unless it is a scripting question), but if it involves graphics changes rather than ERM scripting, you probably should read the thread "Introduction to Modding and Scripting", and similar threads listed in the "Wake of Gods Forum Links" post which is on the first page of this forum.  Then ask specific questions at whichever of those threads seems the most relevant - since that is where you will get the attention of the modding/graphics experts.  Also, if it is a new question which hasn't already been answered in the thread (very unlikely, but possible), it would be good to have the answer where others can find it easily, rather than somewhere where it is off-topic.

P.S. See the MA receiver in ERM Help for how to change all of a creature's properties (Attack, Defense, etc.).  See UN:G1 in ERM Help for how to change a creature's name.  I think this is also covered in "Introduction to Modding and Scripting".

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


Admirable
Omnipresent Hero
Wog refugee
posted September 17, 2012 10:02 AM
Edited by Salamandre at 10:16, 17 Sep 2012.

I want to double crusader stats in battle, but the damage  gets some unexpected bonus and changes slightly from test to test (range of 10!), any idea why? Tested at 0 exp level both.

Left without script, right with. The hero has crusaders specialty, maybe this is the cause?



!?BA0&1000;
!!BA:H0/?v9667 H1/?v9668;
!!FU&v9667<>152/v9668<>152:E;  exit if not Hero 152
!!VRv9666:S1; enable BR
!?BR&v997=0/1000/v9666=1;
!!DO78000/0/7/1&v9667=152:P;  attacker
!!DO78000/21/28/1&v9668=152:P;  defender

!?FU78000;
!!BMx16:T?y1;  check if ID=7
!!if&y1=7:;
!!BMx16:A?v9669 D?v9670 S?v9671;   check stats
!!BMx16:H?v9672 U1/?v9673 U2/?v9674;
!!DO78001/9669/9674/1:P;  double them
!!BMx16:Av9669 Dv9670 Sv9671;
!!BMx16:Hv9672 U1/v9673 U2/v9674;  set new stats
!!VRv9666:S0;  disable for next rounds
!!en:;

!?FU78001;
!!VRvx16:*2;
____________
Era II mods and utilities

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


Honorable
Supreme Hero
posted September 17, 2012 11:13 AM

Afair, WoG exp bonuses are applied in the 0-th round. Perhaps, after your trigger.

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


Admirable
Omnipresent Hero
Wog refugee
posted September 17, 2012 11:15 AM
Edited by Salamandre at 11:16, 17 Sep 2012.

Stack was at basic level, no exp bonuses. The damage values change at each reload.
____________
Era II mods and utilities

 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 ... 160 161 162 163 164 ... 200 250 300 350 400 407 · «PREV / NEXT»
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.6099 seconds