Current time: 23.03.2024, 09:06 Hello There, Guest! (LoginRegister)
Language: english | russian  

Post Reply 
Threaded Mode | Linear Mode
Mod-change battlefield
Author Message
Valery Offline

Posts: 2196
Post: #1

I was thinking such mod will be cake to do, but it is much more tricky than I expected.

What I want to do:

1) In battle, player clicks custom button, dialog shows and offer possibility of changing battlefield terrain and top terrain. Effect is instant, both visual and creatures bonuses.

What it does right now:

1) Effect is not instant, player has to move a creature before changes are visible.

2) It did not work if battlefield is regular (not changed by user in BA trigger first), but Gamecreator provided me a code which does the job very well, thanks

3) For now you can click once, activate one battlefield, close dialog. But if you select "cursed ground", close dialog, open dialog then choose "grass" you see grass but penalties are still those of cursed ground.
This is because top terrain remains even if the base terrain is changed. Should I use other mechanic? Perhaps restrict mod to only top terrains? Or allow double selection, one for top terrain, one for base terrain?

4) I can't solve the native terrain bonuses. Even if I change the terrain to not native, the bonus stacks had at battle start (+1 attack, def and speed) will remain. Is there a way to get rid of? Because coding this manually would be a hell. (tried with BA:B# but it has no effect)

5) I don't seem to be able to trigger the DL it from new button (you see it bottom left), I get 0-400 as y3/v2 so for now it triggers from right-click on system options. Now I understand why nobody yet added a button to battle: it big sucks.

Battle-Mod (4 mb)
If any can help, please.

Code triggering the BF change:
(This post was last modified: 28.10.2014 17:09 by Valery.)
28.10.2014 16:31
Find all posts by this user Quote this message in a reply
gamecreator Offline

Posts: 7107
Post: #2

(28.10.2014 16:31)Valery Wrote:  1) Effect is not instant, player has to move a creature before changes are visible.
Did you try BU:R?


When all gods have burnt to ashes in eternity of sorrow,
Demons gonna tear your soul because there is no tomorrow.
28.10.2014 16:53
Find all posts by this user Quote this message in a reply
Valery Offline

Posts: 2196
Post: #3

it is already in the code. It looks like some creature action is required to redraw this. I tried virtual actions as BM:V (showing a spell animation) but no effect. It needs BG action.

I recall Sav wrote a piece of UN:C code allowing the redraw a creature movement range in battle (if you change speed for example). I think that would work, but can't find it.

@Edit: found it

No effect on bf redraw Bad

Tested a bit more: battlefield will redraw if:
a) open magic book and select a spell (don't need to cast)
b) open combat options (only have to open it)
c) of course, move the creature
(This post was last modified: 28.10.2014 17:44 by Valery.)
28.10.2014 16:59
Find all posts by this user Quote this message in a reply
Valery Offline

Posts: 2196
Post: #4

So I have two issues:

1) Can't redraw the battlefield when exit the DL, needs one additional action. Clicking on System options/return redraws the map, so what could be updated when such action? Is there a way to check and reproduce?

2) I don't know how to reset/recalculate native terrain bonuses. It looks like they are calculated at battle start, depending on terrain, then there is no way to change this.

(This post was last modified: 29.10.2014 03:00 by Valery.)
29.10.2014 02:53
Find all posts by this user Quote this message in a reply
Berserker Offline
Administrators

Posts: 16449
Post: #5

Sorry, Val, I don't know it either. Probably terrain bonuses are simply added at start to monster defense/attack/speed like you do in !!BM.


Скачать Герои 3 Эра и всё, что с ней связано / ERA 2.46f для старых модов
Поддержать проект
29.10.2014 20:05
Find all posts by this user Quote this message in a reply
Valery Offline

Posts: 2196
Post: #6

Thanks, I will remove the native terrains from mod, as dealing with bonuses is impossible when changing. But I want to keep top terrains and mod will work 100% if I could find a UN:C simulator for this combat options button:

Image: EHdJyX.jpg

This button allows instant redraw of battlefield, no matter if you changed options or not (escape key also works when in options screen). Is it possible to find such thing?
(This post was last modified: 29.10.2014 20:41 by Valery.)
29.10.2014 20:23
Find all posts by this user Quote this message in a reply
Berserker Offline
Administrators

Posts: 16449
Post: #7

Probably, but I'm totally inactive on h3 field in the near future.


Скачать Герои 3 Эра и всё, что с ней связано / ERA 2.46f для старых модов
Поддержать проект
30.10.2014 14:58
Find all posts by this user Quote this message in a reply
« Next Oldest | Next Newest »
Post Reply 


Forum Jump:

Powered by MyBB Copyright © 2002-2024 MyBB Group