Author Topic: [Tutorial] Add a custom monster to the game!  (Read 9349 times)

0 Members and 1 Guest are viewing this topic.

Not Yet Rated!

Offline WNG

  • Forum Moderator
  • Full Member
  • *
  • Topic Author
  • Posts: 615
  • Country: ca
  • Karma: +10/-0
  • Gender: Male
    • View Profile
    • Awards
  • Time Zone: -4
[Tutorial] Add a custom monster to the game!
« on: 25 February 2019, 01:53:05 »
↜ Add a custom monster to the game! by WNG ↝

Introduction

Hello! This guide will show you how to create new enemies and include them to the monster pools to make them appear in the game among others. This was requested by sauruz. Hope you like it!

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. Create a new texture (optional)

This step will require:

I. Gather ressources:
The plan is to create a new Hero Epiales, because Epiales are awesome. I want to give my new hero a new texture, and to do this I will import an existing texture from them. Open ARC Explorer, and browse in the directory of your game. My access path is this one :

C:\Program Files (x86)\Steam\steamapps\common\Titan Quest Anniversary Edition\Resources

Inside, you will see a bunch of .arc files. The textures of monsters are stored in Creatures.arc. If you want to pick a creature from an expansion, pick the Creatures.arc from the folder XPack (Immortal Throne) or XPack2 (Ragnarok). Following this example, my Epiales texture is in the XPack's Creatures.arc. Load this .arc file in ARC Explorer. From there, you will see multiple folders named after the monsters. I will pick "epialeshero.tex". Save the file where you can retrieve it.

Spoiler for Hiden:

Launch TEX Viewer and open your texture. You will see it appear on the screen. All you have to do is export it and save it under the ".tga" format.

Spoiler for Hiden:

II. Edit the texture:

Open your image-editing tool, and open your texture. Do the edits you wish to it and save your changes, still in ".tga" format. If you want to follow my example, you can take this texture for the following steps. (Make sure to save it in .tga!)

Spoiler for Hiden:

III. Import your texture into your mod:
Open the Art Manager and select your mod. It will now be time to import your texture into your mod. Before importing it, I'd recommend creating a folder specifically for your custom textures. To do so, right-click on "name_of_your_mod/source > Create New Directory".

Now, select the matching folder, right-click, and select "Import...". Find your texture and select it. It should appear in the menu. Right-click it and choose Auto-Create Asset. You will be prompted to choose between Texture or Bitmap. Choose Bitmap (or Texture > DXT5 if your texture has transparency), and proceed by pressing OK.

Spoiler for Hiden:

IV. Build your texture:
Your texture isn't quite in your mod yet. You will need to visit the "Assets" tab, and seek your texture in the folder structure, wich should be the same as in your "Source" tab. Right-click on it and choose "Build". When that is done, build your mod by pressing F7. Your texture will now become usable in your mod.

Spoiler for Hiden:

II. Create the monster

I. Copy an instance of the base monster:
To make it simple, it is easier to work from an existing instance of the monster. Let's import an Epiales. In the upper bar, go to Database > Import Record... This will be the record I will be importing.

"records\xpack\creatures\monster\epiales\xhero_cthulekes_45.dbr"

In the Database tab of the ArtManager, open the folders to access the record you just imported. Right-click on it, and duplicate this record and rename it (to not overwrite stuff already in the game.)

Spoiler for Hiden:

II. Edit the monster:

Double-click on it to edit its parameters. You will see there is a lot of tabs and parameters, but worry not : I will identify the most important ones to edit and the ones you are the most susceptible to be interested in.

Spoiler for Hiden:
Monster Parameters
Spoiler for Hiden:
Monster Classification
A droplist out of which you can select the type of enemy this one is.

Character
Spoiler for Hiden:
Char Level
Level of your enemy. It's an array; so you can input multiple values for each difficulty.
Experience Points
Experience reward upon killing the enemy.
Hand Hit Damage Min/Max
Physical attack damage when your enemy attacks with bare hands (or tentacles, in Epiales' case.) You can input minimum and maximum values.
Character Racial Profile
The race of your enemy. Ghost, Beast, Olympian... it's an array, so you can put as much as you want at once.

Actor Variables
Spoiler for Hiden:
Description
Name of your enemy. Refer your tag in your 'ModStrings.txt', more info here : https://titanquest.fandom.com/wiki/Modstrings.txt
Base Texture
Base texture of your enemy. !!! This is where you put your custom texture !!!

Character Bio
Spoiler for Hiden:
Self-Explanatory. This is where you put innate values of your enemy, being resistances, attributes and others.

Reward
Spoiler for Hiden:
Gold Generator Chance
Chance to drop gold. If left blank, it will never drop gold.
Gold Generator
The formula of gold associated to your monster. Here's the two you are the most susceptible to be using.

For regular mobs : records\item\miscellaneous\gold\monstergoldgenerator.dbr
For champion/hero mobs : records\item\miscellaneous\gold\championgoldgenerator.dbr

The full list of gold generators are here : "records\item\miscellaneous\gold\...".

Skill Tree
Spoiler for Hiden:
Self-Explanatory. Refer in 'skillNameX' fields the .dbr of a skill you want to give to your hero. Here you need to refer both active skills and passive skills (this includes "racial" passives, such as Undeads' resistances.) Keep in mind you have to put the level of the skill in the fitting 'skillLevelX' field. It's an array, so you can have 3 values : one for every difficulty level.

Useful links
Spoiler for Hiden:
You can find skills from Vanilla masteries here :
records\skills\defensive\...
records\skills\earth\...
records\skills\hunting\...
records\skills\nature\...
records\skills\spirit\...
records\skills\stealth\...
records\skills\storm\...
records\skills\warfare\...
records\xpack\skills\dream\...
records\xpack2\skills\runemaster\...

You can find monster skills here :
records\skills\monster skills\...
records\xpack\skills\monsterskills\...
records\xpack2\skills\monster skills\...

Finally, useful passives you may want to use :
records\skills\monster skills\defense\dodge_1%perlevelx100.dbr (Grants Chance to Dodge attacks, it may not work as an inherent ability)
records\skills\monster skills\defense\dodgeprojectile_1%perlevelx100.dbr (Grants Chance to Avoid projectiles, it may not work as an inherent ability)
records\skills\monster skills\defense\armor_passive.dbr (Grants passive armor protection)
records\skills\monster skills\defense\construct_resists.dbr (Passive resistances for Construct Race)
records\skills\monster skills\defense\resist_ghost.dbr (Passive resistances for Ghost Race)
records\skills\monster skills\defense\resist_undead.dbr (Passive resistances for Undead Race)
records\skills\monster skills\defense\trap_resists.dbr (Passive resistances for Device Race)

I won't show how to create custom skills here though. This is for another time.

Skill Configuration
Spoiler for Hiden:
This is where you setup how your enemy will use its active skills (granted it has the necessary energy to cast it.) All the skills mentionned here have to be included in the Skill Tree, otherwise the enemy will be unable to cast it.

Attack Skill Name
Instead of attacking, it will use this skill. For example : Mage Empusas throwing poison bolts with staves that aren't poison staves.

Buff Self Skill Name
A skill that the enemy will use on itself during the fight.

Buff Other Skill Name
A skill that the enemy will use on an ally during the fight.

Heal Skill Name/Delay
A skill that the enemy will use to heal during the fight (and the delay between each use.)

Heal Skill Name/Delay
A skill that the enemy will use to heal during the fight (and the delay between each use.)

Beserk Skill Name
A skill that the monster uses on low health. The % health is determined by the value of lowHealthTriggerLevel, located in the Character Sounds tab.

Dying Skill Name
A skill casted immediately upon dying (I think it is casted without taking energy cost and cooldown into account.)

Initial Skill Name
A skill that is used as soon as the enemy identifies you.

Special Attack X Skill Name
A skill that is available to the enemy during the battle.

Special Attack X Timeout
Cooldown of Special Attack X, during which the skill will be unavailable.

Special Attack X Delay
Delay before possibly reusing the Special Attack X.

Special Attack X Chance
Chance to use Special Attack X.

Special Attack X Range
Picklist that determines various ranges at which the enemy has to be from the player to use the Special Attack X. The range values are in meters, and can be individually modified for every monster below. Select 'AnyRange' to make it use the skill regardless of the distance the monster is from the player.

x Range Min/Max
Specifies the minimum/maximum distance in meters that is "Short/Medium/Long Range".

Chain Initial Skill
A skill that, when used, forces the enemy to use a specific skill in sequence.

Chain Next Skill
When the enemy uses the skill specified at 'Chain Initial Skill', it will use this skill afterwards.

Chain Behavior
Determines the target of the skill specified at "Chain Next Skill".



Modify the parameters you wish. Feel free to explore and try new stuff as well. When your work is done, save, then right-click on your .dbr and build it.

III. Include your monster in monster pools

I. Import a monster pool:

Monster pools select a number of enemies from a table and makes them appear in-game. This is what makes every run of TQ different, because we never come across the same
combination of monsters at the same place. To include our monster in the game, we will have to take the exisitng monster pools. Proceed by importing a record, and visit those folders to find them :

records\proxies greek\area001\pools\...
records\proxies egypt\pools\...
records\proxies orient\pools\...
records\xpack\proxieshades\pools\...
records\xpack2\proxiesnorth\pools\...

From there, navigate into the folders (named after racial types) and pick one or multiple tables you want to include your monster in. For my hero Epiales, I will import all the tables related to Epiales. That is :

records\xpack\proxieshades\pools\demon\epiales_01_general01.dbr
records\xpack\proxieshades\pools\demon\epiales_01_general02.dbr
records\xpack\proxieshades\pools\demon\epiales_02_general01.dbr
records\xpack\proxieshades\pools\demon\epiales_02_general02.dbr
records\xpack\proxieshades\pools\demon\epiales_03_general01.dbr
records\xpack\proxieshades\pools\demon\epiales_03_general02.dbr

II. Include your monster in the pools :

Open your newly imported monster tables. To include your monster, you will need to refer it inside either "Pool" (if it is a regular monster) or "Champion Pool" (if it is a champion/hero monster.) Technically, you can include it in both, but there's no point.

So, since my Epiales is a hero, I will include it in "Champion Pool", but it works just the same for regular mobs. Here is, in the spoiler, a quick description of the fields to edit.

Spoiler for Hiden:

nameX
The .dbr file of the monster you wish to include. !!! This is where you put the .dbr file of your new creature !!!
weightX
The flat odds for it to appear, in comparison to the other creatures in the file.
difficultyX
Related to difficulty equations??? (can be left blank)
difficultyCutoffX
Related to difficulty equations??? (can be left blank)
alwaysSpawnX
Forces to spawn the specified number of said creature.

Save your changes, and build those tables to apply the changes to your mod.
« Last Edit: 19 April 2020, 03:32:56 by WNG »

Rated 1 time
Excellent

Offline WNG

  • Forum Moderator
  • Full Member
  • *
  • Topic Author
  • Posts: 615
  • Country: ca
  • Karma: +10/-0
  • Gender: Male
    • View Profile
    • Awards
  • Time Zone: -4
Re: [Tutorial] Add a custom monster to the game!
« Reply #1 on: 26 February 2019, 21:07:29 »
« Last Rated on: 11 February 2023, 15:13:29 »
↜ Annex : Edit texture of a monster that doesn't appear in its file ↝

This alternative procedure is useful in the case that the 'baseTexture' field of your monster is empty. This is because the texture file is bound to the mesh, often because the mesh is composed of multiple texture files. To edit it, you need to go through extra steps.

This step will require:

I. Extract the mesh:
As you edit all sorts of monsters, you will probably come across one that has a blank 'baseTexture' field in its Actor Variables, even though it does have a texture in-game. To fit in your custom textures, you will need to import its mesh. For this example, I will edit a mounted satyr. Take note of the mesh file that is displayed in the 'mesh' field, as you will extract it using ARC Explorer. Keep the tool opened after extracting the mesh, we will need it again shortly.

Spoiler for Hiden:

II. Open the mesh:
Launch Mesh Viewer. You will see multiple tabs on the left screen. Select "0 Meshes" and then "Load Mesh". Browse in your folders to retrieve your .msh file. When loaded, it should appear in the grey space, just like shown below.

Spoiler for Hiden:

After importing the mesh, still on the left part of the screen, click on "Shaders". You will see the components of your mesh. Look for the texture files in the 'baseTexture' fields.

Spoiler for Hiden:

Import those textures with the ARC Explorer and edit them as you would normally do following the first step of the base tutorial, on the post above. Save them and import them into your mod. When they have been fully incorporated, take the access path of your built textures (from your mod's perspective) and replace the old textures.

Spoiler for Hiden:

When this is done, click on "Mesh (v11), then hit the "Save" button, on the right. Save your mesh(es) in a folder reserved to your custom meshes.

III. Include your mesh in an archive:

With your custom mesh completed, you will now have to import it in your mod. To do so, you will have to create an .arc file that contains it.

Launch ARC Encryptor. Fill in the needed details to proceed. See Spoilers for more information.

Spoiler for Hiden:
Folder to pack from: Select here the folder that contains your meshes. Preferably make it contain only your meshes and no other files unrelated to your mod.
ARC File Name: The name that will be given to your .arc file. "meshes" would suffice.
Folder to pack to: Folder inside which your .arc will be put after its creation.
Compression: ???

When the info has been filled in, press "Encrypt". Make sure your .arc file has been correctly created at the specified location (you can also use ARC Explorer to verify if your mesh has been correctly included.)

IV. Include archive in mod and apply mesh:

Pick your .arc file and slide it here :
Code: [Select]
C:\Users\xxxx\Documents\My Games\Titan Quest - Immortal Throne\custommaps\xxxnameOfYourModxxx\resources
Launch Art Manager and open the .dbr of your monster (or boar rider, if you followed my example.) If your .arc has been correctly created/implented, you should be able to select your new mesh. Build your record to save your work.

Spoiler for Hiden:

Be cautious!!! Building your mod will cause the ArtManager to delete "unassociated ressources", this includes your meshes.arc file. To avoid this, move drag your .arc on the desktop before building your mod, and afterwards you may put it back where it used to be. Note that ArtManager only proceeds at deleting unassociated ressources the first time you build a mod in your session.
« Last Edit: 27 February 2019, 02:28:30 by WNG »

Tags:
 


SimplePortal 2.3.7 © 2008-2024, SimplePortal