Tutorial: How to play with your weapon skins

This is a copy of the guide created by forum user CRUSHED located here

 

Hello everyone, here is a short guide on how to get your weapon skins in game so you can play with them against bots. There already is a guide on how to get your models in the editor and pose with them, but this is a bit more complicated then that.

This guide does not cover everything from scratch, I already included a mod template of my own so alot of the work is already done here.

So first of all, download the WeaponModTemplate.zip in the attachment of this post and unpack it.


---------------------------------------------
Put the ChivAdv folder here:

 

Steam\SteamApps\common\chivalrymedievalwarfare\Development\Src

 

Put the SDK -Launch Weapon Mod bat here

 

Steam\SteamApps\common\chivalrymedievalwarfare

 

 Now, go to chivalrymedievalwarfare\UDKGame\Config and open UDKSDK.ini

ModPackages line needs to look like this: ModPackages=ChivAdv

Save it and close


Now we want to replace the actual weapon model. To do this we will need the weapon & weaponattachment class of the weapon we want. Go to chivalrymedievalwarfare\Development\Src\AOC\classe s and select the weapon & weaponattachment of the weapon you want. For this example, we will take the Maul.

So I select AOCWeapon_Maul & AOCWeaponAttachment_Maul and copy it into 

chivalrymedievalwarfare\Development\Src\ChivAdv\cl asses


Now, first thing we do is rename both files and replace the AOC with ChivAdv. Now open the ChivAdvWeapon file with notepad/texteditor. First thing we have to do is extend from the original AOC class so the new one will get loaded.

So change this line 

class AOCWeapon_Maul extends AOCMeleeWeapon;

to this

class ChivAdvWeapon_Maul extends AOCWeapon_Maul;

remember this is just the maul example, obviously it will look different in the other weapon class files.


The next thing we do is tell this class file to use the new weaponattachment class

So change this line

AttachmentClass=class'AOCWeaponAttachment_Maul'

to this

AttachmentClass=class'ChivAdvWeaponAttachment_Maul '


Now save and close the ChivAdvWeapon_ class and open the ChivAdvWeaponAttachment file. Here again, change this line

class AOCWeaponAttachment_Maul extends AOCWeaponAttachment;

to this

class ChivAdvWeaponAttachment_Maul extends AOCWeaponAttachment_Maul;


Now we want to replace the skeletal mesh. For this you need to know your weapons package name & skeletal mesh name. So for this example we will use ExamplePackage.Wep_ExampleMaul

Find these lines

SkeletalMesh=SkeletalMesh'WP_hbl_Maul.WEP_Maul'
SkeletalMeshPath="WP_hbl_Maul.WEP_Maul",


and replace ALL of them to make sure, usually its around 3 but sometimes 4 so it looks like this

SkeletalMesh=SkeletalMesh'ExamplePackage.Wep_Examp leMaul'
SkeletalMeshPath="ExamplePackage.Wep_ExampleMaul",


Now we need to assign the new weapon class in this weaponattachment class so find this line

WeaponClass=class'AOCWeapon_Maul'

and change to

WeaponClass=class'ChivAdvWeapon_Maul'


Save and close the whole thing. Now we need to assign the weapon to the characters. In our example, its the knight so open these two

ChivAdvFamilyInfo_Agatha_Knight
ChivAdvFamilyInfo_Mason_Knight

and assign the new weapon so change this line in both

NewPrimaryWeapons(4)=(CWeapon=class'AOCWeapon_Maul ')

to

NewPrimaryWeapons(4)=(CWeapon=class'ChivAdvWeapon_ Maul')

Save and close

Now, put your weapon package into chivalrymedievalwarfare\UDKGame\ContentSDK and go to the chivalrymedievalwarfare folder and run the SDK - BUILD_SCRIPTS bat. This will put a ChivAdv.u in your contentSDK when finished, you will get a few warnings but thats normal. If you get the red errors, it means you did something wrong.

Now, if everything worked, start the SDK -Launch Weapon Mod bat and it should start chivalry and put you into FFA arena and when you select the weapon you replaced it should be there. You can replace as many weapons as you want with the above guidelines. The mod has loaded when you see a yellow welcome message in chat

You can update your package without having to rebuild the scripts. If you want to add a new weapon you have to delete the old ChivAdv.u and rebuild scripts. If you have problems let me know.


Some problems i encountered:

Weapon dissapeared ingame? Recheck your skeletal mesh/package names. Check if your package is in contentSDK.

Weapon didnt get replaced? Check if you are using the right Weapon/WeaponAttachment class by typing showdebug into console. 

Weapon isnt in the correct position in the hands? Check your model coordinates before exporting it. Check coordinates in the skeletal mesh in UDK

Build scripts gives you errors you cant solve? post here.


I hope there are some people who can use this guide to show off their skins a bit better, like I did with my showcase videos.

If anyone has suggestions for improvements or has problems with this let me know in this thread

Enjoy!  I'd appreciate it if you give me some props if this helped you!


Tutorial: Creating a new CustomizationContent script class for a mod so you can control character customization, as well as add helmets and other character assets


Heres a guide from torn banner how to add helmets ingame via mod