Random addition of actor parameters after "Lever up"

Erodaisiki

Veteran
Veteran
Joined
Jul 18, 2018
Messages
48
Reaction score
3
First Language
English
Primarily Uses
RMMV
I want to make a random game.
When an actor lever up,His "atk" "def" "mat" "mdf" will get an increase in random numbers.
Each actor can set his own parameter range in the Notetag.
<Level: atk:+5~10, def:+5~15, mat:+10~20, mdf:+0~5>
I found this https://forums.rpgmakerweb.com/inde...1-1-1-combine-with-sockets-for-materia.48468/
The Plugin can set “Level Up Bonuses”,
Level: atk:+5, def:-5
but it‘s not random.
Is there a better plugin to support my idea?
or how can I modify it?
 
Last edited:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,434
Reaction score
7,713
First Language
German
Primarily Uses
RMMV
Your description is a bit confusing so I can't be sure with my answer, but at a guess:
No, you need a new plugin specifically written for this.

The problem is the randomness - there are different ways of fixed and chosen advancement available, but none that would create a random advancement.
And if you're requesting a new plugin in such a way, you need to give a better description for a programmer to go on, like when should what rendomness be chosen and so on.
Usually players are put off by true randomness, they usually want a guided randomness. Absolute random maps for example would include an iceberg swimming in lava or a tree growing out of the deep ocean. And just consider how dissatisfied players would be if their main tank would randomly get a bonus to magic attacks he doesn't have.
 

Erodaisiki

Veteran
Veteran
Joined
Jul 18, 2018
Messages
48
Reaction score
3
First Language
English
Primarily Uses
RMMV
Your description is a bit confusing so I can't be sure with my answer, but at a guess:
No, you need a new plugin specifically written for this.

The problem is the randomness - there are different ways of fixed and chosen advancement available, but none that would create a random advancement.
And if you're requesting a new plugin in such a way, you need to give a better description for a programmer to go on, like when should what rendomness be chosen and so on.
Usually players are put off by true randomness, they usually want a guided randomness. Absolute random maps for example would include an iceberg swimming in lava or a tree growing out of the deep ocean.And just consider how dissatisfied players w ould be if their main tank would randomly get a bonus to magic attacks he doesn't have.
I just want to set the level up bonuses.
When an actor lever up,His "atk" "def" "mat" "mdf" will get an increase in random numbers.
Each actor can set his own parameter range in the Notetag.
<Level: atk:+5~10, def:+5~15, mat:+10~20, mdf:+0~5>
The main tank can get a higher range of def,like <def:+20~30> evey time.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
Well, you can event it actually.. You can have a parallel common event running every few seconds that checks and saves the character level, if the new level is not equal to the old one, generate a random number and use the Change Parameters event command to apply that value to the parameters... You can do that for any amount of actors as needed.

As a player though, I'd probably hate such a system... I mean if I get unlucky and get mostly the lowest values then that might doom me not because of something that I did (or not do) but because of some random stuff the dev decided to do... and that is super frustrating.
 

Erodaisiki

Veteran
Veteran
Joined
Jul 18, 2018
Messages
48
Reaction score
3
First Language
English
Primarily Uses
RMMV
Well, you can event it actually.. You can have a parallel common event running every few seconds that checks and saves the character level, if the new level is not equal to the old one, generate a random number and use the Change Parameters event command to apply that value to the parameters... You can do that for any amount of actors as needed.

As a player though, I'd probably hate such a system... I mean if I get unlucky and get mostly the lowest values then that might doom me not because of something that I did (or not do) but because of some random stuff the dev decided to do... and that is super frustrating.
I designed 100 actors to be recruited randomly, and the workload would be enormous if public events and variables were used.
Don't worry, the parameters will be set in a reasonable range, a tank won't get 0 def.
 

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
2,118
Reaction score
1,526
First Language
EN
Primarily Uses
RMMZ
Does this work for you?
Code:
/*:
 * @plugindesc Lets you add random values to base parameters on level-up.
 * @author Caethyril
 *
 * @help Actor/Class notetag (case-sensitive!):
 *    <Level Up STAT: X>
 *    <Level Up STAT: X to Y>
 *     - Replace STAT with one of these:
 *         MHP, MMP, ATK, DEF, MAT, MDF, AGI, LUK
 *     - Replace X with the minimum amount to add (integer)
 *     - Replace Y with the maximum amount to add (integer)
 *       -> Note: Y should be greater than X.
 *   Examples:
 *    <Level Up MHP: 40>          + 40 max HP per level
 *    <Level Up ATK: 5 to 15>     + 5~15 (inclusive) ATK per level
 *    <Level Up LUK: 0 to 8>      + 0~8 (inclusive) LUK per level
 *
 * Note that this is not designed to work with "level-downs".
 * The stat gains are permanent and are not tracked separately.
 *
 * Terms of use:
 *    Free to use and modify.
 */

(function(alias) {

'use strict';

	const TAGNAME  = 'Level Up %1';
	const PARAMS   = ['MHP', 'MMP', 'ATK', 'DEF', 'MAT', 'MDF', 'AGI', 'LUK'];
	const SPLITTER = 'to';

	Game_Actor.prototype.levelUp = function() {
		PARAMS.forEach(function(p, n) {
			[this.actor(), this.currentClass()].forEach(function(o) {
				let tag = o.meta[TAGNAME.format(p)];
				if (tag) {
					let arr = tag.split(SPLITTER).map(function(num) { return parseInt(num, 10); });
					let add = 0;
					if (!isNaN(arr[0])) add += arr[0];
					if (!isNaN(arr[1])) {
						let m = arr[1] - (isNaN(arr[0]) ? 0 : arr[0]) + 1;
						if (m > 0) add += Math.randomInt(m);
					}
					this.addParam(n, add);
				}
			}, this);
		}, this);
		alias.call(this);
	};

})(Game_Actor.prototype.levelUp);
 

Attachments

Erodaisiki

Veteran
Veteran
Joined
Jul 18, 2018
Messages
48
Reaction score
3
First Language
English
Primarily Uses
RMMV
Does this work for you?
Code:
/*:
 * @plugindesc Lets you add random values to base parameters on level-up.
 * @author Caethyril
 *
 * @help Actor/Class notetag (case-sensitive!):
 *    <Level Up STAT: X>
 *    <Level Up STAT: X to Y>
 *     - Replace STAT with one of these:
 *         MHP, MMP, ATK, DEF, MAT, MDF, AGI, LUK
 *     - Replace X with the minimum amount to add (integer)
 *     - Replace Y with the maximum amount to add (integer)
 *       -> Note: Y should be greater than X.
 *   Examples:
 *    <Level Up MHP: 40>          + 40 max HP per level
 *    <Level Up ATK: 5 to 15>     + 5~15 (inclusive) ATK per level
 *    <Level Up LUK: 0 to 8>      + 0~8 (inclusive) LUK per level
 *
 * Note that this is not designed to work with "level-downs".
 * The stat gains are permanent and are not tracked separately.
 *
 * Terms of use:
 *    Free to use and modify.
 */

(function(alias) {

'use strict';

    const TAGNAME  = 'Level Up %1';
    const PARAMS   = ['MHP', 'MMP', 'ATK', 'DEF', 'MAT', 'MDF', 'AGI', 'LUK'];
    const SPLITTER = 'to';

    Game_Actor.prototype.levelUp = function() {
        PARAMS.forEach(function(p, n) {
            [this.actor(), this.currentClass()].forEach(function(o) {
                let tag = o.meta[TAGNAME.format(p)];
                if (tag) {
                    let arr = tag.split(SPLITTER).map(function(num) { return parseInt(num, 10); });
                    let add = 0;
                    if (!isNaN(arr[0])) add += arr[0];
                    if (!isNaN(arr[1])) {
                        let m = arr[1] - (isNaN(arr[0]) ? 0 : arr[0]) + 1;
                        if (m > 0) add += Math.randomInt(m);
                    }
                    this.addParam(n, add);
                }
            }, this);
        }, this);
        alias.call(this);
    };

})(Game_Actor.prototype.levelUp);
Nice! That's exactly what I want.
 

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
2,118
Reaction score
1,526
First Language
EN
Primarily Uses
RMMZ
Great! I've only done a few basic tests, so just post back here if you run into problems with it~ :kaothx:
 

JesterRu

Warper
Member
Joined
Jul 24, 2019
Messages
1
Reaction score
1
First Language
English/Spanish
Primarily Uses
RMMV
Does this work for you?
Code:
/*:
 * @plugindesc Lets you add random values to base parameters on level-up.
 * @author Caethyril
 *
 * @help Actor/Class notetag (case-sensitive!):
 *    <Level Up STAT: X>
 *    <Level Up STAT: X to Y>
 *     - Replace STAT with one of these:
 *         MHP, MMP, ATK, DEF, MAT, MDF, AGI, LUK
 *     - Replace X with the minimum amount to add (integer)
 *     - Replace Y with the maximum amount to add (integer)
 *       -> Note: Y should be greater than X.
 *   Examples:
 *    <Level Up MHP: 40>          + 40 max HP per level
 *    <Level Up ATK: 5 to 15>     + 5~15 (inclusive) ATK per level
 *    <Level Up LUK: 0 to 8>      + 0~8 (inclusive) LUK per level
 *
 * Note that this is not designed to work with "level-downs".
 * The stat gains are permanent and are not tracked separately.
 *
 * Terms of use:
 *    Free to use and modify.
 */

(function(alias) {

'use strict';

    const TAGNAME  = 'Level Up %1';
    const PARAMS   = ['MHP', 'MMP', 'ATK', 'DEF', 'MAT', 'MDF', 'AGI', 'LUK'];
    const SPLITTER = 'to';

    Game_Actor.prototype.levelUp = function() {
        PARAMS.forEach(function(p, n) {
            [this.actor(), this.currentClass()].forEach(function(o) {
                let tag = o.meta[TAGNAME.format(p)];
                if (tag) {
                    let arr = tag.split(SPLITTER).map(function(num) { return parseInt(num, 10); });
                    let add = 0;
                    if (!isNaN(arr[0])) add += arr[0];
                    if (!isNaN(arr[1])) {
                        let m = arr[1] - (isNaN(arr[0]) ? 0 : arr[0]) + 1;
                        if (m > 0) add += Math.randomInt(m);
                    }
                    this.addParam(n, add);
                }
            }, this);
        }, this);
        alias.call(this);
    };

})(Game_Actor.prototype.levelUp);

You are a Genius! Thank you so much for this, can it be used commercially? Your name would be added to the credits and splash screen of my games (If I can manage to run a video animation on start up properly, but thats another matter entirely... ^_^")

Erodaisiki, I was having this same problem and I managed to solve it using a bunch of common events and parallel events on the map, which slowed down my game badly and ate at the RAM, so thank you for asking this question because this plugin simplifies so much, and lets the game run smoother with less events.
 

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
2,118
Reaction score
1,526
First Language
EN
Primarily Uses
RMMZ
@JesterRu yes, it's free for whatever you like, commercial or non-commercial, modified or otherwise. It's just a snippet really, but happy to help~ :kaothx:
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,047
Messages
1,018,540
Members
137,834
Latest member
EverNoir
Top