need help on understanding hxd for bms scripts

Help on how to use HxD.
Post Reply
HexForLife
Posts: 2
Joined: 07 Mar 2020 00:17

need help on understanding hxd for bms scripts

Post by HexForLife » 07 Mar 2020 00:22

i am trying to learn to make bms scripts but i can not find good tutorials at explaining finding magic ids, file size, pointers, and offsets. how do i find the magic id if it is nowhere near the top of the file? where would i find the file size in the file? how do i know something is a pointer? lastly how do i know when the data the offset starts at ends? i realize i am asking a lot and i am thankful for any help. i want to learn more so i can contribute to the community haha.

HexForLife
Posts: 2
Joined: 07 Mar 2020 00:17

Re: need help on understanding hxd for bms scripts

Post by HexForLife » 07 Mar 2020 01:52

this attachment is a example. i think BKHD is the magic id.
Attachments
esgvbs.PNG
example of a file i am doing
esgvbs.PNG (57.61 KiB) Viewed 409 times

Maël
Site Admin
Posts: 1164
Joined: 12 Mar 2005 14:15

Re: need help on understanding hxd for bms scripts

Post by Maël » 07 Mar 2020 14:53

So first of all I never made any bms scripts, probably others can give you more guidance there.
A quick search turned up this forum:
https://forum.xentax.com/viewtopic.php?t=17892
finding magic ids, file size, pointers, and offsets. how do i find the magic id if it is nowhere near the top of the file?
That's a difficult question to answer.
An introduction is here:
https://blog.mh-nexus.de/2014/12/how-to ... ex-editor/

If you want to understand the structure of a file, i.e., where data of a certain type begins, you have to know what you are looking for. You can use the search feature of HxD to search for known values, e.g., health points in a game. For knowing what a pointer is, you have to trace/debug a program, and watch it change and access the memory as it progresses.

To know the length of data, you have to know the data type, there are many ways to encode it. Some use a length byte, some terminate with a 0, some have a fixed size, like 32 bit integers.

The best way is to follow a tutorial for hacking a game (or whatever you want to do) and go from there.

Post Reply