Current time: 22.04.2024, 15:19 Hello There, Guest! (LoginRegister)
Language: english | russian  

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

Posts: 7107
Post: #2941

Я написал на предыдущей странице адреса. В этих трёх местах вызывается функция отображения окна 0x5FFA20, для трёх возможных вариантов предлагаемых навыков. Через стек она принимает один аргумент.


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

Posts: 2814
Post: #2942

я не совсем понял про SN:0 . просто с хуками по этим трем адресам я разобрался (и в том, почему три адреса), но вот как отменить диалог я недогоняю. я уже и нопами пытался заменить вызов по данным адресам. и в иде смотрел. но туго слишком без навыков программирования


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

Posts: 7107
Post: #2943

Мало заменить вызов, нужно ещё и заменить все инструкции push, которые передают аргументы через стек (одна для этой функции). Да и ещё нужно бы что-то вместо возвращаемого результата подкинуть чтобы геройский код с ума не сходил.


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

Posts: 16488
Post: #2944

igrik, найди команду, вталкивающую самый первый аргументв стек, например:

100: push 1 <=
104: push 2
108: call [show dialog]
113: lea ecx, [edx]

Хук ставишь в 100. В обработчике хука:


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

Posts: 2814
Post: #2945

Code:
.text:004DAE48                     push edx
.text:004DAE49                     push ecx
.text:004DAE4A                     push ebx
.text:004DAE4B                     lea ecx, [ebp+var_F8]                   ; Load Effective Address
.text:004DAE51                     call Dlg_HeroLvlUp                      ; Call Procedure
.text:004DAE56                     mov ecx, Main_Structure                 ; MainStructPo
.text:004DAE5C                     mov [ebp+var_4], 2
.text:004DAE63                     call MoreThanOneHumanPlayer             ; Call Procedure
.text:004DAE68                     test al, al                             ; Logical Compare
.text:004DAE6A                     jz  short loc_004DAE84                  ; Jump if Zero (ZF=1)
.text:004DAE6C                     mov ecx, offset MPTimeStructure         ; timer
.text:004DAE71                     call IsPlayerTimeExpired                ; Call Procedure
.text:004DAE76                     test al, al                             ; Logical Compare
.text:004DAE78                     jz  short loc_004DAE84                  ; Jump if Zero (ZF=1)
.text:004DAE7A                     mov dword_006977D4, 15000
.text:004DAE84
.text:004DAE84 loc_004DAE84:                                               ; CODE XREF: Hero_CheckLevelUps+4DAj
.text:004DAE84                                                             ; Hero_CheckLevelUps+4E8j
.text:004DAE84                     push 0                                  ; a2
.text:004DAE86                     lea ecx, [ebp+var_F8]                   ; dlg
.text:004DAE8C                     call Dlg_ShowAndRun                     ; Call Procedure
.text:004DAE91                     lea ecx, [ebp+var_F8]

может нужно ставить хук и в "004DAE84 push 0" и в "004DAE48 push edx"?

upd: вылет только на !!UN:Cy4/4/[адрес]; y4 = 32, т.е y3 = 0 и не содержит адресс, а затертые команды по моему всё-равно выполняются


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

Posts: 7107
Post: #2946

У тебя адреса какие-то странные. Переводи их калькулятором что ли. И попробуй получить адрес структуры не в y3, а, скажем, в v2.


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

Posts: 2814
Post: #2947

Да другие адреса это последствия моих экспериментов. Пробовал с v-переменными - то же...


game bug fixes extended.dll || My Plugins || My GitHub
07.10.2014 22:51
Visit this user's website Find all posts by this user Quote this message in a reply
Berserker Offline
Administrators

Posts: 16488
Post: #2948

Код, начиная с SN:X должен вызываться из функции-обработчика Ab


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

Posts: 2814
Post: #2949

Ура! Получилось Sm


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

Posts: 7107
Post: #2950

и что, никаких лишних навыков не прибавляется?


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

Posts: 2814
Post: #2951

Quote:и что, никаких лишних навыков не прибавляется?
нет. И повышалка у AI в другом месте. Т.е. у игрока-человека втор навыки никакие другие не прибавляютя, что есть гудд ибо можно в ручную настроить получение, а у компа всё стандартно.
gamecreator, а точнее по поводу таблицы -> см.формат SS


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

Posts: 7107
Post: #2952

А что тут можно точнее? Всё уже сказано. 4 строки на навык, а навыки расположены в том порядке, в котором они в формате SS. Я не пойму что тут непонятно.


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

Posts: 2196
Post: #2953

105

Trying to make dispel work on any single stack (friends/enemy) when hero has no water skill. I find no way to do that.

I tried any of the following combinations, nothing works, it still targets only friendly stacks. Do I miss something obvious or?

(This post was last modified: 08.10.2014 08:55 by Valery.)
08.10.2014 08:50
Find all posts by this user Quote this message in a reply
Berserker Offline
Administrators

Posts: 16488
Post: #2954

No ERM help at work. Hard to say, but teleport can be casted on enemy stacks.


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

Posts: 2196
Post: #2955

Sure, as well as damage spells on own units (lightning, ice bolt, blind ans so on). But only dispel looks like is broken or so deeply hardcoded that erm has no effect on it. I checked all flags it has, and it displays only 64 and 262144 (mass version at expert level, and AI spell). That's all. Removing them has no effect, adding most of others neither.
08.10.2014 13:49
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