[English] Weapons.dbt Explained + Enabling weapons

  • In this lets say HowTo I will explain the weapons.dbt file, because there is no explanation for this file nowhere or I didn't look where it is. After you will read this you will learn not only one thing but many other things because I will show you how to enable an old,existing or brand new weapon and how to configure them as well.



    Weapons.dbt



    Parameter: "id"
    The ID number assigned to the item which is in Items.dbt


    Parameter: "model"
    The name of the model of the weapon followed by the .nif extension


    Parameter: "damage"
    The real damage
    that a weapon will make and the game will read it first


    Parameter: "weapontype"
    I tend to think there are only two types of weapons in the game: Melee weapons and Ranged weapons


    Parameter: "minrange"
    The minimum distance between a person/weapon and the target person/object, THAT YOU WILL HIT WITH A WEAPON


    Parameter: "maxrange"
    The maximum distance between a person/weapon and the target person/object, THAT YOU WILL HIT WITH A WEAPON


    Parameter: "reload"
    This it must be the reload time from a ranged weapon (correct me if I'm wrong)


    Parameter: "soundtype"
    Is the sound that a weapon makes when you hit/shoot with it



    Explanations


    About "id" » (Weapons.dbt 64 "sword_01.nif") is (Items.dbt 64 "Shortsword") ?
    Yes, the "id" is making the connection between Weapons.dbt and Items.dbt!


    About "damage" » (Weapons.dbt "langsword_01.nif" 20 damage) versus (Items.dbt "Longsword" "datavalue" 16)
    What "datavalue" from Items.dbt means?! According to DarkLiz tutorial 'Items.dbt Explained' determines the damage value for weapons and the armour value for armour. The meaning of the value for other items is unknown.
    I agree with that but only for armor value. The game will always read the damage of a weapon from Weapons.dbt if you don't agree with me, test it and you shall see. The game will calculate the damage of a weapon like this: Damage(from Weapons.dbt) + Skill(The skill that affects the damage) = X Total damage.


    About "weapontype" » There are only two types of weapons: Melee and Ranged. Number 1 represents the melee weapons and number 2 represents ranged weapons.


    About "minrange" and "maxrange" » How bad it will look in-game if I set the minrange bigger then 0 to a melee weapon ?! I don't know, I never test that but I guess that only good will not look!
    Think that you throw torches into a building and the torches have minrange 300 and maxrange 1000.


    About "soundtype" » Looks like there are 5 visible soundtypes.
    (1 = blunt weapon sound ?), (2 = cutting/thrusting sound ?), (3 = Throwing stones/objects ?), (4 = fire/explosion sound ?), (6 = shoot sound ?), (5 or 3 = arrow/bolt/cannon ?). How do I know that ?! Well 1 is assigned to mace, 2 is assigned to axes and swords, 3 is assigned to an unknown item ???, 4 is assigned to torches, 5 is not assigned, 6 is assigned to guns.



    What purpose will have what I told you above if I don't tell you how to enable an old, existing or new weapon ?
    First if you know how to make a new weapon compatible with TG2Ren from 0 then you are big. Second, in the \The Guild 2 - Renaissance\Objects\weapons are some weapons that are not used at this time so I can enable them and I show you how.


    I choose a weapon from weapons folder and that weapon will be... warhammer_01.nif !



    Now, I go to Items.dbt to create the item code. Below in that photo is an example.



    And here is the complete line from Items.dbt for the Warhammer.


    Code
    1035	       "Warhammer"	     3	             2	                 3	                 12	                  5	                 1	                   1	                     4	                   0	                 6	                 151	                 1	            202	             2	            203	             2	            241	             4	             1	                  3	                   |


    If you want to know what these numbers represents, read [URL=http://forum.runeforge-games.net/index.php/topic,1543.msg8984.html#msg8984]DarkLiz [HoWTo]Items.dbt Explained[/URL]


    After I complete the line in Items.dbt, I go to Weapons.dbt to configure the Warhammer from there as well.



    Here is the complete line from Weapons.dbt for the Warhammer.


    Code
    1035          "warhammer_01.nif"		12                 1                    0                  200                0                  1                   |


    About things in common » The Warhammer lines from Items.dbt and Weapons.dbt have one very important thing in common and that thing is the ID!!! 1035, our ID in this case is making the connection between those two files so it must be unique and the same in both files 1035 in Items.dbt - 1035 in Weapons.dbt!


    Now, I need an icon for Warhammer. If you are good with photoshop you can make your own icons who match the weapon model perfectly. I choose a random Warhammer icon and I edit it with my poor Paint.NET!



    As you can see is a Warhammer with no background on the icon, size 42x42 but you can use 41x41 as well. The icon name must be Item_Warhammer otherwise the game will not recognize it as the Warhammer in-game icon. The icon format must be .TGA format when you save it. After you have finished the icon you will put it inside The Guild 2 - Renaissance\Textures\Hud\Items!


    Edit: I forgot about the text for the Warhammer so below it is the example!



    About text lines » _ITEM_Warhammer_NAME_+0 = one single item, _ITEM_Warhammer_NAME_+1 = two or more same items, _ITEM_Warhammer_TOOLTIP_+0 = item description.


    If you want to make it available somewhere, you can make it available at the market by adding the Warhammer to MarketPingHour.lua or if you want, you can make it craftable into a workshop like Goldsmithy by adding the item to BuildingUpgrades.dbt!


    Well... it's time to relax a little because this HowTo is finished my friends !
    I apologize if I made one or more mistakes above, I write this HowTo with no stop so feel free to correct me.



    Enjoy!

    [center]RO: Am jefuit boieri cu toptanul pana am ajuns in top ten.
    EN: I robbed landowners wholesale, until I reached the top ten.
    [/center]

    Einmal editiert, zuletzt von Nekuratu ()