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 ]
HOMM1: info forum | HOMM2: info forum | HOMM3: info mods forum | HOMM4: info CTG forum | HOMM5: info mods forum | MMH6: wiki forum | MMH7: wiki forum
Heroes Community > Heroes 3.5 - WoG and Beyond > Thread: Era II
Thread: Era II This Popular Thread is 217 pages long: 1 2 3 4 5 ... 40 80 120 160 200 ... 213 214 215 216 217 · «PREV
Bersy
Bersy


Honorable
Supreme Hero
posted October 17, 2020 12:08 PM

Ghost, I hope we will fix those Santas growth (each 2-3 days instead of once per week) and their spell and other joke abilities.
____________
Heroes 3 Era and everything for it. Releases folder for releases.

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


Adventuring Hero
posted October 17, 2020 02:23 PM
Edited by Archer30 at 20:49, 17 Oct 2020.

Hi Bersy, I had a discussion with Hawaiing. He's having some confusion, so let me help him out.

Basically, he's trying to register a new receiver in ERA 2.9. He showed you his code here, having no idea why it was not working. Is there a good way to check whether a receiver has been successfully registered?

Another question he asked was about the code you posted:
Quote:
procedure RegisterErmReceiver (const Cmd: pchar; {n} Handler: TErmCmdHandler; ParamsConfig: integer); stdcall;

He noticed that "pchar" was actually "word" in the wog source. Why is there a difference here? Is this something he should be looking at?

Thank you in advance
______

Edit: Problem Solved! It looks like the only failure was the timing of registration. Tried with On_After_Create_Window and it worked like a charm.

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


Honorable
Supreme Hero
posted October 18, 2020 12:19 AM

Usually OnAfterWoG event is good for registering new receivers. But AfterCreateWindow also ok.
____________
Heroes 3 Era and everything for it. Releases folder for releases.

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


Admirable
Omnipresent Hero
Wog refugee
posted October 21, 2020 07:21 PM

The plugin "disable dracoliches block" will remove every block ability for any creature, I see. Is this intended or a collateral damage?


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


Honorable
Supreme Hero
posted October 21, 2020 08:02 PM

Collateral, I suppose, though I hate WoG-style blocks )))
Do you need fixed version?
____________
Heroes 3 Era and everything for it. Releases folder for releases.

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


Admirable
Omnipresent Hero
Wog refugee
posted October 21, 2020 08:11 PM

Well, not anymore, since those maps who use it a lot aren't and will not be available any longer. But thanks.

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


Honorable
Supreme Hero
posted October 21, 2020 10:21 PM

By the way, ERM allows to check wog/era version and thus there can be put a message in !?PI or instruction with recommended platform link like https://bit.ly/XYZ

It should solve all questions.
____________
Heroes 3 Era and everything for it. Releases folder for releases.

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


Adventuring Hero
posted October 22, 2020 05:27 PM

Hi Bersy.
I have a problem about ApiHook.
I paste the codes and hope you get the point.
These strange things didn't happened on era2.4.6 but on era2.9.14
------------------------------------------------------------------------------
ApiHook((void*)Hook_42C598,HOOKTYPE_BRIDGE,(void*)0x42C598);
[original code]
0042C598 - 89 55 fc                   - mov [ebp-04],edx ===>ApiHOOK
0042C59B - 7f de                      - jg 0042c57b
0042C59D - 5f                         - pop edi
0042C59E - 5e                         - pop esi
0042C59F - 8b c2                      - mov eax,edx
0042C5A1 - 5b                         - pop ebx ===>

[after_hook]
0042C598 - e8 33 70 3b 05             - call 057e35d0
0042C59D - 90                         - nop ==>why hook more than 4byes???short jump becomes long jump??
0042C59E - 90                         - nop
0042C59F - 90                         - nop
0042C5A0 - 90                         - nop
0042C5A1 - 5b                         - pop ebx  ===>retrun address
0042C5A2 - 8b e5                      - mov esp,ebp
0042C5A4 - 5d                         - pop ebp

[dll_code]
057E35D0 - 60                         - pushad
057E35D1 - 54                         - push esp
057E35D2 - e8 79 fd 48 62             - call hook_42c598
057E35D7 - 85 c0                      - test eax,eax
057E35D9 - 0f 84 12 00 00 00          - je 057e35f1
057E35DF - 61                         - popad
057E35E0 - 83 c4 04                   - add esp,04 ===>EXEC_DEF_CODE
057E35E3 - 89 55 fc                   - mov [ebp-04],edx ===>default code
057E35E6 - 0f 8f 8f 8f c4 fa          - jg 0042c57b ===>default code,but [0042C59D-0042C5A0]4bytes is missing???
057E35EC - e9 b0 8f c4 fa             - jmp 0042c5a1 ==>return
057E35F1 - 61                         - popad
057E35F2 - c3                         - ret
------------------------------------------------------------------------------

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


Honorable
Supreme Hero
posted October 22, 2020 09:01 PM

I will check it out, thanks.
____________
Heroes 3 Era and everything for it. Releases folder for releases.

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


Honorable
Supreme Hero
posted October 23, 2020 01:37 AM

Here is 2.9.14 fixed dll:
https://dropmefiles.com/ZNuEM

Short jumps are rewritten to long jumps in bridges now (so bridge is 9 bytes), but overwritten code should still have size 5, so it was the issue.

Ex. jg short 401000 => jg long 401000.

[-] Fixed bug in HookCode: hooking short jumps resulted in memory corruption.
____________
Heroes 3 Era and everything for it. Releases folder for releases.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Jump To: Next Thread » This Popular Thread is 217 pages long: 1 2 3 4 5 ... 40 80 120 160 200 ... 213 214 215 216 217 · «PREV
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.0767 seconds