Indie Dev

Hello Guest!. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, sell your games, upload content, as well as connect with other members through your own private inbox!

Using variables as Stats

Nachorl250

Towns Guard
Hi!



I released a Action-RPG game on Sunday and when developing I used variables to define all the stats because the way RPG Maker MV manages them (only increase and decrease) is not practical for me as I want to set them to specific values throughout the game. However, the software doesn't have the option of changing what the menu displays, so while your health might be for example 5000HP, the menu will display the defaul 750HP.



Is there anyway to make the menu show specific variables instead of the Actor's stats?



Shaz told me I would need a plugin. Is someone willing to help me out? what I need is:

Level to be Variable 38, Max health to be variable 2, Max energy to be variable 4, current health to be variable 21, current energy to be variable 12, attack to be variable 3, magic attack to be variable 11, Defense to be variable 7, and exp to be variable 29.



Thank you for your attention.
 

Boy Who Codes

Praised Adventurer
Xy$
0.00
Yes. Each parameter is calculated in Game_BattlerBase. You will definitely want to script this because it is not possible via events. Is your game just one character? Because if there is more than that, the variables will store all stats with just one variable container, and thus this becomes impossible.
 

Nachorl250

Towns Guard
Yes. Each parameter is calculated in Game_BattlerBase. You will definitely want to script this because it is not possible via events. Is your game just one character? Because if there is more than that, the variables will store all stats with just one variable container, and thus this becomes impossible.
Yes, my game only has one actor and one set of variables. Do you know what's the easiest way for me to do it? I don't know too much about scripting, but I guess I can try.
 

Nachorl250

Towns Guard
What do you mean by this? can you show me an example of this?
"I used variables to define all the stats because the way RPG Maker MV manages them (only increase and decrease) is not practical for me as I want to set them to specific values throughout the game." Basically, I want RPG Maker's stats (Max HP, health, attack, magic attack, etc) to be determined by variables (if the variable 001 "health" is 23, then the HP stat in the game's menu should show 23)
 

eivl

Local Hero
Xy$
0.00
Og yeah, now i understand... Yeah a plugin is what is needed.. I will look into it
[doublepost=1450735317,1450711079][/doublepost]Is this what you want?



 

Diremane

Villager
Xy$
0.00
Actually, if I understand what you want correctly, I think it is technically possible with events alone--it just requires a ton of maintenance.

Change Parameters allows you to alter your stats by an amount defined by a variable, and variables can be set to a character's current stats, so what you'd do is set (hypothetically) variable 001: Old Attack to be equal to your character's current Attack stat, then use Change Parameter to lower his attack by the value of variable 001 (effectively setting it to 0), and finally use Change Parameter again to add the new Attack stat to it (variable 3 according to your original post).

Granted, that's to say nothing of how much simpler it would be to handle it with a plugin, haha. This way would probably be a pain, because every time anything has even a chance of changing your attack variable, it would also have to force that whole event chain to keep your stats up to date. I would make it a common event for that reason, but it's still a lot of extra event commands just to call that common event, especially if you've already got the system working without this. Anyway, just wanted to offer another take on it.
 

eivl

Local Hero
Xy$
0.00
Change Parameters allows you to alter your stats by an amount defined by a variable
not looking to alter a stat, are looking to change a stat from one container to another.
And regarding to HP, you are not able to track that in battle without the use of a plugin. it would not even be remotely possible.
other stats that are not changed during combat can ofc be controlled via a common event, and yes it would be a big hassle. ;)
 

Diremane

Villager
Xy$
0.00
That's true, about battles. I may have misunderstood the request; I thought the only concern was getting the proper values to show in the main menu, and variables were only being used because the stats couldn't be directly assigned otherwise, only increased/decreased.
 

Diremane

Villager
Xy$
0.00
Of course, I just didn't think to consider battle transitions. Sorry for any confusion, I was just trying to toss out an idea OP might not have considered.
 

Nachorl250

Towns Guard
Og yeah, now i understand... Yeah a plugin is what is needed.. I will look into it
[doublepost=1450735317,1450711079][/doublepost]Is this what you want?



That's exactly what I want. I'm sorry I didn't respond more quickly.
[doublepost=1450750348][/doublepost]Th
Actually, if I understand what you want correctly, I think it is technically possible with events alone--it just requires a ton of maintenance.

Change Parameters allows you to alter your stats by an amount defined by a variable, and variables can be set to a character's current stats, so what you'd do is set (hypothetically) variable 001: Old Attack to be equal to your character's current Attack stat, then use Change Parameter to lower his attack by the value of variable 001 (effectively setting it to 0), and finally use Change Parameter again to add the new Attack stat to it (variable 3 according to your original post).

Granted, that's to say nothing of how much simpler it would be to handle it with a plugin, haha. This way would probably be a pain, because every time anything has even a chance of changing your attack variable, it would also have to force that whole event chain to keep your stats up to date. I would make it a common event for that reason, but it's still a lot of extra event commands just to call that common event, especially if you've already got the system working without this. Anyway, just wanted to offer another take on it.
Thank you for the help! But, as you said, I've already got the game working and implementing this would be a pain in the ass. I'll consider it if I don't find other choice though.
[doublepost=1450750414][/doublepost]
Of course, I just didn't think to consider battle transitions. Sorry for any confusion, I was just trying to toss out an idea OP might not have considered.
My game doesn't use RPG Maker's default battle system. It's an Action RPG (real-time battles on maps)
 

eivl

Local Hero
Xy$
0.00
Are You using a fixed number of players or is it variable?
You would need actor1 hp, Actor2 hp, actor3 hp.... And so on as a variable.

I would need to rewrite The entire battlesystem as well. What Plugins Are You using and what variables do You need?
 

Nachorl250

Towns Guard
I'm sorry I took half an hour to respond. I don't know why the notification didn't come until now.
I only have 1 actor. The plugins I'm using are:
Quasi Movement
Quasi Pathfinding
Screenresolution
YED_Wordwrap
ET_Mapkey (made by you I think)
TDDP_ManageDashing
Zeriab_ExtraMaps
YEP_MainMenuManager
CXJ_Exit
TDDP_FluidTimestep
DisableMouse
No Autoshadow
TDDP_PreloadManager

I need to replace:
Max HP for variable 2
Current HP for variable 21
Max energy/mana for variable 4
Current energy/mana for variable 12
Total exp needed to reach next level (not exp from the current to the max, the total) for variable 39
Current exp for variable 29
Current level for variable 38
Melee attack for variable 3
Magic attack for variable 11
Defense for variable 7

Thank you for responding so quickly!
[doublepost=1450760359,1450754762][/doublepost]
Are You using a fixed number of players or is it variable?
You would need actor1 hp, Actor2 hp, actor3 hp.... And so on as a variable.

I would need to rewrite The entire battlesystem as well. What Plugins Are You using and what variables do You need?
I forgot to tell you, I'm not using RPG Maker's battle system.
[doublepost=1451127581][/doublepost]
Og yeah, now i understand... Yeah a plugin is what is needed.. I will look into it
[doublepost=1450735317,1450711079][/doublepost]Is this what you want?



Hey, could you give me a link to the plugin you're using in that screenshots?
 

eivl

Local Hero
Xy$
0.00
Well, it is not a plugin as such, i am just experimenting. If you are not using the battle system then i can have this up and running in a few days! ;) what battle system are you using?
 

Nachorl250

Towns Guard
Well, it is not a plugin as such, i am just experimenting. If you are not using the battle system then i can have this up and running in a few days! ;) what battle system are you using?
I made the battle system myself. It's an event based ABS (on map battles). Thank you for yhe help!
 

eivl

Local Hero
Xy$
0.00
Total exp needed to reach next level (not exp from the current to the max, the total) for variable 39


not sure what you mean about this, the game uses something called EXperience Rate, in fact there are 32 different states that can be changed, i am asuming they all are numbers, but i have to check the objects to see if this is the case, it is param and xparam in the Game_BattlerBase.prototype
 
Top