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

Hammerklavier

Veteran
Veteran
Joined
Dec 28, 2013
Messages
45
Reaction score
4
First Language
English
Primarily Uses
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!
 

zeroscares

Veteran
Veteran
Joined
Oct 17, 2020
Messages
57
Reaction score
10
First Language
português
Primarily Uses
RMVXA
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.
 

Hammerklavier

Veteran
Veteran
Joined
Dec 28, 2013
Messages
45
Reaction score
4
First Language
English
Primarily Uses
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?
 

zeroscares

Veteran
Veteran
Joined
Oct 17, 2020
Messages
57
Reaction score
10
First Language
português
Primarily Uses
RMVXA
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
 

Hammerklavier

Veteran
Veteran
Joined
Dec 28, 2013
Messages
45
Reaction score
4
First Language
English
Primarily Uses
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?
 

zeroscares

Veteran
Veteran
Joined
Oct 17, 2020
Messages
57
Reaction score
10
First Language
português
Primarily Uses
RMVXA
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
 

Hammerklavier

Veteran
Veteran
Joined
Dec 28, 2013
Messages
45
Reaction score
4
First Language
English
Primarily Uses
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!
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

So I'm practicing ITC with a spirit box, and decide to try to contact my deceased soulmate. It actually gave me multiple identifiers. Me, still a bit skeptical, asked aloud "Fine but does he still love me?" and the box spoke and printed the word "Forever" at the same time. Been a mess of tears since. :kaocry:
Been scratching away at my game and making progress, but just had a revelation. I'm working in full screen and adjusting all my pictures accordingly, but will they resize if someone's screen is smaller?? I hope this doesn't turn out to be a problem later.
Why is there so much month left at the end of money? D=
Hello humans! How goes your day in this journey of living? I hope it is good, for I am human like you, and I am feeling great! Worship the altar.

Forum statistics

Threads
105,627
Messages
1,015,072
Members
137,287
Latest member
AKPoliandro
Top