Editing the control assignments is easy. Just add this script set_controls.lua to your project:
--Script to initialize the control scheme
--require() this in features.lua to enable it
require("scripts/multi_events")
local function controls(game)
local value = game:get_value("controls")
--Keyboard commands.
game:set_command_keyboard_binding("attack", "s")
game:set_command_keyboard_binding("action", "space")
game:set_command_keyboard_binding("item_1", "d")
game:set_command_keyboard_binding("item_2", "a")
game:set_command_keyboard_binding("pause", "return")
--Game Controller commands.
game:set_command_joypad_binding("attack", "button 0")
game:set_command_joypad_binding("action", "button 1")
game:set_command_joypad_binding("item_1", "button 2")
game:set_command_joypad_binding("item_2", "button 3")
game:set_command_joypad_binding("pause", "button 7")
end
local game_meta = sol.main.get_metatable("game")
game_meta:register_event("on_started", controls)
And then add the line require("scripts/set_controls") to features.lua. Change the arguments to whatever you want the controls to be.
You mention having a shield button - does this mean that you want the shield to work like in Minish Cap or ALBW - where you hold the button to defend and can sidestep while defending? If so, do you have code for this already made and would you be willing to share? Or perhaps it is already available online somewhere? I would also like this system in my project.
PS - do you not find Z, X, and C too close to the spacebar for comfort? Playing that way I feel like I'm using a system made for a child's hand, (and my hands aren't even that big, compared to average). That's why I set my buttons to A, S, and D in my script, to have more space.