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
61
Reaction score
11
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
61
Reaction score
11
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
61
Reaction score
11
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 Posts

Latest Profile Posts

Yet another gaming question, i'm currently playing Last of Us 2 and want to get another game to play next but can't decide between Ghost of Tsushima, Miles Morales & Jedi Fallen Order. After the latest mandalorian i AM on a star wars kick, but i also LOVED the last spiderman game that prequels Miles Morales. Ghost of Tsushima is the bottom of my list but i heard it was AWESOME. Just want a good story & fun gameplay.
I checked out Genshin Impact gameplay out of curiosity. I can't believe it's available as a mobile game too. Smooth animation, great music, and stellar sound effects (the ambient sounds are pretty detailed).

I'm flabbergasted to see games have becoming more and more advanced. Maybe also because I'm oblivious to current trend for a long time, it almost feel like I'm being sent into distant future. xD
xDRAGOONx wrote on WaywardMartian's profile.
Your artwork is amazing!!!
:ewat:
Stream will be live shortly with a session of the Interactive Text Adventure! Feel free to drop by!
I should finish the cat video I'm editing and finish the indesign stuff. So far only 1 is done and 4 to go

Forum statistics

Threads
105,666
Messages
1,015,392
Members
137,341
Latest member
jasapembuatanwebsite
Top