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 ... 42 43 44 45 46 ... 50 100 150 200 250 300 350 400 407 · «PREV / NEXT»
gnollking
gnollking


Supreme Hero
posted October 01, 2009 07:14 PM

You chose a good name for orrin
____________

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


Famous Hero
posted October 02, 2009 01:08 PM
Edited by Siegfried at 13:10, 02 Oct 2009.

"Soft snow"

gmbl! This forum soft "corrects" some text.

O.k., so it is not possible. Besides that there are more things that seem to be impossible. For example the town screen - creature growth. You can add creatures by erm, but that has no effect on what is displayed in the creature growth info dialogue.

Another thing i currently don't know how to implement correctly: I had the idea to add a creature to a town. Specifically i thought of adding peasants to castle and halflings to rampart. The "dwelling" would be the otherwise unused simple huts. It is not that difficult to add a mouse click trigger to these huts and then offer some creatures to buy. But that is never displayed in the creature growth box (left lower corner of town screen). And second where to store the accumulated creatures, if they are not bought?

Well, never rmind. Perhaps this weekend i will implement something simple, just decorative without any impact on gameplay: Individual sound for individual city. Simply trigger, on entering town screen, check if there exists an mp3 with same name as town. If yes, set that mp3 as sound for that town type. Next trigger: On leaving town reset sound for that town type to default. Is there any prerequisite for that mp3?

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

Tavern Dweller
posted October 02, 2009 01:30 PM
Edited by klwar at 13:31, 02 Oct 2009.

Can anyone help me pls (sorry for my englsh)
I tried to write an ERM script like this:

ZVSE

!?BA0; (when battle starts)
!!HE-10:N?v100; (check hero ID of the attacker)
!?BR&v100=42; (Check each turn if hero ID = 42 (Serena) )
!!EA35:Bv2/1/99/59/95/95/95/95/95/95/95/95/95/95/95; (Archmagi can cast beserk on attack)

But it doesn't work. So what should i do to fix this ? I want to make this hero a special one that make the archmagi on both side has the ability to cast beserk on attack.

This worked: (archmagi cast beserk on attack no matter which hero is the attacker)
ZVSE
!#EA35:Bv2/1/99/59/95/95/95/95/95/95/95/95/95/95/95;

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


Famous Hero
posted October 02, 2009 02:23 PM

Quote:

!!HE-10:N?v100; (check hero ID of the attacker)


Shouldn't that be HE-1?
!!HE-1:N?v100,

Besides that: Is v100 unused (free for usage)?

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


Famous Hero
posted October 02, 2009 02:26 PM

Is there any trigger which triggersw when a town screen is opened?

So not only if a hero enters a town but always when a town screen is opened like f.ex. when clicking on the town icon?

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


Admirable
Omnipresent Hero
Wog refugee
posted October 02, 2009 03:23 PM
Edited by Salamandre at 15:48, 02 Oct 2009.

@klvar

!!EA "monster ID" does not work in battle. Use stack ID instead:

ZVSE

!?BA0; (when battle starts)
!!HE-1:N?y8;
!!FU&y8<>42:E; exit if not Serena
!!BM0:T?y1;
!!BM1:T?y2;
!!BM2:T?y3;
!!BM3:T?y4;
!!BM4:T?y5;
!!BM5:T?y6;
!!BM6:T?y7;
!?BR;
!!EA-1&y1=35:Bv2/1/99/59/95/95/95/95/95/95/95/95/95/95/95;
!!EA-2&y2=35:Bv2/1/99/59/95/95/95/95/95/95/95/95/95/95/95;
!!EA-3&y3=35:Bv2/1/99/59/95/95/95/95/95/95/95/95/95/95/95;
!!EA-4&y4=35:Bv2/1/99/59/95/95/95/95/95/95/95/95/95/95/95;
!!EA-5&y5=35:Bv2/1/99/59/95/95/95/95/95/95/95/95/95/95/95;
!!EA-6&y6=35:Bv2/1/99/59/95/95/95/95/95/95/95/95/95/95/95;
!!EA-7&y7=35:Bv2/1/99/59/95/95/95/95/95/95/95/95/95/95/95;
To work for defender you will have to add !!EA-22-29 + !!BM20-26 too check.


@Siegfried: just use towns yellow squares as any visiting object trigger (type 98)

____________
Era II mods and utilities

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


Famous Hero
posted October 02, 2009 03:50 PM
Edited by Siegfried at 15:51, 02 Oct 2009.

@Salamandre: Thanks. But that triggers only if a hero enters the town, not if i open the town screen without an entering hero.

Using the trigger !?OB98&1000; is indeed one possibility. But that solves only half of the problem. Interestingly there is a town hall access trigger, but no town access trigger. There is f.ex. a receiver !!CA-1; which may only be used inside town screen, but there seems to be no related trigger (except hero entering town).

Without securely triggering any town screen popping up there is no way to always trigger a script depending on town screen. Currently it seems it is only possible to trigger such a script on a hero entering town, not on a player opening the town screen without hero.

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


Promising
Supreme Hero
WCL owner
posted October 02, 2009 03:57 PM

you can't change hero class with ERM, right? !!HE:B2 was not working when I tested few months ago.

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


Admirable
Omnipresent Hero
Wog refugee
posted October 02, 2009 04:28 PM
Edited by Salamandre at 16:38, 02 Oct 2009.

True but there are ways to go around. Store stats etc then kill hero and change to a similar class. Druids will have similar growth to clerics, but you know already this. There are always some tricks, not big deal.Even changing a wizard to a barbarian will work, setting new growth chances with !?HL

@Siegfrid: I think there are solutions with mouse pointer storing (!!UN:R5)
Try to explore possibilities where when the mouse pointer is a town then trigger something. I am sure it can work but never tested or seen elsewhere. Or with absolute cursor position.
____________
Era II mods and utilities

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


Famous Hero
posted October 02, 2009 05:27 PM

Interesting idea. I'll check that.

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

Tavern Dweller
posted October 02, 2009 06:38 PM

Thank you, Salamandre. I think your script is right.
But i don't know why, it didn't work in the game.
It is the same with this:
!!BM20&v400>0:M73/50/2;
I make an item that cast Disease spell (of Zombie) on all enemy units. But it only work if i use
!!BM20:M73/50/2;
v400 is to check the number of the stack: !!BM20:Bv400;
So even the stack is killed, the spell is still casted.
Could you help me pls? Thanks.

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


Admirable
Omnipresent Hero
Wog refugee
posted October 02, 2009 07:01 PM
Edited by Salamandre at 19:14, 02 Oct 2009.

The only problem in the script I gave you is Bv2 (if v2>13 then can't work). I supposed you stored it elsewhere, if not, thats why it does not work. Try to change Bv2 to B6 up to B13 and see what happens. Another problem could be that you disabled experience system. For test, use Serena with archmages and other units. Archmages will berserk, others not. I tested it and it works (used B12 instead of Bv2, as I did not store it for test)

For the second script, BM20 means the last attacker stack (usually we never have 20 units on one side, so I don't know what you are doing here). Check every turn if stack 20 is alive then make it a condition.


From ERM:
!!BM#:XXXX;

Check/Set/Get some parameters of a stack of monsters
       # - number of a stack (0...41).
Usually it is used like 0...20 for a first (0) player and 21...41 for a second (1) player.

____________
Era II mods and utilities

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

Tavern Dweller
posted October 02, 2009 07:36 PM
Edited by klwar at 23:28, 02 Oct 2009.

In the first script, i use v2=1
I didn't disable the experience system. But when i use B6 to B13, it still doesn't work.
After i restart the game, all unit can cast berserk...
And the second script, i tried to to do something like this:

!#UN:A170/3/16; [artifact 170 is relic]
!#VRz90:S^Diease horn^;
!#VRz91:S^{Diease horn}
This horn will make all the enemy units suffer a diease.^;
!#UN:A170/10/91;
!#UN:A170/9/90;
!#UN:A170/8/0;

!?BA0; [when any battle occurs]
!!HE-10:A2/170/0/?v93; [check if the artifact is equiped (attacker)]
!!BH1:N?v95; [check if there is a defendering hero]
!!HE-20&v95<>-1:A2/170/0/?v94; [check if the artifact is equiped (defender)]

!?BR&v93>0; [attacker has the artifact]
!!BM21:B?v400; [get number of monsters in stack 21]
!!BM21&v400>0:M73/50/2; [cast diease on this stack]
!!BM21&v400>0:V69; [visual effect of diease]



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


Admirable
Omnipresent Hero
Wog refugee
posted October 02, 2009 09:30 PM
Edited by Salamandre at 21:36, 02 Oct 2009.

Ok, it needs double check, my fault for not seeing the BR trigger but still a bit confused about. The first "exit" should work, but it does not. Now it is OK

I used this:

ZVSE

!?BA0; (when battle starts)
!!BA:H0/?y8;
!!FU&y8<>42:E;
!!BM0:T?y1;
!!BM1:T?y2;
!!BM2:T?y3;
!!BM3:T?y4;
!!BM4:T?y5;
!!BM5:T?y6;
!!BM6:T?y7;
!?BR;
!!FU&y8<>42:E;
!!EA-1&y1=35:Bv2/1/99/59/95/95/95/95/95/95/95/95/95/95/95;
!!EA-2&y2=35:Bv2/1/99/59/95/95/95/95/95/95/95/95/95/95/95;
!!EA-3&y3=35:Bv2/1/99/59/95/95/95/95/95/95/95/95/95/95/95;
!!EA-4&y4=35:Bv2/1/99/59/95/95/95/95/95/95/95/95/95/95/95;
!!EA-5&y5=35:Bv2/1/99/59/95/95/95/95/95/95/95/95/95/95/95;
!!EA-6&y6=35:Bv2/1/99/59/95/95/95/95/95/95/95/95/95/95/95;
!!EA-7&y7=35:Bv2/1/99/59/95/95/95/95/95/95/95/95/95/95/95;
!?BA1;
!!EA35:Bv2/0/////////////;


Now it works from the first battle, and only with Serena. I will look in your second script tomorrow, as it needs way more commands that you did.
____________
Era II mods and utilities

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

Tavern Dweller
posted October 02, 2009 09:56 PM
Edited by klwar at 23:31, 02 Oct 2009.

uhm, thank you. It works somehow, but not on the first battle though.
And the second script, i only post the part that if the attacker has the item, he will cast diease on enemy unit. The part that the defender has the item use !?BR&v94>0; and !!BM0 to !!BM7. But it didn't work. The problem is that the spell is casted every turn. But if i don't use !?BR&v93>0; but !?BA0&v93>0; , it doesn't work.

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

Tavern Dweller
posted October 03, 2009 06:16 AM

I tried to write a script like this: to make any unit that attack the energy element (ID=127) will be stricken with lightning. But i don't know where is my mistake, it didn't work. Could you check it for me?

ZVSE

!?BG1;
!!BG:A?y48;  (store the action of a stack)
!!BG:N?v5;   (store the number slot of the stack)

!?MF1;
!!MF:N?y1;
!!BM0&y1=0:T?y39; (check if slot 1 is attacked and is energy element)
!!BM1&y1=1:T?y40;
!!BM2&y1=2:T?y41;
!!BM3&y1=3:T?y42;
!!BM4&y1=4:T?y43;
!!BM5&y1=5:T?y44;
!!BM6&y1=6:T?y45;
!!BM7&y1=7:T?y46;
!!BM8&y1=8:T?y47;

!!BMv5&y48=6/y39=127:M17/0/1; (cast the spell on the unit attack energy element)
!!BMv5&y48=6/y40=127:M17/0/1;
!!BMv5&y48=6/y41=127:M17/0/1;
!!BMv5&y48=6/y42=127:M17/0/1;
!!BMv5&y48=6/y43=127:M17/0/1;
!!BMv5&y48=6/y44=127:M17/0/1;
!!BMv5&y48=6/y45=127:M17/0/1;
!!BMv5&y48=6/y46=127:M17/0/1;
!!BMv5&y48=6/y47=127:M17/0/1;

!!BMv5&y48=6/y39=127:V1;
!!BMv5&y48=6/y40=127:V1;
!!BMv5&y48=6/y41=127:V1;
!!BMv5&y48=6/y42=127:V1;
!!BMv5&y48=6/y43=127:V1;
!!BMv5&y48=6/y44=127:V1;
!!BMv5&y48=6/y45=127:V1;
!!BMv5&y48=6/y46=127:V1;
!!BMv5&y48=6/y47=127:V1;

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


Admirable
Omnipresent Hero
Wog refugee
posted October 03, 2009 07:00 AM
Edited by Salamandre at 07:26, 03 Oct 2009.

Instead of filling thousand lines of codes, wouldn't be simpler to give the energy endless retaliation and lightning bolt on strike?
Because as you do it you have to check several things: is the unit immune to magic and is the unit adjacent? Long

Using MF trigger is tricky, as you can't just say "the unit will lose HP" and thats all. If the unit has less HP than the damage it will not die (HP will go into the negative), so you have to check previous HP and then substract HP from it if > than damage. If less, then you have to tell the game that unit will die.

In the map Time of Prophecy I Scripted the titan chamber to strike every moving unit with fireball etc:

!?BG&800/v998<36/v806=1;
!!BG&v997=1:N?v807 Q?v812;  **Get current stack number and attacking side
!!BMv808&v997=1:G21/?v810/?v811;  **Get MISFORTUNE info from current stack
!!BMv808&v997=1:P?j;  **Get position of current stack number into "j"
!!BM21&v997=1/v807<21/v810=0/v812=0:C52/j/1/1/0;**Power Lich King casts BASIC MISFORTUNE

!?BG&800/v998>35/v998<72/v806=1;
!!BG&v997=1:N?v807 Q?v812;  **Get current stack number and attacking side
!!BMv808&v997=1:G21/?v810/?v811;  **Get DISRUPTING RAY info from current stack
!!BMv808&v997=1:P?j;  **Get position of current stack number into "j"
!!BM21&v997=1/v807<21/v810=0/v812=0:C47/j/1/1/0;**Power Lich King casts BASIC DISRUPTING RAY

!?BG&800/v998>71/v998<108/v806=1;
!!BG&v997=1:N?v807 Q?v812;  **Get current stack number and attacking side
!!BMv808&v997=1:G45/?v810/?v811;  **Get WEAKNESS info from current stack
!!BMv808&v997=1:P?j;  **Get position of current stack number into "j"
!!BM21&v997=1/v807<21/v810=0/v812=0:C45/j/1/1/0;  **Power Lich King casts BASIC WEAKNESS

!?BG&800/v998>107/v806=1;
!!BG&v997=1:N?v807 Q?v812;  **Get current stack number and attacking side
!!BMv808&v997=1:G22/?v810/?v811;  **Get SORROW info from current stack
!!BMv808&v997=1:P?j;  **Get position of current stack number into "j"
!!BM21&v997=1/v807<21/v810=0/v812=0:C50/j/1/1/0; **Power Lich King casts BASIC SORROW

!?BG&800/v806=1;
!!BG&v997=1:N?v807 Q?v812;  **Get current stack number and attacking side
!!BMv808&v997=1:G21/?v810/?v811;  **Get FIREBALL info from current stack
!!BMv808&v997=1:P?j;  **Get position of current stack number into "j"
!!BM21&v997=1/v807<21/v810=0/v812=0:C21/j/1/1/0; **Power Lich King casts BASIC FIREBALL

You will have to change action from moving to attacking, but requires a lot of checking.

Bind that script and take a look at it, it can be modified to what you wish, good luck

More infos about detailed custom battles are in Thoran Rift, Fnord's map. It can be found in the megapack I uploaded. Check "Efrendil" script, it has a lot of infos about casting mass spells when using an item etc.
____________
Era II mods and utilities

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

Tavern Dweller
posted October 03, 2009 02:05 PM

yeah, thanks, the item script now works.
But it's really hard to make something like a magi counter a ranged attack or the new ability of Hero improves every 3 level.
I have downloaded the map "Time of Prophecy". Did you make this ?

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

Tavern Dweller
posted October 04, 2009 06:57 AM
Edited by klwar at 07:23, 04 Oct 2009.

Could you help me with this: I write a script that make any enemy stack that has the spell misfortune cast on them will also has their attack and defend reduced.
But this script only work for the first time the spell is casted. Is their some kind of script like this that was written better ?

ZVSE

!?BA0;
!!BA:H0/?y38;
!!BA:H1/?y39;
!!VRv105:S1;
!!VRv106:S1;
!!VRv107:S1;
!!VRv108:S1;

!?BG0&y38=120;
!!BG:N?v100;
!!BMv100&v100>20:G52/?v101/?v102;
!!BMv100&v101>0/v100>20/v105=v107/v106=v108:A?v109 D?v110;
!!VRv109&v105=v107/v106=v108:-5;
!!VRv110&v105=v107/v106=v108:-3;
!!BMv100&v101>0/v100>20:Av109 Dv110;
!!BMv100&v101>0/v100>20:A?v105 D?v106;

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


Admirable
Omnipresent Hero
Wog refugee
posted October 04, 2009 08:02 AM
Edited by Salamandre at 08:03, 04 Oct 2009.

Have you tried !?BR&v997=>0 so the action is repeated every turn?
____________
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 ... 42 43 44 45 46 ... 50 100 150 200 250 300 350 400 407 · «PREV / NEXT»
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.2127 seconds