GithubHelp home page GithubHelp logo

azerothcore / mod-zone-difficulty Goto Github PK

View Code? Open in Web Editor NEW
17.0 5.0 23.0 283 KB

Support module for mod-progression-system, handles nerfs and debuffs per zone.

License: GNU Affero General Public License v3.0

Shell 0.81% C++ 99.19%

mod-zone-difficulty's Introduction

Zone Difficulty Module

What is the purpose of this module?

This module provides a way to nerf or debuff players in order to increase the difficulty of certain dungeons or balance battlegrounds/duels.

How to use this module?

This module reads data from the zone_difficulty_info and zone_difficulty_spelloverrides table. _info serves to apply nerfs/debuffs per map and per phase. For example, you can nerf healing by 90% and absorb-effects by 80% while increasing the melee damage players suffer by 50% and reducing the spell damage players suffer by 30%. That is only inside the Temple of Ahn'Qiraj dungeon (MapId 531) for all phases (0 = Skip PhaseMask check, 6 = phases 2 and 4) with the following query:

INSERT INTO `zone_difficulty_info` (`MapId`, `PhaseMask`, `HealingNerfValue`, `AbsorbNerfValue`, `MeleeDmgBuffValue`, `SpellDmgBuffValue`, `Enabled`, `Comment`) VALUES
(531, 0, '0.10', '0.20', '1.50', '0.70', 1, 'AQ40 Healing 50% / Absorb 50% Nerf / 50% physical & 30% spell damage buff');

The heal-output will be multiplied by the value you input in HealingNerfValue as it follows:

output = output * HealingNerfValue

Using MapId 2147483647 will be used for all targets in duels while they're in the zone hardcoded as DUEL_AREA (default 2402: Forbidding Sea, Wetlands). PhaseMask must be 0 for Duels.

You can also prevent certain spells from being affected at all. See zone_difficulty_spelloverrides.sql for examples.

Changing values

You can edit the zone_difficulty_info_content.sql file to apply changes. They will be applied by the autoupdater the next time you restart your server. Alternatively, you may edit the zone_difficulty_info table in your world database and use the reload config command to reload the values.

Mythicmode

How does it work?

For the Mythicmode, there is an NPC (id 1128001) spawned at the beginning of raids and the daily heroic dungeon, determined by the quest given from Wind Trader Zhareem in Shattrath. (Addition of WotlK heroics outstanding). The leader of the party can chose to activate the Mythicmode by talking to the NPC inside the heroic dungeon / raid. Single players can not use the Mythicmode. In Heroic dungeons, the NPC will despawn after 60 seconds. The party needs to decide, if they want to play the Mythicmode before this happens. The last boss of the heroic dungeon will award one score to every player in the heroic dungeon.

In Raids, the NPC will stay indefinitely. As soon as one raidboss is defeated, the leader can still turn the Mythicmode off, but no longer on once it is deactivated. Every defeated raidboss grants one score in the respective category.

Config

ModZoneDifficulty.Hardmode.HpModifier = 2.0 determines the default creature hp modifier for Mythicmode.

Tables

zone_difficulty_instance_saves creates the tables to store the Mythicmode status and the scores. No action required.

zone_difficulty_creatureoverrides contains overrides for creature hp values. This is used to vary certain creatures health from the default value in the conf file.

zone_difficulty_mythicmode_creatures contains gossips and creature positions for the NPCs inside dungeons. Requires spawning additional NPCs, if more heroic dungeons / raids should be added.

In heroic dungeons, the default spawn mask should be 1024. The script will change the NPCs phasemask to 1, if the heroic dungeon is the current daily. In raids, the default spawn mask should be 1.

zone_difficulty_instance_data contains the encounter IDs which should give scores for the Mythicmode. The encounter IDs are taken from the creature_template table. OverrideGO is reserved for future use. InstanceType refers to the content level, see the top of the file for a list.

zone_difficulty_mythicmode_rewards holds the items which can be chosen as a reward for the Mythicmode. Tho gossips for the reward npc (id 1128002) will automatically expand, depending on the kind and amount of rows in the table. ContentType refers to the content level, ItemType refers to the item category. See the top of the file for a list for both. By adding an enchant id and a slot to the item, a custom enchant can be applied.

Authors

mod-zone-difficulty's People

Contributors

55honey avatar annamaria-cc avatar heyitsbench avatar nefertumm avatar nyeriah avatar r-o-b-o-t-o avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

mod-zone-difficulty's Issues

Adding Content types > 9 or Item Types > 9 will cause crash

Hello, thanks in advance for taking your time to do this, really appreciated.

Found out that if i use more content types for reward npc or i create new item types higher than 9 actions go higher than the selected gossip menu so they try to selected the next content type or item type which is + 1 without any itemtype or counter.

For ref if you add TYPE_RAID_T5 or higher to zone_difficulty_mythicmode_rewards which is located at:

https://github.com/azerothcore/mod-zone-difficulty/blob/master/src/ZoneDifficulty.h#L91

You will get a crash on line https://github.com/azerothcore/mod-zone-difficulty/blob/master/src/mod_zone_difficulty_scripts.cpp#L928 when you click on the desired gossip.

Also if you want to add new ItemTypes:

https://github.com/azerothcore/mod-zone-difficulty/blob/master/src/ZoneDifficulty.h#L104 higher than 9

You will also get a crash if you click on the gossip, dunno for what reason this is happening:

image

Again, thanks, appreciated.

Spells that share damage (SPELL_ATTR0_CU_SHARE_DAMAGE) among players isn't affected by spelloverrides

DELETE FROM `zone_difficulty_mythicmode_ai` WHERE `CreatureEntry`=17308 AND `Chance`=100 AND `Spell`=36837 AND `Spellbp0`=0 AND `Spellbp1`=0 AND `Spellbp2`=0 AND `Target`=5 AND `TargetArg`=0 AND `TargetArg2`=0 AND `Delay`=10000 AND `Cooldown`=10000 AND `Repetitions`=0 AND `Enabled`=1 AND `Comment`='Hellfire Citadel - Hellfire Ramparts - Omor the Unscarred - Meteor Test';
INSERT INTO `zone_difficulty_mythicmode_ai` (`CreatureEntry`, `Chance`, `Spell`, `Spellbp0`, `Spellbp1`, `Spellbp2`, `Target`, `TargetArg`, `TargetArg2`, `Delay`, `Cooldown`, `Repetitions`, `Enabled`, `Comment`) VALUES (17308, 100, 36837, 0, 0, 0, 5, 0, 0, 10000, 10000, 0, 1, 'Hellfire Citadel - Hellfire Ramparts - Omor the Unscarred - Meteor Test');

DELETE FROM `zone_difficulty_spelloverrides` WHERE `SpellID`=36837 AND `NerfValue`=0.1 AND `Enabled`=1 AND `Comment`='Hellfire Ramparts Mythic - Meteor Test';
INSERT INTO `zone_difficulty_spelloverrides` (`SpellID`, `NerfValue`, `Enabled`, `Comment`) VALUES (36837, 0.1, 1, 'Hellfire Ramparts Mythic - Meteor Test');
  1. Run sql
  2. Turn on Heroic
  3. .go c 303004
  4. Turn on Mythic
  5. .go c id 17308
  6. See if damage is being modified

Remaining points for Mythic Mode

Raid Tuning:

  • Add tuning/mechanics for Magtheridon's Lair
  • Add tuning/mechanics for Karazhan
  • Add a line in the table zone_difficulty_hardmode_creatureoverrides table for creatures, which should not have their HP doubled, as set in the conf

Heroics tuning:

  • Add tuning/mechanics for each heroic dungeon
  • Add a line in the table zone_difficulty_hardmode_creatureoverrides table for creatures, which should not have their HP doubled, as set in the conf

Global:

  • Make sure the encounter counters are right for every instance
  • Make sure every boss encounter updates boss states (SAI?)

Long-term:

  • Continue tuning for future tiers
  • Spawn a Chromie only in the heroic version of the current daily heroic dungeons for WotLK
  • Add tuning for vanilla raids

Optional:

  • Use the core's target selection where possible instead of the module's own for readability reasons
  • Log player performance data during hardmode encounters
  • Load player history in sZoneDifficulty->Logs on login with an async query and free up the memory on logout
  • Refine the queries to fill sZoneDifficulty->Logs so only the fastest kills are shown (use MIN function for duration) and recent kills (use TimestampStart > ConfSetting)
  • Visualize sZoneDifficulty->Logs

Abilities that heal based on damage get double nerfed

chromiecraft/chromiecraft#4748

What client do you play on?

enUS

Faction

Alliance

Content Phase:

Generic

Current Behaviour

on CC there is a 20% healing reduction and a 30% dmg reduction in bgs to prevent 1 shoting . abilites that heal based on damage, such as Drain Life get nerfed by both the Damage then the heal reduction nerfs

for example; if Drain life would deal 100 damage and heal for 100 health outside BG's, it should Deal 70 damage and heal for 70 health. Instead it Damages for 70 and heals for 56 (80% of 70% of the damage)
image

Expected Blizzlike Behaviour

no double nerf

Source

Steps to reproduce the problem

.learn 47857
use outside of pvp
use in BG

Extra Notes

From Bench

DELETE FROM zone_difficulty_spelloverrides WHERE SpellID IN (689, 699, 709, 7651, 11699, 11700, 27219, 15286, 16487, 16489, 16492, 19578, 20577, 20895, 23881, 28176, 29834, 29838, 30143, 30144, 30145, 30293, 30295, 30296, 31850, 31851, 31852, 53385, 56216, 58369, 59289, 63108, 63220);
INSERT INTO zone_difficulty_spelloverrides (SpellID, NerfValue, Enabled, Comment) VALUES
(689, 1, 1, 'Drain Life (Rank 1) - Skip nerf.'),
(699, 1, 1, 'Drain Life (Rank 2) - Skip nerf.'),
(709, 1, 1, 'Drain Life (Rank 3) - Skip nerf.'),
(7651, 1, 1, 'Drain Life (Rank 4) - Skip nerf.'),
(11699, 1, 1, 'Drain Life (Rank 5) - Skip nerf.'),
(11700, 1, 1, 'Drain Life (Rank 6) - Skip nerf.'),
(15286, 1, 1, 'Vampiric Embrace - Skip nerf.'),
(16487, 1, 1, 'Blood Craze (Rank 1) - Skip nerf.'),
(16489, 1, 1, 'Blood Craze (Rank 2) - Skip nerf.'),
(16492, 1, 1, 'Blood Craze (Rank 3) - Skip nerf.'),
(19578, 1, 1, 'Spirit Bond (Rank 1) - Skip nerf.'),
(20577, 1, 1, 'Cannibalize - Skip nerf.'),
(20895, 1, 1, 'Spirit Bond (Rank 2) - Skip nerf.'),
(23881, 1, 1, 'Bloodthirst - Skip nerf.'),
(27219, 1, 1, 'Drain Life (Rank 7) - Skip nerf.'),
(28176, 1, 1, 'Fel Armor (Rank 1) - Skip nerf.'),
(29834, 1, 1, 'Second Wind (Rank 1) - Skip nerf.'),
(29838, 1, 1, 'Second Wind (Rank 2) - Skip nerf.'),
(30143, 1, 1, 'Demonic Aegis (Rank 1) - Skip nerf.'),
(30144, 1, 1, 'Demonic Aegis (Rank 2) - Skip nerf.'),
(30145, 1, 1, 'Demonic Aegis (Rank 3) - Skip nerf.'),
(30293, 1, 1, 'Soul Leech (Rank 1) - Skip nerf.'),
(30295, 1, 1, 'Soul Leech (Rank 2) - Skip nerf.'),
(30296, 1, 1, 'Soul Leech (Rank 3) - Skip nerf.'),
(31850, 1, 1, 'Ardent Defender (Rank 1) - Skip nerf.'),
(31851, 1, 1, 'Ardent Defender (Rank 2) - Skip nerf.'),
(31852, 1, 1, 'Ardent Defender (Rank 3) - Skip nerf.'),
(53385, 1, 1, 'Divine Storm - Skip nerf.'),
(56216, 1, 1, 'Glyph of Siphon Life - Skip nerf.'),
(58369, 1, 1, 'Glyph of Bloodthirst - Skip nerf.'),
(59289, 1, 1, 'Glyph of Ghost Wolf - Skip nerf.'),
(63108, 1, 1, 'Siphon Life - Skip nerf.'),
(63220, 1, 1, 'Glyph of Divine Storm - Skip nerf.');

AC rev. hash/commit

chromiecraft/azerothcore-wotlk@c05c45c...3ad652d

Operating system

Ubuntu 20.04

Modules

Customizations

None

Server

ChromieCraft

maybe there is a better way to do this

this mod actually works, but I think there is some big overhead.

each damage calculation needs to do some heavy checks against attacker, map, and so on.
for big population servers,damage calculation is quit frequent,especially when massive AOE actions happen.

so, I think it's better to implement this using core native damage calculation mechanism, each time when a creature is added to world, doing the creature condition check, including which map and difficulty mask it belongs to. then, change some origial unit data field or modifier value of this creature. and let the core mechanism to do the work. or in modules, just do some light action.

actually, right now, it is really hard to implement spelldamagemodifier without core hack. but for performance reason, I think it worth a try

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.