Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/_data/tech/data-files/ctb_data_block.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
"Offset","Type","Name","Notes"
"0x0","byte","tickSpeed","Base ticks per turn"
"0x1","byte","ICV_reduction","Max possible reduction to base ICV"
2 changes: 2 additions & 0 deletions docs/_data/tech/data-files/gear_rate_block.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
"Offset","Type","Name","Notes"
"0x0","int","value","The value of the auto-ability"
2 changes: 2 additions & 0 deletions docs/_data/tech/data-files/mix_table_block.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
"Offset","Type","Name","Notes"
"0x0","short[112]","mixList","IDs of resulting Mix Overdrives"
41 changes: 41 additions & 0 deletions docs/tech/data-files/ctb-data.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
grand_parent: "Tech"
parent: "Data Files"
title: "CTB Data"
---
# {{ page.title }}
{: .no_toc }

## Table of contents
{: .no_toc }

1. TOC
{:toc}

## CTB Data files
The general data file mapping CTB values to Agility values is called `ctb_base.bin` and can be found inside the `FFX_Data/ffx_ps2/ffx/master/jppc/battle/kernel` folder in the VBF archive.

The Agility stat determines two parameters used in the Conditional Turn-Based Battle system. The first is **Tick Speed**, and the second is **Initial Counter Value** (or **ICV**). Every action taken by a character generates a **Tick Counter** according to the following formula:

```Counter = TickSpeed * Rank * HasteStatus```

where `rank` is the move's rank (specified in command data) and `HasteStatus` is 0.5 when the character is under the Haste status, 2 when under Slow, and 1 otherwise. Non-integer results are rounded up. Every character's counter is reduced by 1 each "tick", and the character's next turn occurs when their counter reaches 0.

During a Pre-emptive Strike or Ambush, the disadvantaged side's counters are initialized to `TickSpeed * 3` at the start of battle. Otherwise, this is only the *maximum possible* initial counter value, and the ICV has a chance to be reduced by a number based on Agility. For enemies, `TickSpeed * 3` is instead the *minimum* possible ICV, and ranges are much greater; however, that data is not stored here.

The lowest possible tick speed is 3, which is achieved at 170 Agility. Agility has sharply diminishing returns above the value of 62, with extremely large gaps between further reductions in tick speed and some increments not even conferring a greater reduction in ICV.

### Block
The CTB data block is 2 (0x2) bytes long and consists of two 8-bit integers.

{% for row in site.data.tech.data-files.ctb_data_block -%}
{%- if forloop.first -%}
|{% for cell in row %} {{ cell[0] }} |{% endfor %}
|{% for cell in row %} :---: |{% endfor %}
{% endif -%}
|{% for cell in row %} {{ cell[1] }} |{% endfor %}
{% endfor %}

The block is repeated for every value of Agility, up to the stat maximum of 255.

Written by [{{ site.contributors.irin.name }}]({{ site.contributors.irin.url }})
2 changes: 1 addition & 1 deletion docs/tech/data-files/customizations.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ title: "Customizations"
{:toc}

## Customization data files
The general data file containing item prices is called `kaizou.bin` and can be found inside the `FFX_Data/ffx_ps2/ffx/master/jppc/battle/kernel` folder in the VBF archive.
The general data file containing customizations is called `kaizou.bin` and can be found inside the `FFX_Data/ffx_ps2/ffx/master/jppc/battle/kernel` folder in the VBF archive.

### Block
The customization block is 8 (0x8) bytes long and consists of four shorts.
Expand Down
44 changes: 44 additions & 0 deletions docs/tech/data-files/gear-prices.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
grand_parent: "Tech"
parent: "Data Files"
title: "Equipment Prices"
---
# {{ page.title }}
{: .no_toc }

## Table of contents
{: .no_toc }

1. TOC
{:toc}

## Equipment Price files
Equipment price is partially determined by its auto-abilities, each of which have an associated gil value. The general data file containing the value of each auto-ability is called `arms_rate.bin` and can be found inside the `FFX_Data/ffx_ps2/ffx/master/jppc/battle/kernel` folder in the VBF archive.

The full formula for determining equipment price is:

```(50 + sum(ability_value)) * slots_factor * empty_slots_factor```

where `slots_factor` and `empty_slots_factor` are arrays with indices corresponding to the number of filled and empty slots, respectively. The values for each are as follows:

```
EQUIPMENT_SLOTS_GIL_MODIFIERS = (1, 1, 1.5, 3, 5)
EQUIPMENT_EMPTY_SLOTS_GIL_MODIFIERS = (1, 1, 1.5, 3, 400)
```

The location of the formula data is currently unknown.

### Block
The gear price block is 4 (0x4) bytes long and consists only of a single integer determining an auto-ability's value.

{% for row in site.data.tech.data-files.gear_rate_block -%}
{%- if forloop.first -%}
|{% for cell in row %} {{ cell[0] }} |{% endfor %}
|{% for cell in row %} :---: |{% endfor %}
{% endif -%}
|{% for cell in row %} {{ cell[1] }} |{% endfor %}
{% endfor %}

The block is repeated for every existing auto-ability (and more if unmodified). The index of the block, that is, the point at which it appears in the file, determines which auto-ability it contains the value for. The first block contains the value of Sensor, the second contains the value of First Strike, the third of Initiative, and so on.

Written by [{{ site.contributors.irin.name }}]({{ site.contributors.irin.url }})
2 changes: 1 addition & 1 deletion docs/tech/data-files/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Unless otherwise stated, all data is written in little endian.

General data files header:

{% for row in site.data.tech.data-files.general_headers -%}
{% for row in site.data.tech.data-files.general_header -%}
{%- if forloop.first -%}
|{% for cell in row %} {{ cell[0] }} |{% endfor %}
|{% for cell in row %} :---: |{% endfor %}
Expand Down
33 changes: 33 additions & 0 deletions docs/tech/data-files/mix-table.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
grand_parent: "Tech"
parent: "Data Files"
title: "Mix Table"
---
# {{ page.title }}
{: .no_toc }

## Table of contents
{: .no_toc }

1. TOC
{:toc}

## Mix Table files
The general data file mapping item combinations to Mix Overdrives is called `prepare.bin` and can be found inside the `FFX_Data/ffx_ps2/ffx/master/jppc/battle/kernel` folder in the VBF archive.

### Block
The data block is 224 (0xE0) bytes long and consists of a short array of length 112.

{% for row in site.data.tech.data-files.mix_table_block -%}
{%- if forloop.first -%}
|{% for cell in row %} {{ cell[0] }} |{% endfor %}
|{% for cell in row %} :---: |{% endfor %}
{% endif -%}
|{% for cell in row %} {{ cell[1] }} |{% endfor %}
{% endfor %}

The block is repeated for each consumable item in the game. This effectively produces a `u16[112][112]` 2-dimensional array. The first index corresponds to the first item selected, and the second index corresponds to the second item selected. Each value of the array is the ID of the resulting Mix Overdrive.

Each block only has entries up to the combination of the item with itself, with all of the following entries being blank. So for example, block 0 only has an ID in its first index, corresponding to the combination of Potion \+ Potion, with the other 111 entries having a null value of `0x0000`.

Written by [{{ site.contributors.irin.name }}]({{ site.contributors.irin.url }})