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 200 250 300 350 ... 356 357 358 359 360 ... 400 407 · «PREV / NEXT»
orc
orc


Famous Hero
posted January 02, 2019 05:56 AM

Hello,

I want armorer secondary skill to be at advanced lvl inside the combat, and bring it back to expert level after each combat. (for 3 specific heroes: mephala, tazar, and Neela)


how do I do that?

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


Admirable
Omnipresent Hero
Wog refugee
posted January 02, 2019 08:42 PM
Edited by Salamandre at 20:43, 02 Jan 2019.

Well, it is a very easy script, so try it and show results. You need a BA trigger, then BA receiver where you check both heroes, then a FU receiver to exit if none of them are in battle, then a HE receiver to check if any of them has armorer expert, then another HE receiver to downgrade it if previous condition is true, and then ultimately a BU receiver to check if battle has ended this turn, check if hero still alive and give him back the skill at expert, otherwise he will be proposed the skill from experience gain. Check all those columns in erm help and come with something.

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


Adventuring Hero
posted January 08, 2019 02:25 PM

Hawaiing said:
PIGGYChu620 said:
I have 2 questions:
1. How to take away Emissaries' "Too peaceful to attack"!?
2. How to know when my town is been attacked!? Within all the battle triggers and receivers, I can't find anything related to it. So how can I intercept the battle and doing something to it!?

Much appreciated!!!


1.How to take away Emissaries' "Too peaceful to attack"!?

by OxFEA
!?PI;
!!UN:C7718934/4/50000;
!!UN:C7718943/4/50001;
!!UN:C7727325/4/50000;
!!UN:C7727334/4/50001;
!?GM0;
!!UN:C7718934/4/50000;
!!UN:C7718943/4/50001;
!!UN:C7727325/4/50000;
!!UN:C7727334/4/50001;

Thanks!
Is this triggers "eighter or"!? Or I need both of them!?
Also, I can not find UN:C in ERM Help!
Could somebody be so kind and explain it to me please!?
Much appreciated!!!

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


Admirable
Omnipresent Hero
Wog refugee
posted January 09, 2019 02:12 AM
Edited by Salamandre at 02:15, 09 Jan 2019.

The document you link is version 2.06, and at bottom it says last updated october 2004.

Erm help is currently 2.81 and it comes with Era install, last updated 2011. Also has all new Era commands, updated in 2016 or so.

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


Famous Hero
posted January 22, 2019 01:27 PM

I found the thunder bird can cast 2 lightning bolts on its target.
So I did some experiments.
It turns out the original lightning is running separately from the experience ability lightning bolt.

original lightning damage = 10 * no. of birds
EA lightning damage = expert dmg + 3 * power effect

I am using the Remagic mod, and it makes the thunder bird's EA lightning insane! 1 thunder bird could kill 1 archangel with 1 bolt.

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


Hired Hero
Trying 2 ERM
posted January 26, 2019 12:44 PM
Edited by Polish_User at 12:45, 26 Jan 2019.

Hello!

I'd like to know, how can I check X spell dmg value and use that value later in my script.

!?MR and !?MF triggers are no good, cuz I only want this check to run once.

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


Promising
Supreme Hero
Researching Magic
posted January 26, 2019 12:52 PM
Edited by RerryR at 12:56, 26 Jan 2019.

Polish_User said:
Hello!

I'd like to know, how can I check X spell dmg value and use that value later in my script.

!?MR and !?MF triggers are no good, cuz I only want this check to run once.


Well if you don't want to use MR trigger you have to calculate the spell damage based on its Power and the spell power from the hero casting it. Taking Sorcery and the Magic schools into consideration. Later save it in a global variable of course. But the value will always change. So best create a function which you can call anytime that will return the value.

You can read out the values with !!SS receiver.

!!FU(Spell_Damage):Py1/y2/?y3;

y1 will be your spell number, y2 your hero number, y3 will return you the value.

Also it makes no sense if you want to "run only once" unless i misunderstand you.

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


Hired Hero
Trying 2 ERM
posted January 27, 2019 11:46 PM
Edited by Polish_User at 00:54, 28 Jan 2019.

I have another ERM related question.
How can I heal a monster, during combat, using ERM without overhealing it?

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


Promising
Supreme Hero
Researching Magic
posted January 28, 2019 08:16 AM

Polish_User said:
I have another ERM related question.
How can I heal a monster, during combat, using ERM without overhealing it?


I would use BM receiver with:

H $ ; Hit points
L $ ; Hit points lost by the next monster in the stack

first you check with L how many HP has been lost then you add HP with H command.

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


Hired Hero
Trying 2 ERM
posted January 28, 2019 03:26 PM
Edited by Polish_User at 16:07, 28 Jan 2019.

RerryR said:
Polish_User said:
I have another ERM related question.
How can I heal a monster, during combat, using ERM without overhealing it?


I would use BM receiver with:

H $ ; Hit points
L $ ; Hit points lost by the next monster in the stack

first you check with L how many HP has been lost then you add HP with H command.


You see, I had already done that, when i was writing this script but...


Btw I used d before variable to 'add up', example:
!!BMx1:Hdy4;

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


Famous Hero
posted January 28, 2019 04:11 PM

H is the unit's current total HP.
L is the loss of HP.
current HP = current total HP - loss .

If you just want to heal, reduce the value of L.
If you want to heal to full HP, set L to 0.

eg.
BM1:L?y1;
if&y1<6:;
BM1:Ld-6; //heal 6 HP
el:;
BM1:L0; //heal all lost HP
en:;

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


Hired Hero
Trying 2 ERM
posted January 28, 2019 04:18 PM

XEricSin said:
H is the unit's current total HP.
L is the loss of HP.
current HP = current total HP - loss .

If you just want to heal, reduce the value of L.
If you want to heal to full HP, set L to 0.

eg.
BM1:L?y1;
if&y1<6:;
BM1:Ld-6; //heal 6 HP
el:;
BM1:L0; //heal all lost HP
en:;


Ow! I get it now! Thank you for this!

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

Tavern Dweller
posted February 02, 2019 08:03 PM

I was wondering if someone could give me a little help with this?.

This is my first script

None of secondary skills,spells,or special abilities show up in game.

Also got error on Wizard commanders have shooting ability.(Last trigger)

ZVSE

!?PI;

!!DO26307/32/47/1;     Remove starting skills and spells
!!DO26308/0/27/1147; [Remove all starting skills and spells from Dracon]

!!HE32:S23/1 S19/1;             Piquedram #32
!!HE32:M15/1;

!#VRz357:S^Belfire^;            Thane #33
!!HE33:B0/z357;
!!HE33:X2/5;
!!HE33:S3/1 S13/1;
!!HE33:M15/1;
!!UN:J6/2/?v10; generate minor artifact to v10
!!HE33:Av10; give it to the hero

!#VRz355:S^Za'Neena^;           Josephine #34
!!HE34:B0/z355;
!!HE34:S26/1 S22/1;
!!HE34:M46/1;

!#VRz356:S^Vaalsha^;            Neela #35
!!HE35:B0/z356;
!!HE35:X4/41;
!!HE35:S1/1 S27/1;
!!HE35:M35/1;
!!HE35:A1/6/15;
!#VRz757:S^Titans receive +5 Attack, +5 Defence, and +50 to Health.^;
!!UN:G2/35/2/757;
!!HE35:X4/41/d/d/5/5/50;

!#VRz394:S^Lugroke^;            Torosar #36 *needs portrait change*
!!HE36:B0/z394;
!!HE36:X1/29;
!!HE36:S1/1 S9/1;
!!HE36:M28/1;
!!HE36:A3/4/1/1;
!!UN:J6/2/?v10; generate minor artifact to v10
!!HE36:Av10; give it to the hero
!#VRz758:S^Lugroke is the lord of Gremlins, and his minions gift him a artifact at the start of the game!^;
!!UN:G2/36/2/758;

!!HE37:S22/1 S23/1;             Fafner #37
!!HE37:M43/1;

!#VRz395:S^Nyvulma^;            Rissa #38
!!UN:G2/38/1/298;
!!HE38:Y9/100/600/1; give 100 exp each day
!!HE38:B0/z395;
!!HE38:S21/1 S18/1;
!!HE38:M15/1;

!#VRz396:S^Ysbeth^;             Iona #39
!!HE36:B0/z396;
!!HE39:S26/1 S11/1;
!!HE39:A57/20
!!HE39:M35/1;
!#VRz759:S^Ysbeth is very resistent to magic^;
!!UN:G2/39/2/758;

!#VRz397:S^Baeyahn^;            Astral #40
!!HE40:B0/z397;
!!HE40:X3/15;
!!HE40:S25/1 S15/1;
!!HE40:M15/1;
!!HE40:A4/1016/10;
!#VRz759:S^Baeyahn is the master of Magic Arrow^;
!!UN:G2/40/2/759;

!!HE41:M15/1;                   Halon #41
!!HE41:A73/20
!!HE41:S8/1 S24/1;

!!HE42:X0/25;                  Serena #42
!!HE42:S25/2;
!!HE42:M15/1;
!!HE42:A4/76/7;
!#VRz398:S^Serena is the master of Sorcery^;
!!UN:G2/42/2/398;

!#VRz398:S^Sesla^;            Daremyth #43
!!HE43:B0/z398;
!!HE43:X0/24;
!!HE43:S24/2;
!!HE43:M15/1;
!#VRz399:S^Sesla is the master of Intelligence^;
!!UN:G2/43/2/399;

!!HE44:S1/1 S7/1;              Theodorus #44
!!HE44:M28/1;

!#VRz399:S^Ka'Sydus^;          Solmyr #45
!!HE45:B0/z399;
!!HE45:X3/17;
!!HE45:S24/1 S15/1;
!!HE45:M17/1;
!#VRz753:S^Ka'Sydus is the master of Lightning Bolt^;
!!UN:G2/45/2/753;

!!HE46:X3/21;                  Cyra #46
!!HE46:S14/1 S25/1;
!!HE46:M21/1;
!#VRz754:S^Cyra is the master of Fire Ball^;
!!UN:G2/46/2/754;

!#VRz756:S^Sa'Nya^;            Aine #47
!!HE47:B0/z756;
!!HE47:X3/16;
!!HE47:S16/1 S24/1;
!!HE47:M16/1;
!#VRz755:S^Sa'Nya is the master of Ice Bolt^;
!!UN:G2/46/2/755;

!!HE147:S7/1 S21/1;           Dracon #147
!!HE147:M16/1;
--------------------------------------------------------------------------------
!?FU26307;
!!DO26308/0/69/1x16; [Remove skills and spells from Hero x16]
--------------------------------------------------------------------------------
** Remove Hero starting skills and spells]
!?FU26308;
!!HEx1&x16<28:Sx16/0; [Set skill x16 to level 0 (none)]
!!HEx1:Mx16/0; [Set spell x16 to level 0 (not known)]
--------------------------------------------------------------------------------
!?BA0;           Wizard commanders have shooting ability.
!!CO4:B1/4/1:

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


Admirable
Omnipresent Hero
Wog refugee
posted February 02, 2019 08:41 PM

Would be nice if you just explain what your script should do first, in detail. Moreover, if it is not working, how you expect anyone to know what you want, if no detailed description?

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

Tavern Dweller
posted February 03, 2019 10:38 AM

Ok, just changing skills,spells, and special abilities for tower heroes.

I used Halfling Town as my base to this script.

- CREDITS FOR Halfling Town
- patch by Vlaad (April, 2009)
- the code partially based on Fnord's work
- hero portraits by various artists
- thanks to: Cepheus, Salamandre and BAD

1st-Trying to remove all starting skills and spells for Heroes #32-47 and #147.

2nd-Add function(HE#:X#)and specialty pic in hero screen.

3rd-Change starting spells (HE#:M#/1)

4th-Remove a starting artefacts(Hero#36 Ballista), and add a random minor artefact to Heroes #33 and #36. Additional if artefact is chosen during hero selection screen(random map).  

5th-Return shooting ability at 1st level to Tower Commander.

Line 127 !?BA0;           Wizard commanders have shooting ability.
Line 128 !!CO4:B1/4/1:

6th-Not in this script, but would like to add a specialty "Monster Summoning". A random monster(s) is summoned similar to the D&D spell.  
I know this is very vague, wanted to get this problem handled first.
 


Line 005 !!DO26307/32/47/1;     Remove starting skills and spells
Line 006 !!DO26308/0/27/1147; [Remove all starting skills and spells from Dracon]

Line 119 !?FU26307;
line 120 !!DO26308/0/69/1x16; [Remove skills and spells from Hero x16]
--------------------------------------------------------------------------------
** Remove Hero starting skills and spells]
Line 123 !?FU26308;
Line 124 !!HEx1&x16<28:Sx16/0; [Set skill x16 to level 0 (none)]
Line 125 !!HEx1:Mx16/0; [Set spell x16 to level 0 (not known)]

I feel that those seven lines above are my problem, there wasn't much in ERM Help..at least that I understood.

To be honest, I'm not sure what the hell these two lines mean!
line 120 !!DO26308/0/69/1x16; (I know the command "DO" is a loop) and the next two numbers are start and stop points, and "p" must be used. and x16 is a variable.

Line 124 !!HEx1&x16<28:Sx16/0; Can't figure out "x1" variable?, what value does it hold?. The <28??? (Less than 28???).

I tried it this way because it seemed more efficient, less work..don't have to use (HE#:S#1/0) and (HE#:M#/0) and the specialty pics show up in the hero selection screen..with Halfling Town anyway.

I've tried it this way as well, however when a Warlord banner is placed in the creature stack, the specialty picture changes to just words "Specialty Picture".
ZVSE
!?PI;
!!HE77:X3/48;

!?CM2; [hero screen]
!!HE-1:N?v1; [who is the hero]
!!FU&v1<>77:E; [if not Xsi, get out]
!!CM:I?y1; [where do I click]
!!FU&y1<>118:E; [if not on specialty, get out]
!!VRz2:S^Xsi is a fallen Angel, and can cast Dark Prayer upon the dead^; [string]
!!IF:Q1/9/48/4^%Z2^; [display icons and text]
!!CM:R0;



!?CM2; [hero screen]               ROLAND
!!HE-1:N?v1;
!!FU&v1<>152:E;
!!CM:I?y1;
!!FU&y1<>118:E;
!!VRz2:S^Angels receive +5 Attack, +5 Defence, and +50 to Health.^;
!!IF:Q1/21/13/4^%Z2^;
!!CM:R0;
!!HE152:X4/12/d/d/5/5/50;
!!CM:R0;

!?CM2; [hero screen]               SYLVIA
!!HE-1:N?v1;
!!FU&v1<>3:E;
!!CM:I?y1;
!!FU&y1<>118:E;
!!VRz2:S^Increases the Attack and Defense skills of any Pikeman or Halberdiers for each level attained after 1st level.^;
!!IF:Q1/21/0/4^%Z2^;
!!CM:R0;

I'm sorry if this is not enough info, I will provide more if necessary.  

Been at ERM for only a mouth, done a lot of reading including many of your post, nice work by the way!

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


Promising
Supreme Hero
Researching Magic
posted February 03, 2019 11:39 AM
Edited by RerryR at 12:04, 03 Feb 2019.

Its always difficult if a script is partly ripped from some other mod, because if you ask us, it would mean we have to open that mod and see what is inside the complete code.

Anyway your code looks messy but I dont see problems yet.
I can explain the !!Do function to you.

Remove starting skills from Hero:

For Tower we have these Hero Numbers:
Alchemists
32 Piquedram
33 Thane
34 Josephine
35 Neela
36 Torosar
37 Fafner
38 Rissa
39 Iona
Wizards
40 Astral
41 Halon
42 Serena
43 Daremyth
44 Theodorus
45 Solmyr
46 Cyra
47 Aine

So we call a function which cycles trough these numbers from 32 to 47. The funtion will be called 16 times.

So we write

!!DO(Loop_Hero_32_till_47)/32/47/1:P; Code jumps to Function

You can also write a Number as Function name, just make sure the number is unique, otherwise some other script might call the funtion.

!?FU(Loop_Hero_32-47); Now we are here
**x16 is the loop variable going from 32 to 47 (the Hero Number in our case)**
This is example script and I will post the whole script below.
We now could write all skills manual like this from 0 to 27
!!HEx16:S0/0; [Set skill 0 (Pathfinding) to level 0 (none)]
!!HEx16:S1/0; [Set skill 1 (Archery) to level 0 (none)]
!!HEx16:S2/0; [Set skill 2 (Logistics) to level 0 (none)]
.
.and so on
.
!!HEx16:S27/0; [Set skill 27 (First Aid) to level 0 (none)]

but we want a better solution
Now you see that the skills go from 0 to 27 so we make a second function inside the first which will cycle from 0 to 27

!!DO(Loop_Skill_0-27)/0/27/1:Px16; Call next function and pass the current Hero number in X16

!?FU(Loop_Skill_0-27);
!!HEx1:Sx16/0; x1 now has value of x16(Hero Number) and the new x16 is now the secondary skill going from 0 to 27


So the complete script would look like this:

ZVSE

!?PI;
!!DO(Loop_Hero_32_47)/32/47/1:P;


!?FU(Loop_Hero_32_47);
!!DO(Loop_Skill_0-27)/0/27/1:Px16;


!?FU(Loop_Skill_0-27);
!!HEx1:Sx16/0;

Hope this helps a bit, you can figure out the rest.

Edit:!!HEx1&x16<28:Sx16/0; &x16<28 Means that this line will only be executed for x16 values smaller than 28


Use Print command !!IF:M^Current Value of x1 is%X1 and X16 is%X16^; for debugging, that helps for understanding

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


Admirable
Omnipresent Hero
Wog refugee
posted February 03, 2019 03:03 PM

Smichaelis said:
Been at ERM for only a mouth, done a lot of reading including many of your post, nice work by the way!



That's the spirit. I also started by shamelessly plagiarizing  (partially!) other mods, have no regret today, is a good way of learning.

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


Hired Hero
Trying 2 ERM
posted March 02, 2019 12:09 PM

Anims

I have a question.
Is it possible to play spll anims, when the bttl begins, at the same time on all enemy stcks?
Like, the Armor of the Dammed artifact did.

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


Admirable
Omnipresent Hero
Wog refugee
posted March 02, 2019 12:17 PM

!!BM:V#

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


Hired Hero
Trying 2 ERM
posted March 02, 2019 02:46 PM
Edited by Polish_User at 14:48, 02 Mar 2019.

Salamandre said:
!!BM:V#


Well, Am I going to do this this way, It will show animations one by one not at once.

 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 200 250 300 350 ... 356 357 358 359 360 ... 400 407 · «PREV / NEXT»
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.7160 seconds