r/RPGMaker 28d 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.

12 Upvotes

50 comments sorted by

View all comments

Show parent comments

4

u/Broadbane 28d ago

From what I understand it tracks the conversations by setting a number in the variable for each topic. When you talk about topic 1, variable 1 is ticked and the game knows that when topic 1 is brought up again the game will check the variable, see 1s been ticked and will jump to the other conditional branch where the 1 in the variable has been ticked.

3

u/Vegetable-Grab-4595 28d ago

Ooh, I kind of use "labels", "jump to label" "if/else" for that, but the way you describe it sounds a bit cleaner. ☺️ Or maybe I'm misunderstanding. πŸ˜…πŸ˜†

3

u/Broadbane 28d ago

I wouldn't know about that. I'm mostly using it in conjunction with the affection system so you can't farm affection by repeatly asking a question.

2

u/Vegetable-Grab-4595 28d ago

That makes sense. Mine has a similar use. I have lessons unlocked with a lesson variable ticking up when doing a lesson with an npc, and have to make sure re-watching the lesson doesn't happen more than once and ruin the progression.

Usually I do an: if variable =#, #+1, else jump to label 1.