Torchmodders
Modding => Modding Questions => Topic started by: Karkozi the All-Powerful on May 16, 2016, 11:38:17 am
-
Pretty self-explaining. For example, let's take Ratling Warrior, he carries some default sword, it's shown in it's Equipment data. Now I want some of the Ratlings carry something really cool, like Ashbringer :) I think it's what is Spawnclass section of Equipment is for, isn't it? But can I actually make them drop the weapon they hold when they die? There's a DROPONDEATH flag, but I don't want these items dropping from me on my death. Would the only option be cloning the monster, changing equipment and treasures accordingly? Any thoughts?
Also, what's a Wardrobe? Always puzzled me.
-
Hi Karkozi! Yes!
If you set DROPONDEATH the enemy will drop their item. But I don't think it works this way for players.
-
Found some time to test this.
In short, DROPONDEATH flag works for both monsters and players.
Not sure how do I feel about that. It's like minecraft - you get some time to pick up your gear after death, and there's always a possibility of losing it. Implementing it in TL2 sounds like a completely insane idea, but if **** wasn't a tradition it would had sounded like an insane idea too.
There's pretty much three options on how to deal with this:
1) Make all items drop on death.
2) Make only certain, pre-defined items drop on death (change some useless affix to reflect that).
3) Don't bother with this at all.
Pretty confusing :-\
Well there's also a more mundane idea to use this feature for monster cosmetics only.
-
Also, what's a Wardrobe? Always puzzled me.
Wardrobe [wawr-drohb] noun
1. a stock of clothes or costumes, as of a person or of a theatrical company.
;)
Now, with the serious answer, the wardrobe in TL2 is what makes possible por the player to wear differents armor pieces and also different skins colors, hair styles, etc.
The complete wardrobe systems is a bit complex since it has a lot of interaction parts, but once you understand it, it becomes pretty straight foward.
At a technnical level, the wardrobe makes possible to change part of one 3d model, for the parts of another. For this to be possible there are some requirements.
1- The 3d models: The 3d models for the player or monster need to have different materials defined, this different materials are the ones that can be changed for the parts of others models. This "other models" also need to have different materials defined. If you work in blender this material should all be in separate objects.
2- The Wardrobe.dat file: For the game to now what material to remove and what materials to add to the player model, you need to define the "Set" in the wardrobe file, for example a Helmet would remove the materials for the human head, and add the material for the helmet. This sets are defined in a generic way, that need that the materials for the models have an specific naming convention.
3- the item unit file: The item need to have defined in the Wardrobe tab, what set it is, this means if it's a helmet, a chest, a boot, etc. The 3d model that the player will wear when equiped. The type of player, male, female, class, etc.
4- the player unit file: The player need to have the "wardrobable" flag checked, so the game will check for the wardrobe tab in the item file, the set in the wardrobe file, and last the materials in the 3d models.