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
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.
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
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
- Party member selects skill
- Skill initiates a minigame/QTE that lasts 10 seconds
- 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)
- 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.
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.
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!
◆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!