Wake of Gods Forum | Форум Во Имя Богов

Full Version: Typhon v. 2.9
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
Compatibility with Typhon may be broken sooner or later, right. Currently most mods work. In case of extending monsters table in Era in the future, mod conversion will be possible, I hope.
Berserker, это стол заказов?Yes

Тогда просим (просим-просим-просим) расширенные таблицы монстров, ВН, заклинаний, героев, артефактов, зданий, городов, объектов, событий... (Click to View)
(16.03.2020 14:23)daemon_n Wrote: [ -> ]расширенные таблицы монстров, ВН, заклинаний, героев, зданий, городов, объектов, событий...

Для этого вроде как бы уже есть ERA PLUS Master of Puppets, где это всё уже давно есть (правда и особой популярности не сыскало, поэтому смысла добавлять расширенные таблицы монстров в саму ЭРУ нет - пара человек поиграется с перекрашенными монстрами и будет всё на этом).
XEPOMAHT, к сожалению, у MoP нет поддержки HD mod. В бою непривычно отсутствие возможности просмотреть, как далеко ходят юниты с препятствиями и без.

Но для Эры я такое (таблицы) считаю полезным, поскольку это делает её универсальным модостроительным инструментом. Так сказать, мультитулYes
Нашёл причину загрузки файлов вроде scrip92.erm: Typhon. Публикую патч, который войдёт в обновление TyphonZ.
Вместо хука на MapInstructions подписка на событие OnBeforeErmInstructions

Code:
diff --git a/Typhon/Data.asm b/Typhon/Data.asm
index f99b866..2c89942 100644
--- a/Typhon/Data.asm
+++ b/Typhon/Data.asm
@@ -11,8 +11,8 @@ match =FALSE, COPYMODE
Table_Hooks:
       Hook 4EDE90h, LoadCreatures,          TCall; загрузка параметров существ
       Hook 4EDE90h, LoadCreatures,          TCall; загрузка параметров существ
+      Hook 4FDF5Bh, SetupRandomDwellings,   TCall; перед настройкой случайных жилищ
       Hook 4FDF5Bh, SetupRandomDwellings,      TCall; перед настройкой случайных жилищ
-      Hook 74C7DDh, MapInstruction,          TCall; инструкция карты
       Hook 760F07h, SaveParam,              TJump; сохранение данных
       Hook 7614B3h, LoadParam,              TJump; загрузка данных
       Hook 5410FDh, MonsterRandomGeneration,      TJump; запрет из таблицы запрета
diff --git a/Typhon/Functions.asm b/Typhon/Functions.asm
index e13d02a..b5535bb 100644
--- a/Typhon/Functions.asm
+++ b/Typhon/Functions.asm
@@ -498,12 +498,7 @@ L006369BB:
        retn
endp

-proc MapInstruction
-; выполнение затёртого кода
-       push 1
-       mov eax, 72C8B1h
-       call eax
-       pop ecx
+proc OnBeforeErmInstructions uses esi edi ebx, Event
; 6977e8 - адрес оригинальной структуры дерева построек (8*44*9)
        stdcall LoadFile, TownsSetup_mop
        xchg ebx, eax
diff --git a/Typhon/Typhon.asm b/Typhon/Typhon.asm
index b59e894..261f524 100644
--- a/Typhon/Typhon.asm
+++ b/Typhon/Typhon.asm
@@ -215,10 +215,11 @@ section '.code' code readable executable

rd 500; для антивирусов

-_OnAfterWoG           db 'OnAfterWoG', 0
-_OnCustomDialogEvent  db 'OnCustomDialogEvent', 0
-_OnBeforeBattleAction db 'OnBeforeBattleAction', 0
-_OnAfterBattleAction  db 'OnAfterBattleAction', 0
+_OnAfterWoG              db 'OnAfterWoG', 0
+_OnCustomDialogEvent     db 'OnCustomDialogEvent', 0
+_OnBeforeBattleAction    db 'OnBeforeBattleAction', 0
+_OnAfterBattleAction     db 'OnAfterBattleAction', 0
+_OnBeforeErmInstructions db 'OnBeforeErmInstructions', 0

DLL_PROCESS_ATTACH = 1

@@ -228,10 +229,11 @@ proc TYPHON, hDll, Reason, Reserved
   ; только при подключении dll к процессу, не к потокам
   .if dword [Reason] = DLL_PROCESS_ATTACH
     ; регистрируем обработчики событий
-    stdcall [RegisterHandler], OnAfterWoG,           _OnAfterWoG
-    stdcall [RegisterHandler], OnCustomDialogEvent,  _OnCustomDialogEvent
-    stdcall [RegisterHandler], OnBeforeBattleAction, _OnBeforeBattleAction
-    stdcall [RegisterHandler], OnAfterBattleAction,  _OnAfterBattleAction
+    stdcall [RegisterHandler], OnAfterWoG,              _OnAfterWoG
+    stdcall [RegisterHandler], OnCustomDialogEvent,     _OnCustomDialogEvent
+    stdcall [RegisterHandler], OnBeforeBattleAction,    _OnBeforeBattleAction
+    stdcall [RegisterHandler], OnAfterBattleAction,     _OnAfterBattleAction
+    stdcall [RegisterHandler], OnBeforeErmInstructions, _OnBeforeErmInstructions
    
     mov dword [761381h], 39859587; Заглушить вог-функцию ResetMonTable,
     mov dword [761385h], 3271623302; мешающую редактору существ
Скачать TyphonZ 2.7.2 для ЭРЫ 2.9+
Исходники
Обновление в виде готового мода исправляет баг загрузки скриптов script00.erm..script99.erm кодом WoG.
Пользователям рекомендуется заменить у себя файл typhonz.era
Berserker, Should I also update Typhon? What files should I replace so I don't have to transfer all the content I made?
Replace typhonz.era only. And please report any issues.
I'll inform you of any problem or bugs, but if there is a side effect I'll have to postpone the release of Third Upgrades or release that update with the previous core to avoid much bigger problems.
I didn't check if MoP's code is executed, but if you start mod and everything works, then it should be ok.
I've given up so I need help please, I can't get external dwellings to be generated freely on a random map. I wrote the whole line correctly in zobjct, zaobjct and zeobjct, also in dwtable.txt, everything is correct because it works in map editor, but for some reason it does not generate in rmg. 112
V_Maiko, did you add value of the object? I wanna say, that all wog objects are note placed on the map - they are replace original ones with wogify script.
daemon_n, According to MOP, It's supposed to be generated freely in rmg, no need to replace anything or use scripts since Typhon's core allows you that possibility
Has anyone else besides me checked to see if type 17 dwellings are generated in RMG with Typhon? I hope I'm not the only one because I'm really stuck and can't progress any further because Dwellings with Typhon are not generated in RMG, however adding with Map Editor works fine. I wish MOP was here to help me 112 ...
V_Maiko, nope, sorry.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
Reference URL's