(Trinity 3.3.5) Custom Damage Schools & Resistances


For the past few days i've been experimenting with adding custom damage schools and resistances to the game on top of what is already there. So far i've edited the following files... 

  • Core> Creature.cpp
  • Core> CharacterDatabase.cpp
  • Core> ItemTemplate.cpp
  • Core> ItemTemplate.h
  • Core> Player.cpp
  • Core> Unit.cpp
  • Core> Unit.h
  • Core> ObjectMgr.cpp
  • Core> SharedDefines.h
  • Core> UpdateFieldFlags.cpp
  • Core> ThreatManager.cpp
  • DB> Characters.character_stats
  • DB> World.creature_template
  • DB> World.item_template
  • DBC> Resistances.dbc
  • Interface/FrameXML> Constants.lua
  • Interface/FrameXML> GlobalStrings.lua

... and the core will build with 0 errors, however there are multiple problems in-game so I must be missing something.

Current issues:

1. Characters are broken in many ways. Items don't show in bags or the character frame, NPCs are invisible/phased out, and the drunk effect is constantly at 100% (probably an error in characterdatabase.cpp, but I have yet to find where) 

CharacterDatabase.cpp  Changes on 537-538

2. The core reads the item_template incorrectly, seems to look for values in their original fields.

ObjectMgr.cpp Changes on 2457, 2551-2606

ItemTemplate.h Changes on 654-656


If anyone wants to offer help or insights, it would be appreciated. I'll continue hitting the code with a wrench and updating when progress is made. Once this has been solved I plan to make a tutorial out of it.


Update 1: Custom elemental damage now shows properly on spell and weapon tooltips in-game. Loading an item tooltip with custom resistances crashes the game.

Update 2: Looks like despite editing ObjectMgr.cpp, the core won't read the item_template table properly. It seems to look for values in their original fields, which breaks all the rows that come after the newly added ones. Added to current issues.

Share this post

Link to post
Share on other sites

I'm trying the same thing and encountering similar issues. Did you ever fix it?

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now