Page 3 of 5

Re: BH/RECV/C CBNJ's Mods

Posted: Mon Jun 30, 2025 3:54 pm
by cbnj
Run NJSingle.bat write 0 and press enter.

Re: BH/RECV/C CBNJ's Mods

Posted: Mon Jun 30, 2025 4:01 pm
by cbnj
The .bat file will start to work and you will be presented whit a txt file holding a bunch of hex values, DO NOT CLOSE the cmd window or the txt file under any circumstance.

Re: BH/RECV/C CBNJ's Mods

Posted: Mon Jun 30, 2025 4:07 pm
by cbnj
Click ctrl+r on the txt window or use the txt window menu to call the replace function, write 0x in the top field, leave the bottom one empty and click replace all button (This will clean the hex values so we can use them). Once done close the replace function window.
(In a subsecuent update I'll trigger an automatic values cleaning).

Re: BH/RECV/C CBNJ's Mods

Posted: Mon Jun 30, 2025 4:15 pm
by cbnj
In the mdlbuild folder there will be now a file named PL00_1.nj, open this file whit your hex editor, I use HxD, and I set up the bytes per row to 54 to line up the model bones.

Re: BH/RECV/C CBNJ's Mods

Posted: Mon Jun 30, 2025 4:24 pm
by cbnj
This are the model bones, starting whit 0F000000 and finishing at the 13250400 byte further down.

Re: BH/RECV/C CBNJ's Mods

Posted: Mon Jun 30, 2025 4:31 pm
by cbnj
And this value up here is my limiter offset (little endian), this file should never be larger than my limiter offset value, so we check up that trying to jump to that offset and if we get a negative answer everything it's okay.
NOTE:
In case we can jump to the limiter offset it means the model we are importing have too much polys or is extremely bad UV maped, wasting a lot of space sorting out the faces uvs in case the model is low poly.
we can insert high poly models in cv, but it require I tweak the files an extra bit, I'll make an high poly model patcher when I finish this one).

Re: BH/RECV/C CBNJ's Mods

Posted: Mon Jun 30, 2025 4:47 pm
by cbnj
It's time to work! First we will copy all the bone pointer values on its respective bone in the file, the bones we will use are marked whit a 06000000, so we just copy and overwrite the next byte whit the 00000000 value whit the values in the txt in the same order they are listed, just as I show in the image.

Re: BH/RECV/C CBNJ's Mods

Posted: Mon Jun 30, 2025 5:05 pm
by cbnj
The next step as the txt reads is to go to the specified offset adress and overwrite the values there whit those from the txt, but don't rush as every value we write needs a little extra step.
Let's do the first one: I copy the value, next I go to specified offset and overwrite the value.

Re: BH/RECV/C CBNJ's Mods

Posted: Mon Jun 30, 2025 5:18 pm
by cbnj
Now comes the catch, first, as you can see, the value we just overwritted is just ahead an FF000000 byte, and furter more (6 bytes ahead the FF000000 value), there is a byte whit the value 13250400, this layout should be true for every one of this values we are overwritting right now.
If this rule don't meets, then the model you are importing contain a curious structure causing my script to fail when trying to detect the data boundaries, but this is very unlikely to happen (altough it could, specially whit lots of 90 degrees angles or 0,0,0 vertex axis positions, anyway, I'll improve the scrip bit by bit).

Re: BH/RECV/C CBNJ's Mods

Posted: Mon Jun 30, 2025 5:30 pm
by cbnj
The catch, is to change the value of the sixt byte (the one just before the value 13250400) to negative as a 32bits float, just like I show in the image below.
This step should be made for every one of this values we are working on right now.