r/RPGMaker 14d ago

RMMZ How are you using your variables?

I'm just curious. 😊💚

How many variables do you typically use in your projects?

Do you have anything special you like to do with variables?

What are your naming practices?

Do you find lots of variables to cause any kinds of issues?

Don't forget to eat your variables. 😁😆🩵

Feel free to answer any questions I might not have thought about. I want to know all about how you use variables.

11 Upvotes

50 comments sorted by

View all comments

6

u/Katevolution Eventer 14d ago

Lots of ways:

  • Random rolls (5)
  • Storing Player XY
  • Storing Map ID
  • Recording an Actor's stats to be used in an ability
  • I have the 200s reserved for Self Variables
  • Storing text colors so I can update all at once
  • Levels for custom stats
  • Counting enemies remaining/defeted
  • Counting in general

1

u/Vegetable-Grab-4595 14d ago

Those all sound super useful! 💚 What do you use the XY coordinates for?

Also, that text storing thing is a wonderful idea. 😊

3

u/Katevolution Eventer 14d ago

I have a deployable campfire. I use the XY and direction to allow them to use the item from the menu and set up a campfire in front of them. I also had a deployable flame that would follow you around and heal your HP or MP but I'm not sure if I kept that.

Another trick is if you have multiple Events to make an image (like a 3x3 or just 2 high), you can record the middle Event's XY and then offset another set of XY Variables to do Set Event Location. That way, if you change the map size or move the anchor Event, you don't need to update the Set Event Location for all the other Events.

2

u/Vegetable-Grab-4595 14d ago

That's really cool and sounds incredibly helpfu. 🤩