Guides/Adding New Ship Customization Entries: Difference between revisions
RocketRacer (talk | contribs) (Initial dump of information) |
RocketRacer (talk | contribs) (Added visual example of the result of mod IDs clashing) |
||
(5 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{Page in progress}} | {{Page in progress}} | ||
== Preface == | |||
Adding new ship customization entries to the game files requires jumping through a couple of hoops, but at the same time is relatively straightforward. It's important to | Adding new ship customization entries to the game files requires jumping through a couple of hoops, but at the same time it is ''relatively'' straightforward, just a little finnicky. It's important to know that '''any other mods that modify the same files as your mod will break things'''. You will have missing UI textures at best and missing entire models at worst (see example in '''Common issues''' section at the bottom of this guide). In other words - there is no real benefit of adding ''new'' ship customization items as separate entries to the game files instead of ''overwriting existing'' sails/hull'','' unless the player intends to play without any other mod that edits the same files as your mod. This is not to discourage you from making your mod add new entries, but simply a word of caution, mod away! :) You can always add compatibility with other mods at your own liking with relative ease, so not all is bad. | ||
== Preparing files to edit == | |||
Refer to [[Like a Dragon: Pirate Yakuza in Hawaii/Ship Customization]] for additional information on what files to look for and where. | |||
List of all files that you need to extract and edit in order to be able add your custom sails/hull into the game as brand new entries to the game files. If you wish to simply recolour the existing sails/hull, refer to these guides instead: | |||
* [[Guides/Ship Sails Customization]] | |||
All | * [[Guides/Ship Hull Customization]] | ||
All origin filenames and directories are relative to <code><game dir>\LikeADragonPirates\runtime\media\data</code> | |||
{| class="wikitable" | {| class="wikitable" | ||
|+List of files that need to be edited to add new sails and hull entries to the game (figurehead and body decorations TBD) | |+List of files that need to be edited to add new sails and hull entries to the game (figurehead and body decorations TBD) | ||
Line 45: | Line 48: | ||
|} | |} | ||
=== | == Step-by-step guide == | ||
With all the prerequisite information out of the way we are able to start modding the game files to add your new sails and hull items to it. | |||
'''This section needs expansion, clarity and images - will work on this in more detail soon tm''' | |||
=== Sails === | |||
In my example I'm adding new custom sails of Koganei Niko from Hololive. I will use the name "Koganei Niko" for the text that is shown in UI and all of the string ID entries will have <code>niko</code> in their name. ID numbers are important to get right, while the names of entries can be named however you want. | |||
# Add new entry to <code>ui_texture.bin</code>, taking note of the ID of the item that you added | |||
# Add new entry to <code>item.bin</code> by copy-pasting an entry of any other Sails, taking note of the ID of the item that you added. Replace <code>"icon"</code> and <code>"icon_big"</code> with the ID from '''Step 1''' | |||
# Add new entry to <code>pirate_ship_ship_model_customize_sail_category.bin</code> by copy-pasting an entry of any other sails category, taking note of the ID of the item that you added. Replace listed filenames in your entry to your liking. Leave vanilla filenames if you wish them to be unchanged, or refer to any other already-existing filenames in the game files. See [[Like a Dragon: Pirate Yakuza in Hawaii/Ship Customization]] to find filenames for sails of your choice. Do '''not''' include filenames that do not exist otherwise the sails won't apply. Double check that the files you are included in your mod folder are all listed correctly. Only replace existing filenames with your custom files that are different from vanilla files - you do not need to include every single texture, material and normal map in your mod files! | |||
# Add new entry to <code>pirate_ship_ship_model_customize_sail.bin</code> by copy-pasting an entry of any other sail, taking note of the ID of the entry you added. Replace <code>"category"</code> number with your category ID from '''Step 3''' | |||
# Add new entry to <code>pause_pirate_menu_ship_customize_part.bin</code> by copy-pasting an entry of any other sail - be mindful that the sails that have variants have their own entries - if you are adding sails that don't have variants you're better off copy-pasting an entry that also doesn't have variants e.g. "Taiga Saejima" or "Tiger". Replace <code>"sail_model"</code> ID with the ID from '''Step 4'''. Replace <code>"ui_texture"</code> ID with ID from '''Step 1'''. Replace <code>"item"</code> ID with ID from '''Step 2'''. | |||
Visual representation of the steps you need to take and the overall dependency of every file. The relevant filenames are shown at the top of each individual Notepad++ screenshot.[[File:ModdingGuide-FileDependenciesForSails.png|none|thumb|1000x1000px|Dependencies for adding custom sails entries]] | |||
=== Hull === | |||
In my example I'm adding new custom hull of Houshou Marine from Hololive. I will use the name "Houshou Marine" for the text that is shown in UI and all of the string ID entries will have <code>marine</code> in their name. ID numbers are important to get right, while the names of entries can be named however you want. | |||
# TBA | |||
Visual representation of the steps you need to take and the overall dependency of every file. The relevant filenames are shown at the top of each individual Notepad++ screenshot.[[File:ModdingGuide-FileDependenciesForHull.png|none|thumb|1000x1000px|Dependencies for adding custom hull entries]] | |||
(name field for every entry in <code>asset_id.dat</code> can also be whatever you want, it doesn't seem to need to follow any naming convention but we will not be using that name for anything anyway) | |||
== Common issues == | |||
=== Clashing IDs === | |||
'''I'''f you want to have make two mods that add new type of sails/hull to customize your ship - they will overwrite each other when loaded by SRMM. There is a workaround of making your mods (and any other mods made by others, for that matter) compatible with one another, but that will only work within the scope of those mods in particular. | |||
[[File:ModdingGuide-IDclash.jpg]] | |||
In the example above I have two separate mods that modify the same <code>pause_pirate_menu_ship_customize_part.bin</code> file to add a new customization option to the list of items that you can select from ship Customization menu. Depending on which mod is listed higher in the SRMM mod list that mod's file will be loaded and overwrite the other mod's changes. This is universal across all other mods that change same files and is not exclusive to Pirate Yakuza. Keep this in mind if you wish to add new ship customization item entries! | |||
In the example above if you have a save file that has the body type (hull) from the left file equipped on your ship and you load the mod on the right then your pirate ship will be missing its hull and will completely break things: | |||
[[File:SRMM mod order.png|none|thumb|SRMM mod load example - mod listed further down is loaded on top of the mod listed above]] | |||
[[File:Hull game file overwritten example.jpg|none|thumb|900x900px|Example of a hull ID being overwritten by another mod and completely annihilating your ship]] | |||
If this happens, you will need to manually adjust the mod file of the newer mod (in the example, the one on the right) to include the same entries from the older mod (in the example, the mod on the left) while appending <u>the ID number</u>, <u>reARMP_rowIndex</u> and <u>ROW_COUNT</u> accordingly. |
Latest revision as of 21:26, 8 April 2025
![]() |
This page is under construction Check back later for additional changes |
Preface
Adding new ship customization entries to the game files requires jumping through a couple of hoops, but at the same time it is relatively straightforward, just a little finnicky. It's important to know that any other mods that modify the same files as your mod will break things. You will have missing UI textures at best and missing entire models at worst (see example in Common issues section at the bottom of this guide). In other words - there is no real benefit of adding new ship customization items as separate entries to the game files instead of overwriting existing sails/hull, unless the player intends to play without any other mod that edits the same files as your mod. This is not to discourage you from making your mod add new entries, but simply a word of caution, mod away! :) You can always add compatibility with other mods at your own liking with relative ease, so not all is bad.
Preparing files to edit
Refer to Like a Dragon: Pirate Yakuza in Hawaii/Ship Customization for additional information on what files to look for and where.
List of all files that you need to extract and edit in order to be able add your custom sails/hull into the game as brand new entries to the game files. If you wish to simply recolour the existing sails/hull, refer to these guides instead:
All origin filenames and directories are relative to <game dir>\LikeADragonPirates\runtime\media\data
Filename | Origin | Editing purpose |
---|---|---|
pause_pirate_menu_ship_customize_part.bin | db.spr.<language>.par | Add an entry for your sails/hull to be selectable in Customization screen: name, price, availability (e.g. direct purchase, a shop, etc.), variants (more than one type of customization that you can select one you acquire the item) |
pirate_ship_ship_model_customize_body.bin | db.spr.<language>.par | Add an entry for your hull stating which hull model, mast and rudder wheel to use |
pirate_ship_ship_model_customize_sail.bin | db.spr.<language>.par | Add an entry for your sails stating which sail category to use (see below) and what base colour of the sails is (RGB value) |
pirate_ship_ship_model_customize_sail_category.bin | db.spr.<language>.par | Add an entry that explicitly lists which texture file is used for which part of the sails. Your new custom texture filenames must be listed here |
item.bin | db.spr.<language>.par | Add the sails/hull as an actual item for the game to add to your inventory regardless of whether your item will be sold at a store or be purchasable from the Customization menu |
ui_texture.bin | puid.spr\ | Add an entry of your new UI texture to a list of all UI textures in the game which will be referenced multiple times across other files |
asset_id.dat | asset_ngen.par | Contains data equivalent of pirate_ship_ship_model_customize_sail_category.bin but for hull textures instead of sails textures, add a new entry here detailing which hull texture is used on which part of the hull's model (and which model is used) |
Step-by-step guide
With all the prerequisite information out of the way we are able to start modding the game files to add your new sails and hull items to it.
This section needs expansion, clarity and images - will work on this in more detail soon tm
Sails
In my example I'm adding new custom sails of Koganei Niko from Hololive. I will use the name "Koganei Niko" for the text that is shown in UI and all of the string ID entries will have niko
in their name. ID numbers are important to get right, while the names of entries can be named however you want.
- Add new entry to
ui_texture.bin
, taking note of the ID of the item that you added - Add new entry to
item.bin
by copy-pasting an entry of any other Sails, taking note of the ID of the item that you added. Replace"icon"
and"icon_big"
with the ID from Step 1 - Add new entry to
pirate_ship_ship_model_customize_sail_category.bin
by copy-pasting an entry of any other sails category, taking note of the ID of the item that you added. Replace listed filenames in your entry to your liking. Leave vanilla filenames if you wish them to be unchanged, or refer to any other already-existing filenames in the game files. See Like a Dragon: Pirate Yakuza in Hawaii/Ship Customization to find filenames for sails of your choice. Do not include filenames that do not exist otherwise the sails won't apply. Double check that the files you are included in your mod folder are all listed correctly. Only replace existing filenames with your custom files that are different from vanilla files - you do not need to include every single texture, material and normal map in your mod files! - Add new entry to
pirate_ship_ship_model_customize_sail.bin
by copy-pasting an entry of any other sail, taking note of the ID of the entry you added. Replace"category"
number with your category ID from Step 3 - Add new entry to
pause_pirate_menu_ship_customize_part.bin
by copy-pasting an entry of any other sail - be mindful that the sails that have variants have their own entries - if you are adding sails that don't have variants you're better off copy-pasting an entry that also doesn't have variants e.g. "Taiga Saejima" or "Tiger". Replace"sail_model"
ID with the ID from Step 4. Replace"ui_texture"
ID with ID from Step 1. Replace"item"
ID with ID from Step 2.
Visual representation of the steps you need to take and the overall dependency of every file. The relevant filenames are shown at the top of each individual Notepad++ screenshot.
Hull
In my example I'm adding new custom hull of Houshou Marine from Hololive. I will use the name "Houshou Marine" for the text that is shown in UI and all of the string ID entries will have marine
in their name. ID numbers are important to get right, while the names of entries can be named however you want.
- TBA
Visual representation of the steps you need to take and the overall dependency of every file. The relevant filenames are shown at the top of each individual Notepad++ screenshot.
(name field for every entry in asset_id.dat
can also be whatever you want, it doesn't seem to need to follow any naming convention but we will not be using that name for anything anyway)
Common issues
Clashing IDs
If you want to have make two mods that add new type of sails/hull to customize your ship - they will overwrite each other when loaded by SRMM. There is a workaround of making your mods (and any other mods made by others, for that matter) compatible with one another, but that will only work within the scope of those mods in particular.
In the example above I have two separate mods that modify the same pause_pirate_menu_ship_customize_part.bin
file to add a new customization option to the list of items that you can select from ship Customization menu. Depending on which mod is listed higher in the SRMM mod list that mod's file will be loaded and overwrite the other mod's changes. This is universal across all other mods that change same files and is not exclusive to Pirate Yakuza. Keep this in mind if you wish to add new ship customization item entries!
In the example above if you have a save file that has the body type (hull) from the left file equipped on your ship and you load the mod on the right then your pirate ship will be missing its hull and will completely break things:
If this happens, you will need to manually adjust the mod file of the newer mod (in the example, the one on the right) to include the same entries from the older mod (in the example, the mod on the left) while appending the ID number, reARMP_rowIndex and ROW_COUNT accordingly.