Neverending battle?

Official forum of the Wake of Gods mod to Heroes of Might and Magic III.

Moderator: Moderators

LarvaExotech
Leprechaun
Leprechaun
Posts: 28
Joined: 01 Jan 2007

Neverending battle?

Postby LarvaExotech » Oct 6 2009, 16:56

Hello.

I was wondering, if its possible to make battle *NOT* end if all enemy creatures are down?

I have tried adding one unattackable creature in battlefield and well... it does job because battle won't end even if all creatures are down.. but there are some problems

that placeholder creature cannot be placed outside of combat field so it is standing on battle field. also its visible and AI attack it, so that method is not so good... I just want to end battle manually, not automatically when all enemy creatures are dead. maybe you got any other ideas?

or maybe you know how i could make that creature invisible? or at least how to make AI wont attack it? maybe placing an obstacle at creature position would make it untargetable?

and also - how to automatically skip certain creature from getting turn, like Catapult on Enchanced War Machines I script - if it does not have shoots or enemy is blocking catapult then it automatically passes to another creature - how to do it with ERM?

User avatar
Qurqirish Dragon
Genie
Genie
Posts: 1011
Joined: 06 Jan 2006
Location: Flying the skies of Ohlam

Postby Qurqirish Dragon » Oct 7 2009, 15:00

You can make a creature with a minimal AI value, so it won't attack that creature unless it is the only one left on the opposing side.
What are you trying to do? Have a human player in a battle with no creatures, just a hero?

As for skipping, if a creature has no valid action, the AI will skip it normally. In the case of this placeholder creature, just give it 0 movement and 0 damage. (and magic immunity to prevent the AI from casting haste on it!)

LarvaExotech
Leprechaun
Leprechaun
Posts: 28
Joined: 01 Jan 2007

Postby LarvaExotech » Oct 7 2009, 17:57

I'd want to make possible for player to enter a battle screen manually (with no enemy) and arrange creatures. their position would be saved and if hero would be attacked then his creatures would stand on those positions unless hero moved one tile.

for example - player has pikemans and archers. he's right-clicking some button on interface and battle screen appears but no enemies on right side. he is placing archers on center of battlefield, near obstacle and pikemans near archers. then he is clicking some combat button and battle ends. position of pikemans and archers are stored.

now, if hero will take a move, that formation will reset to standard one on right side. but if hero won't move and ai (for example) attack him then combat will start and pikemans and archers would be on their position (center of battlefield in that case).

AI value trick wont help here, because if placeholder-creature is the only creature in AI range, then he'll try to attack it. and if I block attacking that creature with BG receiver ("cancel action"), then AI will endlessy shimmer and try to attack it but it never success (it works for player though). even if i place that creature outside of battlefield, AI still tries to attack it (even though human cant :P).

and about skipping, I know that AI will skip that creature, but on player-side, it will get turn and player must click "defend" button to pass. and enchanced war machines I catapult automatically skips turn if something is standing near it / or it ran out of shoots.

becase i don't want to spam forum with another thread, I'll ask here about something - I saw !!IF:L-1; command in TE wog edition but apparently it gives me error on WOG 3.58. its 3.59 command or maybe they have coded it to their new exe?

anyway, thanks for replying :))
larva~

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

Postby Beholder » Oct 8 2009, 5:53

Why won`t you simply give tactics to the hero? Does it make such a difference in your map / campaign ?
Beholder

User avatar
Qurqirish Dragon
Genie
Genie
Posts: 1011
Joined: 06 Jan 2006
Location: Flying the skies of Ohlam

Postby Qurqirish Dragon » Oct 8 2009, 13:38

Beholder's solution is definitely the easiest one.

If for some reason you cannot do that, then give the AI a single 0-movement creature. Then you just need to set up whatever triggers you need to start / end such a battle.

Another possibility is to place an image of the numbered battlefield on the screen, and simply ask the player where to place all the creatures. Then no battle is needed at all.

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

Postby Beholder » Oct 9 2009, 15:12

the problem with additional creature is when you cast armageddon, death ray etc - it will be hit as well
Beholder

User avatar
Qurqirish Dragon
Genie
Genie
Posts: 1011
Joined: 06 Jan 2006
Location: Flying the skies of Ohlam

Postby Qurqirish Dragon » Oct 10 2009, 13:54

Beholder wrote:the problem with additional creature is when you cast armageddon, death ray etc - it will be hit as well


Give it magic immunity, as I suggested in my first reply. Also, he said this was to allow a setup of troops- in that case I can't see the player wasting spells to get 1 experience point from a 1 HP creature.

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

Postby Beholder » Oct 10 2009, 13:57

Yes but the AI might atack it. Regardless of that you could have some other script autocast spells fe. living scrolls.
Though, magic immunity might work, unless you have orb of vulnerability...
Beholder


Return to “Wake of Gods”

Who is online

Users browsing this forum: No registered users and 5 guests