Falcao Pearl ABS - What would it take to change which keys/buttons are used?

Hi,

I'm making use of Falcao Pearl ABS for a project. Could be I'm overlooking something obvious in the scripts, but I'm simply looking to change which keys are used for various functions.

For example, the F key is used for attacking in this script. I'm hoping to make my game playable by gamepad by setting it instead to use one of the available keys that show up on the gamepad/keyboard properties (for example, F could be set to the "S" key, which, in theory, should allow me to map it to a USB controller.

I realize there are several more keys used in the Pearl ABS script than there are supported mapping keys in RPG Maker VX Ace, but I'm hoping to nullify this issue by simply not using some of those Pearl ABS keys, or requiring the player to simply reach over and press the keyboard key in those instances.

Help is greatly appreciated!
It uses its own input detection method. If you want to adjust the key associated with the values you can look at line 229 to 238 for the vkey codes

1603478268929.png

and then go to "Falcao Pearl ABS script shelf # 3" to set up the basic button options.
Hey zeroscares, thanks for responding.

I'm probably screwing something up (I hope), but I'm not having any luck getting this to work so far. In this case, I changed the "Weapon" value below to "S" (assuming this is represents the "S" key on the keyboard).

1603484458666.png

Upon running the game, here are my gamepad properties:

1603484387080.png


Not sure if I'm reading this RPG Maker VX Ace documentation correctly, but I'm assuming the Name of "Y" is always mapped to keyboard value of "S", in which case, setting Button 1 to "Y" in the properties should mean it maps to whatever the "S" key does.

1603484553874.png


When I run the game, I can confirm that "S" on the keyboard causes my character to use their weapon. But the square button on my PS4 controller isn't causing the use of the weapon, nor are any of the other buttons. I've confirmed that I can switch up the properties and use the square button for other things, like dashing or opening the menu; it just seems like the Pearl ABS input isn't being translated to the controller for some reason. Any ideas?
1. PearlKey's values (should)) correspond to the literal key letter. So S in Pearlkey = S on your keyboard
2. RPGMaker's button values don't correspond to literal keys. Y in RPG Maker for me is S.
3. PearlKey values are vkey-related, so keyboard only.

you're not gonna get far because PearlKey only accounts for keyboard presses, and doesn't care about controller input. So for controllers, you'll need to rely on input equivalents using RPGM's default input detection in places like def update_tool_usage
So you're saying there isn't really an easy way to get the Pearl ABS commands to translate to a USB controller? We'd be looking at extensive script changes?
it would require script editing yea. here's an example. for a static gamepad button assignment, search up "unless actor.equips[0].nil?" and replace the 2 lines below it with this:
Code:
      use_weapon(actor.equips[0].id)  if trigger_tool?(Key::Weapon[0], :keys) || Input.trigger?(:Y)
      use_weapon(actor.equips[0].id) if trigger_tool?(1, :mouse)
it'll make the weapon button (typically F in PearlKey) :Y.
One note though, this example will also apply :Y weapon input detection for the keyboard, so you'd probably have to determine if the player is using the gamepad, and disable that input condition if not.

If you don't wanna do it i'm sure someone's available for paid script editing
zeroscares,

Gave your idea a shot and found a few bits of code to modify in the Projectile and Battler Settings scripts, but it seems to be working now. Thanks for the help!

Original thread: https://forums.rpgmakerweb.com/threads/falcao-pearl-abs-what-would-it-take-to-change-which-keys-buttons-are-used.129042/