Game Difficulty Plugin

bluebooth

Veteran
Veteran
Joined
Nov 12, 2015
Messages
95
Reaction score
115
First Language
English
Primarily Uses
N/A
Difficulty Levels v1.04
Author:
Michael Morris @Blue Booth Studios


Introduction
Adds support for multiple battle and puzzle difficulty levels! Note that this plugin focuses on providing a framework for battle and puzzle difficulty levels, and a scene for selecting the difficulty level (Options menu was way too simple).
Difficulties can set any number of switches and variables to specific values, perma-death and ironman support is built-in to the plugin. Unlockable difficulty levels are also supported.

With no additional code, battle difficulties will not affect combat. But, when combined with custom states, this can be used to set passive states that activate when a given battle difficulty is active to modify player or monster stats. The extent of these states are up to you.

For puzzles, you will need to manually specify how puzzle difficulty conditions affect your puzzles and hints. This is left for manual use because of the sheer range of possibilities.

GameSwitches and GameVariables can be used to restrict the attacks monsters use for lower difficulty levels. Naturally, as with all other variables and switches the limit of their potential uses is up to you.

State Example

Set all base parameters to 110% for easy mode.

In the notes section, add:
Code:
<Custom Passive Condition>
if(ConfigManager.battleDifficulty() == "easy") {
  condition = true
} else {
  condition = false
}
</Custom Passive Condition>
These difficulty states require YEP_AutoPassiveStates.
It must be placed above BBS_DifficultyLevels.


Features
- Adds a new scene that can be called at game start to set difficulty levels for battle and puzzles. Each difficulty type has a
separate menu.

- Command Window difficulty selection with a details window on the right, showing a number of fields for the current selected difficulties. Difficulty name, description, effects, and a custom image are supported.

- Difficulty for battles and puzzles are saved to $gameVariables, so they will persist across save/load, and so that multiple players can each use their own difficulty without having to change Options every time.

- Each difficulty can have any number of switches and variables attached to it. For example, this could remove certain enemies, or prevent them using super-powerful skills, remove guards from stealth sequences, etc.

- Ironman support! For those who aren't familiar, Ironman mode is a difficulty setting where saving is not allowed. It extends all default saving functionality, and some autosave functionality to disable saving if this setting is active. Ironman mode cannot be disabled on a save once it is enabled.

- Permadeath support! Once the dying state is first added to a character, it cannot be removed. This could be done with states, but Permadeath support will also prevent death from being removed if an item that removes death is used, if the RecoverAll command is used, or even if the programmer tries to undo the death state by accident. No states or buffs can be added or removed from dead characters. They dead. Permadeath cannot be disabled on a save once it is enabled.

- JSON file for adding in your own custom difficulty levels for battle and puzzles.

- Increase your player-base by improving your games accessibility.

- Difficulty cannot be changed after it is first set. This is to prevent many potential issues (for example, if your difficulties change
the players health, heroes can be damaged by going to a higher difficulty level, or, if you heal first, difficulty can be exploited to repeatedly heal characters).

- Many options for customizing the appearance of the difficulty scene to your liking.

- Higher difficulties can yield better rewards, have unique monsters, or anything else you can think of.

- Difficulty settings can be referenced from anywhere in the project with a script command.

- Compatible with most (if not all) Yanfly plugins.

- Adds menu option for whether to show tutorials or not. Courtesy feature for veteran players! Higher difficulties might also show less tutorials.

- Fast. No performance drop was noted during tests.


How to Use
- Copy script into your game js/plugins directory.
- Copy difficulty.json into your game data directory.
- Import and configure plugin. The indices for battle and puzzle options must be set!

Requirements
-YEP_MessageCore (for word-wrap)
-YEP_AutoPassiveStates (for difficulty states)

Screenshots
Coming soon!


Demo


Script
*Too large to post directly*

Change Log
1.04

- Fixed bug where deceased check prevented dying state from being complied.
- Fixed game switches and variables not setting. Use format: INDEX, VALUE; INDEX, VALUE; ...
- Option label and death state variables were used inconsistently; now fixed.
1.03a
- Fixed bug that occurs when no gameSwitches/Variables are set for a difficulty level.
1.03
- Difficulty system overhauled to allow for custom selection menu instead
going through options. It doesn't look good using choice command.
- Tons more customizibility now available.
- Solved problem of displaying difficulty selection at start of game.
- Added picture options.
- Difficulties can now set switches and variables directly.
- Added ironman and permadeath support.
- hidden / unlockable difficulties are now supported.
- Removed pos options.
1.02
- Options area overhauled to support custom difficulty levels and names.

1.01
- Plugin finished.


Known Bugs / TODO
Suggestions, bug reports, and feature requests are welcomed!


Compatibility Issues
None known.


Credit and Thanks
- Micheal Morris @Blue Booth Studios
- Yanfly for YEP_MessageCore, YEP_AutoPassiveStates and his invaluable contributions to the community
- Atreyo Ray for InGameManual. The UI is based off his script.

Author's Notes
Free for non-commercial as long as credit is given.
Please contact me regarding commercial usage.

JSON file:
difficulty.json
 

Attachments

Last edited:

Recruit

Villager
Member
Joined
Sep 14, 2015
Messages
20
Reaction score
5
First Language
English
Primarily Uses
Amazing plugin!!
 

Kisai

Veteran
Veteran
Joined
Aug 7, 2013
Messages
35
Reaction score
17
First Language
English
Primarily Uses
N/A
There are a few things I've noticed that don't seem to be working. First, whatever variables you configure for the difficulties in the .json file, they don't seem to be affected in the game. I don't see any change in their values when I test this out. The variables in the plugin setup do work however. The ones that change the variable to the name of the difficulty. Those work. But whatever variables and switches you put into the .json files don't seem to work at all. Also, trying to use that note for passive states doesn't seem to work, either. And you mentioned a demo, but I don't see any... And finally, trying to change the name of the "Show Tutorials?" option doesn't work. It seems set in stone, probably within the plugin itself. And this was all from a brand new project, as well.

But it really is nice having a difficulty plugin that has such a nice-looking setup. It's like another difficulty plugin I remember from RPG Maker VX Ace. Allowing for images was a nice touch. Makes me wish I was an artist so I could draw some artwork for it, but in-game graphics will do nicely.
 

bluebooth

Veteran
Veteran
Joined
Nov 12, 2015
Messages
95
Reaction score
115
First Language
English
Primarily Uses
N/A
There are a few things I've noticed that don't seem to be working. First, whatever variables you configure for the difficulties in the .json file, they don't seem to be affected in the game. I don't see any change in their values when I test this out. The variables in the plugin setup do work however. The ones that change the variable to the name of the difficulty. Those work. But whatever variables and switches you put into the .json files don't seem to work at all. Also, trying to use that note for passive states doesn't seem to work, either. And you mentioned a demo, but I don't see any... And finally, trying to change the name of the "Show Tutorials?" option doesn't work. It seems set in stone, probably within the plugin itself. And this was all from a brand new project, as well.

But it really is nice having a difficulty plugin that has such a nice-looking setup. It's like another difficulty plugin I remember from RPG Maker VX Ace. Allowing for images was a nice touch. Makes me wish I was an artist so I could draw some artwork for it, but in-game graphics will do nicely.
Thank you! I appreciate the kind words. It seemed bizarre that there wasn't a difficulty plugin already, and I needed one, so I just went ahead and made it. I was just about to post a fix for Perma-Death mode accidently blocking attempts to add the Dying state, but I'll hold it off until I can fix the errors you mention. :)

Kisai, I've posted a new version of the DifficultyLevels plugin. It fixes the bugs you listed, and an additional bug where the Death state would not be applied to battlers (because the Death state also marked them as Perma-Dead, preventing addition of the Dead status. I dunno, it get's strange here).
 
Last edited:

Zarsla

Veteran
Veteran
Joined
Jan 23, 2015
Messages
710
Reaction score
227
First Language
English
Primarily Uses
@bluebooth Would there be any way you can add an option to the plugin to allow for game difficulty to be changed through out the game? Since for my game I don't really care that players change different difficulties through out the game, since I put various bonuses and penalties for changing the difficulty level. For example harder enemies = more rewards while weaker enemies = less rewards. So there's nothing for players to spam, when changing the game difficulty.
 

bluebooth

Veteran
Veteran
Joined
Nov 12, 2015
Messages
95
Reaction score
115
First Language
English
Primarily Uses
N/A
@bluebooth Would there be any way you can add an option to the plugin to allow for game difficulty to be changed through out the game? Since for my game I don't really care that players change different difficulties through out the game, since I put various bonuses and penalties for changing the difficulty level. For example harder enemies = more rewards while weaker enemies = less rewards. So there's nothing for players to spam, when changing the game difficulty.
If you make the script call to show the Difficulty Level scene, you should still be able to change difficulty mid-game. I avoided making this explicit functionality because of the potential for difficulty change spam, and because that makes it impossible to enforce Perma-Death and Ironman difficulty options. If the switches or variables you use change between difficulty levels (ie. some switches are activated on one difficulty that are not changed in other difficulties), then you'll also need to reset those values before bringing up the Difficulty Level scene again.

tl;dr It's doable as is, but isn't official functionality because of all the complications switching it mid-game can cause, based on potential difficulty configurations.
 

TheClassical

Warper
Member
Joined
Jul 29, 2020
Messages
1
Reaction score
0
First Language
English
Primarily Uses
RMMV
How do i get the script to run at game start?
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Playing with colour ramps. The first set is the originals, the ones only facing forward in different colour schemes are the new colours.

I present... MAGIC (in progress)

No vaccine till at least spring 2021. Have not seen our parents since Dec 2019. But at least we can phone each other. How is everyone else's situation?

Forum statistics

Threads
102,978
Messages
996,436
Members
134,445
Latest member
CheckmatedKing
Top