BIN (2007): Difference between revisions

From Ryu Ga Gotoku Wiki
Jump to navigation Jump to search
No edit summary
mNo edit summary
 
(14 intermediate revisions by one other user not shown)
Line 1: Line 1:
20070319 .bin format was created on 19th March 2007 by [[Ryu Ga Gotoku Studio]] for the first PS3 game in the series - [[Ryu ga Gotoku: Kenzan!]] and the date 2007.03.19 is used in header to differentiate these .bin files from others.
20070319 .bin format was created on 19th March 2007 by [[Ryu Ga Gotoku Studio]] for the first PS3 game in the series - [[Ryu Ga Gotoku: Kenzan!]] and the date 2007.03.19 is used in header to differentiate these .bin files from others.


=Overview=
=Overview=
This file is used for storing parameters and strings in pre-[[Dragon Engine]] games .
This file is used for storing parameters and strings in pre-[[Dragon Engine]] games.
 
Can be exported into .json, edited and imported back with [https://github.com/SlowpokeVG/Yakuza-2007.03.19-bin-file-exporter-importer this tool].


== Technical Information ==
== Technical Information ==
<blockquote>0x00 - 4 bytes - Magic (0x20, 0x07, 0x03, 0x19)
{| class="wikitable"
0x04 - int32 - Amount of parameters for every entry
|+Offset Table
 
!Offset
0x08 - int32 - Amount of entries in the file
!Type
 
!Description
0x10 - start of parameter declaration chunk (size = parameter count * 0x40)
|-
For every parameter declaration:
|0x00
 
|4 bytes
0x00 - Name of the parameter
|Magic (0x20, 0x07, 0x03, 0x19)
 
|-
0x30 - Parameter type (see list later)
|0x04
 
|int32
0x34 - Amount of strings or other entries in the parameter if it fits the type
|Amount of parameters for every entry
 
|-
0x38 - Size in bytes this parameter chunk uses up 
|0x08
 
|int32
0x10 + parameter count * 0x40 (After parameter declaration) - Values chunk
|Amount of entries in the file
 
|-
For every parameter, in same order as declaration, file lists every value for every entry, according to the type formatting. If there is a “table after last 0x00”, it means there’s a row of bytes (same amount as entries) that sets IDs of lines that appear in every entry.</blockquote>
|0x10
 
|<small>Parameter chunk</small>
=== Types: ===
|Start of Parameter chunk ''(size = parameter count (n) * 0x40)''
* ''''String'''',
|-
** Byte value: 00: Strings, separated with 0x00;
! colspan="3" |For every parameter declaration in Parameter chunk
* ''''String_tbl'''',
|-
**Byte value: 01: Strings, separated with 0x00 with table after last 0x00;
|0x00
*    ''''String_idx'''',
|String
** Byte value: 02: Strings, 2 bytes for ID it's used from, then the value and 0x00;
|Name of the parameter
*    ''''Value'''',
|-
** Byte value: 03: Integers as text like 00;
|0x30
*    ''''Value_tbl'''',
|int32
** Byte value: 04:  Integers as text. Same as 01 - table after 0x00;
|Parameter type ''(see the list for reference)''
*    ''''Value_idx'''',
|-
** Byte value: 05:  Integers as text. Same as 02;
|0x34
*    ''''Special_scenariocategory'''',
|int32
** Byte value: 06:  4 byte hex values, not separated, 0xFFFFFFFF is "empty";
|Amount of strings or other entries in the parameter if it fits the type
*    ''''Special_scenariostatus'''',
|-
** Byte value: 07: or sometimes special_scenariocompare; 4 Byte hex values, separated by 0xFFFFFFFF;
|0x38
*    ''''Stageid'''',
|int32
** Byte value: 08: Strings, separated with 0x00;
|Size in bytes this parameter chunk uses up
*    ''''Special_scenariocompare'''',
|-
**Byte value: 09: 4 byte hex values, not separated, 0xFFFFFFFF is "empty";
! colspan="3" |After Parameter declaration chunk
*    ''''Special_value'''',
|-
** Byte value: 0A: 4 byte int values, go one after another;
|0x10 + n*0x40
*    ''''Itemid'''',
|<small>Values chunk</small>
** Byte value: 0B: 4 byte int values, go one after another;
|For every parameter, in same order as declaration, lists every value for every entry,  
*    ''''Comment'''',
according to the type formatting (see below)
** Byte value: 0C: Never encountered in game files, so not implemented;
|}
*    ''''BGM_ID'''',
** Byte value: 0D: 4 byte values, not separated, 0xFFFFFFFF is "empty";
*    ''''Unknown'''',
**Byte value: 0E: Never encountered in game files, so not implemented;
*    ''''USE_COUNTER'''',
** Byte value: 0F: 4 byte int values, go one after another;
*    ''''ENTITY_UID''''
** Byte value: 10: 4 byte values, not separated, 0xFFFFFFFF is "empty";


{| class="wikitable"
|+Types of values
!Byte
!Name
!Description
|-
|'''0x00'''
|'''String'''
|Strings, separated with 0x00
|-
|'''0x01'''
|'''String_tbl'''
|Strings, separated with 0x00 with the table after last 0x00 - row of
bytes (same amount as entries) that sets IDs of lines that appear in
each entry
|-
|'''0x02'''
|'''String_idx'''
|Strings, 2 bytes for ID it's used from, then the value and 0x00
|-
|'''0x03'''
|'''Value'''
|Integers as text like ''''String''''
|-
|'''0x04'''
|'''Value_tbl'''
|Integers as text. Same as ''''String_tbl'''' - table after 0x00
|-
|'''0x05'''
|'''Value_idx'''
|Integers as text. Same as ''''String_idx''''
|-
|'''0x06'''
|'''Special_scenariocategory'''
|4 byte hex values, not separated, 0xFFFFFFFF is "empty"
|-
|'''0x07'''
|'''Special_scenariostatus'''
('''Special_scenariocompare''')
|4 Byte hex values, separated by 0xFFFFFFFF
|-
|'''0x08'''
|'''Stageid'''
|Strings, separated with 0x00
|-
|'''0x09'''
|'''Special_scenariocompare'''
|4 byte hex values, not separated, 0xFFFFFFFF is "empty"
|-
|'''0x0A'''
|'''Special_value'''
|4 byte int values, go one after another
|-
|'''0x0B'''
|'''Itemid'''
|4 byte int values, go one after another
|-
|'''0x0C'''
|'''Comment'''
|Never encountered in game files, so not implemented
|-
|'''0x0D'''
|'''BGM_ID'''
|4 byte values, not separated, 0xFFFFFFFF is "empty"
|-
|'''0x0E'''
|'''Unknown'''
|Never encountered in game files, so not implemented
|-
|'''0x0F'''
|'''USE_COUNTER'''
|4 byte int values, go one after another
|-
|'''0x10'''
|'''ENTITY_UID'''
|4 byte values, not separated, 0xFFFFFFFF is "empty"
|}
[[Category:File Formats]]
[[Category:File Formats]]

Latest revision as of 18:17, 29 December 2022

20070319 .bin format was created on 19th March 2007 by Ryu Ga Gotoku Studio for the first PS3 game in the series - Ryu Ga Gotoku: Kenzan! and the date 2007.03.19 is used in header to differentiate these .bin files from others.

Overview

This file is used for storing parameters and strings in pre-Dragon Engine games.

Can be exported into .json, edited and imported back with this tool.

Technical Information

Offset Table
Offset Type Description
0x00 4 bytes Magic (0x20, 0x07, 0x03, 0x19)
0x04 int32 Amount of parameters for every entry
0x08 int32 Amount of entries in the file
0x10 Parameter chunk Start of Parameter chunk (size = parameter count (n) * 0x40)
For every parameter declaration in Parameter chunk
0x00 String Name of the parameter
0x30 int32 Parameter type (see the list for reference)
0x34 int32 Amount of strings or other entries in the parameter if it fits the type
0x38 int32 Size in bytes this parameter chunk uses up
After Parameter declaration chunk
0x10 + n*0x40 Values chunk For every parameter, in same order as declaration, lists every value for every entry,

according to the type formatting (see below)

Types of values
Byte Name Description
0x00 String Strings, separated with 0x00
0x01 String_tbl Strings, separated with 0x00 with the table after last 0x00 - row of

bytes (same amount as entries) that sets IDs of lines that appear in each entry

0x02 String_idx Strings, 2 bytes for ID it's used from, then the value and 0x00
0x03 Value Integers as text like 'String'
0x04 Value_tbl Integers as text. Same as 'String_tbl' - table after 0x00
0x05 Value_idx Integers as text. Same as 'String_idx'
0x06 Special_scenariocategory 4 byte hex values, not separated, 0xFFFFFFFF is "empty"
0x07 Special_scenariostatus

(Special_scenariocompare)

4 Byte hex values, separated by 0xFFFFFFFF
0x08 Stageid Strings, separated with 0x00
0x09 Special_scenariocompare 4 byte hex values, not separated, 0xFFFFFFFF is "empty"
0x0A Special_value 4 byte int values, go one after another
0x0B Itemid 4 byte int values, go one after another
0x0C Comment Never encountered in game files, so not implemented
0x0D BGM_ID 4 byte values, not separated, 0xFFFFFFFF is "empty"
0x0E Unknown Never encountered in game files, so not implemented
0x0F USE_COUNTER 4 byte int values, go one after another
0x10 ENTITY_UID 4 byte values, not separated, 0xFFFFFFFF is "empty"