Creating your mod: Assets

How Bonds handles image and audio assets and how to mod them

Depending on the type of assets you're modding, there are different steps to go through. As said before, because it was incompatible with the Android build, there is no dynamic asset lookup like Didnapper 2 does. Every asset is explicitly defined one way or another within the code or data.

For audio assets, that does not translate to anything out of the ordinary; For image assets, however, that means you will likely have to register your new image within the cache set of whichever scene it appears in.

There are multiple exceptions to this requirement, however:

Replacing existing assets

If your mod seeks to simply replace some of the base game's assets (both images and audio), the process is very straightforward: you just need to reproduce the path of the asset within your mod.

For example, the title screen's background's path is img/menus/TitleScreenBG.png . For your mod to replace it, you only need to recreate the img folder at the root of your mod, the menus folder inside it and then place the new title screen image within it and name it TitleScreenBG. The game will now load your mod's title screen file in place of the base game's, and since the game already defines the title screen background and its usage, there is no need for you to do so.

This behaviour is dependent on the mods load order. If multiple mods replace the same assets, the assets that will be used will be the ones of the mod that is loaded the latest.

Adding facesets

Facesets are also straightforward. Simply place them in the correct folder within your mod (img/facesets/[character]/[type]/ for story facesets, and img/DI/Assets/[character]/Expressions/ for session facesets. They will then appear in the dialogs editor and/or interactions editor.

The game looks at the scene's (either story or interactions scene) faceset nodes in order to figure out which facesets are used and need to be cached, so there is no need to do anything else.

This also applies to the backgrounds in img/backgrounds/ and to a lesser extent to the CGs in img/CGs (CGs still need to be defined within BondsGallery#GALLERY_DATA() in order to show up in the gallery)

Adding session items

Session items all need to be defined within BondsItems#ITEMS_DATA() , there is a lot of data that needs to be specified for them. Once defined though, they do not need to be added to a cache set, as the session set's cache is built automatically based on the data from BondsItems#ITEMS_DATA()

Other assets

For any other asset, it is highly likely you'll need to define them in whichever cache set of the scene they appear in, a scene's cache set is typically under [Scene]#_settings() or [Scene]#settings().

For example, take a look at BondsCharacterSelectScene#_settings() (under js/plugins/BondsCharacterSelectScene.js)

Adding the images used in the scene to the cache set isn't strictly necessary, but it is highly recommended to avoid sprites showing up late

Last updated