Battle Minigames/QTEs(?) Initiated By Skills

ETA: I believe my problem might have to do with the trigger in the common event? I had it at "none", but I am trying other options now to see if it has anything to do with it..

Hello, everyone! I am trying to create a turn-based battle system for my hobby/passion project, but I have hit a wall and need some help!


Battle Flow
  1. Party member selects skill
  2. Skill initiates a minigame/QTE that lasts 10 seconds
  3. Based on how well the party member did in the minigame and which minigame they played, they either receive "gold" or lose "gold" (gold is in place of any variable, if using mp, hp, or anything else is better.. that's the kind of advice I am also asking for)
  4. If the player acquires a certain number of "gold", they win the battle and gain an item. If the player loses all of their "gold" they lose the battle and do not gain any item.
In a way, I guess you could say it is like the Undertale battle system, but far simpler and not a bullet-hell.


Skill/Minigame Explanation
Skill 1: A common skill for party members that initiates a minigame where you move a receptacle left and right to collect falling items. If you miss, you do not get "gold"

Skill 2: A one-use skill for party members that attracts more objects

Skill 3: The enemies have a skill that initiates a mini-game for the player where the receptacle instead dodges the falling objects. For every hit, the player loses "gold"

Skill 4: A one-use skill for party members that skips the current party member's action, lets the next party members use their actions, and then applies to the enemy minigame. This skill creates a temporary (3 second) barrier for the receptacle to aid in avoiding the falling objects.


My Issue?
The falling object is slowing as it goes down the screen, and I cannot figure out how to program collisions. When I try, I keep getting things like "Cannot read property 'x' of null" when I try to get the x position of my pictures to script collisions. I have already went through and optimized GPU settings for my executable using NVIDIA Control Panel and the issue persists. I don't know if it's a plugin conflict, my amateur scripting skills, or the size of my graphics (128x128 and larger).


Plugins
The plugin that impacts what I have going on here the most is Yanfly's action sequences, it has what allowed me to get my ideal turn order (wait, action, minigame, next action), but I will attach a photo of my plugin manager here.

Spoiler: Plugin List
plugin-list.png


Eventing
The skills work by calling common events to initiate the QTEs/minigames. The following events are what I have for Skill 1, the common skill. I'm working on it first since it will be the basis for the other minigames/QTEs. Collision scripting has been removed since it caused errors. Unfortunately I didn't document it, but if needed, I can try to retrace my steps and explain what I did. Also, full disclosure, I do not have much of the scripting/eventing finished for what I am wanting to achieve, mostly because I feel stuck and I am relatively new to the engine.

◆Control Variables:#0006 qteTimer = 10
◆Show Picture:#1, background, Center (408,312), (55%,55%), 255, Normal
◆Show Picture:#2, border, Center (408,312), (150%,150%), 255, Normal
◆Show Picture:#3, receptacle, Center (408,360), (100%,100%), 255, Normal
◆Show Picture:#4, falling-object, Center (408,50), (50%,50%), 255, Normal
◆Loop
◆If:Button

is pressed down

◆Move Picture:#3, Center (358,360), (100%,100%), 255, Normal, 15 frames

◆

:End

◆If:Button

is pressed down

◆Move Picture:#3, Center (458,360), (100%,100%), 255, Normal, 15 frames

◆

:End

◆Loop

◆Move Picture:#4, Center (408,400), (50%,50%), 255, Normal, 120 frames

◆Break Loop

◆

:Repeat Above

◆Control Variables:#0006 qteTimer -= 1

◆Wait:60 frames

◆If:qteTimer ≤ 0

◆Break Loop

◆

:End

◆

:Repeat Above

◆If:qteTimer ≤ 0

◆Erase Picture:#1

◆Erase Picture:#2

◆Erase Picture:#3

◆Erase Picture:#4

◆

:End










I will take any advice, whether it be on the limitations of this program, switching to another program, plugins I could be using, anything! I am not the best programmer, but I am familiar with JavaScript and understand the basics of how to use script calls in RMMV. I know that more complex battle features may necessitate scripting - so if that is the case for my situation, I am also welcome to being directed that way or being given scripting advice.

Please let me know if you need any more information! Thank you for your time!​
Have you tried any plugins that are designed to do this? SRD has a number of QTE plugins, and also has an Undertales battle system plugin - I'm not familiar with the game or plugin, so I don't know if it would be a helpful step to achieving what you want.

Aside from that, if you get an error, press F8, go to the Console tab, and provide a screenshot of that (along with the code that caused it, of course).

Your formatting of the event in your post is pretty messed up, so I don't know if it's missing anything - fixing it might help other people offer some suggestions.
Have you tried any plugins that are designed to do this? SRD has a number of QTE plugins, and also has an Undertales battle system plugin - I'm not familiar with the game or plugin, so I don't know if it would be a helpful step to achieving what you want.

Aside from that, if you get an error, press F8, go to the Console tab, and provide a screenshot of that (along with the code that caused it, of course).

Your formatting of the event in your post is pretty messed up, so I don't know if it's missing anything - fixing it might help other people offer some suggestions.
I have tried the Undertale plugin and some of SRD's other plugins, and they have not helped me achieve what I am looking for.

Thank you for the tip regarding checking the code with F8. I have resolved the "can't find property" error so I don't need to share or update on it anymore, but this is going to help so much in the future, in forums and while developing. I am still struggling with picture collision detection, though, unfortunately.

And yes- I tried fixing the format of the eventing and have no idea why it's doing that. It would paste that way and I couldn't edit the lines without the format getting further messed with. I will update with screenshots of the eventing in a few days when I am working on the combat system again, so that the events can be more readable.

Thank you for the tips and advice, they were helpful!

Original thread: https://forums.rpgmakerweb.com/threads/battle-minigames-qtes-initiated-by-skills.171016/