Current time: 29.04.2024, 23:21 Hello There, Guest! (LoginRegister)
Language: english | russian  

Post Reply 
Threaded Mode | Linear Mode
Ваши вопросы по ERM-скриптам
Author Message
fatsawhorse Offline

Posts: 1013
Post: #3001

Quote:1. Можно ли так записать !!BU&y4=156: .... и т. д. ?
2. Правильно ли записано это D160?y3 ?
1. Можно.
2. Нет. Должно быть D160/?y3

"Algor" спасибо Вам...
(This post was last modified: 26.10.2014 21:32 by fatsawhorse.)
26.10.2014 21:32
Find all posts by this user Quote this message in a reply
Shiva Offline

Posts: 122
Post: #3002

Как сделать пустой Erm артефакт со свойством 25%, 50% или 100% сопротивление магии.
27.10.2014 19:43
Find all posts by this user Quote this message in a reply
gamecreator Offline

Posts: 7107
Post: #3003

В триггере MR1 проверяешь надет ли на героя артефакт. Если надет, то отнимаешь (с помощью рисивера MR) от вычисленного урона 25% базового (следишь чтобы не стало меньше нуля).


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

Posts: 2196
Post: #3004

Does anyone know how to change battlefield picture during battle, if battleground is regular?

I have the following issues:

1) If during battle I change background with BA:B^file.pcx^, from regular battleground, it does not work
2) If at battle start, battleground was set to custom, we can change battlegrounds as many as we want, any battle round.

I am confused.
(This post was last modified: 28.10.2014 10:50 by Valery.)
28.10.2014 10:47
Find all posts by this user Quote this message in a reply
gamecreator Offline

Posts: 7107
Post: #3005

This is because of how WoG battlefield changing works. It hooks into SoD battle code, and either just calls default function (if you do BA:B-1) or chooses from several standard and one custom positions. Because there is only one custom position, every new custom battlefield is set into the same variable, so changes are applied instantly. BTW this way the battlefiend name can't be longer than 255 characters.
To make this work, you have to emulate battle code: either call WoG hook 0x761B8A (cdecl, no args) to obtain the standard memory address after BA:B or allocate Era string instead and get its memory address, then assign this memory address to [[0x699420]+0x13464].
I believe it would look like this:


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

Posts: 2196
Post: #3006

Thanks you very much, you solved a big issue. 132

I created a topic in english forums about the mod I am currently working on, as it raised some unexpected issues.
28.10.2014 16:34
Find all posts by this user Quote this message in a reply
Berserker Offline
Administrators

Posts: 16500
Post: #3007

The second way in unsafe, nope? SN:M will be deallocated on other map/game start/load.


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

Posts: 7107
Post: #3008

Berserker, сохраняться и загружаться посреди боя нельзя. А какие могут быть баттлфилды вне боя?
Просто первый вариант работает ещё и для числовых обозначений полей.


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

Posts: 2196
Post: #3009

Looks like a special check/update is processed when:

-you open combat options (click on button is sufficient)
-select a spell in magic book (no need to cast)
-move/attack with creature (or maybe is triggered by next creature moving, hard to check, is going fast)

I tried all other buttons/actions, only those three options trigger battlefield redraw.
(This post was last modified: 28.10.2014 20:13 by Valery.)
28.10.2014 20:12
Find all posts by this user Quote this message in a reply
igrik Offline
Administrators

Posts: 2814
Post: #3010

а если попробовать обновить окно боя через эту функцию
только вот как узнать необходимые параметры для выполнения функции 105
upd:


game bug fixes extended.dll || My Plugins || My GitHub
28.10.2014 21:34
Visit this user's website Find all posts by this user Quote this message in a reply
gamecreator Offline

Posts: 7107
Post: #3011

(28.10.2014 21:34)igrik Wrote:  только вот как узнать необходимые параметры для выполнения функции 105
Как-как: взять да и посмотреть в дизасме.
Чаще всего a2 = -1 и item = 0. Значит так и надо вызывать, а не какая-то магия у тебя в ЕРМ коде.
Вот и всё, не надо ничего мудрить.


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

Posts: 2814
Post: #3012

хорошо, я понял.
Тогда встречный вопрос: возможно ли узнать номер заданного артефакта (int a2), в случае, если мне его нужно проверить а не получить?
в !!SN:E5084256/2/v2/129; , где: v2 - ссфлка на героя; 129 - номер арта. Могу ли я узнать как-то этот номер арта?
0x004D9460 (5084256d) char __thiscall HeroHasArt(_Hero_ *this, int a2)


game bug fixes extended.dll || My Plugins || My GitHub
28.10.2014 23:04
Visit this user's website Find all posts by this user Quote this message in a reply
gamecreator Offline

Posts: 7107
Post: #3013

Что значит узнать? Это функция проверочная. Возвращает true если арт у героя есть и false - если нет.


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

Posts: 2814
Post: #3014

то что проверочная я знаю. И знаю что во флаг v1 заносится результат проверки. Но вопрос тот же: могу ли я через ERM узнать номер проверяемого арта или нет.


game bug fixes extended.dll || My Plugins || My GitHub
28.10.2014 23:15
Visit this user's website Find all posts by this user Quote this message in a reply
gamecreator Offline

Posts: 7107
Post: #3015

А ты в функции этой что-то перехватываешь? Потому что за пределами функции номер этот не существует.


When all gods have burnt to ashes in eternity of sorrow,
Demons gonna tear your soul because there is no tomorrow.
28.10.2014 23:24
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