Various Difficulty Settings

Hello there.

I would like to request a script which allows me to implement various difficulties. Back in VX Ace, I used this script made by TheoAllen. It basically allowed you to specify one variable and depending on the value of the variable it would increase or decrease the enemy stats by a percentage (100% being the baseline in the database). Now, I would be pretty happy with just something simple like this (so only a percentage for enemy stats - and maybe EXP/Gold you get).

However, what would be nice - and I have no idea how hard it actually is to program this - if you were able to influence pretty much everything with notetags. Now, this is of course completely optional, but it would make balancing on various difficulties or just for specific enemies or maybe even weapons and skills so much easier. Being able to say enemy X - and only enemy X - has 150% HP on hard mode instead of 130% like everything else, or weapon Y would only give you 70% ATK instead of the usual 100%, that would be awesome! But as said, that would be a nice addition, but mainly I would be happy with a "simple" global stat increase/decrease.
May not be as easy as it would be with a plugin, but you could do this pretty easily with events and just copy everything you want to be in a different difficulty 3 times and change their stats. Very tedious, but if a plugin doesn't come along it would be your best option.
May not be as easy as it would be with a plugin, but you could do this pretty easily with events and just copy everything you want to be in a different difficulty 3 times and change their stats. Very tedious, but if a plugin doesn't come along it would be your best option.
Yeah, I know that it's possible. However, as you say yourself, it's pretty tedious. I did this back in the day for one of my 2k games with 4 difficulties. Never again. I would probably just stick with a single one then.
*push*

Anyone? Maybe? I would give you a hug! 
Question, would it be only the enemies that are affected? And how would they chose the difficulty? From the title screen when they press new game?
Question, would it be only the enemies that are affected? And how would they chose the difficulty? From the title screen when they press new game?
TheoAllen's script for ace did this with a variable. Basically, the player starts a game, then chooses the difficulty and depending on what he chose the variable gets set to a specific number. 1 = Easy, 2 = Normal, 3 = Hard etc. The script itself then looks at this specified variable (could be changed to any variable, it just had to be changed in the script) and depending on the number it would influence enemy stats. It looks like this (I changed the stats from 100 everywhere though, but it's still part of his VX Ace Script):

module THEOLIZED module DIFFSETTING VAR_ID = 9 # variable id. 0 to disable DIFFICULTY_HASH = { # <- don't touch this # variable value => [modifiers in percent]# value => [mhp ,mmp ,atk ,def ,mat ,mdf ,agi ,luk , exp,gold, buy,sell] 1 => [50 ,50 ,70 ,70 ,70 ,70 ,70 ,70 , 130, 130, 100, 100], 2 => [80 ,80 ,80 ,80 ,80 ,80 ,80 ,80 , 100, 100, 100, 100], 3 => [100 ,100 ,100 ,100 ,100 ,100 ,100 ,100 , 100, 100, 100, 100], 4 => [120 ,120 ,120 ,120 ,120 ,120 ,120 ,120 , 100, 100, 100, 100], 5 => [150 ,150 ,130 ,130 ,130 ,130 ,130 ,130 , 70, 70, 150, 150], } # <- don't touch this endendThis would allow me to change the difficulty with variable 9. When I then change variable 9 to 3, I would have normal mode. All enemy stats would be like I specify them in the database. Var 9 = 4 would be hard mode, enemies get a 20% increase to their stats. Var 9 = 5 increases stats even further and also reduces EXP and Gold you get from enemies (and increases Buy and Sell value from items, but that's not really important here). In TheoAllen's script, difficulty could only be changed once before you fought the first battle. I wouldn't mind that. It would also be enough to just globally change all stats like this script does. The notetag thing I mentioned earlier would be a nice addition, but nothing that's really necessary. It would offer me more possibilites, like saying "All enemies have 50% more health, but every boss only has 30% more", these 30% I would then have to specify with notetags at each enemy. But again, that would be a nice addition but not necessary.
This night, I'll try to make something similiar like Theo's so it's easier for you to set things.

My question is, what if I don't use game variables as a setup but you can freely change it in the middle of the game?
This night, I'll try to make something similiar like Theo's so it's easier for you to set things.

My question is, what if I don't use game variables as a setup but you can freely change it in the middle of the game?
Oh, no problem. Might even be better, so people could just change it if they get stuck or something. 
For my games I use a battle event at the start of battle to apply a state to the enemies and the players based on a variable for game difficulty. The enemy state buffs their stats and the player state buffs XP granted (this buff has no duration but is removed after taking one step).

Basically what Theo did there you just do via states and apply the correct state at the start of combat. For this I use yanfly base troop event plugin so I dont have to copy it to every battle.

With a difficulty state on an enemy you can also give them different attacks at higher difficulty levels etc.
For my games I use a battle event at the start of battle to apply a state to the enemies and the players based on a variable for game difficulty. The enemy state buffs their stats and the player state buffs XP granted (this buff has no duration but is removed after taking one step).

Basically what Theo did there you just do via states and apply the correct state at the start of combat. For this I use yanfly base troop event plugin so I dont have to copy it to every battle.

With a difficulty state on an enemy you can also give them different attacks at higher difficulty levels etc.
I completely forgot that's possible now. But that wouldn't affect stuff like EnemyBook, eh? Then again, I think a script that only affects enemy stats would also not affect EnemyBook, so there is that. 

Edit: Using this, it still has a few problems. One would be that dead characters or enemies loose their buff. It could be applied at the end of the turn, but if you for example revive a character and then kill the last enemy in the same turn, stuff like +/- exp wouldn't be applied to the revived character, because he is lacking the (de)buff.
Got it done with rough documentation.Would you mind checking it?

It's work well on my side, both for enemies and shop.

Adding new actions (or skill) for enemies will be nice. The simplest way is to set some switches ON when setting difficulties (using my plugin).
Oh yeah, I am willing to test it. Thanks in advance! 😀
I too, am very interested in this. May I suggest the possibility to change the difficulty in the options meny? That's where most games allow you to do that even after the game have started.
I too, am very interested in this. May I suggest the possibility to change the difficulty in the options meny? That's where most games allow you to do that even after the game have started.
It's possible. OP already test my plugin and it worked as expected. Just give me some time to add this feature and probably thinking about how user can setup difficulties MV-ish way rather than VXA-ish way (write directly on the script file).

But each user will need to assign each difficulty level a name. For example, one might just set 3 difficulties with names "Easy, Normal, Hard". While maybe I will prefer something like 5 difficulties with names "Noobs, Rookies, Regular, MVP, Masochist".
I am currently using 4, but I think 5 would be enough. Or just add 10, just to be sure. xD

Anyways, it works like a charm. One bug was in it, but that got already fixed. Getting crushed by the first enemy never felt so good. xD
I completely forgot that's possible now. But that wouldn't affect stuff like EnemyBook, eh? Then again, I think a script that only affects enemy stats would also not affect EnemyBook, so there is that. 

Edit: Using this, it still has a few problems. One would be that dead characters or enemies loose their buff. It could be applied at the end of the turn, but if you for example revive a character and then kill the last enemy in the same turn, stuff like +/- exp wouldn't be applied to the revived character, because he is lacking the (de)buff.
Yeah I'm not sure if there is a way to do something at the end of battle without some scripting (such as adding the xp buff to the players prior to gaining xp).
Maybe use Yanflys Base Troop Events to check a switch (or variable) and if its of a value, the enemies are buffed or debuffed. If the difficulty is too high, it may also give states to the enemies.

The longer and more annoying way would be to make an easy, normal, hard and Nightmare version of the enemies and use
this to make a dummy version of them, based on a switch or something...made sense when I thought of it, lol
Has this been resolved? I could make a script for this. 
Oh, yeah, whoops. I already got a plugin from Heartbreak61. No idea if we wants to release it though.
My script has logic inefficiency. I'm currenty working on fix.

Original thread: https://forums.rpgmakerweb.com/threads/various-difficulty-settings.50121/