RECV MODDING BASICS - MODELS - INTRODUCTION (By CBNJ)

Moderators: pcwzrd13, deluxux, VasiliyRS

cbnj
fragger
Posts: 250

RECV MODDING BASICS - MODELS - INTRODUCTION (By CBNJ)

Post by cbnj »

This post main goal is to teach you how to add objects to character bodies trough the modification of the game files it self, you will need the basic knowledge of hexadecimal numbers and how to move trough a file in a hex editor using offsets and pointers.

This guide will split into chapters so every user cand advance at his/her own step not requiring to go trough a whole bunch of posts to find a specific part of the guide.
Last edited by cbnj on Fri Dec 01, 2023 7:19 am, edited 15 times in total.

cbnj
fragger
Posts: 250

Re: (Updating) RECV ARMORING CHARACTERS (By CBNJ)

Post by cbnj »

PLAYER FILE INTERNAL HEADERS

Since we will be jumping up and down trough this files we need to quickly locate specific areas in each section, using the internal headers stored in the file we can achieve that.

SKIN -envelope data
MDL -model header
MTN -animation header
TPVR -texture block header
PVRT -texture header
Last edited by cbnj on Sat Dec 02, 2023 6:22 am, edited 13 times in total.

cbnj
fragger
Posts: 250

Re: (Updating) RECV ARMORING CHARACTERS (By CBNJ)

Post by cbnj »

PLAYER FILE STRUCTURE

This is a concatenate of diferent files.

Envelope data
Texture table
3d model1
Skeleton1
Secondary texture tables
3d model2
Skeleton2
Secondary objects envelope data - (ponytail,glasses,etc. Not all characters have them)
Secondary objects texture table
Secondary objects 3d models
Secondary objects skeletons
Animations
Textures

i have simplified this files into 3 main sections for an easy "armoring" process, section 1 covers envelope data, section 2 covers from texture table to animations, section 3 covers textures block, this is how we will split & handle the player files moving trough each one by pointers jumps.

cbnj
fragger
Posts: 250

Re: (Updating) RECV ARMORING CHARACTERS (By CBNJ)

Post by cbnj »

PLAYER BONE LAYOUTS
Bones are read secuentially in game as follows:

Body root
Pelvis
Abdomen
Chest
Neck
Head
Rchestside
Rarm
Rforearm
Rhand
Lchestside
Larm
Lforearm
Lhand
Rleg
Rcalf
Rfoot
Rtoes
Lleg
Lcalf
Lfoot
Ltoes

Bones should be read in groups of 13 bytes each bone.
(Body root bone as example)
0F000000 FFFFFFFF 00000000 00000000 00000000 00000000 00000000 00000000 0000803F 0000803F 0000803F 74400000 FFFFFFFF

This is a single bone and should split into 7 sections
0F000000 - bone properties
FFFFFFFF - pointer to controlled 3d model
00000000 00000000 00000000 -pos xzy
00000000 00000000 00000000 -rot xzy
0000803F 0000803F 0000803F -sca xzy
74400000 -pointer to children bone
FFFFFFFF -pointer to sibling bone

All the values to input here are 32 bits little endian hexdacemal floats exept the bone properties byte and pointers bytes.

Children bones lead to dead ends, by example the arm bone have two childrens bones, forearm bone and hand bone, the chain of bones dies here, a sibling bone marks the start of a new children bones chain, by example the other arm which will have forearm bone and hand bone too.
Since both arms bones have childrens bones thats why are called siblings, and this 2 arm bones are sibblings of the torso bone wich have its own chindren bones too, the neck and the head bones.

player characters use a 3 "security check" system to animate the models, a global envelope, and two skeletons, i wont go deep in this but is thanks to this 2 skeletons we can trigger an exploit in the character models allowing us to attach external models to them.
Last edited by cbnj on Fri Dec 01, 2023 1:57 am, edited 10 times in total.

User avatar
fafadou
Gold Lion
Posts: 1664

Re: (Updating) RECV ARMORING CHARACTERS (By CBNJ)

Post by fafadou »

This in 1ST_READ.BIN or RDX file ?

cbnj
fragger
Posts: 250

Re: (Updating) RECV ARMORING CHARACTERS (By CBNJ)

Post by cbnj »

First thing to do is to learn how the nj models will looklike in hex view and explain some basics about it.

This is a simple nj 3d model (music box disc), next we have the same file opened in a hex editor, this file have diferent segments and headers, you quickly will notice 2 of them, njtl and njcm, this headers holds data not relevant to us as we will only use the real 3d model data, this data start whit a specific byte value in code veronica files and its 13250400 followed by two "twin" bytes, in this case are B2B2B2FF, this 2 twin bytes values can change to any other value in world but both bytes will always have the same values, 13250400 will be 99.99% of times 13250400 this value will be considered as fixed value.
Attachments
disc.jpg
hexview.jpg
13250400.jpg
B2B2B2FF.jpg
4E.7z
(69.33 KiB) Downloaded 43 times
Last edited by cbnj on Sun Nov 26, 2023 4:03 am, edited 4 times in total.

cbnj
fragger
Posts: 250

Re: (Updating) RECV ARMORING CHARACTERS (By CBNJ)

Post by cbnj »

You clearly can see a change in the byte data flow on the rest of the file, the first part are the triangle strips (poligon faces of the model), this area ends whit a separator byte FF000000, next starts the vertex table, the vertex table will also always have a FF000000 separator byte at the end followed by 6 six extra bytes, this 6 extra bytes are important and should be always kept in every model we rip off.

Its very important you learn to locate an recogniza this areas by eye because since this is a simplified user friendly guide, i wont describe in detail any file format/structures beyond the nessesary to acomplish the goal.
Attachments
faces.jpg
separator.jpg
vertex.jpg
separator2.jpg
6bytes.jpg

cbnj
fragger
Posts: 250

Re: (Updating) RECV MODDING BASICS - MODELS - INTRODUCTION

Post by cbnj »

Once you feel you can recognize this areas of the files clearly by practice whit diferent models wich you can download in the RECV 3d models post
https://www.dreamcast-talk.com/forum/vi ... =2&t=16874
We can proceed to add this music box disc to claire body!

If you still dont have the SYSTEM.afs i provided in the RECV mods i made, download it.
https://www.dreamcast-talk.com/forum/vi ... =2&t=16893
this contain the original unmodified files using real filenames instead of generic file_xx or file_xxxx.bin, also read the fisrt post wich contain instructions about how to rebuild the afs file using afslnk tool.
END OF CHAPTER.

NEXT CHAPTER: RECV MODDING BASICS - MODELS - Ch.1 (By CBNJ)
https://www.dreamcast-talk.com/forum/vi ... 22#p181022
Last edited by cbnj on Wed Nov 29, 2023 5:21 am, edited 8 times in total.

cbnj
fragger
Posts: 250

Re: (Updating) RECV ARMORING CHARACTERS (By CBNJ)

Post by cbnj »

fafadou

This headers are located inside the plxx.ald files inside system.afs as this are the player files.
You can download them in nj format from the Recv 3d models post.
https://www.dreamcast-talk.com/forum/vi ... =2&t=16874
And visualize each one of the plxx.ald files in 3d using noesis model viewer.