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 ... 31 32 33 34 35 ... 50 100 150 200 250 300 350 400 407 · «PREV / NEXT»
Salamandre
Salamandre


Admirable
Omnipresent Hero
Wog refugee
posted March 20, 2009 03:37 PM

From ERM:

How to check if the AI visits an object
When any hero visits an object the AI flag is stored in flag1000. Flag 1000 is set to True for a human player and False for the AI. So you can use it like this:
!?OB...;
!!IF&1000:M^Player^;
!!IF&-1000:M^AI^;

Use &1000 at the end of the object trigger.

!?OBx/l/I&1000;

Or do a check if the visitor is AI of human and if AI, change object to learning stone temporary (see Choices map by Fnord)
____________
Era II mods and utilities

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


Famous Hero
posted March 20, 2009 05:28 PM
Edited by Ayreon at 17:28, 20 Mar 2009.

Thanks for that, but it doesn't really work as I wanted it to work. Can you discover the flaw?

ZVSE

!#OB4/2/0:S;

!#IF:V11/0;
!#VRz123:S^Haunted Guardhouse^;
!#OB4/2/0:H123;
!#VRv10:S0T3;
!#VRv10:+4;
!#VRv10:*3;

!?OB4/2/0;
!!IF&1000:M^Player^;
!!IF&-1000:M^AI^;

!?OB4/2/0&11;
!!IF&1000:M^The Guardhouse is empty and deserted. There are no pikemen to recruit.^;

!?OB4/2/0&-11;
!!IF&1000:Q10^The Guardhouse does not look odd from the outside. Do you want to enter?^;
!!HE-1&10?v5;
!!HE-1&10:T4/2/0/159/v10;
!!HE-1&10?v100;

!!OW&10/v5=v100:R-1/5/?v15;
!#VRv15:+5;
!!OW&10/v5=v100:R-1/6/?v16;
!#VRv16:+10000;

!!IF&10/v5=v100:V11/1;
!!IF&11&1000:Q1/5/10/6/5000/1^You have won the battle with %V10 Ghosts and received:^;
!!VRz123&11:S^Guardhouse^;
!!OB52/5/0&11:Hz123;


I have the feeling this disables the entire building for the AI...
And any tips about the reward thing? (in green)

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


Hired Hero
posted March 20, 2009 05:44 PM

what do you want to achieve?
____________
Sagamosa
[url=http://www.wog.euweb.cz]Advanced Levels[/url]

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


Admirable
Omnipresent Hero
Wog refugee
posted March 20, 2009 06:14 PM
Edited by Salamandre at 03:41, 21 Mar 2009.

You should write **comments at the end of each line to explain what you were trying to do, so it would be easier to help you without checking the whole code to identify variables.

If you want to reward the hero for killing the creatures, you don't need to store in v16 his gold.

Only check if the hero is still alive after the battle, and then use OW followed by the "hero alive" variable v5=v100;
You should also use a flag set to true (1) if battle was won, give reward(with true flag) and then reset that flag to 0 immediately, to prohibit another reward if object is revisited.

!!FU&v5<>v100:E; if the hero was killed exit further commands
!!HE-1&v5=v100:V12/1;  **if the current hero is alive set flag 12 to true
!!OW&12/v5=v100:R-1/6/d10000; *if the current hero is alive after battle and flag 12 is true, give him 10000 gold
!!IF:V12/0;  **reset the flag so the reward does not come again

If that was what you wanted, but I am not sure.

Here should be

!#OB4/2/0:H123;   (change H123 to Hz123). Better to put also a S before to disable the original object:

!#OB4/2/0:SHz123;

Welcome to the tricky ERM. Headache guaranteed at start.
____________
Era II mods and utilities

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


Famous Hero
posted March 22, 2009 06:00 PM

Quote:

!!HE-1&v5=v100:V12/1;  **if the current hero is alive set flag 12 to true



Ok, next time I will use comments

The quoted piece of code is not understood by WoG. It gives errors and stuff. I tried to experiment a little there, but no success. Is my WoG out of date?

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


Admirable
Omnipresent Hero
Wog refugee
posted March 22, 2009 06:04 PM
Edited by Salamandre at 18:25, 22 Mar 2009.

Of course it does not work. The one who gived you this code should never use ERM and start again to learn it. Damnt beginners :P

Use this and I apologize: (instead of !!HE...

!!IF&v5=v100:V12/1;
____________
Era II mods and utilities

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


Famous Hero
posted March 22, 2009 07:52 PM

Haha
Thank you, it's working now

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


Supreme Hero
My water just broke! No, wait.
posted March 25, 2009 04:44 PM

Does anybody know if/where I can download Erm Script Master? I've done several searches for it, and I can't find a working link anywhere
____________
"Edna, there's a special, tiny, tiny place in hell, waiting just for you... "

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


Hired Hero
French guy who learn
posted March 25, 2009 04:49 PM

I downloaded it on the [url=http://wakeofthegods.strategyplanet.gamespy.com/download.shtml]old Wog website[/url]

put the erm_tools.wog file in your UPDATE folder and launch H3wUpd.exe


____________
Learning ERM, starting to mapmaking, after more than ten years of HoMM playing

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


Supreme Hero
My water just broke! No, wait.
posted March 25, 2009 05:39 PM

Thank you
____________
"Edna, there's a special, tiny, tiny place in hell, waiting just for you... "

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

Tavern Dweller
posted March 27, 2009 02:07 PM

Hi guys, I'm not allowed to make my own thread, so I can only hope I'm not too OT.

My question is - how do I change the price of buildings?

I noticed that the game is much more interesting if you don't have enough resources. That fact, plus the fact that the handicap is somehow bugged (you're not getting any resource from mines that normally produce 1/day when you set max handicap) made me try to increase the building expenses. It's much better game when the player can't build everything first and then start to fight (with high level monsters).
____________

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


Famous Hero
from Kesnaria
posted March 28, 2009 04:10 PM

I will try to learn ERM...
I have downloaded the patch Nostrazugus posted...
I have a noobish question...
Where do you write the code?!?
____________

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


Hired Hero
French guy who learn
posted March 28, 2009 04:30 PM

You should have a folder named erm_s in your WoG main folder, with an erm_s.exe where you MUST write any of your erm script. The erm_sm.exe (aka script master) could be use to change your creature, but I never used it; Ask for someone else if you need help with it, even if it doesn't seems to hard to use
____________
Learning ERM, starting to mapmaking, after more than ten years of HoMM playing

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


Famous Hero
posted March 30, 2009 04:31 PM

I want to make a special building now, but how can I make the flag gain the colour of the visited hero?

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


Supreme Hero
My water just broke! No, wait.
posted March 30, 2009 05:24 PM
Edited by Ednaguy at 17:25, 30 Mar 2009.

!!HE-1:O?v99; (Stores vising hero's owner in variable v99) perhaps? :)

____________
"Edna, there's a special, tiny, tiny place in hell, waiting just for you... "

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


Famous Hero
posted March 30, 2009 05:46 PM

Tried that already, doesn't work. Any other suggestions?

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


Hired Hero
French guy who learn
posted March 30, 2009 08:31 PM

Sorry for the off-topic, but, i find it better than creating a new thread.

Is there an uptaded thread about WoG scripts that anyone can use ?

I mean, ones of Sagammosa are great, but the common players can't use it.

I'm searching for some new features, or modified WoG features which allow me to enhanced games


(If moderator thinks this reply should'nt be here, then, I may make a new thread )
____________
Learning ERM, starting to mapmaking, after more than ten years of HoMM playing

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


Admirable
Omnipresent Hero
Wog refugee
posted March 30, 2009 08:32 PM
Edited by Salamandre at 20:38, 30 Mar 2009.

@Ayeron


What kind of building it is? If it is a normal dwelling which you had to disable for doing a custom battle, just enable it post visit again with !$OB/x/l/y:E#; #=player color.

@Nostrazugus:

Thats not the way it works. You have to play WoG maps and choose the scripts you like, then import them in your maps. Once you get familiar with them, you will add some personal adds, then improve them. ERM is very long to learn if you are not a programmer.
____________
Era II mods and utilities

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

Tavern Dweller
posted March 31, 2009 01:58 PM

Hi all,
i have a few questions about ERM:

- Map Editor has a limit for maximum amount of dwelling which could be put into a map. I override this limit placing dwelling after map creation with ERM. Did somebody experience any problem for it?

- Suppose i wish to give to a player a weekly growth of 100 liches for its castles. I found that with the UN:I command you could put objects where is not normally possible, even 2 object in a square. If i put 100 lich dwelling in a square assigning the player as owner, it will works or there's a simpler way to do that?

- I want to create an object that makes you battle against some monsters when you enter into it. There's a way for letting the AI estimate if it is convenient to enter for him according to its army?

Thanks to all

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


Hired Hero
French guy who learn
posted March 31, 2009 04:27 PM
Edited by Nostrazugus at 16:28, 31 Mar 2009.

@Salamandre

Okay. Haven't thought about it. Learning ERM doesn't seems to me too hard, thanks to my studies. Should I look on the yahoo group WoGmap archives ? Or is there a better archive/website ?
____________
Learning ERM, starting to mapmaking, after more than ten years of HoMM playing

 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 ... 31 32 33 34 35 ... 50 100 150 200 250 300 350 400 407 · «PREV / NEXT»
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.7526 seconds