Difference between revisions of "Table Data Types in KCD"
Bodowens86 (talk | contribs) m (Add info about string data type.) |
Pickysaurus (talk | contribs) m |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | {| | + | |
− | !Name | + | {| class="wikitable" |
− | !Width in TBL file | + | |- |
− | !Name in XML table descriptor | + | ! Name |
+ | ! Width in TBL file | ||
+ | ! Name in XML table descriptor | ||
|- | |- | ||
− | |Int | + | | Int |
− | |32 bit | + | | 32 bit |
− | |integer | + | | integer |
|- | |- | ||
− | |Int64 | + | | Int64 |
− | |64 bit | + | | 64 bit |
− | |bigint | + | | bigint |
|- | |- | ||
− | |Float | + | | Float |
− | |32 | + | | 32 bit |
− | |real | + | | real |
|- | |- | ||
− | |Guid | + | | Guid |
− | |128 bit | + | | 128 bit |
− | |uuid | + | | uuid |
|- | |- | ||
− | |Bool | + | | Bool |
− | |8 bit | + | | 8 bit |
− | |boolean | + | | boolean |
|- | |- | ||
− | |String | + | | String |
− | |32 bit | + | | 32 bit |
− | |text, character varying | + | | text, character varying |
|- | |- | ||
− | |Vec3 | + | | Vec3 |
− | |96 bit (3 * 32 bit) | + | | 96 bit (3 * 32 bit) |
− | |vec3 | + | | vec3 |
|- | |- | ||
− | |Quat | + | | Quat |
− | |128 bit (4 * 32 bit) | + | | 128 bit (4 * 32 bit) |
− | |quat | + | | quat |
|- | |- | ||
− | |QuatT | + | | QuatT |
− | |224 bit ((4 + 3) * 32 bit) | + | | 224 bit ((4 + 3) * 32 bit) |
− | |quatt | + | | quatt |
|- | |- | ||
− | |Padding | + | | Padding |
− | |variable | + | | variable |
− | | | + | | |
|} | |} | ||
== Notes == | == Notes == | ||
− | * Strings are stored as 32-bit signed integers pointing into the string table. See [[TBL File Format in KCD]]. | + | |
− | * Most tables do not use any padding. Whether table uses or doesn't use padding is hard-coded in KCD source. KCD data can only tell you that there is some padding somewhere, but not where. To see whether table uses padding, compare table description in XML file with line size in TBL file. | + | *Strings are stored as 32-bit signed integers pointing into the string table. See [[TBL_File_Format_in_KCD|TBL File Format in KCD]]. |
+ | *Most tables do not use any padding. Whether table uses or doesn't use padding is hard-coded in KCD source. KCD data can only tell you that there is some padding somewhere, but not where. To see whether table uses padding, compare table description in XML file with line size in TBL file. | ||
== Example - POI Types Table == | == Example - POI Types Table == | ||
− | {| | + | {| class="wikitable" |
− | !Column | + | |- |
− | !Type | + | ! Column |
− | !Width | + | ! Type |
+ | ! Width | ||
|- | |- | ||
− | |poi_type_id | + | | poi_type_id |
− | |Guid | + | | Guid |
− | |128 bit | + | | 128 bit |
|- | |- | ||
− | |mark_type | + | | mark_type |
− | |Int | + | | Int |
− | |32 bit | + | | 32 bit |
|- | |- | ||
− | |label | + | | label |
− | |String | + | | String |
− | | | + | | |
|- | |- | ||
− | |discovery_msg | + | | discovery_msg |
− | |String | + | | String |
− | | | + | | |
|- | |- | ||
− | |discovery_dist | + | | discovery_dist |
− | |Float | + | | Float |
− | |32 bit | + | | 32 bit |
|- | |- | ||
− | |compass_mark_type_id | + | | compass_mark_type_id |
− | |Int | + | | Int |
− | |32 bit | + | | 32 bit |
|- | |- | ||
− | |associated_codex_perk_id | + | | associated_codex_perk_id |
− | |Guid | + | | Guid |
− | |128 bit | + | | 128 bit |
|- | |- | ||
− | |discovery_msg_mode | + | | discovery_msg_mode |
− | |Int | + | | Int |
− | |32 bit | + | | 32 bit |
|- | |- | ||
− | |discoverable_by_location | + | | discoverable_by_location |
− | |Bool | + | | Bool |
− | |8 bit | + | | 8 bit |
|- | |- | ||
− | |ui_order | + | | ui_order |
− | |Int | + | | Int |
− | |32 bit | + | | 32 bit |
|} | |} | ||
− | [[Category: | + | [[Category:Kingdom Come Deliverance]] [[Category:Game Info]][[Category: Documentation]] |
Latest revision as of 12:12, 25 July 2019
Name | Width in TBL file | Name in XML table descriptor |
---|---|---|
Int | 32 bit | integer |
Int64 | 64 bit | bigint |
Float | 32 bit | real |
Guid | 128 bit | uuid |
Bool | 8 bit | boolean |
String | 32 bit | text, character varying |
Vec3 | 96 bit (3 * 32 bit) | vec3 |
Quat | 128 bit (4 * 32 bit) | quat |
QuatT | 224 bit ((4 + 3) * 32 bit) | quatt |
Padding | variable |
Notes
- Strings are stored as 32-bit signed integers pointing into the string table. See TBL File Format in KCD.
- Most tables do not use any padding. Whether table uses or doesn't use padding is hard-coded in KCD source. KCD data can only tell you that there is some padding somewhere, but not where. To see whether table uses padding, compare table description in XML file with line size in TBL file.
Example - POI Types Table
Column | Type | Width |
---|---|---|
poi_type_id | Guid | 128 bit |
mark_type | Int | 32 bit |
label | String | |
discovery_msg | String | |
discovery_dist | Float | 32 bit |
compass_mark_type_id | Int | 32 bit |
associated_codex_perk_id | Guid | 128 bit |
discovery_msg_mode | Int | 32 bit |
discoverable_by_location | Bool | 8 bit |
ui_order | Int | 32 bit |