Customizing Hide-and-Seek-Mod (General Assembly related Questions)
#10
(01-27-2023, 12:45 AM)tefo7 Wrote: You have posted an overview of all the bits concerning element creation. Did you look that up somewhere or did you reverse engineered it yourself? If there's a documentation for the bits, would you mind posting a link to them?
I already listed all the bits for you. As for where i got them, i just found the function using Ghidra (it was already documented by another person before me).

(01-27-2023, 12:45 AM)tefo7 Wrote: I will try out the approch in the next few days - did you find out the attribute being at 0x80 yourself or did you look that up somewhere?
Also found in Ghidra and not documented by me.

(01-27-2023, 12:45 AM)tefo7 Wrote: Do you know the offset for the opacity so I could slowly fade in the minimap instead of instantly going from 0 to 1.
This is the base structure for all the game's UI components: https://github.com/mkwcat/mkw-tournament...trol.h#L59

There are 4 opacity values, but you'll want the 4th one since it's calculated starting from the others. If you can read C++ code, you should be able to figure out the offset and size of the opacity field yourself.

(01-27-2023, 12:45 AM)tefo7 Wrote: You defined a procedure called
Code:
directWriteBranch

What exactly does the last boolean do?
It defines whether the branch instruction should be a simple branch (b) or a branch and link (bl).

(01-27-2023, 12:45 AM)tefo7 Wrote:
Code:
StoreMinimap:
# original instruction
or r14, r3, r3
# hide minimap
li r4, 1
stb r4, 0x80(r14)
You are missing a blr instruction to return to the game's code, unless it was omitted here.

(01-27-2023, 12:45 AM)tefo7 Wrote: I was just testing the injected code; Minimap is created and shown at start. I was trying to set the bit at offset 0x80 to 1 but the minimap is still visible. Are the ASM lines correct?
The lines are (almost) correct, but the hook you used is too early to be effective. You need to wait for the object to be initialized before modifying the property. Since it seems like you are lacking any sort of documentation, i highly suggest you to get familiar with Ghidra in order to be able to conduct reverse engineering on your own. Here's some info to get you started https://github.com/stblr/mkw-sp#resources
Reply


Messages In This Thread
RE: Customizing Hide-and-Seek-Mod (General Assembly related Questions) - by CLF78 - 01-28-2023, 06:16 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)