XEPOMAHT, Berserker, вы совершенно правы, всё заработало, спасибо большое за помощь! Только я поместил файл Crepfix.bin в WoG\EraPlugins\BeforeWoG, так же всё работает.
Aln, а Вам за упорство и труд!
I have a request that I cannot solve. Maybe someone has the time to help.
So currently a lot of people playing the combination with Advanced Classes and Third Upgrade (TU) Mod, which is nice, because these two huge mods add so much content to H3 that people are happy.
ACM changes the casts of the commanders, I use this command I found in UN:C help:
and this works well and easily.
Now the problem when people also use TU mod which includes Typhon this code stops to work and the casts are reverted back to what Typhon dictates, which are the original WoG casts. I tried several things like setting the casts fro creatures with BM or other tricks but I have no success. It seems like Typhon always maintains its casts for the commander.
Currently, the only solution I have, is to hand out a second version of TU mod which is specifically adjusted to ACM, that ofc is a very bad solution because 95% of people will just miss that or ignore it.
Does anybody have a better idea?
Thanks in advance

No success, I think Typhon does something to the commander's structure or just overrides any other erm command.
But I can only guess

PerryR, I looked at WoG code. Place spell changing code in !?BF or a bit later.
(30.05.2020 16:34)Berserker Wrote: [ -> ]PerryR, I looked at WoG code. Place spell changing code in !?BF or a bit later.
Unfortunately nope, as soon as you use Typhon the commander will cast what is set as a spell in Typhon creature editor and ignore
!!UN:C7783329.....
PerryR, is "stronger commanders" script disabled?
It's strange indeed. Seems like MoP ignores spell field in battle stack structure.
Херомант, ты не в курсе, МоР игнорирует тип заклинания для колдовства в структуре монстра? Если да, то где код в Тифоне, отвечающий за установку заклинания для отряда?
(30.05.2020 18:11)Berserker Wrote: [ -> ]ты не в курсе, МоР игнорирует тип заклинания для колдовства в структуре монстра?
В структуре монстра - постфактум. Т.е. можно только проверять, устанавливать бессмысленно.
(30.05.2020 18:11)Berserker Wrote: [ -> ]Если да, то где код в Тифоне, отвечающий за установку заклинания для отряда?
proc Properties5_2
xor edx,edx
cmp dword [eax+4Ch], 1
setg dl
imul ecx, [eax+34h], sizeof._Creature_
push dword [ecx+edx*4+MonTable+_Creature_.Название_ед_ч]
movzx ecx, byte [edi+Spells_Table]
imul ecx, 88h
push dword [ecx+7BD2D0h]
mov edx, [6A5DC4h]
mov eax, [edx+20h]
push dword [eax+70h]
push 697428h
mov eax, 6179DEh
call eax
add esp, 10h
push 492E3Bh
ret
endp
proc Spells
mov eax, [esi+34h]
cmp eax, 0AEh
jl .L004483C4
cmp eax, 0BFh
jg .L004483C4
push esi
mov eax, 76BEEAh
call eax
pop ecx
push eax
push 2
push -1
push 1
push dword [ebp+08h]
mov eax, [esi+34h]
movzx eax, byte [eax+Spells_Table]
push eax
push 4483D2h
ret
.L004483C4:
mov eax,[ebp+08h]
push 6
push 2
push -1
mov ecx, [esi+34h]
push 1
push eax
movzx eax, byte [ecx+Spells_Table]
push eax
push 4483D2h
ret
endp
proc Spells2
push 1 edi eax
mov eax, [esi+34h]
movzx eax, byte [eax+Spells_Table]
push eax
push 4476CEh
ret
endp
proc Spells3
mov eax,[ebp-0Ch]
mov bl, byte [eax+Spells_Table]
test bl,bl
jnz @f
push 75D112h
ret
@@:
push 75D0FBh
ret
endp
proc Spells4
.if [eax + Структура_стека.Тип_существа] = 53
push eax
mov ecx, SPL_Огненный_Шар
mov edx, SPL_Метеоритный_Дождь
mov eax, 50C7C0h
call eax
mov edx, eax
pop eax
mov dword [eax + Структура_стека.Текущее_заклинание], edx
.else
mov edx,[ebp+20h]
movzx ecx, byte [edx+Spells_Table]
mov dword [eax + Структура_стека.Текущее_заклинание], ecx
.endif
push 75CDECh
ret
endp
XEPOMAHT, спасибо! Не ясно, почему нужна отдельная таблица, если поле и так есть в структуре монстра.
(31.05.2020 04:12)Berserker Wrote: [ -> ]Не ясно, почему нужна отдельная таблица, если поле и так есть в структуре монстра.
Оно вроде как нужно для работы ИИ, так же точно как значения удачи/морали в структуре монстра, которыми реальную мораль/удачу не поменять.
Думаю, для решения вопроса Perry_R достаточно будет добавить экспортируемые функции, возвращающие адреса таблиц. Для начала — таблицы Spells_Table.
GetSpellsTable: pointer to array of byte
(31.05.2020 16:12)Berserker Wrote: [ -> ]Думаю, для решения вопроса Perry_R достаточно будет добавить экспортируемые функции, возвращающие адреса таблиц.
Ну если это дело всё равно будет использоваться только в ERM, то проще и удобнее добавить в Тифон ERM-команду, дающую доступ скриптёру ко всем тифоновским таблицам, без использования UN:C.
XEPOMAHT, с чего бы это? Наоборот, подобный функционал нужен и для компилируемых плагинов и для Lua. Откуда ещё брать адреса новых таблиц? ) Попробую сделать.