Dolphin, the GameCube and Wii emulator - Forums

Full Version: How Do I Load A Controller Profile In a Game.INI?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

I am currently playing through two different games that require two different controller settings. As I launch my games through Playnite I prefer to configure things on a per-game basis as to allow me the most seamless experience. Currently I am trying to figure out how to load a controller profile in a games .INI file, or with command-line arguments, but cannot find how to do so. Does anyone know? I am aware that I can place my controller configurations in the game .INI file, but for some reason this is not working. For example I have the following .INI for Super Mario Galaxy:

```
# RMGE01, RMGJ01, RMGK01, RMGP01 - SUPER MARIO GALAXY
[Core]
# Values set here will override the main Dolphin settings.
WiimoteEnableSpeaker = False

[OnLoad]
# Add memory patches to be loaded once on boot here.

[OnFrame]
# Add memory patches to be applied every frame here.

[ActionReplay]
# Add action replay cheats here.

[Video_Settings]
SafeTextureCacheColorSamples = 512
HiresTextures = True
CacheHiresTextures = True

[Video_Stereoscopy]
StereoConvergence = 623

[Video_Hacks]
EFBAccessEnable = True
EFBAccessDeferInvalidation = True

[Video_Enhancements]
ArbitraryMipmapDetection = True

[Controller]
Device = XInput/0/Gamepad
Buttons/A = `Trigger R`|`Button A`
Buttons/B = `Shoulder R`|`Button B`
Buttons/- = Back
Buttons/+ = Start
IR/Dead Zone = 5.0
IR/Up = `Shoulder L`&`Right Y+`
IR/Down = `Shoulder L`&`Right Y-`
IR/Left = `Shoulder L`&`Right X-`
IR/Right = `Shoulder L`&`Right X+`
IR/Hide = !`Shoulder L`
Tilt/Forward = `Pad N`&`Right Y+`|`Pad S`&`Right Y+`
Tilt/Backward = `Pad N`&`Right Y-`|`Pad S`&`Right Y-`
Tilt/Left = `Pad N`&`Right X-`|`Pad S`&`Right X-`
Tilt/Right = `Pad N`&`Right X+`|`Pad S`&`Right X+`
Tilt/Modifier/Range = 50.0
Shake/X = `Button Y`|`Button X`
Shake/Y = `Button Y`|`Button X`
Shake/Z = `Button Y`|`Button X`
Extension = Nunchuk
Nunchuk/Buttons/C = `Thumb R`
Nunchuk/Buttons/Z = `Trigger L`
Nunchuk/Stick/Up = `Left Y+`
Nunchuk/Stick/Down = `Left Y-`
Nunchuk/Stick/Left = `Left X-`
Nunchuk/Stick/Right = `Left X+`
Nunchuk/Stick/Modifier/Range = 50.0
Nunchuk/Tilt/Modifier/Range = 50.0
Classic/Left Stick/Modifier/Range = 50.0
Classic/Right Stick/Modifier/Range = 50.0
Guitar/Stick/Modifier/Range = 50.0
Drums/Stick/Modifier/Range = 50.0
Turntable/Stick/Modifier/Range = 50.0
uDraw/Stylus/Modifier/Range = 50.0
Drawsome/Stylus/Modifier/Range = 50.0
Rumble/Motor = `Motor L`|`Motor R`
D-Pad/Up = !`Shoulder L`&!`Pad N`&!`Pad S`&`Right Y+`
D-Pad/Down = !`Shoulder L`&!`Pad N`&!`Pad S`&`Right Y-`
D-Pad/Left = !`Shoulder L`&!`Pad N`&!`Pad S`&`Right X-`
D-Pad/Right = !`Shoulder L`&!`Pad N`&!`Pad S`&`Right X+`
Options/Upright Wiimote = `Pad N`
```
But this does not work for some reason. Everything except the controller settings is being properly loaded. Did I do something wrong?
You can't specify the controls directly in a game INI. You have to put the controls in a profile and then specify the profile in the game INI. https://wiki.dolphin-emu.org/index.php?t...[Controls]
(08-02-2023, 05:43 PM)JosJuice Wrote: [ -> ]You can't specify the controls directly in a game INI. You have to put the controls in a profile and then specify the profile in the game INI. ]https://wiki.dolphin-emu.org/index.php?title=GameINI_(Controller_Settings)#[Controls]

Aha! I am working on fixing my game .INI file, but am running into an issue. Working on my Super Mario galaxy .INI I now have the following.

```
# Values set here will override the main Dolphin settings.
WiimoteEnableSpeaker = False

[OnLoad]
# Add memory patches to be loaded once on boot here.

[OnFrame]
# Add memory patches to be applied every frame here.

[ActionReplay]
# Add action replay cheats here.

[Video_Settings]
SafeTextureCacheColorSamples = 512
HiresTextures = True
CacheHiresTextures = True

[Video_Stereoscopy]
StereoConvergence = 623

[Video_Hacks]
EFBAccessEnable = True
EFBAccessDeferInvalidation = True

[Video_Enhancements]
ArbitraryMipmapDetection = True

[Controller]
WiimoteProfile1 = Super Mario Galaxy
```
But when I launch the game it asks for me to connect a nunchuck. Did I forget something? I don't have time to test it, but this is my Battalion Wars one in case I am making a repeated mistake.

```
# G8WE01, G8WP01 - Battalion Wars

[Core]
# Values set here will override the main Dolphin settings.
SyncOnSkipIdle = False

[OnLoad]
# Add memory patches to be loaded once on boot here.

[OnFrame]
# Add memory patches to be applied every frame here.

[ActionReplay]
# Add action replay cheats here.

[Video_Settings]
AspectRatio = 0

[Controller]
PadType0 = 6
PadProfile1 = Battalion Wars
```
Enabling the Nunchuk is something you would have to do in the controller profile rather than in the game INI.