ShinyRedUmbreon

Wannabe-Animator + Gamer
Veteran
Joined
Sep 3, 2017
Messages
69
Reaction score
14
First Language
English
Primarily Uses
RMVXA
Say that your character has 4 (insert stat here) to start with. And then when that character levels up, it has a chance of earning a stat gain of 1, 2, or 3, or have a chance of not earning any stat gain. So basically a random stat gain. You could be lucky and get a good roll and earn 3 (insert stat here), or you could have bad luck and have no change to your (insert stat here) when your actor gets a level up.

Is this possible, if so, how? I'm okay with a script.
 

Cray

My avatar is sassy WM and it's beautiful
Member
Joined
Dec 26, 2017
Messages
11
Reaction score
143
First Language
Ar
Primarily Uses
RMXP
Mk, after tryna work this out for a while I think I know how to do this. (bear in mind that I'm a noob when it comes to rpg maker so this method might not be perfect XD) So, to do this you gotta create a common event (unless you don't mind copy-pasting the same event over and over again) Let's just say, we'll call it 'Level up'. In this event, increase the actor's level by 1, Then create a control switch which I'll name 'Level up' too for convenience. Turn on the control. Your event page should look like this :https://i.imgur.com/179pGV9.jpg
Now, create another common event which I'll call 'stat add'. Set it's trigger to 'Autorun' and it's condition switch to 'Level up' Now create a variable by the name 'stat add'and set it's operand to 'random' (from 0-3). Now, create 4 conditional branches with that variable, corresponding to how much of the stat your actor has earned. Here's how it should look cuz' I suck at explaining :https://i.imgur.com/qVuFKrx.jpg
Turn off your 'level up' Control switch or otherwise the event will keep looping itself, So now whenever you need your character to gain a random stat, simply use a 'call common event' and call 'Level up'. If you have any questions please don't hesitate to ask, Like I said before. I REALLY suck at explaining XD (btw, feel free to replace 'EXP' with an other stat)
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,510
Reaction score
12,012
First Language
English
Primarily Uses
RMVXA
How will the common event know that a particular actor has just leveled up and so qualifies for a stat increase?
 

Cray

My avatar is sassy WM and it's beautiful
Member
Joined
Dec 26, 2017
Messages
11
Reaction score
143
First Language
Ar
Primarily Uses
RMXP
Once you call the level up event, It will automatically level up your actor. You can edit it so that it levels up more than one actor at once, or create more scripts like that one if you want to level up each of your party members individually.) Afterwards it will turn on the 'Level up' switch which will cause the stat event to autorun. Is this explanation better?
 

Cray

My avatar is sassy WM and it's beautiful
Member
Joined
Dec 26, 2017
Messages
11
Reaction score
143
First Language
Ar
Primarily Uses
RMXP
Np! Glad I could help :3
 

Latest Threads

Latest Posts

Latest Profile Posts

After the initial success with one event, I set up four different events on the same map to detect who is in which slot in my current party, and fortunately it managed to work as intended, with the events changing image to match the party members even as I swapped their positions around in formation. This will be a great tool for immersive scene design.
Finally finished the first hand-drawn map! It took me a week, but I'm so proud!
Actual line of code I just had to write for a plugin:

return Object.keys(this._shopStock).map(key => key.split(",")).map(element => element.map(value => Number(value))).filter(key => key[0] === mapId && key[1] === eventId);

Forum statistics

Threads
118,447
Messages
1,116,054
Members
155,419
Latest member
legolanxz
Top