Heroes of Might and Magic Community
visiting hero! Register | Today's Posts | Games | Search! | FAQ/Rules | AvatarList | MemberList | Profile


Age of Heroes Headlines:  
5 Oct 2016: Heroes VII development comes to an end.. - read more
6 Aug 2016: Troubled Heroes VII Expansion Release - read more
26 Apr 2016: Heroes VII XPack - Trial by Fire - Coming out in June! - read more
17 Apr 2016: Global Alternative Creatures MOD for H7 after 1.8 Patch! - read more
7 Mar 2016: Romero launches a Piano Sonata Album Kickstarter! - read more
19 Feb 2016: Heroes 5.5 RC6, Heroes VII patch 1.7 are out! - read more
13 Jan 2016: Horn of the Abyss 1.4 Available for Download! - read more
17 Dec 2015: Heroes 5.5 update, 1.6 out for H7 - read more
23 Nov 2015: H7 1.4 & 1.5 patches Released - read more
31 Oct 2015: First H7 patches are out, End of DoC development - read more
5 Oct 2016: Heroes VII development comes to an end.. - read more
[X] Remove Ads
LOGIN:     Username:     Password:         [ Register ]
New Server | HOMM1: info forum | HOMM2: info forum | HOMM3: info forum | HOMM4: info forum | HOMM5: info forum | MMH6: wiki forum | MMH7: wiki forum
Heroes Community > Heroes 3.5 - WoG and Beyond > Thread: How to edit HotA?
Thread: How to edit HotA? This thread is 32 pages long: 1 2 3 4 5 ... 10 20 ... 28 29 30 31 32 · «PREV / NEXT»
RoseKavalier
RoseKavalier


Honorable
Famous Hero
posted October 15, 2017 05:59 PM

Ben80 said:
RoseKavalier said:
I ran through 0x43B2E0 quickly (different function came after) and it gave me &(0x63B7D8) for ECX which is referenced a few times in the code, e.g. 0x436885.
Not something I've seen before.


How it can be ?

.text:0043B2F4                     mov cl, ds:byte_0043B4F4[eax]
.text:0043B2FA                     jmp ds: off_0043B458[ecx*4]              

this strings say that in ECX - surely not &(0x63B7D8)...
From which string in 0x43B2E0 ECX becomes &(0x63B7D8) ?


That's simply a switch() {} that loads the function to call to EAX, it does not call here, just returns lead to correct logic.

If you go back to 0x43A599 (one of the calls to 0x43B2E0) you can see
0x43A5A7 MOV DWORD PTR SS:[EBP-14],EAX
and a bit later...
0x43A659 MOV ECX,DWORD PTR SS:[EBP-8]
0x43A65D CALL DWORD PTR SS:[EBP-14] << your function(s)
____________
My Let's Plays: Metataxer's Revenge - The Empire of The World 2

 Send Instant Message | Send E-Mail | View Profile | PP | Quote Reply | Link
Ben80
Ben80


Hired Hero
posted October 15, 2017 06:47 PM

Thank you !
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Maurice
Maurice

Hero of Order
Part of the furniture
posted October 15, 2017 07:08 PM
Edited by Maurice at 19:15, 15 Oct 2017.

RoseKavalier said:
That's simply a switch() {} that loads the function to call to EAX, it does not call here, just returns lead to correct logic.


That's incorrect. EAX gets filled just before that, and is used as an offset to find the correct value to return to CL:

.text:0043B2E3                 mov     eax, [ebp+arg_0]
.text:0043B2E6                 add     eax, 0FFFFFFF1h
.text:0043B2E9                 cmp     eax, 3Ch
.text:0043B2EC                 ja      loc_43B44E
.text:0043B2F2                 xor     ecx, ecx
.text:0043B2F4                 mov     cl, ds:byte_43B4F4[eax]
.text:0043B2FA                 jmp     ds: off_43B458[ecx*4]

The first statement reads EAX from the stack, then it gets manipulated in the two statements that follow it. After the jump condition check, ECX is first emptied and then EAX is used to find the correct value from the jumptable, which starts off at the byte located at address 43B4F4. That value is returned into CL, which is the lower register of CX, which in turn is the lower register of ECX.

The jump table itself is as follows (note that the 90 value at the end are filler bytes):

00 00 00 00 26 26 26 26 26 26
26 26 01 02 03 04 05 06 07 08
09 0A 0B 26 26 26 0C 0D 0E 0F
10 11 12 13 14 15 16 17 18 19
1A 1B 00 1C 1D 1E 1F 20 26 26
21 26 26 26 26 26 22 23 24 20
25 90 90 90 90 90 90 90 90 90
90 90 90 90 90

The value of ECX is then used to find a value for a second jump table, based on the number found in the table above, which looks like this:

.text:0043B458 off_43B458      dd offset loc_43B37F
.text:0043B45C                 dd offset loc_43B418
.text:0043B460                 dd offset loc_43B30A
.text:0043B464                 dd offset loc_43B3A3
.text:0043B468                 dd offset loc_43B3F4
.text:0043B46C                 dd offset loc_43B406
.text:0043B470                 dd offset loc_43B40F
.text:0043B474                 dd offset loc_43B3FD
.text:0043B478                 dd offset loc_43B313
.text:0043B47C                 dd offset loc_43B36D
.text:0043B480                 dd offset loc_43B31C
.text:0043B484                 dd offset loc_43B35B
.text:0043B488                 dd offset loc_43B32E
.text:0043B48C                 dd offset loc_43B364
.text:0043B490                 dd offset loc_43B340
.text:0043B494                 dd offset loc_43B3EB
.text:0043B498                 dd offset loc_43B445
.text:0043B49C                 dd offset loc_43B43C
.text:0043B4A0                 dd offset loc_43B376
.text:0043B4A4                 dd offset loc_43B3E2
.text:0043B4A8                 dd offset loc_43B3BE
.text:0043B4AC                 dd offset loc_43B42A
.text:0043B4B0                 dd offset loc_43B39A
.text:0043B4B4                 dd offset loc_43B3C7
.text:0043B4B8                 dd offset loc_43B433
.text:0043B4BC                 dd offset loc_43B3D0
.text:0043B4C0                 dd offset loc_43B421
.text:0043B4C4                 dd offset loc_43B3AC
.text:0043B4C8                 dd offset loc_43B352
.text:0043B4CC                 dd offset loc_43B325
.text:0043B4D0                 dd offset loc_43B3B5
.text:0043B4D4                 dd offset loc_43B391
.text:0043B4D8                 dd offset loc_43B337
.text:0043B4DC                 dd offset loc_43B349
.text:0043B4E0                 dd offset loc_43B3D9
.text:0043B4E4                 dd offset loc_43B44E
.text:0043B4E8                 dd offset loc_43B388
.text:0043B4EC                 dd offset loc_43B301
.text:0043B4F0                 dd offset loc_43B44E

The number found through translating the EAX value is then used to find the proper entry sequentially in this jump table.

Finally, each of those loc_ entries points to the final handler:

.text:0043B301 loc_43B301:                             ; DATA XREF: .text:0043B4ECo
.text:0043B301                 mov     eax, offset sub_437040
.text:0043B306                 pop     ebp
.text:0043B307                 retn    4
.text:0043B30A ; ---------------------------------------------------------------------------
.text:0043B30A
.text:0043B30A loc_43B30A:                             ; CODE XREF: sub_43B2E0+1Aj
.text:0043B30A                                         ; DATA XREF: .text:0043B460o
.text:0043B30A                 mov     eax, offset sub_438810
.text:0043B30F                 pop     ebp
.text:0043B310                 retn    4
.text:0043B313 ; ---------------------------------------------------------------------------
.text:0043B313
.text:0043B313 loc_43B313:                             ; CODE XREF: sub_43B2E0+1Aj
.text:0043B313                                         ; DATA XREF: .text:0043B478o
.text:0043B313                 mov     eax, offset sub_439990
.text:0043B318                 pop     ebp
.text:0043B319                 retn    4
.text:0043B31C ; ---------------------------------------------------------------------------
.text:0043B31C
.text:0043B31C loc_43B31C:                             ; CODE XREF: sub_43B2E0+1Aj
.text:0043B31C                                         ; DATA XREF: .text:0043B480o
.text:0043B31C                 mov     eax, offset sub_439A30
.text:0043B321                 pop     ebp
.text:0043B322                 retn    4
.text:0043B325 ; ---------------------------------------------------------------------------
.text:0043B325
.text:0043B325 loc_43B325:                             ; CODE XREF: sub_43B2E0+1Aj
.text:0043B325                                         ; DATA XREF: .text:0043B4CCo
.text:0043B325                 mov     eax, offset sub_43A050
.text:0043B32A                 pop     ebp
.text:0043B32B                 retn    4
.text:0043B32E ; ---------------------------------------------------------------------------
.text:0043B32E
.text:0043B32E loc_43B32E:                             ; CODE XREF: sub_43B2E0+1Aj
.text:0043B32E                                         ; DATA XREF: .text:0043B488o
.text:0043B32E                 mov     eax, offset sub_437080
.text:0043B333                 pop     ebp
.text:0043B334                 retn    4
.text:0043B337 ; ---------------------------------------------------------------------------
.text:0043B337
.text:0043B337 loc_43B337:                             ; CODE XREF: sub_43B2E0+1Aj
.text:0043B337                                         ; DATA XREF: .text:0043B4D8o
.text:0043B337                 mov     eax, offset sub_438D50
.text:0043B33C                 pop     ebp
.text:0043B33D                 retn    4
.text:0043B340 ; ---------------------------------------------------------------------------
.text:0043B340
.text:0043B340 loc_43B340:                             ; CODE XREF: sub_43B2E0+1Aj
.text:0043B340                                         ; DATA XREF: .text:0043B490o
.text:0043B340                 mov     eax, offset sub_437D50
.text:0043B345                 pop     ebp
.text:0043B346                 retn    4
.text:0043B349 ; ---------------------------------------------------------------------------
.text:0043B349
.text:0043B349 loc_43B349:                             ; CODE XREF: sub_43B2E0+1Aj
.text:0043B349                                         ; DATA XREF: .text:0043B4DCo
.text:0043B349                 mov     eax, offset sub_43AF30
.text:0043B34E                 pop     ebp
.text:0043B34F                 retn    4
.text:0043B352 ; ---------------------------------------------------------------------------
.text:0043B352
.text:0043B352 loc_43B352:                             ; CODE XREF: sub_43B2E0+1Aj
.text:0043B352                                         ; DATA XREF: .text:0043B4C8o
.text:0043B352                 mov     eax, offset sub_439AD0
.text:0043B357                 pop     ebp
.text:0043B358                 retn    4
.text:0043B35B ; ---------------------------------------------------------------------------
.text:0043B35B
.text:0043B35B loc_43B35B:                             ; CODE XREF: sub_43B2E0+1Aj
.text:0043B35B                                         ; DATA XREF: .text:0043B484o
.text:0043B35B                 mov     eax, offset sub_439880
.text:0043B360                 pop     ebp
.text:0043B361                 retn    4
.text:0043B364 ; ---------------------------------------------------------------------------
.text:0043B364
.text:0043B364 loc_43B364:                             ; CODE XREF: sub_43B2E0+1Aj
.text:0043B364                                         ; DATA XREF: .text:0043B48Co
.text:0043B364                 mov     eax, offset sub_43AFC0
.text:0043B369                 pop     ebp
.text:0043B36A                 retn    4
.text:0043B36D ; ---------------------------------------------------------------------------
.text:0043B36D
.text:0043B36D loc_43B36D:                             ; CODE XREF: sub_43B2E0+1Aj
.text:0043B36D                                         ; DATA XREF: .text:0043B47Co
.text:0043B36D                 mov     eax, offset sub_439810
.text:0043B372                 pop     ebp
.text:0043B373                 retn    4
.text:0043B376 ; ---------------------------------------------------------------------------
.text:0043B376
.text:0043B376 loc_43B376:                             ; CODE XREF: sub_43B2E0+1Aj
.text:0043B376                                         ; DATA XREF: .text:0043B4A0o
.text:0043B376                 mov     eax, offset sub_438A10
.text:0043B37B                 pop     ebp
.text:0043B37C                 retn    4
.text:0043B37F ; ---------------------------------------------------------------------------
.text:0043B37F
.text:0043B37F loc_43B37F:                             ; CODE XREF: sub_43B2E0+1Aj
.text:0043B37F                                         ; DATA XREF: .text: off_43B458o
.text:0043B37F                 mov     eax, offset sub_436BB0
.text:0043B384                 pop     ebp
.text:0043B385                 retn    4
.text:0043B388 ; ---------------------------------------------------------------------------
.text:0043B388
.text:0043B388 loc_43B388:                             ; CODE XREF: sub_43B2E0+1Aj
.text:0043B388                                         ; DATA XREF: .text:0043B4E8o
.text:0043B388                 mov     eax, offset sub_438660
.text:0043B38D                 pop     ebp
.text:0043B38E                 retn    4
.text:0043B391 ; ---------------------------------------------------------------------------
.text:0043B391
.text:0043B391 loc_43B391:                             ; CODE XREF: sub_43B2E0+1Aj
.text:0043B391                                         ; DATA XREF: .text:0043B4D4o
.text:0043B391                 mov     eax, offset sub_43B150
.text:0043B396                 pop     ebp
.text:0043B397                 retn    4
.text:0043B39A ; ---------------------------------------------------------------------------
.text:0043B39A
.text:0043B39A loc_43B39A:                             ; CODE XREF: sub_43B2E0+1Aj
.text:0043B39A                                         ; DATA XREF: .text:0043B4B0o
.text:0043B39A                 mov     eax, offset sub_4380E0
.text:0043B39F                 pop     ebp
.text:0043B3A0                 retn    4
.text:0043B3A3 ; ---------------------------------------------------------------------------
.text:0043B3A3
.text:0043B3A3 loc_43B3A3:                             ; CODE XREF: sub_43B2E0+1Aj
.text:0043B3A3                                         ; DATA XREF: .text:0043B464o
.text:0043B3A3                 mov     eax, offset sub_439D60
.text:0043B3A8                 pop     ebp
.text:0043B3A9                 retn    4
.text:0043B3AC ; ---------------------------------------------------------------------------
.text:0043B3AC
.text:0043B3AC loc_43B3AC:                             ; CODE XREF: sub_43B2E0+1Aj
.text:0043B3AC                                         ; DATA XREF: .text:0043B4C4o
.text:0043B3AC                 mov     eax, offset sub_437220
.text:0043B3B1                 pop     ebp
.text:0043B3B2                 retn    4
.text:0043B3B5 ; ---------------------------------------------------------------------------
.text:0043B3B5
.text:0043B3B5 loc_43B3B5:                             ; CODE XREF: sub_43B2E0+1Aj
.text:0043B3B5                                         ; DATA XREF: .text:0043B4D0o
.text:0043B3B5                 mov     eax, offset sub_43A150
.text:0043B3BA                 pop     ebp
.text:0043B3BB                 retn    4
.text:0043B3BE ; ---------------------------------------------------------------------------
.text:0043B3BE
.text:0043B3BE loc_43B3BE:                             ; CODE XREF: sub_43B2E0+1Aj
.text:0043B3BE                                         ; DATA XREF: .text:0043B4A8o
.text:0043B3BE                 mov     eax, offset sub_437DC0
.text:0043B3C3                 pop     ebp
.text:0043B3C4                 retn    4
.text:0043B3C7 ; ---------------------------------------------------------------------------
.text:0043B3C7
.text:0043B3C7 loc_43B3C7:                             ; CODE XREF: sub_43B2E0+1Aj
.text:0043B3C7                                         ; DATA XREF: .text:0043B4B4o
.text:0043B3C7                 mov     eax, offset sub_438BB0
.text:0043B3CC                 pop     ebp
.text:0043B3CD                 retn    4
.text:0043B3D0 ; ---------------------------------------------------------------------------
.text:0043B3D0
.text:0043B3D0 loc_43B3D0:                             ; CODE XREF: sub_43B2E0+1Aj
.text:0043B3D0                                         ; DATA XREF: .text:0043B4BCo
.text:0043B3D0                 mov     eax, offset sub_438EC0
.text:0043B3D5                 pop     ebp
.text:0043B3D6                 retn    4
.text:0043B3D9 ; ---------------------------------------------------------------------------
.text:0043B3D9
.text:0043B3D9 loc_43B3D9:                             ; CODE XREF: sub_43B2E0+1Aj
.text:0043B3D9                                         ; DATA XREF: .text:0043B4E0o
.text:0043B3D9                 mov     eax, offset sub_439150
.text:0043B3DE                 pop     ebp
.text:0043B3DF                 retn    4
.text:0043B3E2 ; ---------------------------------------------------------------------------
.text:0043B3E2
.text:0043B3E2 loc_43B3E2:                             ; CODE XREF: sub_43B2E0+1Aj
.text:0043B3E2                                         ; DATA XREF: .text:0043B4A4o
.text:0043B3E2                 mov     eax, offset sub_438710
.text:0043B3E7                 pop     ebp
.text:0043B3E8                 retn    4
.text:0043B3EB ; ---------------------------------------------------------------------------
.text:0043B3EB
.text:0043B3EB loc_43B3EB:                             ; CODE XREF: sub_43B2E0+1Aj
.text:0043B3EB                                         ; DATA XREF: .text:0043B494o
.text:0043B3EB                 mov     eax, offset sub_4387A0
.text:0043B3F0                 pop     ebp
.text:0043B3F1                 retn    4
.text:0043B3F4 ; ---------------------------------------------------------------------------
.text:0043B3F4
.text:0043B3F4 loc_43B3F4:                             ; CODE XREF: sub_43B2E0+1Aj
.text:0043B3F4                                         ; DATA XREF: .text:0043B468o
.text:0043B3F4                 mov     eax, offset sub_4395F0
.text:0043B3F9                 pop     ebp
.text:0043B3FA                 retn    4
.text:0043B3FD ; ---------------------------------------------------------------------------
.text:0043B3FD
.text:0043B3FD loc_43B3FD:                             ; CODE XREF: sub_43B2E0+1Aj
.text:0043B3FD                                         ; DATA XREF: .text:0043B474o
.text:0043B3FD                 mov     eax, offset sub_439650
.text:0043B402                 pop     ebp
.text:0043B403                 retn    4
.text:0043B406 ; ---------------------------------------------------------------------------
.text:0043B406
.text:0043B406 loc_43B406:                             ; CODE XREF: sub_43B2E0+1Aj
.text:0043B406                                         ; DATA XREF: .text:0043B46Co
.text:0043B406                 mov     eax, offset sub_439620
.text:0043B40B                 pop     ebp
.text:0043B40C                 retn    4
.text:0043B40F ; ---------------------------------------------------------------------------
.text:0043B40F
.text:0043B40F loc_43B40F:                             ; CODE XREF: sub_43B2E0+1Aj
.text:0043B40F                                         ; DATA XREF: .text:0043B470o
.text:0043B40F                 mov     eax, offset sub_439690
.text:0043B414                 pop     ebp
.text:0043B415                 retn    4
.text:0043B418 ; ---------------------------------------------------------------------------
.text:0043B418
.text:0043B418 loc_43B418:                             ; CODE XREF: sub_43B2E0+1Aj
.text:0043B418                                         ; DATA XREF: .text:0043B45Co
.text:0043B418                 mov     eax, offset sub_4388B0
.text:0043B41D                 pop     ebp
.text:0043B41E                 retn    4
.text:0043B421 ; ---------------------------------------------------------------------------
.text:0043B421
.text:0043B421 loc_43B421:                             ; CODE XREF: sub_43B2E0+1Aj
.text:0043B421                                         ; DATA XREF: .text:0043B4C0o
.text:0043B421                 mov     eax, offset sub_438950
.text:0043B426                 pop     ebp
.text:0043B427                 retn    4
.text:0043B42A ; ---------------------------------------------------------------------------
.text:0043B42A
.text:0043B42A loc_43B42A:                             ; CODE XREF: sub_43B2E0+1Aj
.text:0043B42A                                         ; DATA XREF: .text:0043B4ACo
.text:0043B42A                 mov     eax, offset sub_437F10
.text:0043B42F                 pop     ebp
.text:0043B430                 retn    4
.text:0043B433 ; ---------------------------------------------------------------------------
.text:0043B433
.text:0043B433 loc_43B433:                             ; CODE XREF: sub_43B2E0+1Aj
.text:0043B433                                         ; DATA XREF: .text:0043B4B8o
.text:0043B433                 mov     eax, offset sub_439300
.text:0043B438                 pop     ebp
.text:0043B439                 retn    4
.text:0043B43C ; ---------------------------------------------------------------------------
.text:0043B43C
.text:0043B43C loc_43B43C:                             ; CODE XREF: sub_43B2E0+1Aj
.text:0043B43C                                         ; DATA XREF: .text:0043B49Co
.text:0043B43C                 mov     eax, offset sub_4389E0
.text:0043B441                 pop     ebp
.text:0043B442                 retn    4
.text:0043B445 ; ---------------------------------------------------------------------------
.text:0043B445
.text:0043B445 loc_43B445:                             ; CODE XREF: sub_43B2E0+1Aj
.text:0043B445                                         ; DATA XREF: .text:0043B498o
.text:0043B445                 mov     eax, offset sub_438B20
.text:0043B44A                 pop     ebp
.text:0043B44B                 retn    4
.text:0043B44E ; ---------------------------------------------------------------------------
.text:0043B44E
.text:0043B44E loc_43B44E:                             ; CODE XREF: sub_43B2E0+Cj
.text:0043B44E                                         ; sub_43B2E0+1Aj
.text:0043B44E                                         ; DATA XREF: ...
.text:0043B44E                 mov     eax, offset loc_43B2D0
.text:0043B453                 pop     ebp
.text:0043B454                 retn    4
.text:0043B454 sub_43B2E0      endp
.text:0043B454
.text:0043B454 ; ---------------------------------------------------------------------------


 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
RoseKavalier
RoseKavalier


Honorable
Famous Hero
posted October 15, 2017 07:16 PM

Maurice said:

That's incorrect. EAX gets filled just before that, and is used as an offset to find the correct value to return to CL:

.text:0043B2E3                 mov     eax, [ebp+arg_0]
.text:0043B2E6                 add     eax, 0FFFFFFF1h
.text:0043B2E9                 cmp     eax, 3Ch
.text:0043B2EC                 ja      loc_43B44E
.text:0043B2F2                 xor     ecx, ecx
.text:0043B2F4                 mov     cl, ds:byte_43B4F4[eax]
.text:0043B2FA                 jmp     ds: off_43B458[ecx*4]


This is how I understand it:


EAX is initially your switch(value), and then in the appropriate case: the appropriate address is loaded to EAX.

Everything before 0x43B301 is just manipulation, everything after is results.

? ?
____________
My Let's Plays: Metataxer's Revenge - The Empire of The World 2

 Send Instant Message | Send E-Mail | View Profile | PP | Quote Reply | Link
Ben80
Ben80


Hired Hero
posted October 15, 2017 07:28 PM

@Maurice,

but how in procedure sub_00438D50 is transmitted ECX with complex structure of variables, not just number from jump table ?
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Ben80
Ben80


Hired Hero
posted October 15, 2017 07:35 PM

@RosKavalier,

it seems ECX contains _Dlg_* Battle dialog.
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
RoseKavalier
RoseKavalier


Honorable
Famous Hero
posted October 15, 2017 08:35 PM

Serp said:
I would like to see plugins for:

1) be able to remove ballista and other war machines from heroes inventory. (especiall ballista sucks with blind)

2) Tell the stupid ballista and especially tower AI, to NOT attack blinded creatures, at least if there are unblinded creatures left... In my current fight there are 6 unblinded and one blinded creature, but my towers keep attacking the blinded one (sprites)...

3) First Aid -> tent can resurrect and heals more and has more hitpoints. At the moment I consider every magic hero with ressurection to be much stronger than any might hero, just because the might hero is loosing troops in every big fight, while the magic hero never looses troops.

4) More heavy change: Allow to switch between mass- and single spell. Especially "Dispel" you normally do not want to be casted at all units. Most of the time I would like to remove "AntiMagic" from a single unit.
If you have expert, you could cast a less effective spell at all units, or a good spell on one unit. Eg. haste gives +1 or +2 more speed when casting on a single unit, compared to cast it to all units.


1)there is a check at 0x4DE4A8 to see if artifact can be placed in backpack (that includes war machines). However if you override the result and place the artifact in backpack, it vanishes - so there's something else needed to do.

2) should be possible. Personally I don't like to make big changes to gameplay mechanics so I'm really not_motivated to search for this right now when there is much else to do

3) check Phoenix4ever's mod, I'm pretty sure he improved First Aid Tent healing. Use his addresses to get started

4) see 2)
____________
My Let's Plays: Metataxer's Revenge - The Empire of The World 2

 Send Instant Message | Send E-Mail | View Profile | PP | Quote Reply | Link
Maurice
Maurice

Hero of Order
Part of the furniture
posted October 15, 2017 08:46 PM
Edited by Maurice at 20:47, 15 Oct 2017.

RoseKavalier said:
EAX is initially your switch(value), and then in the appropriate case: the appropriate address is loaded to EAX.

Everything before 0x43B301 is just manipulation, everything after is results.

? ?


I think we have some miscommunication about which EAX we refer to . You use the one from the eventual procedure call, while I was referring to the initial one in the disassembly code.

I was referring to the EAX noted at 0043B2F4.

Ben80 said:
@Maurice,

but how in procedure sub_00438D50 is transmitted ECX with complex structure of variables, not just number from jump table ?


I checked the code and I have to admit my disassembly knowledge falls short.

As far as I can tell, looking at the start of that procedure:

.text:00438D50 var_28          = qword ptr -28h
.text:00438D50 var_18          = qword ptr -18h
.text:00438D50 var_10          = qword ptr -10h
.text:00438D50 var_8           = qword ptr -8
.text:00438D50 arg_0           = dword ptr  8
.text:00438D50 arg_8           = dword ptr  10h
.text:00438D50 arg_10          = dword ptr  18h
.text:00438D50 arg_14          = byte ptr  1Ch

... the value of ECX is held in var_28, as per the decompiled subroutine header:

int __userpurge sub_00438D50<eax>(int a1<ecx>, long double a2<st0>, int monster, int a4, int a5, int a6, int a7, char a8)

Unless I am missing something here. But like I said, my disassembly knowledge falls short here. It seems the value in ECX isn't purged between function calls, so it should contain whatever was put into it prior to the function call.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Salamandre
Salamandre


Admirable
Omnipresent Hero
Wog refugee
posted October 15, 2017 08:48 PM

So you guys are struggling to create Heroes 3.6 Wake of Hota?

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
phoenix4ever
phoenix4ever


Supreme Hero
Heroes is love, Heroes is life
posted October 15, 2017 10:05 PM
Edited by phoenix4ever at 22:10, 15 Oct 2017.

Serp said:

3) First Aid -> tent can resurrect and heals more and has more hitpoints. At the moment I consider every magic hero with ressurection to be much stronger than any might hero, just because the might hero is loosing troops in every big fight, while the magic hero never looses troops.


Hi Serp.
I can help you with making First Aid Tent heal more, I'm not at home right now so I can't remember exactly how to hex edit it, but I can post it tomorrow if you want.
I made First Aid heal 100 at basic, 175 at advanced and 250 hp at expert.
I also gave the tent 225 hp, but it can be made as tough as an Azure Dragon if you want. You can edit hp and defense simply by editing the text file crtraits.txt and the description of what first aid skill does in sstraits.txt.

I agree with most of your other points btw, except maybe resurrection for the first aid tent. I also hate when ballista/cannon shoots at blinded targets and that you can't buy a cannon if you already have a ballista etc.
It would also be nice if first aid tent would automatically heal highest tier stack.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
phoenix4ever
phoenix4ever


Supreme Hero
Heroes is love, Heroes is life
posted October 24, 2017 12:38 AM

Can anything be done to make Resurrection and Animate Dead less OP?
I already made Animate Dead cost the same mana as Resurrection and consider moving it to level 4.
But since the reviving becomes permanent these spells seems to be some of the only spells you cast when you have them, making combat a bit boring. I could of course just disable them from a map and remove the 3 heroes specialising in them, but I don't know if they could somehow become less OP?... If they somehow could work after a battle instead of in combat, that would be much more interesting I think.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Ben80
Ben80


Hired Hero
posted October 24, 2017 06:49 PM

@phoenix4ever

Yes, it is very usefull spell, but usually strong players in some hypothetical battle will use not only it. In some battle, possibly, it will not be used at all...
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
phoenix4ever
phoenix4ever


Supreme Hero
Heroes is love, Heroes is life
posted October 24, 2017 07:22 PM

Perhaps in multiplayer, but in singleplayer once the main hero has grown strong Resurrection/Animate Dead and an occasional Chain Lightning is all I seem to cast. Some spells never feels good to cast like Remove Obstacle, Fire Wall (except Luna) and Land Mine, I even buffed the last two.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Serp
Serp


Known Hero
posted October 25, 2017 01:09 AM

phoenix4ever said:
Can anything be done to make Resurrection and Animate Dead less OP?
I already made Animate Dead cost the same mana as Resurrection and consider moving it to level 4.
But since the reviving becomes permanent these spells seems to be some of the only spells you cast when you have them, making combat a bit boring. I could of course just disable them from a map and remove the 3 heroes specialising in them, but I don't know if they could somehow become less OP?... If they somehow could work after a battle instead of in combat, that would be much more interesting I think.


I like resurrection, but manly because it does mean you don't loose troops.So I like your idea, that troops are not resurrected within the fight, but after the figt (like necromancy).
@Alex/Ben/RoseKavalier:
Do you think this would be possible?

@phoenix4ever:
I can help to put plugins into dll form, but I can not do the hex code stuff and most of the time also not the Code style, like you saw in my previous posts here If it is something similuar to what I have aöready done with help, I can repeat it with other settings/skills of course, as long I know the hex values.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
RoseKavalier
RoseKavalier


Honorable
Famous Hero
posted October 25, 2017 01:45 AM

Probably, but implementation raises a lot of questions.

How do you handle various skill levels? How do you cast it and know you're done casting? What about stacks that died on top of each other? Those creatures done for? What about AI, how will AI use those spells?

Try to formulate a complete mechanism and then it can be discussed to see how it's possible and how to code it.
____________
My Let's Plays: Metataxer's Revenge - The Empire of The World 2

 Send Instant Message | Send E-Mail | View Profile | PP | Quote Reply | Link
Salamandre
Salamandre


Admirable
Omnipresent Hero
Wog refugee
posted October 25, 2017 07:59 AM

phoenix4ever said:
Perhaps in multiplayer, but in singleplayer once the main hero has grown strong Resurrection/Animate Dead and an occasional Chain Lightning is all I seem to cast


Maybe the maps you're playing are not interesting then. Of course resurrect is a main key and it should remain that way, elsewhere how to design a challenging map if not allow the player to win without casualties if skilled. But resurrect phase, at least in good maps with creative battles, is triggering very late, and usually it starts ONCE the battle is already won. Is just like cleaning your F1 car once you won the race so it doesn't remain dirty.

Then chain lightning, thats a non existing issue imo, you're the only one apparently who uses or complains about it. And ofc, RK is right, without proposing a detailed and valid alternative it can't work.
____________
All my Era II mods

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
phoenix4ever
phoenix4ever


Supreme Hero
Heroes is love, Heroes is life
posted October 25, 2017 09:24 AM
Edited by phoenix4ever at 10:37, 25 Oct 2017.

@RoseKavalier and Salamandre
Well I have not figured out exactly how they could work and I don't know if everything is possible.
It was also more like raising the topic for discussion and perhaps you guys had some ideas too? Or maybe you think they are already perfect as they are?
It's just a shame that when you have these spells that is (sometimes) all you need in combat.
Air Magic can be used on adventure map with Fly and DD and Water Magic with Summon Boat and Water Walk. But Fire Magic seems almost completely useless once you got Res/AD.

Okay I'll try to formulate my idea of "post combat resurrection":
After a battle is won you can choose creature stacks which lost creatures in previous combat and choose to resurrect/animate them.
You can do this as long as you have mana and it does'nt matter if creatures are on top of the corpse, it still works.
When AI resurrects it should prioritize higher level creatures first and first resurrect level 7's, then level 6's and so on. If neccessary it should spend all mana to try to resurrect it's army.
If you or the enemy was wearing Recanter's Cloak, Orb of Inhibition or HotAs Ring of Oblivion resurrection cannot be performed.
If possible both Resurrection and Animate Dead should require advanced Earth Magic before the spells work.
If a hero lost both living and undead units in combat and knows both advanced Resurrection and advanced Animate Dead he will get to use both after combat.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Maurice
Maurice

Hero of Order
Part of the furniture
posted October 25, 2017 11:17 AM

phoenix4ever said:

If you or the enemy was wearing Recanter's Cloak, Orb of Inhibition or HotAs Ring of Oblivion resurrection cannot be performed.


I agree with your points for the most part, but on this one, I disagree.

Resurrection should only be allowed for the victor of combat; the defeated Hero will lose all creatures that were dead on his side at the end of battle. Post-battle resurrection should not consider the defeated Hero (in the sense that that Hero is no longer actively present on the battlefield), nor any of its carried Artifacts. Likewise, it seems rather stupid to include such inhibiting Artifacts when worn by the victor, post combat, as it would make sense for the Hero to unequip those before starting the resurrection sequence. It's not like the Hero needs to spend hours to unequip anything and post-battle, there's no threat to the Hero anymore either.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
phoenix4ever
phoenix4ever


Supreme Hero
Heroes is love, Heroes is life
posted October 25, 2017 11:25 AM
Edited by phoenix4ever at 12:32, 25 Oct 2017.

I also meant that post resurrection should only be allowed for the victor.
And those 3 artifacts was meant as a way of limiting the use of Resurrection/Animate Dead to make them less OP.

Alternatively Resurrection and Animate could just revive only for the battle and never permanent, but that would make them really bad...

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
RoseKavalier
RoseKavalier


Honorable
Famous Hero
posted October 25, 2017 01:58 PM

phoenix4ever said:
It was also more like raising the topic for discussion and perhaps you guys had some ideas too? Or maybe you think they are already perfect as they are?


For my part I'm quite happy how they work. If the map is correctly planned, they give the AI some extra punch.
For randomly generated maps you might as well disable both spells because AI will never be smart enough to develop a good caster - and then it's only by chance that it might stumble upon resurrection.

Regarding your suggestion, it might be doable but I personally have 0 idea how to code that for AI to use.
____________
My Let's Plays: Metataxer's Revenge - The Empire of The World 2

 Send Instant Message | Send E-Mail | View Profile | PP | Quote Reply | Link
Jump To: « Prev Thread . . . Next Thread » This thread is 32 pages long: 1 2 3 4 5 ... 10 20 ... 28 29 30 31 32 · «PREV / NEXT»
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.3280 seconds