Skip to content

Features Mods

Albeoris edited this page Feb 12, 2022 · 4 revisions

The mod system, similar to the import mechanics, allows you to replace dynamically loaded files by putting the replacement on the file system at a specific path.

The only difference is the ability to include files with the same paths in different mods (conflicting changes).

For most resources, the conflict is resolved by the fact that in this case we take the last file (sorted by name).

But CSV files now support partial modification. So you can add a new row, delete an existing row, or modify any value (even one cell) without changing the entire file.

For example, you can decrease the accuracy of an axe and another modder will increase the cost of a sword. Your changes do not conflict and will work together.

Configuration

All changes are turned on by default. To change them you need to edit the configuration file.

[Assets]

## Overwrite the supported resources from the ModsDirectory.
# Setting type: Boolean
# Default value: true
ModsEnabled = true

## Directory from which the supported resources will be updated.
# Setting type: String
# Default value: %StreamingAssets%/Mods
# Acceptable values: absolute or relative path to the EXISTING directory. Placeholders: %StreamingAssets%, %DataPath%, %PersistentDataPath%, %TemporaryCachePath%
ModsDirectory = %StreamingAssets%/Mods

File System Structure

By default, the game will look for mods in the %StreamingAssets%/Mods folder

This directory should contain folders with mod names. For example: Flying Fortress 5F - All Warmechs

Folders are sorted by name. The higher the folder, the less important the changes you make are considered - on a collision, a mod from the next folder can override resources from previous mods. You can use this to sort mods with conflicting changes.

If the game is installed in C:\Games\FINAL FANTASY PR and we want to make changes to the Assets\GameAssets\Serial\Data\Master\monster_set.csv file (use export to extract files and getting the correct folder structure), then the modified file should be located along the path C:\Games\FINAL FANTASY PR\FINAL FANTASY_Data\StreamingAssets\Mods\Flying Fortress 5F - All Warmechs\Assets\GameAssets\Serial\Data\Master\monster_set.csv

  • C:\Games\FINAL FANTASY PR\FINAL FANTASY_Data\StreamingAssets\Mods\ is the path specified in configuration file.
  • Flying Fortress 5F - All Warmechs - mod name
  • Assets\GameAssets\Serial\Data\Master\monster_set.csv - the name of the modified file

Partial CSV

Example: encount_area_grid.csv

id,grid_width,grid_height,base_number,x_start_point,y_start_point
1,8,8,100,-8,-9
2,8,8,200,-8,-9

Change certain cell

We want to change x_start_point and y_start_point of entry with id 2

id,x_start_point,y_start_point
2,-7,0

Logs:

[Info   :Memoria IL2CPP] [Mod] Merging data from %StreamingAssets%\Mods\MyFirstMod\Assets/GameAssets/Serial/Data/Master/encount_area_grid.csv
[Info   :Memoria IL2CPP] [Mod] Changed row [2].  x_start_point(-8 -> -7) y_start_point(-9 -> 0)

Add new entries

We want to add new entries with ids 202201141, 202201142 and 202201143

id,grid_width,grid_height,base_number,x_start_point,y_start_point
202201141,16,16,400,-20,-20
202201142,16,16,400,-10,-10
202201143,16,16,400,-5,-5

Logs:

[Info   :Memoria IL2CPP] [Mod] Merging data from %StreamingAssets%\Mods\MyFirstMod\Assets/GameAssets/Serial/Data/Master/encount_area_grid.csv
[Info   :Memoria IL2CPP] [Mod] Added new row: 202201141,16,16,400,-20,-20
[Info   :Memoria IL2CPP] [Mod] Added new row: 202201142,16,16,400,-10,-10
[Info   :Memoria IL2CPP] [Mod] Added new row: 202201143,16,16,400,-5,-5

Remove existing entry

We want to remove entry with id 2

id
-2
[Info   :Memoria IL2CPP] [Mod] Merging data from %StreamingAssets%\Mods\MyFirstMod\Assets/GameAssets/Serial/Data/Master/encount_area_grid.csv
[Info   :Memoria IL2CPP] [Mod] Removed existing row [2].  2,8,8,200,-8,-9

Examples

There are some examples of mods that use Partial CSV: