RPG Maker Questions, Answers, and Tutorials

Ok, so I’m trying to replicate the picture and found out what does what. But am I able to make the image change depending on how much damage you take exactly.

The example in my head being:
Character has 250 Max Hp, and thier image changes when they have taken 50 damage from thier max.
Stage 1: 250, Stage 2: 200, Stage 3: 150, ect.
But due to this, more stages can be locked to higher HP limits since you’ll need to lose more hp than what you currently got to reach them.

Do you understand me, this is why I wanted to flip the HP Value or whatever you call the numbers on the bar. To flip 0 with thier current total HP amount.

Sure, it’s not complicated. In that case, we just want to measure (Max HP) - (Current HP). Realistically, it’s just a very minor tweak to the example above: Take the Max HP instead of Current HP as a variable, then subtract Current HP from that variable with the Sub[tract] operation.

From there, changing the values, adding additional stages, etc. should be pretty trivial.

I got that down, and now I’m testing it out in a Mirror Check event…but the picture won’t change and I am struggling trying to get google to GIVE ME WHAT I WANT!!!
(Breathe) How can I make that common event work with other events, like say a Mirror. What do I need to put in to make this lineup of code work for a mirror? To give out a different image depending on how much HP you have currently lost?

I can’t speak for exactly how your code is set up, but an example flow based on the above common event example would look like the below:

  • Press button to trigger the mirror
  • Mirror triggers the common event and draws picture
  • Any other info is shown (narration, dialogue, etc.; in real usage you’d probably want handlers to adjust this based on the weight stage as well, or make a separate common event with the same flow as the previous Show Alice example that displays text instead)
  • The image is erased when all event info has played out.
  • Using the mirror again will re-run the event.
  • Once you’ve got this down and working you can add more advanced conditions to the mirror, e.g.: if (First Party Member is Alice), then (call Common Event: Show Alice); if (First Party Member is Bob), then (call Common Event: Show Bob), etc.

If you’re triggering the mirror at different HP values but not getting the results you expect, it’s time to double-check the other values in your code. Is the common event checking the HP values of the same actor you’re manipulating the HP of? Are your HP changes in line with how your weight system is set up? Have you double-checked that the proper images are being called where they’re supposed to be?

If what you’re aiming for is that the mirror calls up the image but updates it in real-time, not simply showing what was the proper image at the instant you activated the mirror, you would need to call the common event as often as you expect the image to change. For this example, a parallel process that calls the common event then waits X number of frames would do the trick, but this parallel process should not be the mirror - instead, activating the mirror should toggle a switch on/off, and the separate parallel event should have that switch as one of its Conditions to run.

What I’m trying to do is like how most people would like it. It’s just a view of your current weight with flavor text. Only changing if you exited the event, took damage, and re-entered.


I put in the code correctly, why is there a Syntax Error.

I don’t see anything in this event that should be causing syntax errors - those usually occur with actual custom code (plugins, script calls, inserted lines of JavaScript, etc.). I would say either the problem lies with whatever event or other process is calling this common event, or that (as incredibly unlikely as it seems) the parentheses or hyphens in your image file names are causing the issue.

Assuming the image names aren’t the cause, when a syntax error pops up while playtesting, press F12 to bring up the debugger and hope the Console tab offers more insight into the issue. It’s probably not going to show exactly what’s wrong but hopefully at least will give a better idea where to look.

Pressing F12 does NOTHING. But I think the variables are the issue or something.
GRAAAAAGH (MENTALLY SMASHES COMPUTER OUT OF INTERNAL FRUSTRATION)

I have done no other code other than the stuff here and I don’t know if I’m missing something you ain’t showing. I don’t know how javascript works. Should I be putting the 2nd part of the variables into scripts?

Why does coding have to be so frustrating!?

As long as you are doing a playtest, F12 should work. make sure you are testing from inside RPG Maker.

I figured out my problem, I used extra variables instead of Game Data…and yes I did it in and out of game, still did nothing.

do you have a keyboard that has the function keys be function keys and other buttons. For instance on my laptop i have to hold down the fn button to have my function keys actually be function keys.

Ok, new question revolving around cutscene. So I got 2 cutscenes done so far, but how do I make all the extra non player characters stay exactly where they were once a cutscene ends. For 1 cutscene, this one guy got scooted over a bit, and for cutscene 2 a bunch of stuff had thier images changed to no image to show them getting removed or make way for a different still sprite to take thier place.
When the area reloads, the cutscene is now switched off but everything from the cutscene returned to thier original places.

How do I make sure nothing gets reverted after reloading the room once the cutscene is officially done?


I don’t know what I’m missing, can someone show me an example of how to tell the game who the current leader is so it can figure out which mirror event to present. I feel close to what I want, I’m just missing something I can’t find.

By the way if anyone wants to help via private chat so I ain’t bubbling this space with all the questions I’ll have involving codes, I would appreciate that.

Note that it’s a holiday weekend in the US, I’ve been drinking the heat away, and my advice may not be sound or easy to understand as a result, BUT:

You’ve already got this half-figured: That second line, where you’re setting Lucia’s ID number, is pulling the actor ID of the first party member - in other words, the leader - not the first actor in the game.

So, set the Current Leader variable to Actor ID of party member #1 rather than using that bit of script - I don’t even think that’s a valid call, to be honest.

Actor IDs, on the other hand, are static: If Lucia is Actor 001 in the database, that’s going to be their Actor ID no matter where they are in the party lineup or even regardless of if they’re in the party or not.

So assuming your setup is that Lucia is Actor 0001, Rhoncra is Actor 0002, etc. on down the line, you’d want to just compare it to a Constant number:

Control Variables: #0012 = Actor ID of party member #1
If: Current Leader = 1
    - Common Event: Lucia Mirror
    - 
    Else
    - If: Current Leader = 2
        - Common Event: Rhoncra Mirror

… and so on down the line.

As for your cutscene dilemma: Switches and Event Pages are your friends. Higher-numbered pages (pages further to the right) in an event take priority over lower-numbered pages, and each page has its own set of activation conditions, run types and priorities, even its own image.

Have your cutscene turn on a switch when it’s finished, and give the altered events high-priority page(s) as necessary that have that switch as a Condition. In these event pages, alter the character images, dialogues, etc. from the lower-priority pages as needed.

Characters that’ve been moved from an action prove to be a bit more difficult to handle, because a separate event page doesn’t have its own map position - it’ll still load at the same spot each time the map is loaded. There are two decent solutions to this:

  • Create a new event at the final location of the moved event, with each of its pages having the cutscene switch as a Condition. To prevent both the old and new version of the event appearing at the same time, add a new Event Page in the original event (make sure it’s the highest-numbered page), and leave it blank other than having the cutscene switch as its condition. This replaces the old version with a blank event once the cutscene finishes and turns on the switch, which also tells the new version of the event to display itself.

  • Create an autorun event with the cutscene switch as a Condition, and uses the Set Event Location command on each event that needs moving, then uses the Erase Event command on itself. Despite being called Erase Event, it just removes it from the map for this load - it’ll still load again the next time the map is loaded, but you need to do something to stop it from running continuously without stopping it from running again in the future. To be frank, I think this is a messier solution than the above, but it does prevent map clutter if you’re careful in how you use it.

Thank you for the info, and your assumption is correct, I always try to order my group of 6 in unlockshion order.

So about the cutscenes, the event isn’t playing all over again, they won’t reactivate when I walk back over the specified tile once it ends for the run. All the pieces of the cutscene just return to thier original places and forms upon a reload. Thus it’s like nothing ever happened. I put all the pieces down and link them to set movement route to start the cutscene, so they’re there from the start, before the cutscene plays to ensure it actually starts.

New question, I’m not certain on how it should be done. But between overworld travel & during battle, when you pass the hp threshold whether that be from being damaged or getting healed. I would like to present the full character image visually gaining or losing weight through a simple pop-in image swap. I want the 2 pictures to pop in, do it’s thing, then leave with no interaction from the player.
I want to present the full character art as much as possible. But how do you get this event to do it’s thing without looping?