Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MMExtension compatibility #9

Closed
Rod-L opened this issue Jul 7, 2023 · 2 comments
Closed

MMExtension compatibility #9

Rod-L opened this issue Jul 7, 2023 · 2 comments

Comments

@Rod-L
Copy link

Rod-L commented Jul 7, 2023

Hello.
I'm updating MMMerge to current version of MMExtension, and I got into these troubles, worth to mention:

  1. mem arrays do not accept boolean values anymore. For example 'mem.u4[ptr] = true' will give error now (unlike in previous MMExt version, where bool was correctly casted to 1 or 0). I can avoid assigning booleans, but it is troubling with evt functions, for example: 'evt.Set{const.VarNum.Poison1, true}', feels like correct code, but will give error as well, because 'true' is not converted to number underneath.
  2. lua51.dll in the ExeMods folder sometimes crahses the game after call to RtlUnwind inside it. I could not reproduce the error in clean installation of MM8 + MMPatch + MMExtension, and it does not happen too often in the Merge, but still I did not have play session, where it would not happen at least once. After i recompiled this dll using vs2019 with it's bundled msvc_x86, error has gone (I've taken source from OpenResty repository and added lj_get_char_bits exported symbol accordingly).
@Rod-L
Copy link
Author

Rod-L commented Jul 12, 2023

  1. events.lua:2137 hookfunction method hides ItemsTxt offset: beginning of 0x453ECC is:
	push ebp
	mov ebp, esp
	sub esp, 0xc94

0xc94 is amount of allowed lines in items.txt multiplied by 4. I'm modifying this value inside RemoveItemsLimits.lua. I've found no way to do it before hookfunction is called, thus i have to modify events.lua.

@GrayFace
Copy link
Owner

GrayFace commented Mar 4, 2024

Use mem.BatchAdd({0x453ECF+2}, New - Old), it will account for code relocation.

@GrayFace GrayFace closed this as completed Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants