| Aln   
 Posts: 15
 
 | 
			| 
 
				XEPOMAHT, Berserker, вы совершенно правы, всё заработало, спасибо большое за помощь! Только я поместил файл Crepfix.bin в WoG\EraPlugins\BeforeWoG, так же всё работает.
			 |  | 
	| 16.05.2020 00:54 |  | 
	
		| Berserker   
   
   Posts: 16785
 
 |  | 
	| 16.05.2020 02:19 |  | 
	
		| PerryR   
 Posts: 460
 
 | 
			| 
 
				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   
				
(This post was last modified: 30.05.2020 12:31 by PerryR.)
 |  | 
	| 30.05.2020 12:29 |  | 
	
		| daemon_n   
   
   Posts: 4366
 
 |  | 
	| 30.05.2020 15:36 |  | 
	
		| PerryR   
 Posts: 460
 
 | 
			| 
 
				No success, I think Typhon does something to the commander's structure or just overrides any other erm command. 
But I can only guess   
				
(This post was last modified: 30.05.2020 15:50 by PerryR.)
 |  | 
	| 30.05.2020 15:49 |  | 
	
		| Berserker   
   
   Posts: 16785
 
 |  | 
	| 30.05.2020 16:34 |  | 
	
		| PerryR   
 Posts: 460
 
 | 
			| 
 
				 (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.....
			 |  | 
	| 30.05.2020 17:12 |  | 
	
		| daemon_n   
   
   Posts: 4366
 
 |  | 
	| 30.05.2020 17:56 |  | 
	
		| Berserker   
   
   Posts: 16785
 
 |  | 
	| 30.05.2020 18:11 |  | 
	
		| XEPOMAHT   
   
   Posts: 2481
 
 | 
			| 
 
				 (30.05.2020 18:11)Berserker Wrote:  ты не в курсе, МоР игнорирует тип заклинания для колдовства в структуре монстра? 
В структуре монстра - постфактум. Т.е. можно только проверять, устанавливать бессмысленно.
  (30.05.2020 18:11)Berserker Wrote:  Если да, то где код в Тифоне, отвечающий за установку заклинания для отряда? 
proc Properties5_2xor 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
 
				
(This post was last modified: 31.05.2020 00:59 by XEPOMAHT.)
 |  | 
	| 31.05.2020 00:53 |  | 
	
		| Berserker   
   
   Posts: 16785
 
 |  | 
	| 31.05.2020 04:12 |  | 
	
		| Berserker   
   
   Posts: 16785
 
 |  | 
	| 31.05.2020 16:12 |  | 
	
		| Berserker   
   
   Posts: 16785
 
 |  | 
	| 31.05.2020 18:26 |  |