[SSG] Difficulty Setting

Heartbreak61

Wandering Noob
Veteran
Joined
Sep 5, 2012
Messages
188
Reaction score
88
First Language
Indonesian
Primarily Uses
RMMV
[simple Stupid Gaming] Difficulty Setting
version 1.0.3
by Heartbreak61​

INTRODUCTION
This plugin allows you to set difficulties that affects enemies stats, exp, gold, and shop price. You can choose wether to display difficulty setting on Game Option screen or not (default: on). In case you don't want to, you can switch difficulty levels using Event Plugin Command.

Before using this plugin, please make sure that you have file Difficulties.json placed inside "data" folder of your current project. Edit your Difficulties.json to your liking. You may add or remove difficulty levels as long as you follow the pattern.


FEATURES
- Multiple difficulty level to your liking
- Turn switches to on when changing difficulty level
- Set difficulty on Option Screen​

SCREENSHOT
N/A​

HOW TO USE
Put Difficulties.json inside your data folder, and put SSG_DifficultySetting.js inside your js/plugin folder. Open Diffifficulties.json using any text editor and you will find something like this
[ // <- don't touch this { "name": "Very Easy", "mhp": 60, "mmp": 60, "atk": 50, "def": 50, "mat": 50, "mdf": 50, "agi": 50, "luk": 50, "exp": 50, "gold":50, "buy": 200, "sell": 200, "switches":[1,6] },......] // <- don't touch this
Here's the explanation

~~ name ~~
Set your difficulty level name that will be displayed on the Option Screen. Values must be a string (wrapped by quotes or double quotes sign).
The tables is an Array. It means that the first element's ID is 0. You should make your difficulty level sorted from easiest to hardest. As it will make sense for the player when they set difficulty on the option screen

~~ mhp, mmp, atk, def, atk, mat, mdf, agi, luk ~~
Set enemy's stats. Values represent percentage (100 is 100%)

~~ exp, gold ~~
Set enemy's exp and gold. Values represent percentage

~~ buy, sell ~~
Affect price when buying or selling items on the shop. Values represent percentage

~~ switches ~~
Will specified set of switches to ON when a difficulty level applied. Switches should be declared in array (i.e. [1,2,3]). If you don't want to use this feature, just set it to [0]. Switches from other difficulty level will be turned OFF but you can have same switches declared on different difficulty level (See how I set switch 6 on difficulty 0 and 2 on the
example table below). Please note that switches CAN'T be turned off using normal way.

Author's Note About Switches:
In case you don't know, you can use switches for enemy skill condition. So you can set an enemy to cast different skills on different difficulty level.



Specific Enemy Setting
To override the table for certain enemies, you can write this line on enemy notebox
Code:
<param difficulty: difficultyLevel, param, value>
example: <param difficulty: 4, def, 250>

It will set enemy's DEF on difficulty 4 to 250%. Or you can write these lines for multiple assignment
Code:
<enemy difficulty>difficultyLevel, param, valuedifficultyLevel, param, value...</enemy difficulty>
example:
Code:
<enemy difficulty>0, mhp, 70 3, atk, 1503, def, 1254, atk, 2004, mhp, 400</enemy difficulty>
valid arguments for enemy stats is:
Code:
mhp, mmp, atk, def, mat, mdf, agi, luk, exp, gold
Note: default maximum stats for enemy will still be applied. For example, enemy's ATK limit is 999.


Plugin Command
In case you don't want to use Option Screen or you want to set difficulties via events, you can use plugin command.


Code:
setDifficulty Number
example: setDifficulty 4


Plugin Parameters
Code:
Show Difficulty OptionDescription = Show Difficulty on Option WindowDefault = true
Code:
Default DifficultyDescription = Your default starting difficulty level. This value will be replaced by game option save data.Default = 0
DEMO
N/A

OLDER DEMOS:
N/A

SCRIPT
SSG_DifficultySetting.js
Difficulties.json


for those who have issues "can't read property length of null", please try this
Hotfix
Let me know if this work because I can't reproduce your error to see wether this fix work or not.



Thanks to estriole that inspired me to upload a test project to dropbox + my slow internet connection,
finally I can test error about "can't read property 'length' of null". This shouldn't be a problem right now.

FAQ
Nothing yet

TERM OF USE
Free to use on both commercial or non-commercial project as long as you give credits to me. ;)

CHANGELOG
2015.11.16 ver 0.9.9
- Finished beta version

2015.11.26 ver 1.0.0
- Added : display on Option Screen
- Added : option to turn switches on
- Changed : change from using Game_System to SSG_Heartbreak static class

2015.11.27 ver 1.0.1
- Fixed : Attempt to fix error about not being able to read property of 'length' from null object

2015.11.28 ver 1.0.2
- Fixed : Improved fix method from ver 1.0.1. Now it should work properly.
- Fixed : Bug that caused user to be able to set switches from another difficulty level to ON
- Added : Better documentation

2015.12.10 ver 1.0.3
- Fixed : Syntax error that caused logical flaw
 
Last edited:

Otakuhn

Veteran
Veteran
Joined
Aug 13, 2015
Messages
93
Reaction score
4
First Language
English
Primarily Uses
whoa that's a interesting way to do difficulties thanks for the plugin
 

lolshtar

Master of Magic thatknow nospell
Veteran
Joined
Apr 13, 2013
Messages
694
Reaction score
101
First Language
French
Primarily Uses
RMMV

Heartbreak61

Wandering Noob
Veteran
Joined
Sep 5, 2012
Messages
188
Reaction score
88
First Language
Indonesian
Primarily Uses
RMMV
if you mean the default setting at 0, yes its still 0 http://puu.sh/lzDqB/67949bfb40.png
Your first and second error are different. I still got no clues about your first error.

By any chance, did you test this plugin from online server? I think it's because my plugin is trying to read your $dataEnemies that has not completely loaded. I'll try to figure it out on next update.
 

lolshtar

Master of Magic thatknow nospell
Veteran
Joined
Apr 13, 2013
Messages
694
Reaction score
101
First Language
French
Primarily Uses
RMMV
This is the same error, the text is translated differently on the console.

No, it's a normal game.

I suspect the error to be either because l have 2 difficulties and you put 4 at the beginning hence it cannot find 3 or compatibility.

Let me check the compatibility, didnt had the time yesterday.

EDIT: with all scripts off but yours l still get the error

EDIT2: with your difficulties setting l get a different error:

http://puu.sh/lA6JI/7a282340eb.png

http://puu.sh/lA6Oc/2979b4b18e.png
 
Last edited by a moderator:

Heartbreak61

Wandering Noob
Veteran
Joined
Sep 5, 2012
Messages
188
Reaction score
88
First Language
Indonesian
Primarily Uses
RMMV
@Fisherolol I've made a quick fix. Please PM me if you want to test it. Anyone with similiar problem can also contact me to test this fix.

Thanks.
 

clitvin

Veteran
Veteran
Joined
Oct 26, 2015
Messages
95
Reaction score
11
Primarily Uses
I'm getting the same "length" of null error. It's definitely a timing issue because if I try to load the game enough times it will eventually work.
 

Prescott

argggghhh
Veteran
Joined
Aug 28, 2014
Messages
470
Reaction score
364
First Language
English
Primarily Uses
RMMV
This is perfect, thanks a billion!
 

Heartbreak61

Wandering Noob
Veteran
Joined
Sep 5, 2012
Messages
188
Reaction score
88
First Language
Indonesian
Primarily Uses
RMMV
I'm getting the same "length" of null error. It's definitely a timing issue because if I try to load the game enough times it will eventually work.
Please check hotfix on my 1st post. let me know if this work.

Updated to version 1.0.2

Thanks to estriole that inspired me to upload a test project to dropbox + my slow internet connection, finally I can test error about "can't read property 'length' of null". This shouldn't be a problem right now.
 
Last edited by a moderator:

clitvin

Veteran
Veteran
Joined
Oct 26, 2015
Messages
95
Reaction score
11
Primarily Uses
Seems to be fixed. I'll let you know if the issue comes back.
 

Radis3D

Just a Devilz
Veteran
Joined
Nov 1, 2015
Messages
172
Reaction score
33
First Language
Indonesian
Primarily Uses
RMVXA
where si the link of v1.0.2??
 

Heartbreak61

Wandering Noob
Veteran
Joined
Sep 5, 2012
Messages
188
Reaction score
88
First Language
Indonesian
Primarily Uses
RMMV
The first post. On SSG_DifficultySetting.js link

I removed link for previous version because I'm afraid that people accidentally clicked wrong version if I display it.
 
Last edited by a moderator:

Radis3D

Just a Devilz
Veteran
Joined
Nov 1, 2015
Messages
172
Reaction score
33
First Language
Indonesian
Primarily Uses
RMVXA
The first post. On SSG_DifficultySetting.js link

I removed link for previous version because I'm afraid that people accidentally clicked wrong version if I display it.
this one?

is this 1.0.2?  :unsure:
 

Heartbreak61

Wandering Noob
Veteran
Joined
Sep 5, 2012
Messages
188
Reaction score
88
First Language
Indonesian
Primarily Uses
RMMV
supposed to be 1.0.2 lol

my bad. I forget to change the header. maybe I'll just delete the header afterall

*edit: edit it so it show proper name.

thanks for remind me :)
 
Last edited by a moderator:

Mojo907

Veteran
Veteran
Joined
May 21, 2013
Messages
143
Reaction score
34
First Language
English
Primarily Uses
RMMV
Suppose you could add custom values be affected by the difficulty too?

For example if people use Yanfly's Job Points plugin.
 

Pumamori

Veteran
Veteran
Joined
Oct 29, 2012
Messages
109
Reaction score
21
First Language
German
Primarily Uses
RMMV
Is it possible to check which difficulty the player plays on, so we can change certain events and stuff? Also, disabling the option to change difficulty midgame would be neat! :)

EDIT: My apologies, I wasn't reading thoroughly enough. Great plugin!
 
Last edited by a moderator:

Otakuhn

Veteran
Veteran
Joined
Aug 13, 2015
Messages
93
Reaction score
4
First Language
English
Primarily Uses
could someone show me what this looks like in game if it was set up properly?
 

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

Latest Threads

Latest Posts

Latest Profile Posts

buinguyenhoangtho wrote on fizzly's profile.
Hello @fizzly, i would like to use your asset/ resource for my project ( is maybe commercial ). May i have your permission? Thanks you !
Working on breaking the limits of RPGMaker! :cool:
I have 470+ hours on RMMV but have only made a demo game, is this normal? :kaoswt: (I lose motivation a lot plus I use a 32gb laptop, so..)
I like Iron Maiden.
Benku wrote on Magnus0808's profile.
Hey man you helped me out a long time ago with a plugin i was wondering if you can help me out one more time since its literally the last thing i need help with if not is cool but id figured id ask you one more soild.

Forum statistics

Threads
95,427
Messages
929,082
Members
125,659
Latest member
AphoticAmaranth
Top