#define kActor_Wpn_Blaster 1525#define kActor_Item_WpnBlaster 2113#define kWpn_Blaster 33#define kWpnChar_Blaster 18
Weapon kWpn_Blaster{ offset "6 7 10" actor kActor_Wpn_Blaster defaultWeapon FALSE owned TRUE allowUnderwater FALSE allowLand TRUE allowMultiplayer TRUE icon "gfx/hud/weapons/h_w_blaster.png" ammo "Ammo_Bullet" initialAmmoAmount 100 ammoConsumption 1 projectileParticle kParticle_PlasmaShot charMeshIndex kWpnChar_Blaster priority 9000 slot 3 pickupTypeID kActor_Item_WpnBlaster quickslot 2}
Blaster kActor_Wpn_Blaster{ className "kexPlayerWeapon" initialScale "1 1 1" Begin_Component "kexRenderMeshComponent" mesh "char/blaster.skinnedmesh" anim "anims/Weapon_Magnum_Pistol.anim" bRenderAsWeapon TRUE End_Component Begin_Component "kexAnimTrackComponent" End_Component Begin_Component "kexScriptComponent" scriptClass "TurokWeapon" End_Component}
I am trying to add a custom weapon called "blaster" to turok 2, however, the weapon is not showing up in the weapon selection carousel or anywhere else ingame. I set up developer mode and the filesystem then made these changes:Added the converted models to char/ and materials to material/Added an icon in gfx/hud/weapons/Added this code to defs/common.txt:Code: [Select]#define kActor_Wpn_Blaster 1525#define kActor_Item_WpnBlaster 2113#define kWpn_Blaster 33#define kWpnChar_Blaster 18Added this code to defs/weaponInfo.txtCode: [Select]Weapon kWpn_Blaster{ offset "6 7 10" actor kActor_Wpn_Blaster defaultWeapon FALSE owned TRUE allowUnderwater FALSE allowLand TRUE allowMultiplayer TRUE icon "gfx/hud/weapons/h_w_blaster.png" ammo "Ammo_Bullet" initialAmmoAmount 100 ammoConsumption 1 projectileParticle kParticle_PlasmaShot charMeshIndex kWpnChar_Blaster priority 9000 slot 3 pickupTypeID kActor_Item_WpnBlaster quickslot 2}Added this code to defs/actors/weapons.txtCode: [Select]Blaster kActor_Wpn_Blaster{ className "kexPlayerWeapon" initialScale "1 1 1" Begin_Component "kexRenderMeshComponent" mesh "char/blaster.skinnedmesh" anim "anims/Weapon_Magnum_Pistol.anim" bRenderAsWeapon TRUE End_Component Begin_Component "kexAnimTrackComponent" End_Component Begin_Component "kexScriptComponent" scriptClass "TurokWeapon" End_Component}Any help would be greatly appreciated I would love to start making mods for this great game!
Good news, the weapon now appears on the carousel! Thanks for your help I went through my steps and it turns out I accidently modified one of the files in the "export" folder instead of my unpackaged dev folders. There is now another problem however, that my weapon model is not loading and there is an error. At the moment the weapon has been converted from an ".obj" to a ".staticmesh" file (I don't know a way to convert to a ".skinnedmesh" or do rigging) and I am trying to use the "kexStaticMeshComponent" to render it, however I get this error:I have now attached my .kpf file and also an extra zip file containing the models.