Titan Quest Fans Forum

Titan Quest - Anniversary Edition => Modifications => Art Manager => Topic started by: WNG on 15 February 2019, 14:32:44

Title: [Tutorial] Add a new weapon to the game!
Post by: WNG on 15 February 2019, 14:32:44
↜ Add a new weapon to the game! by WNG ↝

Introduction

Hello! This guide will show you how to create new uniques items and how to make them available in the game (to be dropped and found in chests.) I'll use a sword for this example, but any other item type would work just the same way.

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

I. Copy and recolor an item

This step will require:

I. Gather ressources:
The plan is to start from an existing item, take its textures and give it a new hue. Start by opening your Art Manager and open your mod. Click on Database > Import Record... and browse to an item you want to work from. For this tutorial, I will make a new blade. Here's where the swords are stored.

records\item\equipmentweapon\sword
records\xpack\item\equipmentweapons\sword
records\xpack2\item\equipmentweapons\sword

Pick the one of your choice. For this tutorial, I'll pick the sword Silence.

records\item\equipmentweapon\sword\u_e_silence.dbr

Select it and press OK. The original sword is now loaded in your mod for consultation. Open the file and go to Actor Variables. Look at the file path that is set at "baseTexture". For Silence, it's this :

Items\EquipmentWeapon\Sword\Default\RSword05C.tex

Now this is where ARC Explorer comes in. Open it, press File > Open and go to this directory : C:\Program Files (x86)\Steam\steamapps\common\Titan Quest Anniversary Edition\Resources

When you get there, you will notice a bunch of .arc files. That's where the game's assets are stored. Now, open Items.arc, or choose the one located in the XPack/XPack2 folder if you chose an item from an expansion.

You will see a bunch of folders appear. Browse to find the texture file as seen in the "baseTexture". Double click on it, and save it where you wish. This is the texture applied to item in a 3D environment. Also, go to the Item Parameters tab, and also import the texture that's specified on the "bitmap" field. It's the texture used to represent the item in your inventory.

II. Edit the textures:
When the two textures have been exported, launch TEX Viewer. Open one of the newly imported textures. Once opened, all you have to do File > Export, and save it under another name. Make sure to add the ".tga" extension at the end, or you will receive an error message.

Now, open your image-editing software. Open your .tga files and edit them as you please. I simply changed their color, turning the green of the blade with a red and the yellow handle was turned into gray.

Texture:
(https://i.imgur.com/4zn2fxH.png)
UI Bitmap:
(https://i.imgur.com/1iMx7XR.png)

Save your work, still in .tga format.

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, and proceed by pressing OK.

(https://i.imgur.com/nG0qJO1.png)

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.

(https://i.imgur.com/Sw9SJoU.png)

II. Create your new item

I. Copy an item:
Right-click on the .dbr of the item and copy it. Paste it where you like (I did in a custom directory) to create a new instance. Rename it, then right-click > Build.

(https://i.imgur.com/MxN0H20.png)

II. Edit your new item:
Open your new item. There is a few parameters that you are going to be interested in editing. See the Spoiler below for details. Irrelevant parameters are omitted.

General parameters
Item Parameters
Item Name Tag: The name of your item. Reference it in your ModStrings.txt. More info here : https://titanquest.fandom.com/wiki/Modstrings.txt
Bitmap: Texture file of your item when in the inventory. !! Include your own texture here !!
ItemCostName: Contains equations that, when combined with the ItemLevel value below, sets automatic requirements. For more control and simplicity, I recommend to set them manually.
ItemSetName: .dbr file that refers to the set your item belongs to.
ItemClassification: Rarity of your item.

Item Requirements
Self-explanatory.

Actor Variables
BaseTexture: Texture of your item in a 3D environement.  !! Include your own texture here !!


Item Parameters (the actual stats of your item)
This is a review of the many (not all!) basic parameters you may set on your item. If you know about those, skip this.
Many of the parameters share the same proprietes. I'll explain them once.

Offensive Parameters
Offensive Global (for offensive bonuses with a global chance (5% of +10% Total Damage, +20% Poison Damage, ...))
  • 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)
(https://i.imgur.com/Xxvinq4.png)
  • 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)
(https://i.imgur.com/poQSMAJ.png)
  • 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.)
See the above sections, they share similar parameters.
Retaliation Parameters

Retaliation Global (for retaliation bonuses with a global chance (5% of 15 Piercing Retaliation, 20 Elemental Retaliation, ...))
  • retaliationGlobalChance : Chance of retaliation global effects to occur (choose the effects with booleans in the sections below.)
Retaliation Absolute (for flat retaliation bonuses)
(https://i.imgur.com/kQrDqM6.png)
  • 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)
(https://i.imgur.com/ABXC3sK.png)
  • 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
Defensive Absolute (for resistances bonuses)
(https://i.imgur.com/QRTHLNF.png)
  • 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)
    See the Defensive Absolute section, they share similar parameters.
Defensive Misc (for blocking/reflecting bonuses)
    See the Defensive Absolute section, they share similar parameters.
Defensive Influence (for secondary resistances)
    See the Defensive Absolute section, they share similar parameters.
Monster Defense (for tertiary resistances)
    See the Defensive Absolute section, they share similar parameters.

Character Parameters
Character Base Attributes
    characterBaseAttackSpeed : Base Attack Speed.
    characterBaseAttackSpeedTag : Displayed Attack Speed.
Character Bonus Attributes (for direct stats bonuses)
(https://i.imgur.com/9Ujupm4.png)
  • 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)
(https://i.imgur.com/ISOF79h.png)
  • 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)
(https://i.imgur.com/AYKUZ7F.png)
  • 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)
(https://i.imgur.com/lBlQEQq.png)
  • 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)
(https://i.imgur.com/M1j6qj9.png)
  • 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)
(https://i.imgur.com/6lN23fu.png)
Self-explanatory. Also, you do NOT need to add the negative.

Skill Parameters (for bonuses that regard spells)
Skill Reduction (for reduced recharge and mana costs)
(https://i.imgur.com/q6UV1Nj.png)
  • 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)
  • skillProjectileSpeedModifier  : Percent increase of the projectile speed.
  • skillProjectileSpeedModifierChance : Chance of percent increase of the projectile speed.
Skill Augment (boosts or grants skills)
(https://i.imgur.com/ExDpbM2.png)
  • augmentSkillName1  : The database entry of the skill you wish to boost. (ex.: records\skills\stealth\envenomweapon.dbr)
  • augmentSkillLevel1  : Level by wich the skill above is increased.
  • augmentSkillName2  : The database entry of ANOTHER the skill you wish to boost.
  • augmentSkillLevel2  : Level by wich the skill above is increased.
  • augmentMasteryName1  : The database entry of a mastery you wish to boost all of its skills.
  • augmentMasteryLevel2  : Level by wich the skills of the mastery above is increased.
  • augmentMasteryName2  : The database entry of ANOTHER mastery you wish to boost all of its skills.
  • augmentMasteryLevel2  : Level by wich the skills of the mastery above is increased.
See this for masteries names :
  • Warfare : records\skills\warfare\warfaremastery.dbr
  • Defense : records\skills\defensive\defensivemastery.dbr
  • Rogue : records\skills\stealth\stealthmastery.dbr
  • Hunting : records\skills\hunting\huntingmastery.dbr
  • Dream : records\xpack\skills\dream\dreammastery.dbr
  • Nature : records\skills\nature\naturemastery.dbr
  • Earth : records\skills\earth\earthmastery.dbr
  • Storm :records\skills\storm\stormmastery.dbr
  • Runes : records\xpack2\skills\runemaster\runemaster_mastery.dbr
  • Spirit :records\skills\spirit\spiritmastery.dbr
  • augmentAllLevel : Level by wich all skills should be increased.
  • itemSkillName : See the part IV.
  • itemSkillLevel : See the part IV.
  • itemSkillAutoController : See the part IV.
Racial Bonus (for increased offense/defense versus certain races)
(https://i.imgur.com/DdRCtNL.png)
  • 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)
  • petBonusName  : Select a pet bonus for the item. May explain the creation of one of these later.

Give the item the stats of your choosing. When you are done, right-click on it and build your .dbr.
Title: Re: [Tutorial] Add a new weapon to the game!
Post by: WNG on 15 February 2019, 14:32:54
III. Add your item to the game's loot tables

I. Import the loot tables you need:
Now that your item is ready to slay some monters, we have to add it to the game's loot tables to make it drop from monsters and chests. It's best to use existing loot tables, since they are already used across the whole game.

I made my weapon a legendary blade, and it's important to note that unique items (epics and legendaries) have their own loot tables. Here's where you can find the unique weapons' loot tables.

Vanilla Game : records\item\loottables\weapons\unique\...
XPack : records\xpack\item\loottables\weapons\unique\...
XPack2 : records\xpack2\item\loottables\weapons\unique\...

The loot tables are named following a pattern.

records\xpack2\item\loottables\weapons\unique\sword_l01.dbr

*Expansion
*Item Type
*Game Difficulty
*Act Number

With that said, if I want to make my weapon drop starting from Act 2 legendary until the end of the game, I will import and edit the following loot tables.

records\item\loottables\weapons\unique\sword_l02.dbr
records\item\loottables\weapons\unique\sword_l03.dbr
records\xpack\item\loottables\weapons\unique\sword_l01.dbr
records\xpack2\item\loottables\weapons\unique\sword_l01.dbr

Open the loot table(s) you wish to add your item in. Simply have the path to your .dbr in hand and add it in the array of possible drops, found in the "Loot" field.

When your item is added, don't forget to save and build the loot tables. Press F7 to build your mod.
Title: Re: [Tutorial] Add a new weapon to the game!
Post by: Tauceti on 16 February 2019, 15:10:17
Woooh, a very detailed guide.  :)
Although i do not modding, i find it useful to understand how it works.

I have a few questions:

In particular what i don't undestand is, say, you have a loot table shared for 10 items. If you add 10 more new items, does it mean you double the global drop rate or does it mean you spare a mean global drop rate among all the items (old+new)?
Title: Re: [Tutorial] Add a new weapon to the game!
Post by: WNG on 16 February 2019, 20:24:39
Woooh, a very detailed guide.  :)
Although i do not modding, i find it useful to understand how it works.

I have a few questions:
  • how item grant skills are implemented (passive or active skills) ?
  • have you a way to attach a particular graphical effect or even a sound effect to an item (like a broken glass sound for a cold weapon) ?
  • how work the loot tables ?

In particular what i don't undestand is, say, you have a loot table shared for 10 items. If you add 10 more new items, does it mean you double the global drop rate or does it mean you spare a mean global drop rate among all the items (old+new)?

Question 1:
This is where you setup the "Grants Skill" on any item that can hold one.

(https://i.imgur.com/dwuA62d.png)
At itemSkillName, you set the .dbr file of the skill you want to be granted.
At itemSkillLevel, you determine which level will the skill be at.
At itemSkillAutoController, you set a special .dbr that determines under wich conditions will the skill be used automatically. If omitted, the skill will be available in your skill tab.

Question 2:
Of course. You can set a sound for when you swipe and for when you hit with the weapon. The sound when you drop it on the ground or in your inventory isn't hardcoded either, so it can be virtually anything you wish. And yes, it can also have particle effects attached to it like Pagos or Iris if you edit the mesh.[/li][/list]

Question 3:
Well, there's different types of loot tables, but I guess you want to know how the uniques' loot tables work. Here's how they work.

First, it begins with a monster's loot pages. You see it has 100% chance to have a weapon equipped on its right hand. Then, it can choose from up to 6 arrays of loot tables (arrays that contains one loot table per difficulty). Though, most monters only have 2 arrays of loot tables : one for common items, one for uniques. This hero has 13 chances versus 5000 to wield a unique weapon, so it's roughly 0.26%.
(https://i.imgur.com/foH1iC4.png)

Considering you fall on the uniques' loot table, wich act differently from commons' loot tables, it simply picks an item from the array. Each act and difficulty has its own array of uniques.

(https://i.imgur.com/gP3mrLD.png)




Hope this answers your questions ^^
Title: Re: [Tutorial] Add a new weapon to the game!
Post by: Tauceti on 16 February 2019, 20:57:57
this is instructive  ;)

A last question:
do you see any technical reason that explains why so many Ragnarock items don't trigger well their proc skill (like Fafnir's teeth and others) ?
Title: Re: [Tutorial] Add a new weapon to the game!
Post by: WNG on 16 February 2019, 21:29:44
this is instructive  ;)

A last question:
do you see any technical reason that explains why so many Ragnarock items don't trigger well their proc skill (like Fafnir's teeth and others) ?

That, I can't tell for sure since I haven't tested those at all. Though in my mod I intend to at least attempt resolving those issues, at which time I'll look at the issue from closer.
Title: Re: [Tutorial] Add a new weapon to the game!
Post by: Bumbleguppy on 16 February 2019, 22:34:30
Yes, I agree.

However, I think after a little experimentation modders will eventually see that some skill templates simply don't proc ever.

Skill_AttackProjectileBurst.dbr skills never proc with item skills. Ever.

Skill_AttackProjectileRing.dbr template skills do so that's what I have been using to replace some item skills,  just reduce the projectile rotation to 30  or so.

Would be useful to aggregate a list of skill templates that resist item skill AI proccing.
Title: Re: [Tutorial] Add a new weapon to the game!
Post by: WNG on 17 February 2019, 01:54:09
Skill_AttackProjectileRing.dbr template skills do so that's what I have been using to replace some item skills,  just reduce the projectile rotation to 30  or so.

Very clever  ;D

I was aware of Ichthian Spear's suffering the same issue, wich also has a ProjectileBurst. Those are the only two items I heard that had issues with AI controllers.
Title: Re: [Tutorial] Add a new weapon to the game!
Post by: wolpak on 15 June 2019, 19:21:50
Is it possible to add new weapon types?  Like two-handed weapons or modify current types?
Title: Re: [Tutorial] Add a new weapon to the game!
Post by: WNG on 16 June 2019, 02:27:51
That is hardcoded, unfortunately. I guess you had two-handed weapons in mind? Trust me, if it was possible, it would've been done long ago.
Title: Re: [Tutorial] Add a new weapon to the game!
Post by: wolpak on 16 June 2019, 06:56:01
That is hardcoded, unfortunately. I guess you had two-handed weapons in mind? Trust me, if it was possible, it would've been done long ago.

Yeah, I figured, though I was hoping that they opened up something when they created throwing weapons.  Ive been spitballing semi-work arounds like giving all characters a base 20% dodge and all weapons and shields decrease it 10%.  Thus, staff and how users get a nice bonus and if you would, for some reason, fight with just one weapon and an empty offhand, youd get a 10% dodge bonus.
Title: Re: [Tutorial] Add a new weapon to the game!
Post by: sauruz on 16 June 2019, 12:05:34
I guess theres a way to add fake 2nd weapons , might be a possibility

1) Replace staff item visual with a melle weapons
2) On character animation import Maenad 1nd handed animation

This way i think you can have more or less 2nd weapons look like

Or another fastter way

Replace all character 1nd handed animation tab with Maenad,
Title: Re: [Tutorial] Add a new weapon to the game!
Post by: WNG on 16 June 2019, 12:22:33
Among other issues I see here, that would require overwriting something else, which i guess can make sense if you want your mod to solely revolve around 2-handed weapons.
Title: Re: [Tutorial] Add a new weapon to the game!
Post by: sauruz on 16 June 2019, 12:41:38
In my head sounded more easly and possible lol. Thanks for the clariffication.

Bit off topic: im not planing looking at 2nd weapons, maybe it just me, this type of weapon dont fit in classic TQ theme
Title: Re: [Tutorial] Add a new weapon to the game!
Post by: wolpak on 16 June 2019, 15:42:47
In my head sounded more easly and possible lol. Thanks for the clariffication.

Bit off topic: im not planing looking at 2nd weapons, maybe it just me, this type of weapon dont fit in classic TQ theme

Oh come on, and unlimited throwing daggers are?  I think it would be a cool alternative for various classes.
Title: Re: [Tutorial] Add a new weapon to the game!
Post by: WNG on 17 June 2019, 03:50:57
I wouldn't be one to say 'No' to it, but there is just too many issues around it to become a thing. Plus, it would inevitably require overwriting something, which I'm not really liking in the first place.
Title: Re: [Tutorial] Add a new weapon to the game!
Post by: mvlad954 on 17 November 2019, 21:22:50
Can someone please help me?I tried running the Tex viewer,but it gave me this error message:The code execution cannot proceed because MSVCR71.dll was not found.Reinsatalling the program may fix this problem.
I tried running it again and as administrator and I even tried running it from the archive,but nothing.What am I doing wrong?
Title: Re: [Tutorial] Add a new weapon to the game!
Post by: WNG on 17 November 2019, 21:41:32
You need to download the missing .dll and put it in the same folder as Texture Viewer.

https://mega.nz/#!sZNz1a7B!uArGtdJZWk5BjoUqOpKMZ5KS6-y1kCMMqMPCVfwFGZc
Title: Re: [Tutorial] Add a new weapon to the game!
Post by: mvlad954 on 18 November 2019, 06:18:42
You need to download the missing .dll and put it in the same folder as Texture Viewer.

https://mega.nz/#!sZNz1a7B!uArGtdJZWk5BjoUqOpKMZ5KS6-y1kCMMqMPCVfwFGZc
Thanks!I'm gonna try this once I get home.
Title: Re: [Tutorial] Add a new weapon to the game!
Post by: tacitus on 20 March 2020, 19:54:20
First of all, thank you for the manual, this is the first helpful thing I've seen on the topic.

A couple of questions though. Having followed the instructions I modified the properties of an item and let it use it's original textures, then modified a chest to drop the item as a bonus, and renamed then built both .dbrs, if this process though described quite briefly is correct, I'd like to ask how you'd get either the item and or the chest to be accessible in the editor to be placed in a custom map, or any modified object, really. Apologies if I missed something.

Also, general question, couldn't you have used a less clunky system for verification? ;)
Title: Re: [Tutorial] Add a new weapon to the game!
Post by: WNG on 23 March 2020, 00:46:01
First of all, thank you for the manual, this is the first helpful thing I've seen on the topic.

Glad to help  ;D

A couple of questions though. Having followed the instructions I modified the properties of an item and let it use it's original textures, then modified a chest to drop the item as a bonus, and renamed then built both .dbrs, if this process though described quite briefly is correct, I'd like to ask how you'd get either the item and or the chest to be accessible in the editor to be placed in a custom map, or any modified object, really. Apologies if I missed something.

If you have built your item proprely, it should appear in the object list in the Editor. Place it in your custom map and that should be it.

Also, general question, couldn't you have used a less clunky system for verification? ;)

No idea what you mean here  ???
Title: Re: [Tutorial] Add a new weapon to the game!
Post by: tacitus on 23 March 2020, 17:47:54
I've tried it again now, and, after some amount of tinkering, still without apparent success. My guess is I'm missing something quite fundamental, as a side effect of never Learning to mod properly but rather dipping my head into it from time to time.

So, what I have managed to produce is a mod or rather Custommap folder, housing both the .dbr in question, and an .arz file. nothing more as the effect of building the dbr, I'm guessing. The question is now, as that directory can't and won't be used by the editor, which only accesses resources .arc files to my knowledge, if any additional steps would be required, which would possibly create the file in question at the right location; do I have to auto create an asset e.g. even if I want the mod to use the original assets of the item, and didn't create any myself, in the style of making a custommap? Is the source folder in the art manager supposed to be empty for the duration of the project?

Also speaking of custommaps, in testing I've ran into another issue, one bug, through which, when loading the map in question, everything but the ui is just a blackscreen, My guess is that the assets/ .map file is empty due to the short build time in the art manager and the short loading time ingame thereafter. One suggested solution for this is moving your TQ documents, then reopening the art manager. I've done this in the following order, also with no apparent effect: Moved TQ IT folder from "My Games" to Desktop> reopened the ArtManager and let it reload resources> closed the ArtManager> moved the folder back> reopened the ArtManager and tried to build the map again after deleting the old .map file

Lastly, with verification, I was referring to this:
Verification
enter numbers only: [random sequence of letters, numbers and symbols]

which has to be done each time when posting.

Thanks again, for the help.
Title: Re: [Tutorial] Add a new weapon to the game!
Post by: WNG on 23 March 2020, 19:31:22
Would you share some screenshots? I would like to see your item .dbr file in the ArtManager and where it should appear in the Editor. About the assets, it is only needed for things like textures and such. Database entries are unrelated and should appear in the Editor even if you attach an unexisting texture to them.

About the black map, you can force ArtManager to recreate the working directories by moving your whole TQ folder (the one that contains SaveData, Custommaps, Working, etc.) and launch ArtManager. Then, restore your old fields where they used to be, and try to rebuild the pathing again (or a make a new map, even.) That's the only solution I found to this bizarre problem.
Title: Re: [Tutorial] Add a new weapon to the game!
Post by: tacitus on 23 March 2020, 20:13:29
The screenshots, further information there.   

https://imgur.com/a/c5kkSFb

Keep in mind that I've yet been unable to test due to the bug. But my guess is that it's not working.
Title: Re: [Tutorial] Add a new weapon to the game!
Post by: WNG on 23 March 2020, 21:37:30
You should have only 1 .arz file and it should be named database. Not sure how you came to do a item.arz; the ArtManager automatically produces the file you need.

You built the file but did you build the mod (F7)? Do you select the mod in the Editor?
Title: Re: [Tutorial] Add a new weapon to the game!
Post by: tacitus on 23 March 2020, 21:44:48
That file is in there because it doesn't hurt to try. Should that item.arz file be anywhere else in particular or just in the mod folder?

I've built the mod yes, but what do you mean by opening the mod/selecting in the editor?

Official Edit: I've resolved the blackscreen issue. Thank you. However, now my character won't move at all in the new map I've created. I've encountered and fixed this before but I can't for the live of me remember how. How could I fix this?
Title: Re: [Tutorial] Add a new weapon to the game!
Post by: soa on 23 March 2020, 22:24:23
That file is in there because it doesn't hurt to try. Should that item.arz file be anywhere else in particular or just in the mod folder?

I've built the mod yes, but what do you mean by opening the mod/selecting in the editor?

Your resources files (textures, models, and so on) should be in .arc format.
.arz is for archives that contain text data in the form of database records (.dbr files). They are supposed to be named database.arz or yourmodname.arz when they are in the custommaps folder.

In the map Editor, you need to select your mod above (Mod name, list) and then find your map (.wrl).
Title: Re: [Tutorial] Add a new weapon to the game!
Post by: tacitus on 23 March 2020, 22:29:47
right. so in addition to my new .dbr. which I modify then build in the ArtManager, I then create a new world and in the Editor under the same name/ directory?

Also: I've resolved the blackscreen issue. Thank you. However, now my character won't move at all in the new map I've created. I've encountered and fixed this before but I can't for the live of me remember how. How could I fix this?

Again. Official Edit: Got it all working now, spawned my item. So first of all, thank you. However, one question remains, is it somehow possible to insert a custom item into the main Game making it playable there?
Title: Re: [Tutorial] Add a new weapon to the game!
Post by: sauruz on 23 March 2020, 23:26:44
right. so in addition to my new .dbr. which I modify then build in the ArtManager, I then create a new world and in the Editor under the same name/ directory?

Also: I've resolved the blackscreen issue. Thank you. However, now my character won't move at all in the new map I've created. I've encountered and fixed this before but I can't for the live of me remember how. How could I fix this?

I think you need to rebuild the pathing in the editor, select the map and -> rebuild pathing ( i think)
Title: Re: [Tutorial] Add a new weapon to the game!
Post by: tacitus on 23 March 2020, 23:29:05
Just got it all working now, spawned my item. So first of all, thank you, this has been really helpful. However, one question remains, is it somehow possible to insert a custom item into the main Game making it playable there? I'm pretty sure it is, so how do I do it?
Title: Re: [Tutorial] Add a new weapon to the game!
Post by: soa on 24 March 2020, 00:03:22
I think you need to rebuild the pathing in the editor, select the map and -> rebuild pathing ( i think)
If you just add an item without modifying the environment, I think it's OK not to rebuild pathing.

Just got it all working now, spawned my item. So first of all, thank you, this has been really helpful. However, one question remains, is it somehow possible to insert a custom item into the main Game making it playable there? I'm pretty sure it is, so how do I do it?

It depends on what you want : do you want it in a fixed place on the ground/a fixed chest, or appearing randomly or not in merchant's inventory, monsters equipment, etc.
It would be more complicated to have it on the ground at a specific place, it would involve changing the main map. You'd want to use existing containers, npc or proxies of the main game map to make things easier.
Title: Re: [Tutorial] Add a new weapon to the game!
Post by: tacitus on 24 March 2020, 00:14:03
If it doesn't make any difference to you I'd be interested in all available methods. If it does, I'd rather know the easiest way of having the item at one specific retrievable point, edited chest or otherwise.
Title: Re: [Tutorial] Add a new weapon to the game!
Post by: WNG on 24 March 2020, 00:52:56
Just got it all working now, spawned my item. So first of all, thank you, this has been really helpful. However, one question remains, is it somehow possible to insert a custom item into the main Game making it playable there? I'm pretty sure it is, so how do I do it?

The only way to do this is replace your game's database.arz with your mod's database.arz. That will modify the game files, so make sure to make at least one backup to preserve your old files, in case you mess up and wish to go back. Also, you will not be able to play multiplayer with players that have a different database.arz than yours.
Title: Re: [Tutorial] Add a new weapon to the game!
Post by: tacitus on 24 March 2020, 01:33:59
If that's the way to go, I'l be sure to take precautions, though @soa didn't make it sound that way, but that may just be interpretation. Also, how come you say mp would be impossible? I remember seeing plenty of people running around in custom gear in normal campaigns in multiplayer
Title: Re: [Tutorial] Add a new weapon to the game!
Post by: WNG on 25 March 2020, 01:12:59
In my message, I assumed you would include your item only through loot tables and not make it appear on the ground. If you want to make it appear in Main Quest, whether it is on the ground or not, you will need to replace the game files with yours, and if you have different game files as your partners, you will not be able to play with them.

About those cheated items, I'm not sure how they're made, but they all use assets in-game, so they definetly come from somewhere. But I don't really know tbh...
Title: Re: [Tutorial] Add a new weapon to the game!
Post by: tacitus on 25 March 2020, 01:34:49
So I did get it all in and working now using your method of unpacking the database and repacking it, which surely would need to be done for lootables as well wouldn't it since they're just your standard .dbrs as well which wouldn't work outside of custommaps....

I do wonder how other people got custom items into the game, I do have some from years ago, I had an actual working Leonidas Amour for some time, no idea if I still have it or if or if it still works, and I still have some modified rings, some of which still work, others which don't, all of which I got via the multiplayer. Very strange indeed...

One unrelated question however. When building mods, especially when rebuilding my database.arz I frequently get errors, in which the ArtManager is unable to open certain files (template or resources)(and my database.arz file shrinks by every time I build it) probably resulting in strange bugs I experience now in game, mainly a black background on the main menu, missing ui elements or a ctd when trying to access the artifact stash. One solution that is mentioned is moving your working/templates folder to the required correct directory, but it already appears to be there, where it's intended to be. Or to install the templates via the ArtManager in the first place, which I tried, without apparent affect, probably because it's already there. One other idea was to direct the ArtManager to use an updated tool in the Atlantis dlc directory which doesn't seem to exist under any recognizable name or directory at least. All of these suggestions were in reference to a missing template folder (which I'm pretty sure exists where it's supposed to in my case) but the error message does suggest that it could have been a resource as well...
Any idea how i fix this?
Title: Re: [Tutorial] Add a new weapon to the game!
Post by: WNG on 26 March 2020, 04:00:05
I think some Atlantis templates are missing which will cause an error when attempting to build them. Are you running your mod through Custom Quest or Main Quest? What have you attempted so far?
Title: Re: [Tutorial] Add a new weapon to the game!
Post by: tacitus on 26 March 2020, 17:53:25
I'm running it on the Main, which was the aim of all of this. I tried relocating the template folder which already appeared in the right directory, downloading templates which didn't do anything,really, and, last but not least verifying the game files via steam, which lead to the modded database file being recognized as faulty and subsequently replaced with a working one. I don't think it's only hinging on Atlantis templates though, since for example, the quest tab was missing, and the ctd in the artifact stash.
Title: Re: [Tutorial] Add a new weapon to the game!
Post by: WNG on 29 March 2020, 05:30:43
It's hard for me to tell because I don't know what you did or how your files look like. The implementation of a new item should be pretty straight-forward and certainly not lead to the loss of game elements.
Title: Re: [Tutorial] Add a new weapon to the game!
Post by: tacitus on 30 March 2020, 02:02:50
It is, and I'm clear that the process is straightforward, in and of itself, it appears to be working. It builds the .arz file I want it to build, and it builds the mod  want it to build, with the exceptions of a few errors, 192, in my last try to be exact, all, to my knowledge with the same error msg. "error loading record file or associated template" this also happens with other, smaller mods though without apparent effect.

I can post a pic of my directory but I'm not so sure what's there to be seen...
Title: Re: [Tutorial] Add a new weapon to the game!
Post by: WNG on 30 March 2020, 03:59:21
Before skipping any steps, have you made sure that it works in a Custom Quest at all?
Title: Re: [Tutorial] Add a new weapon to the game!
Post by: tacitus on 30 March 2020, 18:39:33
The item works.
Title: Re: [Tutorial] Add a new weapon to the game!
Post by: WNG on 31 March 2020, 12:34:14
When you attempt to overwrite the game's database with your mod's database, have you noticed any difference in file size? I would guess some files are missing and there's a way you could make sure no file is left out: you could try using ARZ Explorer (https://titanquestfans.net/index.php?topic=709.0) and use it to extract the whole base game's database, place it in your mod then add your item. Rebuild the mod for a new .arz and place this one in the game folder. Remember to make backups.
Title: Re: [Tutorial] Add a new weapon to the game!
Post by: tacitus on 31 March 2020, 19:06:31
Exactly how I did it in the first place.
Title: Re: [Tutorial] Add a new weapon to the game!
Post by: WNG on 04 April 2020, 21:28:54
Have you tried doing it all over again from a clean installation? I can't possibly know what went wrong at this point.
Title: Re: [Tutorial] Add a new weapon to the game!
Post by: dimitri33 on 07 June 2020, 06:18:52
Hi can you please make video tutorial i have problems i can't open  ArtManager error importing database record :'(
please make video tutoria
i like to mod Itemus_1.5.4 weapons i don't know the stats skills please help thank you
SimplePortal 2.3.7 © 2008-2020, SimplePortal