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 ... 115 116 117 118 119 ... 150 200 250 300 350 400 407 · «PREV / NEXT»
mister_kalu
mister_kalu


Known Hero
posted November 17, 2011 05:30 PM

Quote:
In Era, using the new (3.59) DL receiver and trigger, you can create your own Mage Guild dialog with your own spell icons.  I'll try to show an example, from Shining Force:




If that worked you'll see examples of Magic Arrow and Mass Magic Arrow, Curse and Mass Curse, etc..  All the spells were applied to creatures directly with ERM code.  There were no Magic Schools (no Air, Earth, etc.), but certain Mages could only learn certain spells.

The graphics are a bit crude because I did some of them myself.


ignoring the fact of the custom dialog, can you give a example of your spell/mass spell  script? i don't know haste for example?

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


Admirable
Omnipresent Hero
Wog refugee
posted November 17, 2011 06:01 PM

Quote:
I have a simple script that doesn't work.
!#HE142:X2/7;


No, you have to check with a timer who owns Gelare and give manually 1 mithril/day.
____________
Era II mods and utilities

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


Responsible
Supreme Hero
posted November 17, 2011 06:08 PM

@Magissia,

It sounds like you have discovered another feature (or lack thereof) of WoG 3.58f which is not (yet) documented in the ERM Help - that is, that the Resource Specialty does not work for mithril.  I know from experience that most of the other resources work.  I will add this note to the 3.58f ERM help on my next update.

You will have to write an ERM script to add the effect yourself, similar to my script to add movement points for Scouting, a page or so back.  Check the Heroes and give their owner the mithril if they have the Mithril Specialty.  Once the script is working, you could add it to the end of your new script45.erm.  That would probably deserve a QP.

@mister_kalu,

The script is part of a whole system intended to simulate the battle mechanics of a game called "Shining Force" in Heroes 3, which took me about three months to write.  I don't think the scripts would mean much to you unless I explained the whole system, with spreadsheets, which would take about a week.  All my work is here:

http://www.box.net/shared/qnynq18qps

The maps contain the scripts as Timed Events.  The Battle script implements the new spells, such as Mass Haste, but does a lot of other things also - battles in Shining Force are quite different from those in Heroes.

The game graphics require a special LOD made by Salamandre, which he posted about on a different thread.

I'll paste an excerpt from the battle script here:

!?BG1&310; parse mage spells
!!FU315:P;
!!IF:V310/0;

!?FU315; parse Mage spell effects, v52=spell index+1, v74=spell number
* v1200 table of A+1000*D+10^6*Dm spell effects by spell index
* v1240 table of Dr+1000*Sm+10^6*HP spell effects by spell index
* value=cxx where xx=|effect|, c=0(+), 1(-), 2(+%), 3(-%), 4(+all), 5(-all), 6(+%all), 7(-%all)
* special: c=9 for Sm = Stone, c=9 for Dm = Berserk, c=9 for Dr Summon Clone, c=9 for HP = Resurrect
!!VRy1:Sv52+1199; index to table 1
!!VRy2:Sv52+1239; index to table 2
!!VRy3:Svy2:100000000; HP c
!!DO316/21/41/1&y3=5:P;  mass damage
!!FU|y3=1/y3=5:E;
!!BMv77:Gv74/99/d; make sure spell doesn't wear off and remove effect
!!VRy20:Sv79+110; index to Spell Power Dr v110
!!VRy4:Svy1%100+vy20; A
!!VRy5:Svy1%1000:100; cA
!!VRy6:Svy1%1000000:1000%100+vy20;D
!!VRy7:Svy1%1000000:100000; cD
!!VRy8:Svy1:1000000%100+vy20; Dm
!!VRy9:Svy1:100000000; cdm
!!VRy10:Svy2%100+vy20; Dr
!!VRy11:Svy2%1000:100; cdr
!!VRy12:Svy2%1000000:1000%100+vy20; Sm
!!VRy13:Svy2%1000000:100000;   csm
!!DO317/v77/v77/1&v74=54/y13=3:Py4/y5/y6/y7/y8/y9/y10/y11/y12/y13/19; slow
!!DO317/21/41/1&v74=54/y13=7:Py4/y5/y6/y7/y8/y9/y10/y11/y12/y13/19; mass slow
!!DO317/v77/v77/1&v74=42/y9=3:Py4/y5/y6/y7/y8/y9/y10/y11/y12/y13/40; curse
!!DO317/21/41/1&v74=42/y9=7:Py4/y5/y6/y7/y8/y9/y10/y11/y12/y13/40; mass curse
!!DO317/v77/v77/1&v74=45/y5=3:Py4/y5/y6/y7/y8/y9/y10/y11/y12/y13/56; weakness
!!DO317/21/41/1&v74=45/y5=7:Py4/y5/y6/y7/y8/y9/y10/y11/y12/y13/56; mass weakness

!?FU316; x16=stack, v73=damage, v74=spell, v77=cast stack
!!FU&x16=v77:E;
!!BMx16:N?y1 L?y2;
!!FU&y1<1:E;
!!BMx16:Kv73;
!!BMx16&v74=15:V64; show MA animation
!!BMx16&v74=16:V46; IB
!!BMx16&v74=17:V49; L
!!BMx16&v74=21:V53; FB

!?FU317; mage spell effects, x16=stack
* x1 x2 x3 x4  x5 x6  x7 x8  x9 x10  x11
* A  cA D  cD  Dm cDm Dr cDr Sm cSm BM:V#
* c=0(+), 1(-), 2(+%), 3(-%), 4(+all), 5(-all), 6(+%all), 7(-%all), 8-no effect
!!BMx16:N?y1 A?v6 D?v7 U2/?v8 S?v9;
!!FU&y1<1:E;
!!VRv6&x16=v77:Cv53/v54/v48/v49; saved values prior to spell effects
!!BMx16&x16<>v77:Mv74/99/2;
!!VRv1:Cx1/x3/x5/x7/x9;
!!VRv1|x2=2/x2=7:Sx1*v6+51:100;
!!VRv2|x4=2/x4=7:Sx3*v7+51:100;
!!VRv3|x6=2/x6=7:Sx5*vy4+51:100;
!!VRv4|x8=2/x8=7:Sx7*vy5+51:100;
!!VRv5|x10=2/x10=7:Sx9*vy6+51:100;
!!VRv6&x2<>8:-v1;
!!VRv7&x4<>8:-v2;
!!VRy8&x6<>8:-v3;
!!VRy9&x10<>8:-v5;
!!VRy7:Sv8:2+1;
!!BMx16:Av6 Dv7 U1/y7 U2/v8 Sv9;
!!BMx16&x16<>v77:Vx11; show animation

This is not exactly what you want, but maybe it will give you some ideas.

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


Hired Hero
posted November 18, 2011 03:51 PM

HI!

I have a new stupid questions but I do not know how ask the number of hero of a stack in battle.  Is 0-21 stack's owner usually is the left hero or is alway? (The answer is: read the help )

Thanx.

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


Responsible
Supreme Hero
posted November 18, 2011 04:05 PM

You've got it:

-----------------------------------------
BATTLE, MONSTER PARAMETERS (BM)RECEIVER

You may check/set/get some parameters of a stack of monsters during combat (!?BR trigger)

!!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.
------------------------------------------

Elsewhere in ERM Help, e.g., the BH receiver, you will see that side 0 is the attacking side, on the left, and 1 is the defending side, on the right (of the battlefield).  So stacks 0-20 belong to side 0 and stacks 21-41 belong to side 1.

I recommend reading all (100%) of ERM help so that things you learn under one receiver can combine with things you learn under another receiver, to form a complete picture.  Unfortunately, if you are not an English speaker, the information is in English, but then, so are my replies.  I don't think I have ever answered a question from an ERM beginner which was not answered in ERM Help.  It has tutorials and sample scripts.  From my point of view (sorry to keep saying this), learning ERM without first reading all of ERM Help is like learning History by asking one question at a time.

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


Hired Hero
posted November 18, 2011 04:25 PM

The question is what if I change the stack side whith !!BM31:I0; The hero's number got with !!BA:H0/?i. The left size is equal attacker size allways? So 31 stack's owner is the i hero?

And how can I change a stack's luck and moral under the battle???

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


Responsible
Supreme Hero
posted November 18, 2011 05:11 PM
Edited by JimV at 17:24, 18 Nov 2011.

I have never tried to change a stack's affiliation in battle, and am suspicious that it would not work.  For example, a stack which came from a Hero's army (instead of being summoned or cloned) has a troop slot number (BM:O).  What will WoG do with that troop slot if the stack is given to a different Hero?  What if the other Hero already has a stack which came from that same troop slot?

Nevertheless, this is what ERM Help says:

I$; Side index as for heroes (0:left, 1:right)

That is, the side parameter is designated with $, which means you can get or set it.

Please try it in a test map and report results.  If it does not work, as I suspect, I will update the ERM Help.

Stack luck and morale:  except for Minotaurs, the stack's luck and morale are based on their Hero's luck and morale, which can be changed with (to quote ERM Help):

R0/$;  Set/check/get hero's morale (until next battle)
Note: $ acts like d$. Example: if Gem has +3 morale, !!HE27:R0/0; does not change her morale, and !!HE27:R0/-3; reduces it to zero.

R1/$;  Set/check/get hero's luck (until next battle)

"Until next battle" means of course that the Hero's morale and luck are reduced back to the values determined by his/her skills and artifacts after a battle is over.

Also, under the !?BA trigger there is this note:

Note:You may use indirect reference to heroes (copies of info):
!!HE-10:... apply changes to the copy of attacker hero info.
!!HE-20:... apply changes to the copy of defender hero info.

What if there is no defending Hero?  Will HE-20 work?  I don't know (haven't tried), but doubt it, since it says the information is a copy.  However, that is the only possibility I can think of to change the luck and morale of a neutral army (other than assigning them a temporary Hero, which I have done).  Well, giving the attacking Hero the Spirit of Oppression will disable luck and morale for both sides, and it could be given and taken away (HE:A) at various times during the battle.

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

Hero of Order
The Abyss Staring Back at You
posted November 18, 2011 05:56 PM

Quote:
I have never tried to change a stack's affiliation in battle, and am suspicious that it would not work.  

I could be wrong, but I feel Fnord and I did this very thing in THUNK, in the Sam Camfry battle.

Then again it's been a while so maybe I'm totally off base. :)
____________
I'm sick of following my dreams. I'm just going to ask them where they're goin', and hook up with them later. -Mitch Hedberg

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


Responsible
Supreme Hero
posted November 18, 2011 06:12 PM
Edited by JimV at 18:14, 18 Nov 2011.

Since ERM Help says (or implies) it is possible and Corribus agrees, I am mostly convinced - but just because Corribus and Fnord can do it doesn't mean an ordinary mortal could.  You know, like those commercials which say, "Don't try this at home."

Certainly one could use BA:M to shuffle troops from side to side under !?BA0 before the battle begins, or BU:S to summon new troops to a side under !?BF or later, but BM:I under !?BR seems risky to me.

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


Admirable
Omnipresent Hero
Wog refugee
posted November 18, 2011 06:18 PM

Not really:

!!BM25&v23=2/37:M60/10/3; [Hypnotize Camfrey]

For the neophyte it looks as he changes side, but in fact, easy trick.
____________
Era II mods and utilities

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

Hero of Order
The Abyss Staring Back at You
posted November 18, 2011 06:23 PM

@Jim V

Quote:
but just because Corribus and Fnord can do it doesn't mean an ordinary mortal could.


LOL, Fnord's the only immortal between the two of us.

@ Salamandre

Quote:
For the neophyte it looks as he changes side, but in fact, easy trick.


You just had to spoil the mystery, didn't you?  Don't you know a magician is never supposed to reveal his tricks??

But anyway, I just remembered the effect.  I never asked Fnord how he worked his magic.
____________
I'm sick of following my dreams. I'm just going to ask them where they're goin', and hook up with them later. -Mitch Hedberg

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


Admirable
Omnipresent Hero
Wog refugee
posted November 18, 2011 06:25 PM

He did it admirably well. Usually we show animation when a spell is applied via ERM, so it is explicit. Here Fnord chooses to skip animation, so nothing informs you visually that hypnotize was cast. Brilliant idea.
____________
Era II mods and utilities

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


Responsible
Supreme Hero
posted November 18, 2011 06:35 PM

Thanks, Salamandre, that is interesting information. (Someone should give you a QP sometime).  That gives me an idea for possibly eliminating the screen glitch when a Living Scroll casts a non-damage spell, like Haste or Hypnotize:  use BM:M on the target stack instead of BM:C by a friendly stack.  It might not make any difference, but it is worth a try - if I finish checking script99.ert for Phoenix in this lifetime.  (I think I will, the hard work has already been done.)

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


Admirable
Omnipresent Hero
Wog refugee
posted November 18, 2011 07:02 PM
Edited by Salamandre at 19:48, 18 Nov 2011.

Quote:
However, that is the only possibility I can think of to change the luck and morale of a neutral army (other than assigning them a temporary Hero, which I have done).


SS does all the work under ERA:

!!SS50:E3/?y1; check sorrow effect
!!VRy1:*100;
!!SS50:E3/y1;



If applied, sorrow now can go down to infinite negative value. The manual claims that the morale cap is -6 or so, but when set to -20, nobody had a move.

Modified slow effect (*100*-1)


____________
Era II mods and utilities

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


Hired Hero
posted November 18, 2011 07:24 PM

I only ask.

The !!UN:C with a good calculation of address will work maybe.

How could I play a def file which is in a lod file in a message box (for example a luck effect)?

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


Admirable
Omnipresent Hero
Wog refugee
posted November 18, 2011 07:28 PM
Edited by Salamandre at 19:29, 18 Nov 2011.

I don't know any other way to play animation in box message than custom gif.
____________
Era II mods and utilities

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


Promising
Known Hero
posted November 18, 2011 07:28 PM
Edited by itsjustme at 19:29, 18 Nov 2011.

Quote:
I only ask.

The !!UN:C with a good calculation of address will work maybe.

How could I play a def file which is in a lod file in a message box (for example a luck effect)?
No way I think. But you can play GIF created from this DEF.

Salamandre is faster.
____________
Hundreds of DEFs

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


Honorable
Supreme Hero
posted November 18, 2011 09:43 PM

Custom DL message box?

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


Admirable
Omnipresent Hero
Wog refugee
posted November 18, 2011 09:47 PM

Animated def not supported yet in DL.
____________
Era II mods and utilities

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


Responsible
Supreme Hero
posted November 18, 2011 10:11 PM
Edited by JimV at 22:12, 18 Nov 2011.

True, but the amazing TL0 can be used to do animations in Era - see the "Max's Dream" script in Shining Force, or the shift-left-click animation in XFiles.  (Not very practical except for special effects, I know.  GIF capability in DL's would be better.  Until then, 3.58f's IF:D is the best means.)

I tried to think of 3.58f ERM commands to affect stack morale directly earlier, and didn't think of Mirth and Sorrow and Fortune and Misfortune - great catch.  UN:C commands could probably be found also, but that is more a technique for modders than for scripters, and has the danger that the next great mod, such as VCMI, may not support them.

 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 ... 115 116 117 118 119 ... 150 200 250 300 350 400 407 · «PREV / NEXT»
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.1094 seconds