Jump to content
Easycore

[Showcase] Instance Difficulty Settings

Recommended Posts

Instance Difficulty Settings

RUipOGP.png

Instance Difficulty Settings is a powerful modification that allows you to set/modify an instance difficulty without touching the whole NPC Script of the instance and adding status penalties to the players.

🔹How it works?🔹

This Mod works in base of a Custom Database (instance_mode_db.yml).
Inside this file you can configurate a bunch of parameters related to Monster, Exp Rate and Drop Rate.

###########################################################################
# Instance Mode Database
###########################################################################
#
# Instance Mode Settings
#
###########################################################################
# - Mode              Instance Mode ID.
#   Exp Rate          Experience rate percentage setting for Instance. (Default: 100)
#   Drop Rate         Drop rate percentage setting for Instance. (Default: 100)
#   HP                Mob's Max HP percentage. (Default: 100)
#   Speed             Mob's Movement Speed percentage. Set it lower to increase speed. (Default: 100)
#   STR               Mob's STR percentage. (Default: 100)
#   AGI               Mob's AGI percentage. (Default: 100)
#   VIT               Mob's VIT percentage. (Default: 100)
#   INT               Mob's INT percentage. (Default: 100)
#   DEX               Mob's DEX percentage. (Default: 100)
#   LUK               Mob's LUK percentage. (Default: 100)
#   ATK               Mob's ATK percentage. (Default: 100)
#   ATK2              Mob's ATK2 percentage. (Default: 100)
#   MATK              Mob's MATK percentage. (Default: 100)
#   MATK2             Mob's MATK2 percentage. (Default: 100)
#   DEF               Mob's DEF percentage. (Default: 100)
#   MDEF              Mob's MDEF percentage. (Default: 100)
#   HIT               Mob's HIT percentage. (Default: 100)
#   FLEE              Mob's FLEE percentage. (Default: 100)
#   FLEE2             Mob's FLEE2 percentage. (Default: 100)
#   CRI               Mob's CRI percentage. (Default: 100)
#   AMOTION           Mob's AMOTION percentage. Set it lower to increase speed. (Default: 100)
#   ADELAY            Mob's ADELAY percentage. Set it lower to increase speed. (Default: 100)
#   DMOTION           Mob's DMOTION percentage. Set it lower to increase speed. (Default: 100)
###########################################################################

Currently there are 4 premade difficulty modes

  • ID_EASY: Easy mode, all monster stats are reduced by 20%. Exp & Drop rates reduced by 20%.
  • ID_NORMAL: Default mode. No changes.
  • ID_HARD: Hard mode, all monster stats increased by 50%, speed & ASPD +20%. Exp & Drop rates increased by 20%.
  • ID_INSANE: Very hard mode, all monster stats increased by 100%, speed & ASPD +50%. Exp & Drop rates increased by 50%.

You can easily modify each value in this file and even create your custom difficulty modes.

🔹Instance Penalty Debuffs🔹

Instance penalty debuff is another way to make harder the experience of your players by adding permanents debuff while they are inside the instance.
Currently there are 8 debuffs.

  • Cast Time: Increases cast time by <value>%.
  • ASPD: Decreases ASPD by <value>%.
  • MaxHP: Decreases MaxHP by <value>%.
  • MaxSP: Decreases MaxSP by <value>%.
  • AllStats: Reduces All Stats by <value>.
  • Speed: Decreases Movement Speed by <value>%.
  • ATK: Decreases Base ATK by <value>%.
  • MATK: Decreases MATK by <value>%.

This all is great! But how can you set instance difficulty and penalties?

🔹Setting up Difficulty🔹

There are 2 ways to set up this:

  1. Setting this up in instance_db.yml:
    There's a node called Difficulty inside this file where you can setup the difficulty.
  2. Setting this up through script command (Recommended):
    When you create an instance with instance_create script command, you can add an extra argument <difficulty>.

Nice! But can I change the mode whenever I want?

Yes, you can. There is a script command called instance_setdifficulty that allows you to change this.
Whenever the difficulty is changed, all the monsters stats inside the instance are recalculated.

So you can make a script that changes the difficulty when X players join from ID_NORMAL to ID_HARD.

🔹Setting up Penalties🔹

For setup a instance penalty you have the script command instance_setpenalty.
instance_setpenalty(<instance id>,<sc_type>,<value>)

Example:
// This will reduce players MaxHP by 75% when they enter to the instance
instance_setpenalty(instance_id(IM_PARTY),SC_ID_MAXHP,75);

Additionally this will give you a Status Icon and send you a message when you join the instance.

AI4Ul6i.png

And again, you can make a script that increases a penalty when X players join the instance or that penalty increases by each player in!

🔹Script Documentation🔹

Spoiler

---------------------------------------

*instance_setdifficulty(<instance id>,<difficulty>);

Set the difficulty of an Instance.
Returns 1 if the difficulty is changed and returns 0 if there's no changes.
If returns 1 all the mobs stats will be reloaded.

Examples:
    // This will set the Instance Difficulty to Insane and will send an announce
    if (instance_setdifficulty(instance_id(IM_PARTY),ID_INSANE))
        mapannounce(instance_mapname("[email protected]"), "Notice : Difficulty has been set to Insane.",bc_map,"0xff0000");

---------------------------------------

*instance_getdifficulty(<instance id>);

Get the difficulty of an Instance.
Returns the difficulty ID.

Examples:
    if (instance_getdifficulty(instance_id(IM_PARTY) == ID_EASY))
        dispbottom("Ha ha ha! Playing in Easy Mode?");

---------------------------------------

*instance_setpenalty(<instance id>,<sc_type>,<value>);

Set a penalty debuff to an Instance.

Valid sc_type:
    SC_ID_CAST: Increases cast time by <value>%.
    SC_ID_ASPD: Decreases ASPD by <value>%.
    SC_ID_MAXHP: Decreases MaxHP by <value>%.
    SC_ID_MAXSP: Decreases MaxSP by <value>%.
    SC_ID_ALLSTATS: Reduces All Stats by <value>.
    SC_ID_SPEED: Decreases Movement Speed by <value>%.
    SC_ID_ATK: Decreases BaseATK by <value>%.
    SC_ID_MATK: Decreases MATK by <value>%.

The penalty is set to the <instance id> and whenever a player enters to a map
that belongs to this instance will receive the debuff.
The debuff is automatically removed when leaving the instance.

Examples:
    //Reduce BaseATK by 100%
    instance_setpenalty(instance_id(IM_PARTY),SC_ID_ATK,100);

---------------------------------------

 

Edited by Emistry
Remove ads
  • Love 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.