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
Thread: erm help
00108118
00108118

Tavern Dweller
posted November 22, 2003 05:17 PM
Edited By: 00108118 on 22 Nov 2003

erm puzzle

hello,I want to add some damage to monster on battlefield of stack number from 0 to 41,
but there seems no way to do that,who can please tell me how i can do that?
thank you

____________

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


Promising
Famous Hero
posted November 22, 2003 10:57 PM

Quote:
hello,I want to add some damage to monster on battlefield of stack number from 0 to 41,
but there seems no way to do that,who can please tell me how i can do that?
thank you



You're right, there's no way currently to easily change the damage done by monsters on the stack level aside from changing their attack value.

This means that in order to do it you would need to:

a) store the damage values done by all monsters of each type on the battlefield (using the MA receiver), then change this value, and restore it after the combat;

or

b) use BG triggers to add add damage to a stack after each attack made by any monster (using BM:L or BM:K applied to the target). This can get pretty complicated, however and may not give you the results you want anyway.


____________

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

Tavern Dweller
posted November 23, 2003 06:07 AM



b) use BG triggers to add add damage to a stack after each attack made by any monster (using BM:L or BM:K applied to the target). This can get pretty complicated, however and may not give you the results you want anyway.




thank you for your reply,I have tried your advice b,
!?BG;
!!BG:A?v810;
!!VRv811:S0;
!!VRv811&v810=6:S1;
!!VRv811&v810=7:S1;
!!BG&v811=1:E?v812; victim stack number
!!BG:N?v813; attacker stack number
!!BMv813:T?v814;
!!MA:Mv814/?v815; damage
!!MA:Av814/?v816; attack
!!BMv812:T?v817;
!!MAv817/?v818; defence
!!VRv816:-v818;
!!VRv816:*3;
!!BMv813:N?v819;
!!VRv816:+100;
!!VRv816::100;
!!VRv816:*v819;
!!VRv816:*v815;
!!BMv812&v811=1:Kdv819;

as you said,I got a unpredicted result... maybe there is something wrong in my script.

once more,thank you for you reply!
____________

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


Promising
Famous Hero
posted November 23, 2003 06:47 AM

Quote:

as you said,I got a unpredicted result... maybe there is something wrong in my script.

once more,thank you for you reply!


You're welcome. If I'm reading your script correctly, what it does is:

1. Take the minimum damage the attacking creature does;
2. Take the difference between unmodified attack of attack and defense of defender (i.e., doesn't include the Hero bonus or spells, etc.) and multiply it by 3;
3. Add 100 to the difference (times 3) calculated in 2 and then divide by 100, which means that you'll usually get a number equal to 0 or 1. To get 2, you would need to have a base difference between attack and defense of 34 or more;
4. Take the number calculated in 3 and multiply it by the current number of creatures in the attacking stack;
5. Take the number calculated in 4 and multiply it by the minimum damage the creature does;
6. Apply this damage to the target creature using the BM:K command with the d syntax. I'm not certain if the d syntax works correctly here as I think this may be additional damage only, but I could be mistaken.

If all this is correct then it looks like your script should work (although I'm not sure about the d parameter), but combat scripting is a somewhat unpredictable business in places.

What I can tell you is that 3.58 will add some additional combat scripting triggers and receivers. One of them is a trigger for when a stack takes physical damage and another is a receiver that lets you modify this damage. So if you're unable to get your script to do what you want now, the new commands should let you do it when 3.58 is (eventually) ready.


____________

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

Tavern Dweller
posted November 24, 2003 07:22 AM

Quote:

as you said,I got a unpredicted result... maybe there is something wrong in my script.

once more,thank you for you reply!


You're welcome. If I'm reading your script correctly, what it does is:

1. Take the minimum damage the attacking creature does;
2. Take the difference between unmodified attack of attack and defense of defender (i.e., doesn't include the Hero bonus or spells, etc.) and multiply it by 3;
3. Add 100 to the difference (times 3) calculated in 2 and then divide by 100, which means that you'll usually get a number equal to 0 or 1. To get 2, you would need to have a base difference between attack and defense of 34 or more;
4. Take the number calculated in 3 and multiply it by the current number of creatures in the attacking stack;
5. Take the number calculated in 4 and multiply it by the minimum damage the creature does;
6. Apply this damage to the target creature using the BM:K command with the d syntax. I'm not certain if the d syntax works correctly here as I think this may be additional damage only, but I could be mistaken.

If all this is correct then it looks like your script should work (although I'm not sure about the d parameter), but combat scripting is a somewhat unpredictable business in places.

yes,what you said is exactly what I want to implement,though that formula looks somewhat foolish
Quote:

What I can tell you is that 3.58 will add some additional combat scripting triggers and receivers. One of them is a trigger for when a stack takes physical damage and another is a receiver that lets you modify this damage. So if you're unable to get your script to do what you want now, the new commands should let you do it when 3.58 is (eventually) ready.


oh,it is so wonderful,I am looking forward to 3.58 very much
and it seems that i have to postpone my plan until releasing of 3.58

in the end please accept my thank


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


Promising
Famous Hero
posted November 24, 2003 08:43 AM

Quote:

oh,it is so wonderful,I am looking forward to 3.58 very much
and it seems that i have to postpone my plan until releasing of 3.58

in the end please accept my thank




You're welcome. There's quite a lot of new ERM commands that will be in 3.58. Of course, there will always be more commands than haven't been made (yet), but many of the new ones are quite interesting and useful.


____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Greek_god_su...
Greek_god_superman


Famous Hero
Bringer Of Light
posted December 07, 2003 06:18 PM

Is there some easy way (=without too much scripting) to add special abilities like unlimited retaliations, drain life, strike and return attack, attack to three squares (cerberus), petrifyings, immunities, spellcastings etc. to other creatures??

Could these options be added somehow to erm script master, cause I have very little knowledge of scripting those myself with script editor.

 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.0414 seconds