no fear

Official forum of the Wake of Gods mod to Heroes of Might and Magic III.
Lamaclown
Leprechaun
Leprechaun
Posts: 22
Joined: 13 Nov 2006
Location: Oakland,MD USA

no fear

Unread postby Lamaclown » 29 Jul 2008, 13:26

I am creating an artifact that among other things would render troops immune to dragon fear. I can't figure out how to do this.
Anyone know how I could do this?

Also, I have been working with the artifact casting a spell at the beginning of combat. I've tried BH and BM and I just can't figure it out. How do you get an artifact to automatically cast a spell at the beginning of combat?

Thanks in advance.

EDIT:
OK I figured out casting the spell (kinda) using the BH command. I wanted it to be the artifact casting the spell (like angelic alliance). Instead its the hero and it uses the heroes turn for spell casting that round. So, I guess my question still stands.. anybody know how to get an artifact to cast a spell at the beginning of combat?

User avatar
Beholder
Scout
Scout
Posts: 150
Joined: 27 Feb 2006
Location: Poland, Kraków
Contact:

Unread postby Beholder » 01 Aug 2008, 11:20

You can use BM:C as far as I remember. It causes a particular stack to cast the spell, meaning that the hero will be able to cast a spell this round and won`t lose mana. There are however some problems with casting spells in general. AFAIR it was with casting spells in first round of the combat, especially if you had tactics going on. You can try BM:G which sets a spell effect without actually casting it. As far as I know this works better but doesn`t display graphics and doesn`t play sounds.

As for fear... well... you could iterate through all your stacks on the battle field and give them 'immune to fear' ability using creature experience for the duration of the battle (then remove it). You could also try to do it other way round that is to loop thorough all enemy stacks and disable their fear... This one actually, I think, will require a lot of coding..
Beholder

Lamaclown
Leprechaun
Leprechaun
Posts: 22
Joined: 13 Nov 2006
Location: Oakland,MD USA

Unread postby Lamaclown » 04 Aug 2008, 13:44

Beholder wrote:You can use BM:C as far as I remember. It causes a particular stack to cast the spell, meaning that the hero will be able to cast a spell this round and won`t lose mana. There are however some problems with casting spells in general. AFAIR it was with casting spells in first round of the combat, especially if you had tactics going on. You can try BM:G which sets a spell effect without actually casting it. As far as I know this works better but doesn`t display graphics and doesn`t play sounds.
Thanks for the reply.
I'll give this a shot again using BM:G.
Beholder wrote:As for fear... well... you could iterate through all your stacks on the battle field and give them 'immune to fear' ability using creature experience for the duration of the battle (then remove it). You could also try to do it other way round that is to loop thorough all enemy stacks and disable their fear... This one actually, I think, will require a lot of coding..
Yeah, I kinda gave up on this one. When it comes to ERM I am getting better but I'm still no more than a n00b and this one is beyond me.

Thank you again for the reply!

Lamaclown
Leprechaun
Leprechaun
Posts: 22
Joined: 13 Nov 2006
Location: Oakland,MD USA

Unread postby Lamaclown » 05 Aug 2008, 20:35

I have set an artifact to cast bless at the beginning of combat. For some reason though the stack at the top of the screen when attacking (position 01) isn't effected. I've tried different positions and numbers for it but nothing seems to work.

I've gone through my script several times and can't figure it out. Here is the script I wrote (I am sure there is an easier, less confusing way to do it- if so let me know)...

!?BA0&234;
!!IF:V45/1;
!!BA&234:H0/?v87; [get number of attacking hero]
!!BA&234:H1/?v88; [get number of defending hero]
!!HEv87&v87=>0/234:O?v89; [get owner of attacking hero]
!!HEv88&v88=>0/234:O?v70; [get owner of defending hero]
!?BR-1&234;
!?BF0&234;
!?BR0&234;
!?BG0&234;

!!BU&v89=0/45/234:E01/?v45; [if red player attacking get number of creature @ position 01]
!!BU&v89=0/45/234:E18/?v46;
!!BU&v89=0/45/234:E35/?v47;
!!BU&v89=0/45/234:E52/?v48;
!!BU&v89=0/45/234:E69/?v49;
!!BU&v89=0/45/234:E86/?v50;
!!BU&v89=0/45/234:E103/?v51;
!!BU&v89=0/45/234:E120/?v52;
!!BU&v89=0/45/234:E137/?v53;
!!BU&v89=0/45/234:E154/?v54;
!!BU&v89=0/45/234:E171/?v55;



!!BMv45&v89=0/45/v45=>0/234:M41/99/3; [if red player attacking bless creature v45]
!!BMv46&v89=0/45/v46=>0/234:M41/99/3;
!!BMv47&v89=0/45/v47=>0/234:M41/99/3;
!!BMv48&v89=0/45/v48=>0/234:M41/99/3;
!!BMv49&v89=0/45/v49=>0/234:M41/99/3;
!!BMv50&v89=0/45/v50=>0/234:M41/99/3;
!!BMv51&v89=0/45/v51=>0/234:M41/99/3;
!!BMv52&v89=0/45/v52=>0/234:M41/99/3;
!!BMv53&v89=0/45/v53=>0/234:M41/99/3;
!!BMv54&v89=0/45/v54=>0/234:M41/99/3;
!!BMv55&v89=0/45/v55=>0/234:M41/99/3;

!!IF&v89=0/45/234:V45/0;

!!BU&v70=0/45/234:E15/?v45; [if red player defending get number of creature @ position 15]
!!BU&v70=0/45/234:E32/?v46;
!!BU&v70=0/45/234:E49/?v47;
!!BU&v70=0/45/234:E66/?v48;
!!BU&v70=0/45/234:E83/?v49;
!!BU&v70=0/45/234:E100/?v50;
!!BU&v70=0/45/234:E117/?v51;
!!BU&v70=0/45/234:E134/?v52;
!!BU&v70=0/45/234:E151/?v53;
!!BU&v70=0/45/234:E168/?v54;
!!BU&v70=0/45/234:E185/?v55;

!!BMv45&v70=0/45/v45=>0/234:M41/99/3; [if red player defending bless creature v45]
!!BMv46&v70=0/45/v46=>0/234:M41/99/3;
!!BMv47&v70=0/45/v47=>0/234:M41/99/3;
!!BMv48&v70=0/45/v48=>0/234:M41/99/3;
!!BMv49&v70=0/45/v49=>0/234:M41/99/3;
!!BMv50&v70=0/45/v50=>0/234:M41/99/3;
!!BMv51&v70=0/45/v51=>0/234:M41/99/3;
!!BMv52&v70=0/45/v52=>0/234:M41/99/3;
!!BMv53&v70=0/45/v53=>0/234:M41/99/3;
!!BMv54&v70=0/45/v54=>0/234:M41/99/3;
!!BMv55&v70=0/45/v55=>0/234:M41/99/3;

!!IF&v70=0/45/234:V45/0;


Any ideas as to why the stack @ 01 isn't being effected?
Thanks for any help!

User avatar
Beholder
Scout
Scout
Posts: 150
Joined: 27 Feb 2006
Location: Poland, Kraków
Contact:

Unread postby Beholder » 06 Aug 2008, 16:26

AFAIR it`s one of those annoying bugs...

As for creatures, there was some 'array' where creature index 0..21 were atacker creatures and the rest was the defender (so you don`t have to check the position on the battle field to get the stack number). Unfortunately I don`t remember where it was (maybe BH?).
Beholder

Lamaclown
Leprechaun
Leprechaun
Posts: 22
Joined: 13 Nov 2006
Location: Oakland,MD USA

Unread postby Lamaclown » 07 Aug 2008, 18:32

Beholder wrote:AFAIR it`s one of those annoying bugs...
Well, I guess I can live with it if I have to. I just hate to leave a stack out.

Thanks for the tip on shortening my script. I'll see if I can understand it and use it.

User avatar
Beholder
Scout
Scout
Posts: 150
Joined: 27 Feb 2006
Location: Poland, Kraków
Contact:

Unread postby Beholder » 08 Aug 2008, 19:58

I`m almost certain that there was a way to apply a spell on all stacks... try BM:C, BH:C receivers...
Beholder


Return to “Wake of Gods”

Who is online

Users browsing this forum: No registered users and 3 guests