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 scripting topic-Map Internal ERM Scripts
Thread: ERM scripting topic-Map Internal ERM Scripts
Lord_Immortal
Lord_Immortal


Famous Hero
DoR Dev Team
posted June 27, 2009 04:05 PM
Edited by Lord_Immortal at 16:12, 27 Jun 2009.

ERM scripting topic-Map Internal ERM Scripts

Hello,I have ideated a second topic about the ERM Scripts.I think that is the first thread"ERM help and discussions" is a bit poor in the field of ERM scripts(i do not mean to insult the creator of "ERM help and discussions but it has a very limited part of the immense discusions about ERM,meanwhile,here we will discuss about INTERNAL MAP ERM SCRIPTS(like those of the campaings).At this thread,everybody can post his INTERNAL MAP ERM SCRIPT.The WOGification scripts(those you can enable/disable at "WOG options"before you start the Single/Multi Player custom maps)are part of the "ERM help and discussions" thread.If you want ask about WOGification Scripts that may interfere or cooperate with INTERNAL MAP ERM SCRIPTS post it here.Have fun creating new INTERNAL MAP ERM SCRIPTS or simply use those posted by others.Here I post a starting tutorial I found:
__---..SINGING ROCK..---__
In this example, we'll make a magical singing rock that can be visited by a hero. The rock will sing to the hero, give the hero spell points equal to (knowledge x 40) and will reduce his movement to zero for the remainder of the turn.

1.
Use the editor to place a nice looking rock on the map where you want it. For our example, let's use x=10, y=12, level=0 (surface).

2.
Create a timed event where you can put the ERM code. Change the event day to 500 (so it won't pop up like a normal event) and name it "Singing Rock". Start it off with a ZVSE instruction at the top.

3.
Use an immediate instruction to make the rock square passable:
!#TR10/12/01;

4.
Use an immediate instruction to make the rock square a yellow trigger square:
!#TR10/12/0:E0;

5.
Use an immediate instruction to turn the rock into another object (this is important!), say, a magic well:
!#OB10/12/0:T49;

6.
Use an immediate instruction to *disable* the normal function of the (magic well) object:
!#OB10/12/0:S;

7.
Use an immediate instruction to change the right-click hint text of the new object:
!#VRz1:S^Singing Rock^; [assign text to string variable z1]
!#OB10/12/0:H1; [set right-click text to variable z1]

8.
Use an object trigger, set for the location of the new object:
!?OB10/12/0;

9.
Display a message:
!!IF:M^The rock entrances you for the rest of the day with a sweet and magical melody.^;

10.
Set hero's spell points:
!!HE-1:Fd0/d0/d0/?v1; [assigns knowledge skill to v1 variable]
!!VRv1:*40; [multiply v1 by 40]
!!HE-1:Iv1; [set spell points to v1]
!!IF:Q1/35/v1/1^^; [Display picture of spell point bonus]


11.
Reduce hero's movement to zero:
!!HE-1:W0;


And there you have it! :-)


If you *don't* include steps 5 and 6, you'll find that when you move the mouse to that square, it will change into the rearing horse (like a normal yellow trigger square) but when you move your hero to the square nothing will happen..*unless* you press the SPACEBAR to revisit the square. This is great if you want to make players work harder for something, but for a new object to work like a NORMAL object does, activating immediately upon entering the trigger square, you'll have to include steps 5 and 6.


Here's a summary of the code:
ZVSE
!#TR10/12/01;
!#TR10/12/0:E0;
!#OB10/12/0:T49;
!#OB10/12/0:S;
!#VRz1:S^Singing Rock^;
!#OB10/12/0:H1;
!?OB10/12/0;
!!IF:M^The singing rock entrances you for the rest of the day with a sweet and magical melody.^;
!!HE-1:Fd0/d0/d0/?v1;
!!VRv1:*40;
!!HE-1:Iv1;
!!IF:Q1/35/v1/1^^;
!!HE-1:W0;
(you can find this at:"http://wakeofthegods.strategyplanet.gamespy.com/fnord_erm_lesson.shtml" site)
____________

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


Famous Hero
posted June 27, 2009 04:34 PM

I think ERM uses too much ?!;:# chars to make it interesting and easy to understand for me (and maybe more ppl).

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


Known Hero
posted June 27, 2009 05:37 PM

It is quite easy to understand where they have to be placed.

"!!" is the beginning of a receiver
"!?" is the same of a trigger
"!#" is the same of an instruction (which loads when a map starts)
Before ":" we can see the name of function and conditionals, afyer ":" there is a body of a function.
";" is placed in the end of every function.

So the template is:
("!?"/"!#"/"!!")(*name*)("&")(*conditionals*)(":")(*body*)(";")

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


Famous Hero
posted June 27, 2009 05:43 PM

I'm sorry, but I'm very certain that so called INTERNAL MAP ERM SCRIPTS are very much discussed in the other ERM topic. At least, I did discuss scripts for my own map there.
By the way:
'ERM Help and Discussion' involves everything about ERM, even the name says so.
____________

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


Admirable
Omnipresent Hero
Wog refugee
posted June 27, 2009 06:21 PM

Quote:
Hello,I have ideated a second topic about the ERM Scripts.I think that is the first thread"ERM help and discussions" is a bit poor in the field of ERM scripts(i do not mean to insult the creator of "ERM help and discussions but it has a very limited part of the immense discusions about ERM,meanwhile,here we will discuss about INTERNAL MAP ERM SCRIPTS(like those of the campaings).At this thread,everybody can post his INTERNAL MAP ERM SCRIPT.The WOGification scripts(those you can enable/disable at "WOG options"before you start the Single/Multi Player custom maps)are part of the "ERM help and discussions" thread.If you want ask about WOGification Scripts that may interfere or cooperate with INTERNAL MAP ERM SCRIPTS post it here.Have fun creating new INTERNAL MAP ERM SCRIPTS or simply use those posted by others.)


When I read this I suddenly had an internal headache.
____________
Era II mods and utilities

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


Famous Hero
DoR Dev Team
posted June 27, 2009 07:20 PM

Yes,Ayeron,but there are only guides and explenations how to use WOGificating ERM scripts.
____________

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


Admirable
Omnipresent Hero
Wog refugee
posted June 29, 2009 07:26 AM

Quote:
I think ERM uses too much ?!;:# chars to make it interesting and easy to understand for me (and maybe more ppl).



I would say 99% of ERM is accessible to anyone, once he is willing to learn. Those 99% allows you to do almost anything. It is like a foreign language but with very easy grammar and limited words.
____________
Era II mods and utilities

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


Famous Hero
posted June 29, 2009 10:50 AM

And the other 1%?
____________

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


Admirable
Omnipresent Hero
Wog refugee
posted June 29, 2009 11:06 AM
Edited by Salamandre at 11:15, 29 Jun 2009.

The 1% is about mathematics. Not anyone has a good level in calculating variables. Me, for example. I never went to school, so when I see:

50 * 1.30 = 65
65 with + 20 A/D is 65 * 2 = 130 (from defence specialists)

I have no idea what means (actually this is a bad example, because too easy, but you get the idea). Complex ERM scripts may require some mathematic skills, but only 1% I would say.

Scripts as those from James Vogan are not part of the ERM legacy. He uses ERM only as a platform and then improvise a whole new process using his programmer formation. When I look at his scripts, I don't have a clue what he is doing or wanting to.
____________
Era II mods and utilities

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


Famous Hero
DoR Dev Team
posted June 29, 2009 11:18 AM

Of course,ERM sounds hard at the beggining,merely impossible,but when you learn the meaning of its symbols,it is easy.The only problem I have it is that I cannot find the units,heroes and artefacts'IDs ex.Crag Hack has ID 102(the only hero ID I know),so,posting the list of spells,artefacts,heroes,monsters,towns,town buildings' IDs list in this thread would be very helpful.Besides you can post Internal ERM Scripts like that I posted the "SINGING ROCK TUTORIAL" I found at the website.I started ERM Scripting with that tutorial.

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


Admirable
Omnipresent Hero
Wog refugee
posted June 29, 2009 11:30 AM

Sorry Immortal but I think this thread should be deleted, because useless and confuse. Why would we need the paste here scripts that anyone has in his ERM help.

If I were you, I would not start a thread before having the ERM tools and a clue about what means.
____________
Era II mods and utilities

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


Famous Hero
DoR Dev Team
posted June 29, 2009 12:29 PM
Edited by Lord_Immortal at 14:21, 29 Jun 2009.

Sorry,Salamandre,but you did not understood the reason of this thread.I posted the thread beacause we post ERM scripts in order to help each other by teaching him new scripts,tutorials like the tutorial I posted(with Copy/Paste of course) and giving instructions to those who do not know how to script...you understand?
P.S.I know I write in a very complicated way,but it is sipmple to read my posts if you are concentrated.
***UPDATE 1***
I already found the heroes IDs at the ERM Scripter.

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


Famous Hero
Fresh Air.
posted July 13, 2009 09:26 PM

HELP!!!

I need help ...i do not need  my reply deleted...unless first help me before erasing it.If i knew where ( in which post)it would be proper to do it ,i would have done it right.This is my2nd post and the first one was deleted,im sure it was done because of some infraction to the forumīs law or something. Im from argentina so please excuse my bad english. I need help cause i have downloaded the erm_tools.wog file but canīt seem to make it run. Iīve got Windows Vista in Spanish language so the UPDATE wonīt work for me with the mentioned file. Could any of you pass me a "erm_tools.WDN" file?Itīs been weeks of trying to make this work, seeking the right version of WOG and other stuff until i found this forum.Iīm a System Analist and for some reasons i do not wish to change my O.S(YET!). PLEASE, HELP  ME...MY MIND IS SET ON DEVELOPING MY CAMPAIGN!!!
____________
LOL I came out of my tent

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


Admirable
Omnipresent Hero
Wog refugee
posted July 13, 2009 09:45 PM

Further questions about ERM should be posted HERE, as that thread is stickied.

You don't need another wog file, but to change your regional settings to ENGLISH before running the update.

Steps:

Change regional settings to english
Rename the wdn file to wog (it become wdn after update was done)
Run Update.exe
Change your regional settings back to spanish and you are done.
____________
Era II mods and utilities

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


Famous Hero
Fresh Air.
posted July 13, 2009 09:53 PM
Edited by Cepheus at 17:07, 23 Jul 2011.

THANKS SALAMANDRE

Thanks salamandre!!!! You will be part of my campaign as a noble hero. Honestly,thanks.

I think im a bit obsessive... since i posted the reply i ve been refreshing the screen over and over again...i will let you now when the first map is done. Greetings!

---

Moderator note: This thread has been inactive for two years or longer, and has been archived (closed) to prevent necro-posting. If you wish to revive the topic, send a message to Cepheus or create a new thread in its place. Thank you.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Jump To: « Prev Thread . . . Next Thread »
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.0876 seconds