I want to limit the MA command

Official forum of the Wake of Gods mod to Heroes of Might and Magic III.
User avatar
Salamandre
Genie
Genie
Posts: 1032
Joined: 13 May 2006
Location: France
Contact:

I want to limit the MA command

Unread postby Salamandre » 26 Jul 2008, 23:09

I wonder how you guys change the parameters for only one battle but not for the others. I have a hard time to imagine what I should do with this:

ZVSE

!?OB3/6/0; there must be an archer in 3/6/0
!!IF:M^Set Archer to shoot twice^;
!!MA:X2/?i;
!!VRi:+32768;
!!MA:X2/i;

The problem is that all archers on the map will strike twice. Whats the purpose of setting them as OB instead of creating just a first day rule. And how can I do to disable the others archers in the map shooting twice? Please?

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

Unread postby Beholder » 27 Jul 2008, 14:59

The OB would work differently than a day timer because it would give archers double strike on the day you visited the object, so you could for example trigger it on day 132.

As for making it only for this specific stack... well you could do it for some specific stack on the map. Do a check at the start of the battle to see if you are fighting with this stack and if yes then give archers the double strike ability and disable it after the combat is over. There could however be some problems. First, I don`t know if changing the ability at the begining of the fight isn`t 'too late' since the battle has already started - you`ll have to check that. Secondly, it`s hard to make a check to see if you`re fighting with the specific pack. You could check the position of hero at the battle startup and if it`s a field adjacent to the monster position. This however could be a problem if you would have two packs of monsters on the map on adjacent fields beacuse you don`t know which one you`re fighting with (you could however loop then through all the stacks and check for monster types but still you could be having two adjacent stacks of monsters of the same type etc.).

Hope this helps :)
Beholder

User avatar
Salamandre
Genie
Genie
Posts: 1032
Joined: 13 May 2006
Location: France
Contact:

Unread postby Salamandre » 27 Jul 2008, 22:26

I appreciate the help. I think it is too difficult for me to do all operations you propose. Lets think different and easier:

What I want to do is to customize some battlefields, but not all.
I have this bf with some obstacles

!!BF:O3/15 O3/185 O64/82 O64/116 O0/91;

I am lost how to keep it only for a specifical battle and disable it for the others battles on the map. I know it has something to do with variables, maybe you can enlight me where I need to store this battle and how?

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

Unread postby Beholder » 01 Aug 2008, 11:12

For example you can store the info in some variable. Let`s say 1 means that this type of battle should be used and all other values mean that it shouldn`t be used. Then set the variable to 1 in some place (meaning that the next battle will be the one you want). So insert fe:

!!VRv10000:s1;

where you want to enable it. Then put all your customisation in a trigger that checks if v10000 is 1:

!?BF&v10000=1;
...//your code here
!!VRv10000:s0;

This means that your battle settings will be used only after you set v10000 to 1. The last line in trigger section will ensure that these settings will not be used further in the game (in next battles) unless you set v10000 to 1 again.

Other way would be to make a normal !?BF; trigger and then check for player position and exit the trigger (!!FU:E;) if it`s not the position where this battle of yours should be enabled.
Beholder

User avatar
Salamandre
Genie
Genie
Posts: 1032
Joined: 13 May 2006
Location: France
Contact:

Unread postby Salamandre » 01 Aug 2008, 16:27

Thank you. Give me some time so I can test and study this. I will post a sample and maybe you could help debug. I think having custom battles is what is missing most at Heroes.


Return to “Wake of Gods”

Who is online

Users browsing this forum: No registered users and 2 guests