[TUTORIAL]How to import a weapon into the game



  • First of this is not the perfect way of doing things simply because i dont know the way the developer did it, and i lack the skills in udk. But i found that this works simple to check if ur weapon is scaled properly etc. Now il be using an existing package to load it into the game, there should be a way to just use the existing animation sets and link it to ur weapon sadly yet again i lack the skill to figure this one out just yet (maybe a dev can share there workflow pls :D) or we as a modding community can find it out.

    Now before we get started PLEASE FOR THE LOVE OF EVERYTHING make a backup of ur weapons folder found in : \chivalrymedievalwarfarebeta\UDKGame\CookedPC\AOC\Weapons

    Alright lets get started for the method u need the SDK, some kind of modeling software maya/max.

    First off open the SDK then goto the content browser and find a weapon of ur choice and show all the files it uses. I used the quarterstaff as an example.
    [image:2hge36ff]http://i.imgur.com/4eSXb7m.png[/image:2hge36ff]

    First of drag the SKELETAL MESH!! (u need this one for the bones) in the viewport and place it in (0,0,0) coords.
    [image:2hge36ff]http://i.imgur.com/EtBlayB.png[/image:2hge36ff]

    Then right click it in the viewport and select EXPORT (.fbx) name it to what ever u want.
    [image:2hge36ff]http://i.imgur.com/hIVeIvv.png[/image:2hge36ff]

    Then open up ur modeling software (maya/max etc…)and import the file u saved.
    [image:2hge36ff]http://i.imgur.com/lXuk5xV.png[/image:2hge36ff]

    Select the mesh and detach it from the bones, then delete it.
    [image:2hge36ff]http://i.imgur.com/i7tXSG0.png[/image:2hge36ff]

    Then bind ur desired model to the bones (rigid bind or smooth bind i dont think it should matter that much) and export it as a .fbx.
    [image:2hge36ff]http://i.imgur.com/YOTfCbo.png[/image:2hge36ff]

    Then go back to the SDK and import the ur model and name it as the weapon you have chosen!
    [image:2hge36ff]http://i.imgur.com/Gk2kbVt.png[/image:2hge36ff]

    Now we have to open it into the Anim set viewer.
    [image:2hge36ff]http://i.imgur.com/CrJST8U.png[/image:2hge36ff]

    Then goto the socket manager:
    [image:2hge36ff]http://i.imgur.com/yb5MVp9.png[/image:2hge36ff]

    Now add a new socket select the root bone first b_weapon_root then click ok, name the socket TraceStart. (you’ll need to do this for the weapon to show up and use the fighting animations.)
    [image:2hge36ff]http://i.imgur.com/3hw4Ou8.png[/image:2hge36ff]
    [image:2hge36ff]http://i.imgur.com/O5Ee6wM.png[/image:2hge36ff]

    Then do the other bone and name the socket TraceEnd
    [image:2hge36ff]http://i.imgur.com/fe7i2cX.png[/image:2hge36ff]

    Then save the package the same as the package you choosen mine is WP_Dl1_quarterstaff.
    [image:2hge36ff]http://i.imgur.com/u1Hol6c.png[/image:2hge36ff]

    And we should be done, close the editor put the package in the weapons folderoverwriting the existing weapon you chose and start the game. Ur weapon should show up now and work!

    *Edit

    How to fix wrongly rotated meshes!

    You might run into the issue that ur weapon is orientated in the wrong way like this :
    [image:2hge36ff]http://i.imgur.com/t70eX0v.jpg[/image:2hge36ff]

    This is a simple fix that can be done in the editor as u can see my weapon is orientated in the wrong way, also u can what is causing it. The origin is -90 degrees in the Yaw axis, simply changing it to 0 degrees should fix it. If the weapon is still messed up play around whit the Pitch,Yaw, or Roll axis untill the error is solved.

    [image:2hge36ff]http://i.imgur.com/oNQHkJf.png[/image:2hge36ff]

    Here are 2 pictures how it should look hopefully its helpfull!

    [image:2hge36ff]http://i.imgur.com/N3hgvhi.jpg[/image:2hge36ff]
    [image:2hge36ff]http://i.imgur.com/eQu6E6v.png[/image:2hge36ff]
    id like to thank Wertyuiop408 for helping me figuring this out :)



  • Thanks for this. I had managed to get a custom weapon in the game, but it wasn’t drawing tracers. Now I know why :P . Being able to rip the game’s meshes/bones is also very useful.

    If you want to get a custom weapon in the game without overwriting the original weapons, you can try using Nabsterhax’s example mod as reference to make a custom game mode:
    viewtopic.php?f=97&t=15753

    In the weaponattachment file you can change the weapon’s skeletalmesh.

    Example:
    you change
    SkeletalMesh=SkeletalMesh’WP_hbl_Maul.WEP_Maul’
    to
    SkeletalMesh=SkeletalMesh’mypackage.mymesh’
    in your customweaponattachment_maul.uc



  • Really cool can someone test to see if they can connect to an unmodded server with this? Would be super cool if this worked as a client side art replacer.



  • @Knil:

    Really cool can someone test to see if they can connect to an unmodded server with this? Would be super cool if this worked as a client side art replacer.

    I doubt it, or rather, I hope not. It would cause endless problems with hit detection. Can you imagine if someone actually modelled a 5x size maul and they could use it client side? :? D:



  • @NabsterHax:

    @Knil:

    Really cool can someone test to see if they can connect to an unmodded server with this? Would be super cool if this worked as a client side art replacer.

    I doubt it, or rather, I hope not. It would cause endless problems with hit detection. Can you imagine if someone actually modelled a 5x size maul and they could use it client side? :? D:

    That’s true with the client side hit detection that could get nasty lol.



  • I have a legit man crush on you. Katars and Hunga Mungas, here I come!



  • @Knil:

    @NabsterHax:

    @Knil:

    Really cool can someone test to see if they can connect to an unmodded server with this? Would be super cool if this worked as a client side art replacer.

    I doubt it, or rather, I hope not. It would cause endless problems with hit detection. Can you imagine if someone actually modelled a 5x size maul and they could use it client side? :? D:

    That’s true with the client side hit detection that could get nasty lol.

    Seems like u cant join any server while having overwritten packages, its stuck on the loading screen for an infinite time.

    *edit found an issue also updated in the OP. :

    You might run into the issue that ur weapon is orientated in the wrong way like this :
    [image:366zejvo]http://i.imgur.com/t70eX0v.jpg[/image:366zejvo]

    This is a simple fix that can be done in the editor as u can see my weapon is orientated in the wrong way, also u can what is causing it. The origin is -90 degrees in the Yaw axis, simply changing it to 0 degrees should fix it. If the weapon is still messed up play around whit the Pitch,Yaw, or Roll axis untill the error is solved.

    [image:366zejvo]http://i.imgur.com/oNQHkJf.png[/image:366zejvo]

    Here are 2 pictures how it should look hopefully its helpfull!

    [image:366zejvo]http://i.imgur.com/N3hgvhi.jpg[/image:366zejvo]
    [image:366zejvo]http://i.imgur.com/eQu6E6v.png[/image:366zejvo]


Log in to reply