Calling stats per script call...possible?

Hello guys,

this is about asking if it is possible and how to do it.
 

Can I call like the hp, mp, stats, gold etc per script call while taking the settings done in luna engine? (values, numbers, graphics etc.)

If not... can I call what I mentioned above with the default rpg maker vx ace settings... and how do do it?


I would be very happy about a useful reply since I critically need this and would really like to share a hug (no homo) to the person helping me to get it to be working 🙂

My greetings & thanks!
LUNA is simply a HUD script - it does not provide any numbers, it takes them from the default engine.

And of course, all values are accessable by both eventing and scripting directly from default - either by using control variable (eventing) or by direct access to the data objects as described in the help file.

If you tell us what exactly you want to do with those value, we can even show you how to do it best...
Thanks for your reply.

I'm doing a menu per eventing instead of the default scene menu.

When I open it then I want the HP/MP values of the battlers in my group to show up, if possible per picture numbers (png file numbers instead of default rpg maker vx ace drawn numbers).

This occurs through a switch that is on and hides when that specific switch is off.

I also want that to work when another condition is met (Like conditional branch == true) then instead the stats of your character are shown like atk, matk, def, mdef, agi, luck etc. whatever stats there are.

For the last thing showing the current gold value when a certain condition is met again. I need all these to update too if the values get a change.

That's exactly what I'm looking for, practically similar like the default menu offers but just in this way. I have my reasons.


Peace and thanks!

 
I'm doing a menu per eventing instead of the default scene menu.
For Eventing, you don't need the LUNA engine at all.


I've moved this thread to Ace Support. Please be sure to post your threads in the correct forum next time. Thank you.


Every data you listed so far can be gained by simple control variable command: just select "Game data" and then go into the following window (the dots at the right end of the selection) to select which value you want to read - actor values, gold, map data, whatever.


And after the value is loaded into the variable, you can check it with conditional branches or display it however you want.
I know that I don't need luna engine for that purpose but my idea was to call the settings from luna engine if that was possible.

I also know that I can select game data and can read the value but showing them graphically and having them update properly will be the issue.

Of course I can let them show up but I would need to make a graphic and conditional branch for every single value starting from 0 and that would be a crazy amount of work that's why I want

to call these per script call that they function as showing up the values, drawing them (luna engine settings can make them replace as a png number sheet while keeping the functions) and updating them upon a change of value.

Hope you understand my goal.

Greetings & thanks....
Actually there's a Luna board, Andar. Moving it there.
Anything I can do to have my issue solved? 😛
Can you paraphrase and put it in bullet points? I have a hard time understanding
Can you paraphrase and put it in bullet points? I have a hard time understanding
I'm gonna try it the easiest way cuz I'm mostly thinking pretty much complicated, I guess.

- When you open scene main menu having luna engine it reads values like HP/MP, Gold and  in scene character stats like HP/MP/AGI/DEF/ATK etc.

- I want these values to be read without using the main menu but per event, in addition to show the value itself.

- I want what a main menu can do but per bare eventing since I do not plan to use the real menu scene (reading values, showing values, updating values).

__________________________________________________________________________________________________________________________

- These were the basics and now in addition, is it possible to let these values show in a .png number sheet aswell, per bare eventing/ script call?

- Can I possibly script call these functions out of the luna engine? Or can I do these above steps without the luna engine functions at least?

- This is all like having luna engine and being in the menu scene but for real not having the menu scene enabled but opening my own built menu per eventing while having it work like if it WAS a menu scene having these values work properly.

Hope you understand me now, thanks.

Greetings & Thanks

[bY THE WAY: Is it possible to get an add-on for luna engine to have more settings on critical hits in battle? Like specific number sheet just for crits, additional effects or visual effect added to it? I know it probably isn't out but is it at least possible to request it from you, for a deal of course).
- I want these values to be read without using the main menu but per event, in addition to show the value itself.


- I want what a main menu can do but per bare eventing since I do not plan to use the real menu scene (reading values, showing values, updating values).
As I told above (and why I moved the topic away from LUNA engine):
What you want has absolutely nothing to do with scripting or the LUNA engine, it is pure eventing.


You use the control variable command to load any of those values into a variable - just set that command to "Game Data" and switch it to the value you want to read.


That will get you every value you've listed above.


After that, you can use show text to display the values by eventing.

- These were the basics and now in addition, is it possible to let these values show in a .png number sheet aswell, per bare eventing/ script call?


- Can I possibly script call these functions out of the luna engine? Or can I do these above steps without the luna engine functions at least?
You can show the values of variables by the use of show pictures, but that would probably require a lot of conditional branches.
It would be a lot better to use a HUD script to do that.


And the core of the LUNA engine is a GUI script, which means it allows to change the display of the existing menus - it is NOT a HUD script.


Archeia needs to answer this as I don't know every detail of the LUNA engine, but I don't think you can "call" parts of the GUI outside the menus, because the LUNA engine restructures the menus and doesn't provide any HUD function as far as I know.
Andar is right, none of your question relates to Luna Engine. Check the actors section of this post

If you want to call parameters then let's check this one out for Change Parameters:

# For Single Actor# ----------------------------------------------$game_actors[id].add_param(pid, value) # For Entire Party# ----------------------------------------------$game_party.members.each { |actor| actor.add_param(pid, value) # where id is the actor id# pid is the parameter id (0=MHP, 1=MMP, 2=ATK, 3=DEF, 4=MAT, 5=MDF, 6=AGI, 7=LUK)# value is the amount to add or subtractTo get the value of an actor parameter into a variable then something like this for actor 1:$game_variables[1] = $game_actors[1].atk

etc.

Andar already gave you a hint by saying it's in Game Data on Control Variables Section.

Critical hits is a gameplay function and has no relation to visuals. We can only provide visuals to preexisting systems in the default RM. We might have added some, but we don't plan to add anymore for compatibility purposes.
Thanks for the replies. I knew all these stuff that Andar told me up there again, the thing is I would need to make many thousands of conditional branches and their result if they are true or false.
That will be an immense amount of work you can guess, especially if I were to make the values be a picture, thousands of pictures you can tell.

That's why my idea was if I could not simply just read the value, but display it per script call for example, just like the default menu does, it reads the value and then displays it, without big work or many lines.

My idea was to have this function just without using the actual menu, to save that chaos of eventing of course.
I do know how to do all the eventing but it was all the idea to save a bunch of time.

I'm going to try your idea, Archeia, thank you. I will see how far I can get, I know it might not be simple in the first place.

Regarding the critical hits, I didn't ask to have the add-on script be released in public but in private use for me, I'm using scripts that have high compability with eachother aswell.
if there's no way of this happening, sad, but alright, I can understand.


Greetings & Thanks
You don't have to use a true/false conditional branch, but it would still be around a few lines. It's time for me to teach modulus then! 

But I don't feel like making a tutorial, so here's a working project instead. Check the Common Event to understand how it works. It's a simple copy paste, change the variables and picture number etc.

tKMdZez.png


Some examples made with this method:

Original thread: https://forums.rpgmakerweb.com/threads/calling-stats-per-script-call-possible.41422/