Dolphin Dynamic Input Textures Specification(V2?)

Format

Dynamic Input Textures are generated textures based on a user's input formed from a group of png files and json files.



\__ Dolphin User Directory
\__ Load (Directory) \__ Textures (Directory) \__ DynamicInputTextures (Directory)
\__ FOLDER (Directorys)
\__ PNG and JSON
GO HERE
\__ DEVICESFOLDER (Directorys)
\__ JSON
GO HERE
\__ Defaultstyle (Directory)
\__ PNG
GO HERE DEVICESFOLDER can be one or multiple directories which Any folder name, with one or multiple <DEVICESID>.json underneath it(e.g. DInput_0_Keyboard Mouse.json for "DInput/0/Keyboard Mouse")

FOLDER can be one or multiple directories which are named after:

How to enable

Place the files in the format above and ensure that "Load Custom Textures" is enabled under the advanced tab of the graphics settings.



JSON files

You need at least a single json file that describes the generation parameters. You may have multiple JSON files if you prefer that from an organizational standpoint. 

Possible fields in the JSON for a texture

In each json, one or more generated textures can be specified. Each of those textures can have the following fields:


Identifier

Required

Since

image

Yes

v1

image_mode

No

V2?

devices_style

No

v2?

emulated_controls

Yes

v1

host_controls

No

v1

image - the image that has the input buttons you wish to replace, can be upscaled/redrawn if desired.



image_mode - A value from 0-2 , default is 0.



devices_style - Sets the style for the devices textures, so it is possible to change to a different style for the Devices Textur without changing everything via host_controls. default is „Defaultstyle“.

emulated_controls - a map of emulated devices (ex: Wiimote1,
GCPad2) each with their own section of emulated buttons that map to an array of "regions". Each region is a rectangle defined as a json array of four entries. The rectangle bounds are offsets into the image where the replacement occurs (left-coordinate, top-coordinate, right-coordinate, bottom-coordinate).



host_controls - No longer needed, use devices_style.

Global fields in the JSON applied to all textures

The following fields apply to all textures in the json file:

Identifier

Since

generated_folder_name

v1

preserve_aspect_ratio

v1

default_host_controls

v1



generated_folder_name - the folder name that the textures will be generated into. Optional, defaults to '_Generated'

preserve_aspect_ratio - will preserve the aspect ratio when replacing the colored boxes with the image. Optional, defaults to on

default_host_controls - No longer needed, use DEVICESFOLDER.

Examples

An example for a game that has a pressed animation for the buttons. (Super Mario Galaxy)

\__ RMG (Directory)
\__ output
.json
\__ icons_128X128.png
\__ XInput (Directory)
\__
Xinput_0_Gamepad.json
\__ Defaultstyle (Directory)
\__
ButtonA.png
\__
ButtonB.png
\__ ButtenPressed (Directory)
\__
ButtonA.png
\__
ButtonB.png For the Xinput_0_Gamepad.json. {
"XInput/0/Gamepad": {
"`Button A`": "ButtonA.png",
"`Button B`": "ButtonB.png"
}
} For the output.json. {
"output_textures":
{
"tex1_32x32_9a47da88341f0c3e_2.png":
{
"image": "icons_128X128.png",
"emulated_controls": {
"Wiimote1":
{
"Buttons/A": [
[0, 0, 128, 128]
]
}
}
},
"tex1_32x32_13bce5749bdf8d96_2.png":
{
"image": "icons_128X128.png",
"devices_style": "ButtenPressed"
"emulated_controls": {
"Wiimote1":
{
"Buttons/A": [
[0, 0, 128, 128]
}
}
}

}
now we also want to support the dualshock4 controller, for this we only need to add the following files.
\__ DualShock4 (Directory)
\__ DSUClient_0_DualShock4
.json
\__ Defaultstyle (Directory)
\__ Cross
.png
\__ Circle
.png
\__ ButtenPressed (Directory)
\__ Cross
.png
\__ Circle
.png For the DSUClient_0_DualShock4.json. {
"DSUClient/0/DualShock4": {
"`Cross`": "Cross.png",
"`Circle`": "Circle.png"
}
}