[SSG] Difficulty Setting

● ARCHIVED · READ-ONLY
Started by Heartbreak61 44 posts Page 1 of 3 View original ↗
  1. [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
  2. whoa that's a interesting way to do difficulties thanks for the plugin
  3. Great! Was waiting for this
  4. Heartbreak61 said:
    Do you set proper difficulty level? Because usable difficulties level on your setup is just 0 (normal) and 1 (hard).

    It that's not the case, press F8 on test play and let me know what line caused that error.
    if you mean the default setting at 0, yes its still 0 http://puu.sh/lzDqB/67949bfb40.png
  5. Fisherolol said:
    http://puu.sh/lzC0Z/4af845567b.png

    http://puu.sh/lzC40/3fc4644ab0.png

    Any ideas?
    Fisherolol said:
    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.
  6. 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
  7. @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.
  8. 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.
  9. This is perfect, thanks a billion!
  10. clitvin said:
    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.
  11. Seems to be fixed. I'll let you know if the issue comes back.
  12. where si the link of v1.0.2??
  13. 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.
  14. Heartbreak61 said:
    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.
    hfgh8j1.pngthis one?

    is this 1.0.2?  :unsure:
  15. 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 :)
  16. Suppose you could add custom values be affected by the difficulty too?

    For example if people use Yanfly's Job Points plugin.
  17. 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!
  18. could someone show me what this looks like in game if it was set up properly?