BH/RECV/C CBNJ's Mods
-
- Arabian Night
- Posts: 333
Re: BH/RECV/C CBNJ's Mods
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.
-
- Arabian Night
- Posts: 333
Re: BH/RECV/C CBNJ's Mods
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).
(In a subsecuent update I'll trigger an automatic values cleaning).
-
- Arabian Night
- Posts: 333
Re: BH/RECV/C CBNJ's Mods
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.
-
- Arabian Night
- Posts: 333
Re: BH/RECV/C CBNJ's Mods
This are the model bones, starting whit 0F000000 and finishing at the 13250400 byte further down.
-
- Arabian Night
- Posts: 333
Re: BH/RECV/C CBNJ's Mods
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).
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).
-
- Arabian Night
- Posts: 333
Re: BH/RECV/C CBNJ's Mods
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.
-
- Arabian Night
- Posts: 333
Re: BH/RECV/C CBNJ's Mods
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.
Let's do the first one: I copy the value, next I go to specified offset and overwrite the value.
-
- Arabian Night
- Posts: 333
Re: BH/RECV/C CBNJ's Mods
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).
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).
Last edited by cbnj on Tue Jul 01, 2025 10:33 am, edited 1 time in total.
-
- Arabian Night
- Posts: 333
Re: BH/RECV/C CBNJ's Mods
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.
This step should be made for every one of this values we are working on right now.
Last edited by cbnj on Mon Jun 30, 2025 6:00 pm, edited 3 times in total.
-
- Similar Topics
- Replies
- Views
- Last post