Graphics Mods: Difference between revisions

From Dolphin Emulator Wiki
Jump to navigation Jump to search
No edit summary
Line 2: Line 2:


Graphics Mods are an exciting new feature that allows users to modify games through a method of defining targets and then applying actions to those targets.  Currently, Dolphin supports three actions: Skip, Move, and Scale.  These are modifications to the target groups.  In addition to this, Dolphin has some built-in Graphics Mods that apply to certain target groups.  These include "Native Bloom" - scaling the "Bloom" target group down to the correct resolution, "No Bloom" - skipping any texture labeled in the "Bloom" target group, and "No HUD" - skipping any textures under the target group of "HUD".  You can define these or your own Target Groups in any game through using Dolphin's Texture Dumping tool or EFB dumping tools.
Graphics Mods are an exciting new feature that allows users to modify games through a method of defining targets and then applying actions to those targets.  Currently, Dolphin supports three actions: Skip, Move, and Scale.  These are modifications to the target groups.  In addition to this, Dolphin has some built-in Graphics Mods that apply to certain target groups.  These include "Native Bloom" - scaling the "Bloom" target group down to the correct resolution, "No Bloom" - skipping any texture labeled in the "Bloom" target group, and "No HUD" - skipping any textures under the target group of "HUD".  You can define these or your own Target Groups in any game through using Dolphin's Texture Dumping tool or EFB dumping tools.
==== Loading a Graphics Mod ====
Graphics Mods are loaded similarly to Texture Packs and Riivolution mods. Graphics Mods are loaded from a user's "Load" directory.  On Windows, this directory will be located in "My Documents/Dolphin Emulator/Load/Graphics Mods" by default.  A graphics mod will then be located in a subfolder, for instance "My Documents/Dolphin Emulator/Load/Graphics Mods/Wind Waker" could be the folder where you place a Wind Waker oriented Graphics Mod.  In order to make the Graphics mod valid, two files will be located in that folder: a blank txt file with the target GameIDs (GZL.txt for Wind Waker), and a file named metadata.json containing the actual Graphics Mod script.  If your script applies to multiple games, you can include multiple GameID files or an "all.txt" to make your Graphics Mod apply to any title that has compatible target groups defined.


==== Defining a Target Group for an Existing Graphics Mod ====
==== Defining a Target Group for an Existing Graphics Mod ====

Revision as of 10:28, 7 July 2022

Welcome to Graphics Mods

Graphics Mods are an exciting new feature that allows users to modify games through a method of defining targets and then applying actions to those targets. Currently, Dolphin supports three actions: Skip, Move, and Scale. These are modifications to the target groups. In addition to this, Dolphin has some built-in Graphics Mods that apply to certain target groups. These include "Native Bloom" - scaling the "Bloom" target group down to the correct resolution, "No Bloom" - skipping any texture labeled in the "Bloom" target group, and "No HUD" - skipping any textures under the target group of "HUD". You can define these or your own Target Groups in any game through using Dolphin's Texture Dumping tool or EFB dumping tools.

Loading a Graphics Mod

Graphics Mods are loaded similarly to Texture Packs and Riivolution mods. Graphics Mods are loaded from a user's "Load" directory. On Windows, this directory will be located in "My Documents/Dolphin Emulator/Load/Graphics Mods" by default. A graphics mod will then be located in a subfolder, for instance "My Documents/Dolphin Emulator/Load/Graphics Mods/Wind Waker" could be the folder where you place a Wind Waker oriented Graphics Mod. In order to make the Graphics mod valid, two files will be located in that folder: a blank txt file with the target GameIDs (GZL.txt for Wind Waker), and a file named metadata.json containing the actual Graphics Mod script. If your script applies to multiple games, you can include multiple GameID files or an "all.txt" to make your Graphics Mod apply to any title that has compatible target groups defined.

Defining a Target Group for an Existing Graphics Mod

If you're trying to create a Graphics Mod for a game using one of the aforementioned groups, all you need to do is define the group in question. The following Graphics Mod is for Fragile Dreams, and note that it has no actions. Because it uses one of the default Graphics Mods, simply setting the target group is enough to get the Graphics Mod to show up in its Game Properties page.

{
    "meta":
    {
        "title": "HUD definitions",
        "author": "iwubcode"
    },
    "groups": [
        {
            "name": "HUD",
            "targets": [
                {
                    "type": "draw_started",
                    "prettyname": "map border",
                    "texture_filename": "tex1_180x180_6e5c9aa7004f377b_1"
                },
                {
                    "type": "draw_started",
                    "prettyname": "map player marker",
                    "texture_filename": "tex1_64x64_f84b318707ee8455_1"
                },
                {
                    "type": "draw_started",
                    "prettyname": "map player facing pointer",
                    "texture_filename": "tex1_64x64_2ece13b26442de5a_0"
                }
            ]
        }
    ]
}

Creating a New Graphics Mod

If you're making more complex Graphics Mods, odds are Dolphin's default Graphics Mods won't be enough. For this, you might need to create your own target groups and actions. In this case, The Legend of Zelda: The Wind Waker has a depth of field effect that makes the game slightly blurrier than it needs to be at high distances. There are already cheatcodes to skip this depth of field effect, but we can also achieve this through a simple Graphics Mod script without having to deal with cheatcodes or having to understand the game code.

{
    "meta":
    {
        "title": "DOF definition for Wind Waker",
        "author": "iwubcode"
    },
    "groups": [
        {
            "name": "DOF",
            "targets": [
                {
                    "type": "efb",
                    "texture_filename": "efb1_n000004_320x240_3"
                }
            ]
        }
    ],
    "features":
    [
        {
            "group": "DOF",
            "action": "skip"
        }
    ]
}