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 ... 74 75 76 77 78 ... 100 150 200 250 300 350 400 407 · «PREV / NEXT»
Salamandre
Salamandre


Admirable
Omnipresent Hero
Wog refugee
posted February 23, 2011 12:14 AM

Change the icons in Artefact.def

____________
Era II mods and utilities

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


Hired Hero
posted February 23, 2011 02:00 AM

How would I code the following:

say I want to give this special ability to evil eyes:

Evil eyes have a 10% chance to cast blind on enemy creatures after a ranged attack, REGARDLESS WHETHER THE TARGET IS IMMUNE TO BLIND OR NOT, unless the target is another evil eye or beholder. So black dragons can still be "blinded" by evil eyes but not from other means.

I know how to code it using EA receiver but the difficulty is the "REGARDLESS WHETHER THE TARGET IS IMMUNE TO BLIND OR NOT, unless the target is another evil eye" part.

How can this be coded in ERM in a stand-alone script?

what would need to be changed if we give this ability to a non-shooting creature?

____________

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


Admirable
Omnipresent Hero
Wog refugee
posted February 23, 2011 03:03 AM

Posting the same question 3 times in a row will not help.
____________
Era II mods and utilities

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


Hired Hero
posted February 24, 2011 01:25 AM

Sorry, should i now go delete the earlier entires?
____________

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


Admirable
Omnipresent Hero
Wog refugee
posted February 24, 2011 11:07 AM
Edited by Salamandre at 11:21, 24 Feb 2011.

If no answer, means either no one knows, or it is too long to make, or it is not possible, or your "request" was not clearly formulated.

I don't understand very well what you asked. You want the eyes to blind on attack all the creatures, even those which are immunes to magic? Then it requires a longer script, more than a simple EA command.
____________
Era II mods and utilities

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


Hired Hero
posted February 24, 2011 02:32 PM

try using the below simple code which should do the trick.

ZVSE
!?BG0;                   before stack action
!!BG:A?y-1 N?y-2;        what's next action? / stack #
!!BMy-2:T?y-3;           active stack monster type?
!!FU&y-3<>74/y-3<>75:E;  continue for evil eyes/beholders
!!FU&y-1<>7:E;           end code if action is not "shoot"

!!BG:E?y-1;              destination stack #
!!BMy-1:M62/1/3;         apply blind spell for 1 round on expert fire
                        magic skill
____________
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 February 24, 2011 05:50 PM
Edited by Salamandre at 18:31, 24 Feb 2011.

Sagamosa, will work with all spells except blind, because the spell is always applied before hit, being in BG0 trigger therefore the arrow will dispel it. (tricky, no matter the order, ERM still process everything before the arrow leaves )

Try this:

ZVSE

!?BG0;                   before stack action
!!BG:A?y-1 N?y-2;        what's next action? / stack #
!!BMy-2:T?y-3;           active stack monster type?
!!FU&y-3<>74/y-3<>75:E;  continue for evil eyes/beholders
!!FU&y-1<>7:E;
!!IF:V99/1;              enable post shot

!?BG1&99;
!!BG:E?y-1;              destination stack #
!!BMy-1:M62/1/3;         apply blind spell for 1 round on expert fire
!!VRz10:S^Blind.wav^;
!!SN:Pz10;  play sound
!!BMy-1:V6;              add blind animation
!!IF:V99/0;

I would also change the spell duration to >1 because almost all creatures immune to blind are faster than the eyes, so practically you will blind them always too late. And of course, bbvsdd,  you will have to code the 10% chance in.
____________
Era II mods and utilities

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


Hired Hero
posted February 25, 2011 02:15 AM

Thanks for the reply.

So I think the random number thing can be used to generate the 10% probability, using !!VRv7000:S0 T99;



ZVSE

!?BG0;                   before stack action
!!BG:A?y-1 N?y-2;        what's next action? / stack #
!!BMy-2:T?y-3;           active stack monster type?
!!FU&y-3<>74/y-3<>75:E;  continue for evil eyes/beholders
!!FU&y-1<>7:E;
!!IF:V99/1;              enable post shot

!?BG1&99;
!!VRv7000:S0 T99;    randomly generate v7000 between 0 and 99
!!BG:E?y-1;              destination stack #
!!BMy-1&v7000<10:M62/1/3;         apply blind spell for 1 round on expert fire if v7000 is less than 10
!!VRz10:S^Blind.wav^;
!!SNz10;  play sound
!!BMy-1:V6;              add blind animation
!!IF:V99/0;

Would this code fly?
____________

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


Admirable
Omnipresent Hero
Wog refugee
posted February 25, 2011 08:36 AM

[...]
!?BG1&99;
!!VRv7000:S0 T100;  
!!IF&v7000>10:V99/0;
!!FU&v7000>10:E;  10% chance
!!BG:E?y-1;              destination stack #
!!BMy-1:M62/1/3;         apply blind spell for 1 round on expert fire
!!VRz10:S^Blind.wav^;
!!SN:Pz10;  play sound
!!BMy-1:V6;              add blind animation
!!IF:V99/0;
____________
Era II mods and utilities

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

Tavern Dweller
posted February 25, 2011 05:36 PM

Quote:
Change the icons in Artefact.def



Hi Salamandre, and thanks for the good answer
I'm WanderingHero (just recovered my lost account ) and i'm glad to see there's such a way.. but where i can find the artefact.def file? I didn't do such modifications since now, so i'm sorry for not knowing it

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


Admirable
Omnipresent Hero
Wog refugee
posted February 25, 2011 08:59 PM

First you will have to download ERA, the last WoG version, having all modding tools inside. Then open H3sprite.lod with MM archive, extract Artifact.def, open it with Defpreview and extract all frames in some folder. Replace the one you want, repack the whole thing back using DefTool, and put it back in H3sprite.lod.

Sounds long, but once you are used to, it takes a few minutes.
____________
Era II mods and utilities

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


Hired Hero
posted February 26, 2011 07:26 AM

Salamandre is the best!!!

Your code worksd and WOG didn't crash

So I loaded the following code into WOG for testing purposes, with 100% occurance.

There were a few instances I found the enemy was casted blind but was still able to attack. A particular situation was when an evil eye attacked a marksman and the markman moved immediately after the eye. There was the blind sound and animation being played, the marksman's status shows red (Some negative spell on it) but it still attacked the eye.

Here's the code I used.

!?BG0;                   before stack action
!!BG:A?y-1 N?y-2;        what's next action? / stack #
!!BMy-2:T?y-3;           active stack monster type?
!!FU&y-3<>74/y-3<>75:E;  continue for evil eyes/beholders
!!FU&y-1<>7:E;
!!IF:V99/1;              enable post shot

!?BG1&99;
!!BG:E?y-1;              destination stack #
!!BMy-1:M62/1/3;         apply blind spell for 1 round on expert fire
!!VRz10:S^Blind.wav^;
!!SNz10;  play sound
!!BMy-1:V6;              add blind animation
!!IF:V99/0;


Any clue why that was happening? Is it because of the post-shot trigger?

____________

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


Admirable
Omnipresent Hero
Wog refugee
posted February 26, 2011 07:22 PM

I don't know why marksmen move while blinded. Maybe the trigger comes too late. Anyway, it should be fixed with the BG:A12 at the end of the script:

[...]
!!BMy-1:V6;add blind animation
!!BG:A12; disable stack for this turn
!!IF:V99/0;
____________
Era II mods and utilities

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


Hired Hero
posted February 26, 2011 08:19 PM

Okay that problem is now fixed. so do I use the following code to code the part "evil eyes can't blind another evil eye"?

!?BG1&99;
!!BG:E?y-1;              destination stack #
!!BMy-1:T?y-2;           what's the target stack #?
!!FU&y-2=74/y-2=75:E;       stop if target is evil eyes
____________

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


Admirable
Omnipresent Hero
Wog refugee
posted February 26, 2011 08:23 PM

!?BG1&99;
!!BG:E?y-1;              destination stack #
!!BMy-1:T?y-2;           what's the target stack #?
!!FU|y-2=74/y-2=75:E;       stop if target is evil eyes

| = or  -if one of the conditions
& = and - checks for both conditions at once, so yours can't work
____________
Era II mods and utilities

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


Hired Hero
posted February 26, 2011 08:25 PM

Thank you!

As you can tell, I'm erm - noob
____________

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


Admirable
Omnipresent Hero
Wog refugee
posted February 26, 2011 08:30 PM

Me too, some are still laughing at my coding skills.
____________
Era II mods and utilities

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


Hired Hero
posted February 27, 2011 12:33 AM

Seems like the above evil-eye code work on most of the original SOD creatures. I have tested a few WOG creatures and it won't work...

I applied the 100%-chance test code for eyes, archers and lizards they worked fine but the blind part doesn't work for WOG creatures like lord of thunder, sorceress and dracolich....

also the code seems to just apply blind when any creature shoot during the first round of combat... why is this happening?
____________

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


Admirable
Omnipresent Hero
Wog refugee
posted February 27, 2011 01:00 AM

All works fine here, every round, any creature. Surely you messed ID's.
____________
Era II mods and utilities

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


Hired Hero
posted February 27, 2011 01:01 AM
Edited by bbvsdd at 01:04, 27 Feb 2011.

... Could you plz copy-pasta the code you have in?

Also did you use a stand-alone erm script or did you code it into a map event? I used a stand-alone script numbered 99.

I am certain I didn't mess up IDs because the same ID was used to add the creature to starting hero.
____________

 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 ... 74 75 76 77 78 ... 100 150 200 250 300 350 400 407 · «PREV / NEXT»
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.6382 seconds