Global Difficulty System
Overview
Creator:
Moosh
Updated: 26 Dec 2020
Tags:
FFC,
Global
Downloads: 38
|
View Script
Download Package (995.91 KB) |
Information
This script allows for dynamic difficulty options like seen in several popular quests. I've also included some FFC scripts to work alongside them.
Description Setup Reviews Comments
Global Script:
For this script to work, you'll need to create 2-5 difficulty token items for tracking the player's current selected difficulty. These items can be any itemclass, though Peril Rings (with Maximum Hearts set to 99) are recommended (as they have innate damage divsion) if you're doing global damage multipliers with easy modes. Give each difficulty token its own item level.
Set the following five constants in the script to the item IDs of your difficulty items as seen in the editor:
Set the following constants to your desired difficulty settings:
Below are global damage multipliers. Any times Link takes damage from any source, it will get multiplied by these. If <1, you'll likely want to use Peril Ring damage divisors on the difficulty tokens instead.
Below are enemy damage multipliers. These will be applied only to enemies when they spawn in. They will not affect damage caused by combos or scripts.
If you're using ghost.zh, you should also swap the commented lines (//) in the following comments. So if you're using ghost.zh
FFC and Item Scripts:
Enemy Specific Exceptions (Advanced):
This script only requires std.zh. If you're on 2.53 and need to reference constants for some of the setup, remember it's been moved to include/std_zh/std_constants.zh.
For this script to work, you'll need to create 2-5 difficulty token items for tracking the player's current selected difficulty. These items can be any itemclass, though Peril Rings (with Maximum Hearts set to 99) are recommended (as they have innate damage divsion) if you're doing global damage multipliers with easy modes. Give each difficulty token its own item level.
Set the following five constants in the script to the item IDs of your difficulty items as seen in the editor:
- I_DIFF_VERYEASY
- I_DIFF_EASY
- I_DIFF_NORMAL
- I_DIFF_HARD
- I_DIFF_VERYHARD
Set the following constants to your desired difficulty settings:
Below are global damage multipliers. Any times Link takes damage from any source, it will get multiplied by these. If <1, you'll likely want to use Peril Ring damage divisors on the difficulty tokens instead.
- DIFFICULTY_VERYEASY_DAMAGE_MULTIPLIER
- DIFFICULTY_EASY_DAMAGE_MULTIPLIER
- DIFFICULTY_NORMAL_DAMAGE_MULTIPLIER
- DIFFICULTY_HARD_DAMAGE_MULTIPLIER
- DIFFICULTY_VERYHARD_DAMAGE_MULTIPLIER?
Below are enemy damage multipliers. These will be applied only to enemies when they spawn in. They will not affect damage caused by combos or scripts.
- DIFFICULTY_ENEMY_VERYEASY_DAMAGE_MULTIPLIER
- DIFFICULTY_ENEMY_EASY_DAMAGE_MULTIPLIER
- DIFFICULTY_ENEMY_NORMAL_DAMAGE_MULTIPLIER
- DIFFICULTY_ENEMY_HARD_DAMAGE_MULTIPLIER
- DIFFICULTY_ENEMY_VERYHARD_DAMAGE_MULTIPLIER
- DIFFICULTY_ENEMY_VERYEASY_HP_MULTIPLIER
- DIFFICULTY_ENEMY_EASY_HP_MULTIPLIER
- DIFFICULTY_ENEMY_NORMAL_HP_MULTIPLIER
- DIFFICULTY_ENEMY_HARD_HP_MULTIPLIER
- DIFFICULTY_ENEMY_VERYHARD_HP_MULTIPLIER
- DIFFICULTY_ENEMY_VERYEASY_STEP_MULTIPLIER
- DIFFICULTY_ENEMY_EASY_STEP_MULTIPLIER
- DIFFICULTY_ENEMY_NORMAL_STEP_MULTIPLIER
- DIFFICULTY_ENEMY_HARD_STEP_MULTIPLIER
- DIFFICULTY_ENEMY_VERYHARD_STEP_MULTIPLIER
If you're using ghost.zh, you should also swap the commented lines (//) in the following comments. So if you're using ghost.zh
void DifficultyGlobal_SetEnemyHP(npc n, int val){ //If using ghost.zh, uncomment the following and comment out the line below //SetEnemyProperty(n, ENPROP_HP, val); n->HP = val; } int DifficultyGlobal_GetEnemyHP(npc n){ //If using ghost.zh, uncomment the following and comment out the line below //return GetEnemyProperty(n, ENPROP_HP); return n->HP; }would become:
void DifficultyGlobal_SetEnemyHP(npc n, int val){ //If using ghost.zh, uncomment the following and comment out the line below SetEnemyProperty(n, ENPROP_HP, val); // n->HP = val; } int DifficultyGlobal_GetEnemyHP(npc n){ //If using ghost.zh, uncomment the following and comment out the line below return GetEnemyProperty(n, ENPROP_HP); // return n->HP; }For the final step, you'll need to combine Difficulty_Example with your quest's global script.
FFC and Item Scripts:
Item Script: Difficulty_PickupItem
FFC Script: Difficulty_Override
FFC Script: Difficulty_SelectionScreen
FFC Script: Difficulty_ReplaceScreen
FFC Script: Difficulty_ReplaceCombo
FFC Script: Difficulty_ChangeWarp
Enemy Specific Exceptions (Advanced):
Spoiler
This script only requires std.zh. If you're on 2.53 and need to reference constants for some of the setup, remember it's been moved to include/std_zh/std_constants.zh.