Hello Rpg maker community, I was wondering the following -
Is there a way to pass information to the game, right now I have a html page before loading the game it self. I have html page open when you click on the game.exe. Is there a way to say I want to pass a certain amount of exp to the player before they start the game. I was thinking using the JSON data at first but I don't know if that would work or not, then I looked up the datamanager.js might be possible to do it from there.
I
Please clarify what you want - usually, if you want the actors to start at a higher level, you increase the initial level in the actor tab of the database.
And please edit your title to tell us what you're wondering about - it will speed up responses to your topic not to keep us wondering what you want ;-)
OK so this is how i have my project set up.
I have index.php on my server which uses sessions to allow a player to connect once toy are signed in it brings you to the game page which is the game it self.
What I want to do is make a app.php/html page that while the player is at work, they can click a button on the website for ex - train sword skills which will give the player plus 20 exp - once they exit the app it pushes that 20 exp over to the game. So next time the game is open the player would have 20 extra exp points or a increase to the sword skill.
What can work in this case is that you can make a script with a command to load a value from your database, and then have that script called by an event command that loads the returned value into a game variable and add that to the actor automatically - perhaps a common event called on load or new game?
Thank you Andar for the helping on this topic still a little confused
So if I wanted to get a actor stats outside of MV how would I pull the data, Would it be JSON data or would it be a variable I made in MV and then referenced that variable outside of MV?
So lets say the following ex is happening. -
Player A is playing the game fir 2 hours and now has to go to work, he gets to work and he knows he can not play the game at work so he loads the app which is load off the session once he logs in. He decedies that he wants to have his Hp increased so I have a variable delecared in a Javascipt as follows -
function hp_Train(){
var hp = 0;
//Say the trained for 5 minutes
hp += 5;
}
How would I take the var hp and apply it in game to the player who is actor 1. Would i need a way for the game to grab the variable from the DOM and pass it in to the common event and then have that common event pass it to the actor Max_Hp?
You wouldn't. Assuming several people are playing your game, you would want to update a file that's strictly for their use - so you'd use a json file and would save it to the same location that MV uses for save files, not for data files (otherwise it would affect all players). Then you'd make a mod to the program so when you load their save data, you also load this file that keeps their updated stats, you would update the stats based on what they'd earned, and then you'd set the data in that file back to 0 so they can start it all over again.