1
Fork 0
mirror of https://github.com/xivdev/EXDSchema.git synced 2025-06-07 00:27:46 +00:00

Update Usage.md

This commit is contained in:
liam 2023-09-17 22:37:51 -04:00
parent 6be4d770f1
commit a682c0787d

View file

@ -47,14 +47,14 @@ fields:
- name: CauseBind - name: CauseBind
- name: CauseDeath - name: CauseDeath
``` ```
This schema is valid because it is accurate - not in name, but in structure. It defines a field for each column in the EXH file as of 6.48. This schema is valid because it is accurate in structure. It defines a field for each column in the EXH file as of 6.48.
### Types ### Types
Valid types for fields in a schema are `scalar`, `array`, `icon`, `modelId`, and `color`. Valid types for fields in a schema are `scalar`, `array`, `icon`, `modelId`, and `color`.
#### scalar #### scalar
The default type. If the `type` is omitted from a field, it will be assumed to be a scalar. Effectively does nothing except tell consumers that The default type. If the `type` is omitted from a field, it will be assumed to be a `scalar`. Effectively does nothing except tell consumers that
"this field is not an array". "this field is not an `array`".
#### icon : uint32 #### icon : uint32
In the above AozActionTransient example, In the above AozActionTransient example,
@ -66,21 +66,21 @@ can become
- name: Icon - name: Icon
type: icon type: icon
``` ```
While this may seem redundant, there are many fields in column that refer to an icon within the `06`, or the `ui/` category, While this may seem redundant, there are many fields in sheets that refer to an icon within the `06`, or the `ui/` category,
but the field itself is just a uint32. This is a hint for any consumer that attempts to display this field that the data in this column but the field itself is just a `uint32`. This is a hint for any consumer that attempts to display this field that the data in this column
can be used to format an icon path, like generating `ui/icon/132000/132122_hr1.tex` when the field contains `132122`, without the consumer having can be used to format an icon path, like generating `ui/icon/132000/132122_hr1.tex` when the field contains `132122`, without the consumer having
to manually determine which columns contain icons. to manually determine which columns contain icons.
#### modelId : uint32, uint64 #### modelId : uint32, uint64
Model IDs in the game are packed into either a uint32 or a uint64. Model IDs in the game are packed into either a `uint32` or a `uint64`.
uint32 packing is like so: `uint32` packing is like so:
``` ```
uint16 modelId uint16 modelId
uint8 variantId uint8 variantId
uint8 stain uint8 stain
``` ```
uint64 packing is like so: `uint64` packing is like so:
``` ```
uint16 skeletonId uint16 skeletonId
uint16 modelId uint16 modelId
@ -211,50 +211,36 @@ A sheet's single column can link to multiple columns depending on another field
- name: Location - name: Location
comment: PlaceName when LocationKey is 1, ContentFinderCondition when LocationKey is 4 comment: PlaceName when LocationKey is 1, ContentFinderCondition when LocationKey is 4
link: link:
target: [PlaceName, ContentFinderCondition]
condition: condition:
switch: LocationKey switch: LocationKey
cases: cases:
1: [0] 1: [PlaceName]
4: [1] 4: [ContentFinderCondition]
``` ```
The targets array must contain all possible sheets that this field can link to. The targets array is not required for conditional links.
When defining the link, add a `condition` object with a `switch` key that defines the field to switch on the value of. When defining the link, add a `condition` object with a `switch` key that defines the field to switch on the value of.
The `cases` dictionary contains arrays of *the indexes of the desired sheet(s) in the target array* to resolve to when the case matches. The `cases` dictionary contains arrays of the sheet to reference when the case matches.
Yes, the `case` dictionary may contain an *array*. This means that each case can be a [multi link](#multi-link) as well. Take `Item` for example: Yes, the `case` dictionary may contain an *array*. This means that each case can be a [multi link](#multi-link) as well. Take `Item` for example:
```yml ```yml
- name: AdditionalData - name: AdditionalData
link: link:
target:
- Stain
- TreasureHuntRank
- GardeningSeed
- AetherialWheel
- CompanyAction
- TripleTriadCard
- AirshipExplorationPart
- Orchestrion
- SubmarinePart
- HousingExterior
- HousingInterior
- HousingYardObject
- HousingFurniture
- HousingPreset
- HousingUnitedExterior
condition: condition:
switch: FilterGroup switch: FilterGroup
cases: cases:
14: [9, 10, 11, 12, 13, 14] 14: [HousingExterior, HousingInterior,
15: [0] HousingYardObject, HousingFurniture,
18: [1] HousingFurniture, HousingPreset,
20: [2] HousingUnitedExterior]
25: [3] 15: [Stain]
26: [4] 18: [TreasureHuntRank]
27: [5] 20: [GardeningSeed]
28: [6] 25: [AetherialWheel]
32: [7] 26: [CompanyAction]
36: [8] 27: [TripleTriadCard]
28: [AirshipExplorationPart]
32: [Orchestrion]
36: [SubmarinePart]
``` ```
The `AdditionalData` column does a lot of heavy lifting. We can assume during game execution that the use of the field is heavily based on context, The `AdditionalData` column does a lot of heavy lifting. We can assume during game execution that the use of the field is heavily based on context,
but for research and data exploration, having the ability to define the exact sheet is very useful. Here, we can see that when `FilterGroup` is `14`, but for research and data exploration, having the ability to define the exact sheet is very useful. Here, we can see that when `FilterGroup` is `14`,