|
|
Bersy
Honorable
Supreme Hero
|
posted October 17, 2020 12:08 PM |
|
|
|
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.
|
|
Bersy
Honorable
Supreme Hero
|
posted October 18, 2020 12:19 AM |
|
|
|
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?
|
|
Bersy
Honorable
Supreme Hero
|
posted October 21, 2020 08:02 PM |
|
|
|
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.
|
|
Bersy
Honorable
Supreme Hero
|
posted October 21, 2020 10:21 PM |
|
|
|
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
------------------------------------------------------------------------------
|
|
Bersy
Honorable
Supreme Hero
|
posted October 22, 2020 09:01 PM |
|
|
|
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.
|
|
Hawaiing
Adventuring Hero
|
posted October 23, 2020 08:02 AM |
|
|
Bersy said: 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.
Thank you Bersy.
Code works perfectly.
|
|
Bersy
Honorable
Supreme Hero
|
posted October 23, 2020 02:21 PM |
|
|
|
Hawaiing
Adventuring Hero
|
posted October 25, 2020 04:43 AM |
|
|
Hi Bersy.
Could we get the real FU's id via FU_string on era2.9.14?
like !?FU(bersy);
How to get real fu_id via "(bersy)".
It seems the function "ExecErmCmd" doesn't suport "FU(bersy);"
How about "FireErmEvent" ?
(Please ignore my English grammar mistakes)
|
|
Bersy
Honorable
Supreme Hero
|
posted October 25, 2020 12:24 PM |
|
|
|
Hawaiing
Adventuring Hero
|
posted October 25, 2020 02:11 PM |
|
|
Thank you Bersy.
Sometimes meet following message when game wogfy.
but no more message after.
How does this happen?
"Invalid Spell Parameter:number of spell exclusions must be 0..9"
|
|
Bersy
Honorable
Supreme Hero
|
posted October 25, 2020 06:39 PM |
|
|
78 wog:
!?FU7777;
[x1=min. level, x2=max. level, x3=type, x4=element, x5=banning]
[x6=number of exclusions, x7..x15=specific exclusions]
[Display invalid parameter message for an invalid parameter]
!!IF|x1<0/x1>5:M1/z100032;
!!IF|x2<0/x2>5:M1/z100033;
!!IF|x3<0/x3>2:M1/z100034;
!!IF|x4<0/x4>15:M1/z100035;
!!IF|x5<0/x5>3:M1/z100036;
!!IF|x6<0/x6>9:M1/z100037;
I don't know, what causes the error exactly.
____________
Heroes 3 Era and everything for it. Releases folder for releases.
|
|
PiggyChu620
Adventuring Hero
|
posted November 01, 2020 02:35 AM |
|
|
Why my ERA keep crashing!?
I had ERA 2.7 or 8 something installed before, and it keep crashing after a while of gameplay.
I went online and find a solution telling me to change it to "Execute as administrator" and "Compatible with XP SP3", and it still crashing!
I thought it might be because the version was too old and downloaded 3.1.2 couple days ago, and it STILL crashing!
I can even play a decent game!
Could somebody PLEASE be so kind and tell me how to fix it!?
Much appreciated!
|
|
Rerryr
Promising
Supreme Hero
Researching Magic
|
posted November 01, 2020 09:01 AM |
|
|
Reminder:
How to properly report a bug.
When a crash happens ERA will create several log files with all necessary information, including your loaded mods and game version.
You can also generate that log during your game by pressing F11. You can locate that folder in your Heroes 3 main folder under "Debug". Please send zipped "Debug" folder in Discord or with Dropmefiles. Also put your save game and maybe even the map you played in that folder. This will provide all necessary information to catch the bug.
Sending the HD-Crash log is not very helpful.
|
|
Hawaiing
Adventuring Hero
|
posted November 01, 2020 01:19 PM |
|
|
Bersy said: 78 wog:
!?FU7777;
[x1=min. level, x2=max. level, x3=type, x4=element, x5=banning]
[x6=number of exclusions, x7..x15=specific exclusions]
[Display invalid parameter message for an invalid parameter]
!!IF|x1<0/x1>5:M1/z100032;
!!IF|x2<0/x2>5:M1/z100033;
!!IF|x3<0/x3>2:M1/z100034;
!!IF|x4<0/x4>15:M1/z100035;
!!IF|x5<0/x5>3:M1/z100036;
!!IF|x6<0/x6>9:M1/z100037;
I don't know, what causes the error exactly.
Hi Bersy.
Maybe I found the answer.
!!FU(test007):P-1/0/1/2/3/4/5/6/7/8;
!!FU(test007):P;
FU:A=1 x1=0 and x2-x10 still keep the same value 0..8???
!?FU(test007);
!!FU:A?y1;
!!IF:M^FU:A=%Y1
X1=%X1 X2=%X2 X3=%X3 X4=%X4 X5=%X5 X6=%X6 X7=%X7
X8=%X8 X9=%X9 X10=%X10 X11=%X11 X12=%X12 X13=%X13 X14=%X14 X15=%X15
^;
those two bugs just on era2.9.14.
era3 fixed.
Would you fix it on era2.9.14?
|
|
Bersy
Honorable
Supreme Hero
|
posted November 01, 2020 02:59 PM |
|
|
|
|