Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/kojobailey/xfbin-parser-plusplus

Unpacks CyberConnect2 XFBIN files and converts their data into more usable and editable formats.
https://github.com/kojobailey/xfbin-parser-plusplus

binary cc2 cpp cyberconnect2 drag-and-drop jjba jojo json parser tool xfbin

Last synced: 24 days ago
JSON representation

Unpacks CyberConnect2 XFBIN files and converts their data into more usable and editable formats.

Awesome Lists containing this project

README

        

### Table of Contents
- [Introduction](#cyberconnect2-xfbin-parser)
- [Usage](#usage)
- [Unpacking XFBINs](#unpacking-xfbins)
- [Repacking XFBINs](#repacking-xfbins)
- [Converting from binary and JSON](#converting-from-binary-and-json)
- [Merging](#merging)

# CyberConnect2 XFBIN Parser++
This tool aims to be the **ultimate parser** for the **XFBIN** file container format created by **CyberConnect2**, used in the games developed in their own engine, sometimes referred to as the **NU** engine.

For those unfamiliar, XFBIN files use the `.xfbin` file extension, and contain the magic (first 4 bytes of a file) `NUCC`. They are a container since they contain other file data within them in **pages** and **chunks** (such as `nuccChunkBinary` and `nuccChunkModel`). For more information, see the [XFBIN wiki page](https://jojomodding.miraheze.org/wiki/xfbin) on JoJo's Bizarre Modding Wiki.

What this tool does is **extract** these chunks by separating them into different files for easier viewing, replacing, or removing; it is similar to the [XFBIN Parser by SutandoTsukai181](https://github.com/SutandoTsukai181/xfbin_lib). It then goes a step further and offers to convert any `nuccChunkBinary` to **JSON**, a format that is much easier to read and edit quickly.

See an example of JSON


This data isn't taken from any particular file. Notice how **easy** it would be to edit the different parameters, as well as how useful it can be just to read them for understanding.
```json
{
"Metadata": {
"Chunk Map Index": 1,
"Name": "example",
"Type": "nuccChunkBinary",
"Path": "cmnparam/bin/230/example.bin"
},
"Some Character ID": "4tno01",
"Random Number": 1987,
"An Array": {
"Bing": "bong",
"Magic Number": 23
},
"Some String": "Do you believe in \"gravity\"?",
"Some Japanese String": "調理場という所は... バイキンが一番の敵デスッ!"
}
```

Since every `nuccChunkBinary` is different, separate functions need to be defined for the conversion of each one. Currently, I as the creator of this tool am focusing on support for data from *JoJo's Bizarre Adventure: All-Star Battle R*, but adding support for other games will also be possible eventually - faster with contributions from others.

This tool is very much still a **WORK IN PROGRESS**, so until the first release, everything below is what I aim to have the tool be able to do.

## Installation
This tool is a **WORK IN PROGRESS** and therefore not yet available for download. An initial release will be made when it is at least somewhat functional (otherwise it'd be useless to share).

## Usage
### Unpacking XFBINs
To **unpack an XFBIN**, simply drag-and-drop it onto the tool's EXE. A folder will then be created with the same name as that XFBIN, and if a folder of the same name already exists, the name will be slightly altered instead (e.g. `xfbin (0)`) to prevent accidental file overwriting/replacement. Inside this folder will be `_xfbin.json`, and other folders with a naming format like `[XXX] Y (nuccChunkZ)`.
- `[XXX]` → The **page** index, as each of these folders is representative of an XFBIN page.
- `Y` → The page's name, determined by the most dominant **chunk** from the page.
- `(nuccChunkZ)` → The dominant chunk's type (e.g. `nuccChunkTexture`, `nuccChunkModel`, `nuccChunkBinary`, etc.)

An example folder name could be `[055] cmn_color_thumbnail_icon (nuccChunkAnm)`.

The `_xfbin.json` contains information directly about the XFBIN itself. This file **is** important, and shouldn't be modified unless you know what you're doing.

The folders are representative of the different **pages** within the XFBIN, which in turn contain **chunk** data. Within these, you will find a `_page.json` and (usually) at least one file containing the chunk's data.

### Repacking XFBINs

### Converting from binary and JSON

### Merging