Ancurio / mkxp

Free Software implementation of the Ruby Game Scripting System (RGSS)
GNU General Public License v2.0
532 stars 140 forks source link

Input.press?() for rgss version>=3 #81

Closed Daverball closed 9 years ago

Daverball commented 9 years ago

So I've started porting a game that has been made with RPG Maker VX Ace from what i can tell. I now ran into a crash related to Input.press?()

Now I know that VX Ace has switched to symbols for button codes, but from what I can see you may still use an integer button code in the press? function instead of a symbol. This functionality is not represented in MKXP, if you try to give press? an integer button code it will say that it expects a Symbol instead.

I think it would be trivial to allow both integer button codes and symbols for the same function and let the interpreter determine which kind of argument it got.

It would certainly be easier than tracking down all the game code where integers have been passed instead of symbols and clean up a thing that isn't necessary to clean up in VX Ace itself.

Ancurio commented 9 years ago

Thanks for reporting this, I was not aware integer codes were still allowed in RGSS3. Pushed a fix: 685f8b63b3c5553a1561890d3bf86952618d8002, please confirm that it works for you. Are you compiling mkxp from source, or do you want me to update the prebuilt binaries?

Also, how does your game use integers? Is it a script that was written for older makers?

Daverball commented 9 years ago

Thanks for the quick patch, I've tried to get it to build but openSUSE does not have the best build environment when it comes to some of the used libraries, so I'd be very grateful if you could make a build.

I'm not entirely sure which parts of the game are using integers but I do know that development was started on an older version of RPGMaker so it's likely leftovers from that.

Ancurio commented 9 years ago

It's no problem, the building is automated so I just run a script. Here's an updated build.

Daverball commented 9 years ago

thanks, it's working great!