Aller au contenu

Photo

[TUTORIAL] How to add new Base Types and to make a sheath for your sword


  • Veuillez vous connecter pour répondre
8 réponses à ce sujet

#1
th3_selectah

th3_selectah
  • Members
  • 43 messages
Hi,

welcome to my 3rd tutorial. This time we get to know on how we add new Base Types to the toolkit and the Game, and as a goody we make a sheath for our 2H-weapon.


So, this is basically where we want to be at the end of the Tutorial.

Posted Image


And when fighting:
Posted Image

Preperation: Be sure to have your Models ready for use in Toolkit and the game.

If you dont know how to do this follow my first 2 Tutorials:

 [TUTORIAL] How to add custom model to Toolset and the Game
 [Tutorial] How to add NormalMap, SpecularMap etc to your custom model

Ok, lets start make a new Base Item Type. I`ll make a weapon Type named Katana and a sheath for it named saya.

To do this we need following files extracted from the 2da.erf:

- m2da_base.gda
- itemstats.gda
- bitm_base.gda

To edit the *.gda i recommon GDapp to you.

Lets start with the easiest one: Edit m2da_base.gda

This file basically points out where to find the variation files for a base type.

Colums are following: 

- ID (int) : Identifier of the variation file. Be sure to choose a unique one. I took 15001 and 15002 as they are unique.

- Label (string) + Worksheet (string): Pointers to the variation file. Make this the name of the variation file, without the ".gda". It`s katana_variation and saya_variation in my example.  

- PackageIDforAI: ID if you want to have AI players have to use your items. 0 since i dont want that now.

should be smth like this in the end:

Posted Image

Ok, now to the itemstats.gda:

Here we set the dmg etc for the new type.

Columns:

- ID : The Identier of the Type. Unique again. I took 116 and 117.

- Label: Name of the Type. Has to be Unique. I took "Weapon - Katana" and "Weapon - Saya"

-Attack: Don`t know. Seems not important till its always 0. Set it 0.

- Damage: Hit Damage for the Weapon. I took 8 for Katana and 0 for Saya since i dont wanna hit with it...

- DamageRange: Damage Multiplier. 1.5 means it does weapon dmg till 1.5*weapon dmg. I set it to 1.2 and 0

- Armor: Armor Value. 0 since we make a weapon.

- Armor Penetration: Percentage value for armor penetration. I took 3

- Defense: Only used on shields.

- BaseAimDelay: Delay before aiming next shot. Only used on bows and such.

- Dspeed: should be Drawspeed but iam not positive on this.

- CritChanceModifier: Modifier for crit...

- AbilityCostModifier: Modifier for the exhaution caused by armors.

- MissleDeflection: Guess what :P

- Optimum Range : Guess again...

- SpellPower: Not sure here. 0 seems to be a save choice though.

- RngdPenalty: Damagepenalty for ranged weapons if you wear heavy armors.

- AttributeMod, Attribute1, Attribute 0: not sure (anyone knows this? Tell me!!)

It should look smth like this in the end:
Posted Image 
Now the hardest one (but the last one): bitm_base.gda

Columns:

- ID: Same as before

- Label: Same as before

- namestrref + descstrref: References, most probably for use in conversations. Take unique ones.

- InvSlotWidth + InvSlotHeight: Guess what. Take 3 and 2.

- EquippableSlots:  Slotid where the item is equipable. Possibilities (only a few)
                                    - 1 : Two hand weapon (only in main hand. offhand is filled too)
                                    - 2 : Off hand ( Equipable in both weapon slots)
                                    - 3 : Main hand (Equipable only in the left weapon slot until you got mastery)
                                    - 4 : Ammunition slot
                                    - 16 : Body Armor
                                    - 32 : Helmet
                                    - 64 : Boots
                                    - 128 : Gloves

I take 1 for my katana and 4 for my saya.
 
- WearR, WearL (on the body): This is where you set how your weapon will be displayed on your model:
                                    - 5 : Right shoulder
                                    - 10 : Left shoulder
                                    - 3 : Bows 
                                    - 11 : Staff (basically 5 upside down)

both 5 on katana and saya

- WieldR, WieldL (in fight): This is how your item is wielded in fight (right and left hand). Best to set 14 in WieldR and 15 in WieldL. Except for bows which have 15 in WieldR and 0 in WieldL. If you dont want your item Wielded in either hand set 0.

14 on katana 0 on saya

- Hearaldry: Unknown. Set it to 0.

- WeaponOffset: Offset. make 0 if possible.

- CanRotateIcon: Rotation of icon if you take item in offhand.

- targettype: Set it 0.

- VariationWorksheet: This is important. Its the ID of the variation set. Set it to the int you chose in your m2da.gda. 15001 and 15002 in my example.

- DefaultMaterial: Minimum Material. 1 for Iron

- DefaultModel, DefaultIcon, DefaultResource. Let it empty.

- Weaponwield:
                            - 2: One Handed
                            - 3: Two Handed
                            - 4: Bow
                            - 6: Cutscene Longbow

- WieldModel + WieldmodelOverlay: Only used with bows.

- CombatRating: ?? How aggro you make your enemies ??

- StrengthModifier: Guess..

- BaseDam: Will be overwritten in itemstats.gda.

- Stack Size: Guess...

- Min and MaxItemProps: 0

- PropColumn: Possible "Melee", "Ranged", "Ammo", ... etc

- StartingCharges, QBBehavior, StorepanelSort: 0

- Type: 2 for Melee, 3 for Shield, 4 for Armor, 5 for Wand, 6 for Ranged, 7 for Ammo, ... etc

- Speed: GreatSword 1, maces + longswords 2, daggers 3 (be aware that speed is capped by animation duration)

- Projectile: Seems to be what remains of the projectile (arrow in enemy bodies etc)

- Ammo: Ammunation for the weapon. I use that one to make my saya ammunation for my Katana. All you have to do for this is to add the Id of Saya to the Katana row (117 in my example).

- Storepanel: Panel of the Store (inventory) in which it is displayed.

- ModalAbility: Don`t know yet. Set it 1.

- InvSound. Sound in inventory on / off.

- Armortype: Guess.. 1 to 5. The higher the number the heavier the armor.

- The Rest should be self explaining. Just take the ones of the item which is alike yours.

should be smth. like this:

Posted Image

So. Now you just have to copy the created *.gda files to your "/Dragon Age/packages/core/override/" - Folder and you should be able to use the new Item types in the Toolkit and the game.

DONT FORGET to make new variations.gda for your items. In my example its katana_variation.gda and saya_variation.gda

A Zip file containing my "work" can be found here.

Hope i could help some of you. If there are errors in the tut, or you know smth i don`t, TELL ME!! :)

Modifié par th3_selectah, 07 décembre 2009 - 06:25 .


#2
Ambaryerno

Ambaryerno
  • Members
  • 532 messages
Awesome work on the scabbards. Question is will this work if you have two weapons equipped, with each having a scabbard?



Next we need to figure out how to get those weapons to mount on your belt, rather than your back....



Also, you CAN set defense on a sword, too, and the game will correctly add that stat. Arms and Armor will be doing just that to reflect the fact that you can block with a sword.



I was hoping for some new insight into the issues I'm having getting the Base Types to work, tho. Unfortunately, everything is set as indicated.... But at least I know how to add a scabbard for my swords, now. :D

#3
th3_selectah

th3_selectah
  • Members
  • 43 messages
if you send me your gda`s and models i could see why it isn`t working on your side. It most probably are naming issues though since the naming is kind of difficult. And iam just working out the rules out myself.

The belt thing next, but i think finding the Vectors will take some time.

You defenitely can add two scabbards "in one model" which would be working with 2 swords then. If you want two scabbards i think you`ll have to add one more armor slot first.

Perhaps ill work on that later on :P

Yeah you basically can set every value. Bit i didn`t want to as it doesn`t sound right for a sword to have defense (at least for me) :P

Modifié par th3_selectah, 07 décembre 2009 - 07:49 .


#4
Lotion Soronarr

Lotion Soronarr
  • Members
  • 14 481 messages
HEy, th3_selectah, could you put your model (in some 3D Max compatible format) for donwload somehwere? It would be very usefull for scale and orientation reference.

#5
th3_selectah

th3_selectah
  • Members
  • 43 messages
 I uploaded my backup files, which contain *.3ds model of the saya and the katana.
The models are crappy and not at all good textured as they are used more for proof of concept. But i think they`ll do as a reference.

Download

#6
Lotion Soronarr

Lotion Soronarr
  • Members
  • 14 481 messages
Much oblidged. The scaling and facing is all I'm interested at this point. I can handle the rest easily enough ;)

EDIT: Frak. Can you put it up somewhere else? It requireas a Premium rapidshare account to download.

Modifié par Lotion Soronnar, 19 décembre 2009 - 01:33 .


#7
ChewyGumball

ChewyGumball
  • Members
  • 282 messages
1 model unit = 1m in game.

#8
Lotion Soronarr

Lotion Soronarr
  • Members
  • 14 481 messages
that helps...facing I assume, is straight up, with the pivot point set right below the crossguard?

#9
15meu.choi

15meu.choi
  • Members
  • 1 messages
th3_selectah can u put files on to megaupload?



your download link is dead.