Author Topic: [Tutorial] Setup a new mastery!  (Read 130 times)

0 Members and 1 Guest are viewing this topic.

Not Yet Rated!

Offline WNG

  • Forum Moderator
  • Full Member
  • *
  • Topic Author
  • Posts: 520
  • Country: ca
  • Karma: +7/-0
  • Gender: Male
    • View Profile
    • Awards
  • Time Zone: -4
[Tutorial] Setup a new mastery!
« on: 05 November 2019, 01:09:04 »
↜ Setup a new mastery! by WNG ↝

Introduction

This tutorial will explain in detail the anatomy of a mastery and what needs to be setup so you can fully understand the functioning behind it and the editing possibilities. This is NOT a tutorial about making skills; this will be seen in great detail in a future tutorial (most likely my next one.)

It's important to note that the game doesn't allow adding new masteries, but rather overwriting the current ones. That means, you cannot add an 11th mastery, but you can create your own which will replace an existing mastery while your mod is running. When you replace files from a mastery with your own, remain consistant : if you are replacing the Defense mastery, only edit the Defense mastery-related files.

I may assume you have some basic knowledge and overlook some manipulations. Feel free to tell me if anything is unclear.

Without further ado, let's get this started.

I. Setup your mod
I. Download the mod template
There is a lot of files to import and to edit. To avoid this, simply download the mod base I have made a small mod with all the files needed to edit for the full customization of your masteries. It also contains some visual assets.

Download it here : https://mega.nz/#!NMNRFIDa!OijXfq3gmE2xSCUSDboMmxmqe4O9ZhqVyTIVtbW9Ivo

Place the downloaded mod here :
Code: [Select]
C:\Documents\My Games\Titan Quest - Immortal Throne\Working\
Make sure that inside your folder there's the folders "assets", "database" and "source". If there's an intermediary folder, remove it. If that has all been done correctly, your mod is now ready to be opened with the ArtManager, as always located in your game installation folder.

II. Anatomy of a Mastery Mod

This section will now discuss the multiple components that are related to the masteries.

I. Mastery Skill Trees (skills/.. skilltree.dbr & mastery.dbr)

Those files are the essential components to a mastery, the very core where you can decide the skills and the bonuses your masteries will provide. Those are located in your mod's database, more commonly under the "skills" folder (or xpack/skills or xpack2/skills, if we speak of the Dream or Rune mastery.) In the mod template, you can find a folder inside the "skills" folder which is named "new_mastery", containing the two files mentionned above.

mastery.dbr will contain all the necessary information that is related to the mastery button (which increases your mastery level.) As I usually tend to do in my tutorials, I'll list the important fields to edit. Anything that is omitted shouldn't (or rather doesn't have to) be edited.

Spoiler for Hiden:
Header
Spoiler for Hiden:
Properties > Mastery Enumeration
The "identity" of you mastery to the game's eyes. Choose only one per mastery you make. This seemingly irrelevant and easy-to-miss step is actually very important. If your choice doesn't match the mastery you intend to replace, there will be issues such as launching the game and having your skill tree opening the tree of another mastery.

Very important notice here : you will notice that there is 10 choices in the droplist; one per mastery in the game. HOWEVER, the option that seems to match the Rune Mastery (Berserk) is actually useless. To resolve that, simply import and copy-paste the .dbr file below and edit it normally without EVER touching this field.

Code: [Select]
records\xpack2\skills\runemaster\runemaster_mastery.dbr
UI Information
Spoiler for Hiden:
skillDisplayName
The name that will appear when you hover the "+" button in your skill tree.
skillBaseDescription
The description that will appear under the skillDisplayName when you hover the "+" button in your skill tree.
skillUpBitmapName / skillDownBitmapName
The texture files that are used for your "+" button, the first being the button in its regular state and the latter being when the button is clicked on.
Offensive Parameters
Spoiler for Hiden:
Offensive Global (for offensive bonuses with a global chance (5% of +10% Total Damage, +20% Poison Damage, ...))
Spoiler for Hiden:
  • offensiveGlobalChance : Chance of offensive global effects to occur (choose the effects with booleans in the sections below.)

Offensive Absolute (for flat/percent based damage bonuses)
Spoiler for Hiden:

  • offensiveXMin : Minimum of flat X damage.
  • offensiveXMax : Maximum of flat X damage.
  • offensiveXChance : Chance of the X damage set above to occur.
  • offensiveXXOR : Boolean. Set to 1 to select only one bonus in the global pool.
  • offensiveXGlobal : Boolean. Set to 1 to make the bonus part of the global chance pool.
  • offensiveXModifier : Increases by X% the damage of the selected type.
  • offensiveXModifierChance : Chance of the percent damage bonus to occur.

Offensive Duration (for damage/debuffs over time bonuses)
Spoiler for Hiden:

  • offensiveSlowXMin : Minimum of X damage over time (every second).
  • offensiveSlowXMax : Maximum of X damage over time (every second).
  • offensiveSlowXDurationMin : Minimal duration of the DoT effect.
  • offensiveSlowXDurationMax : Maximial duration of the DoT effect.
  • offensiveSlowXChance : Chance of the X damage over time set above to occur.
  • offensiveSlowXXOR : Boolean. Set to 1 to select only one bonus in the global pool.
  • offensiveSlowXGlobal : Boolean. Set to 1 to make the bonus part of the global chance pool.
  • offensiveSlowXModifier : Increases by X% the damage of the selected type.
  • offensiveSlowXModifierChance : Chance of the percent damage bonus to occur.
  • offensiveSlowXDurationModifier : Increases the duration of the DoT effect by x%.

Offensive Influence (for debuffs for a set duration, such as Confusion, Mind-Control, etc.)
Spoiler for Hiden:
See the above sections, they share similar parameters.
Retaliation Parameters

Spoiler for Hiden:
Retaliation Global (for retaliation bonuses with a global chance (5% of 15 Piercing Retaliation, 20 Elemental Retaliation, ...))
Spoiler for Hiden:
  • retaliationGlobalChance : Chance of retaliation global effects to occur (choose the effects with booleans in the sections below.)
Retaliation Absolute (for flat retaliation bonuses)
Spoiler for Hiden:

  • retaliationXMin : Minimal damage of the retaliation of the set type.
  • retaliationXMax : Maximal damage of the retaliation of the set type.
  • retaliationXChance : Chance of the retaliation to occur.
  • retaliationXXOR : Boolean. Set to 1 to select only one bonus in the global pool.
  • retaliationXGlobal : Boolean. Set to 1 to make the bonus part of the global chance pool.
  • retaliationXModifier : Boosts the damage of the retaliation of X type by a set percent.
  • retaliationXModifierChance : Chance of the percent damage boost to occur.
Retaliation Duration (for DoT retaliation bonuses)
Spoiler for Hiden:

  • retaliationSlowXMin : Minimal damage of the retaliation of the set type (per second.)
  • retaliationSlowXMax : Maximal damage of the retaliation of the set type (per second.)
  • retaliationSlowXDurationMin : Minimal duration of the DoT of the set type.
  • retaliationSlowXDurationMax : Minimal damage of the DoT of the set type.
  • retaliationSlowXChance : Chance of the retaliation to occur.
  • retaliationSlowXXOR : Boolean. Set to 1 to select only one bonus in the global pool.
  • retaliationSlowXGlobal : Boolean. Set to 1 to make the bonus part of the global chance pool.
  • retaliationSlowXModifier : Boosts the DoT of the retaliation of X type by a set percent.
  • retaliationSlowXModifierChance : Chance of the percent DoT boost to occur.
  • retaliationSlowXDurationModifier : Boosts the DoT of X type's duration by a set percent.
  • retaliationSlowXDurationModifierChance : Chance of the percent duration boost to occur.


Defensive Parameters
Spoiler for Hiden:
Defensive Absolute (for resistances bonuses)
Spoiler for Hiden:

  • defensiveX :  Increases resistance to the damage type of by a set percent.
  • defensiveXChance : Chance of the resistance to the damage type of by the percent set above.
  • defensiveXModifier :  Increases the resistance bonus by a set percent.
  • defensiveXModifierChance : Chance of the resistance bonus to the damage type by the percent set above.
  • defensiveXDuration : Same as above, for the matching DoT.
  • defensiveXDurationChance : Same as above, for the matching DoT.
  • defensiveXDurationModifier : Same as above, for the matching DoT.
  • defensiveXDurationModifierChance : Same as above, for the matching DoT.
Defensive Special (for resistances versus certain DoTs)
Spoiler for Hiden:
    See the Defensive Absolute section, they share similar parameters.
Defensive Misc (for blocking/reflecting bonuses)
Spoiler for Hiden:
    See the Defensive Absolute section, they share similar parameters.
Defensive Influence (for secondary resistances)
Spoiler for Hiden:
    See the Defensive Absolute section, they share similar parameters.
Monster Defense (for tertiary resistances)
Spoiler for Hiden:
    See the Defensive Absolute section, they share similar parameters.

Character Parameters
Spoiler for Hiden:
Character Bonus Attributes (for direct stats bonuses)
Spoiler for Hiden:

  • characterStrenght : Flat strenght increase.
  • characterDexterity : Flat dexterity increase.
  • characterIntelligence : Flat intelligence increase.
  • characterLife : Flat health points increase.
  • characterMana : Flat energy points increase.
  • characterStrenghtModifier : Percent strenght increase.
  • characterDexterityModifier  : Percent dexterity increase.
  • characterIntelligenceModifier  : Percent intelligence increase.
  • characterLifeModifier  : Percent health points increase.
  • characterManaModifier  : Percent energy points increase.
  • characterIncreasedExperience  : Increases experience gained.
  • characterPhysToElementalRation  : x% converted to elemental damage.
Character Speed (for speed bonuses)
Spoiler for Hiden:

  • characterRunSpeed : Increases base run speed. Unused at this date.
  • characterAttackSpeed : Increases base attack speed. Unused at this date.
  • characterSpellCastSpeed : Increases base spell cast speed. Unused at this date.
  • characterRunSpeedModifier : Increases run speed by x%.
  • characterAttackSpeedModifier : Increases attack speed by x%.
  • characterSpellCastSpeedModifier : Increases spell cast speed by x%.
  • characterTotalSpeedModifier : Increases total speed by x%.
Character Regeneration (for regeneration bonuses)
Spoiler for Hiden:

  • characterLifeRegen : Increases health regeneration by a flat amount.
  • characterManaRegen : Increases energy regeneration by a flat amount.
  • characterLifeRegenModifier : Increases health regeneration by a percent amount.
  • characterManaRegenModifier : Increases energy regeneration by a percent amount.

Character Ability (for dodge/critical hit bonuses)
Spoiler for Hiden:

  • characterOffensiveAbility : Increases OA by a flat amount.
  • characterDefensiveAbility : Increases DA by a flat amount.
  • characterOffensiveAbilityModifier : Increases OA by a percent amount.
  • characterDefensiveAbilityModifier : Increases DA by a percent amount.
  • characterDefensiveBlockRecoveryReduction : Reduces shield recovery time.
  • characterEnergyAbsorptionPercent : Recovers energy when hit by spells by percent amount.
  • characterDodgePercent : Increases melee attack dodge chance.
  • characterDeflectProjectile : Increases projectile dodge chance.

Character Reserve (for mana reservation reduction bonuses)
Spoiler for Hiden:

  • characterManaLimitReserve : Not quite sure...
  • characterManaLimitReserveReduction : Decreases energy reserved by a flat amount.
  • characterManaLimitReserveModifier : Not quite sure...
  • characterManaLimitReserveReductionModifier : Decreases energy reserved by a percent amount.

Requirement Reduction (for requirement reduction bonuses)
Spoiler for Hiden:

Self-explanatory. Also, you do NOT need to add the negative.

Skill Parameters (for bonuses that regard spells)
Spoiler for Hiden:
Skill Reduction (for reduced recharge and mana costs)
Spoiler for Hiden:

  • skillCooldownReduction  : Flat cooldown reduction.
  • skillCooldownReductionChance : Chance of flat cooldown reduction.
  • skillManaCostReduction : Flat mana cost reduction.
  • skillManaCostReductionChance : Chance of flat mana cost reduction.
  • skillCooldownReductionModifier : Percent cooldown reduction.
  • skillCooldownReductionModifierChance : Chance of percent cooldown reduction.
  • skillManaCostReductionModifier : Percent mana cost reduction.
  • skillManaCostReductionModifierChance : Chance of percent mana cost reduction.
Projectile Bonus (for projectile speed)
Spoiler for Hiden:
  • skillProjectileSpeedModifier  : Percent increase of the projectile speed.
  • skillProjectileSpeedModifierChance : Chance of percent increase of the projectile speed.
Racial Bonus (for increased offense/defense versus certain races)
Spoiler for Hiden:

  • racialBonusRace  : Races that will be affected by the bonuses below. You can have as many as you like.
  • racialBonusPercentDamage  : Percent damage increase versus the race.
  • racialBonusAbsoluteDamage  : Flat damage increase versus the race.
  • racialBonusPercentDefense  : Percent reduced damage received from the race.
  • racialBonusAbsoluteDefense  : Flat reduced damage received from the race.
Pet Bonus (for bonuses to all pets)
Spoiler for Hiden:
  • petBonusName  : Select a pet bonus for the item. May explain the creation of one of these later.

As this may suggests, you can introduce any sort of bonus to your mastery bar. The developpers from Iron Lore preferred to stick with attribute bonuses, but you can go beyond those boundaries.

skilltree.dbr will be used by the game to determine which skills are part of your mastery. As you open it, you will see there's 26 slots for skills (one of them being your mastery.dbr from earlier), which means your mastery can hold up to 25 skills with the current hardcoded limits. Make sure to reference your mastery.dbr at the first field, and any of your skills in the following fields. There's also a field for the skill level, which is normally set at 0. If any value other than 0 is given, the skill will be directly available to your skill bar at the specified level.

Very important notice : Make sure to include any skill modifier directly under the parent skill. If you do not, the skills in question may not function as intended. See the spoiler below for an example.

Spoiler for Hiden:



Not Yet Rated!

Offline WNG

  • Forum Moderator
  • Full Member
  • *
  • Topic Author
  • Posts: 520
  • Country: ca
  • Karma: +7/-0
  • Gender: Male
    • View Profile
    • Awards
  • Time Zone: -4
Re: [Tutorial] Setup a new mastery!
« Reply #1 on: 05 November 2019, 01:09:21 »
II. Mastery Windows (ingameui/..)

Those files are used by the game to render the skill tree with the proper buttons, background and other various graphics.
 
mastery.dbr (not to be confused with the one from the previous step) is the actual button that the player will press. All you need to edit inside is the "skillName" field, where you should insert your mastery.dbr from the previous step.

masterybar.dbr is the graphic that will be used as your mastery bar. You can change it for one that will fit your mastery's color(s).

masterybitmap.dbr is the graphic that will be used as your mastery icon (when inside the mastery's skill tree.)
 
skillpanebasebitmap.dbr contains the texture that serves as your mastery's background.

skillpanereallocationbitmap.dbr is a single file that reunites all the necessary graphical assets and some other data to compose your skill tree. Look at the spoiler below for more details.

skillXX.dbr are the buttons scattered around your tree. Each of them is bound to a skill from your skill tree with some other informations. See the spoiler below for more details.

Spoiler for Hiden:
skillName
The .dbr name of your skill. When you will press on this button, it will add points to this skill. If it's a skill that isn't present in your skilltree.dbr from step I, it will appear as an empty button with a X where there would usually be the level indicator.
bitmapNameUp
Border type of your skill.
If it is an active (square icon), use : InGameUI\SkillButtonBorder01.tex
If it is a passive or modifire (circular icon), use : InGameUI\SkillButtonBorderRound01.tex
bitmapNameDown
Border type of your skill when it is pressed on.
If it is an active (square icon), use : InGameUI\SkillButtonBorderDown01.tex
If it is a passive or modifire (circular icon), use : InGameUI\SkillButtonBorderRoundDown01.tex
bitmapNameInFocus
Border type of your skill when it is hovered.
If it is an active (square icon), use : InGameUI\SkillButtonBorderOver01.tex
If it is a passive or modifire (circular icon), use : InGameUI\SkillButtonBorderRoundOver01.tex
bitmapPositionX / Y
The position of your button in the skill tree window with X and Y coordinates. You can refer to this grid for guidelines, but you can put literally any value you like here (so technically having 8 skills on the same tier is possible.)
Spoiler for Hiden:

panectrl.dbr is a single file that reunites all the necessary graphical assets and some other data to compose your skill tree. Look at the spoiler below for more details.

Very important notice : The panectrl.dbr of each mastery has been edited after the Immortal Throne and the Atlantis expansion. ONLY EDIT THE ATLANTIS ONE, as it is the most recent.

Spoiler for Hiden:
skillTabTitle
The name of your mastery as it appears in the skill tree. Put in here your reference from the Modstrings.txt (https://titanquest.fandom.com/wiki/Modstrings.txt)
skillPaneDescriptionTag
The description of your mastery that will appear on the right side of the skill tree. Put in here your reference from the Modstrings.txt (https://titanquest.fandom.com/wiki/Modstrings.txt)
skillPaneBaseBitmap
The texture used as a background to your skill tree. Reference here your skillpanebasebitmap.dbr. 
skillPaneBaseReallocationBitmap
The texture used as a background to your skill tree, when visiting a Mystic. Reference here your skillpanereallocationbitmap.dbr.
masteryBar
The mastery bar used for this mastery. Reference here your masterybar.dbr.                           
skillPaneMasteryBitmap
The mastery icon that will appear in the skill tree. Reference here your masterybitmap.dbr. 
tabSkillButtons
The mastery buttons that will appear in your skill tree. Put all the skillXX.dbr files fitting the mastery.
peekThroughColor(Red/Green/Blue)
The value of the said tint that will form the color that appears in the small cracks at each tier. The values can't be higher than 1 or lower than 0. You can use an online color picker to help you. (https://convertingcolors.com/)
peekThroughNextTierSound
The sound that is emitted when you reach a new tier.

III. Playable characters (xpack/creatures/pc/..)

Here, you can reference your skilltree.dbr files so your characters can have access to your skill trees. You need to reference all of them, otherwise your skill trees will not be available. Open both the male and female character files, and go to the Skill Tree section. All you need to do is to overwrite a vanilla mastery's skill tree with yours.

IV. Mastery selection screen (xpack2/ui/skills/selectmastery/..)

masteryXbutton.dbr are the buttons you press to select a mastery in the mastery selection window.

Spoiler for Hiden:
bitmapNameUp
Texture of your mastery icon in the mastery selection screen while it is active.
bitmapNameDown
Texture of your mastery icon in the mastery selection screen while it is pressed on.
bitmapNameInFocus
Texture of your mastery icon in the mastery selection screen while it is hovered.
bitmapNameDisabled
Texture of your mastery icon in the mastery selection screen while it is disabled (already selected.)
soundNameDown
A .dbr file with the Soundpak template which contains the sound that plays when the mastery is selected.

masteryXtext.dbr are the mastery names as they appear under the mastery icons in the mastery selection screen.

Spoiler for Hiden:
textTag
A tag that refers to the text that should appear under your mastery icon. Put in here your reference from the Modstrings.txt (https://titanquest.fandom.com/wiki/Modstrings.txt)

masterypane.dbr combines the previous elements and more in this single file to manage the mastery selection screen.

Spoiler for Hiden:
masteryMasterySelectedBitmapNames
An array containing the texture files of your mastery icons appearing bigger in the center screen when hovered in the mastery selection screen.
masteryMasterySelectedDescriptionTags
An array containing text tags that correspond to each mastery's description when it is hovered in the mastery selection screen.  Put in here your multiple references from the Modstrings.txt (https://titanquest.fandom.com/wiki/Modstrings.txt)

__________________________________

!!Note that this tutorial will be bound to a future tutorial about the skill creation, and thus isn't 100% complete right now.!!
« Last Edit: 05 November 2019, 01:12:14 by WNG »

Tags: