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
67
Reaction score
12
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
67
Reaction score
12
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
67
Reaction score
12
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



So I figured out how to put words and pictures in the screen transition. It even wipes away from both the top and bottom. The possibilities are endless! :LZSexcite: I'm going to devise secret messages now for them because I'm a terrible wonderful person like that. :kaopride:
December has arrived and with that, an ¡update for Aletoir Feast! a game made it for the One Map Challenge. I will use some of the remaining switches, variables, and events from the challenge limit to add more content but keep it within the requirements. ¡Have a nice day Everybody!
What I worked on today. :LZSjoy:

No stream today, make a game in MZ is continuing next week!
It seems MOG Weather only has a "clear" function to instantly erase a given weather effect. Probably works well if weather only changes at map transfer, etc, but looks very abrupt if weather effects are continuously changing. So my next challenge: script a "fade" function to gradually fade the sprites and wait to "clear" the current weather until the opacity of all its sprites hits zero... or something like that! XD

Forum statistics

Threads
105,758
Messages
1,016,211
Members
137,444
Latest member
NeoRetro
Top