Post tutorial RSS How weapons work basic tutorial

Don't forget to check my addon list and my profile, i've got discord to talk

Posted by on - Basic Starting a mod

Ryan ‘s Production tutorial


This is my Tutorial for help beginners, there are probably mistakes, sorry for my english, i'm french


What I am going to show you will explain how to import a weapon from another mod


So how is setup a basic handheld weapon?
In this tutorial I will use the aix_hk416 from Aix2, it’s available for all handheld weapons and all mods, vehicles operate more or less the same way



How a weapon is installed?


Capture 7

There are more files again but I will explain it after.
So how work all that?



  • Objects_client.zip/Handheld/aix_hk416 /Meshes/aix_hk416.bundlemesh

This is the geometry, open it with Mesh Shader Wrapper, and you will see which texture is usedCapture 8


Capture 9

Capture 10

  • Objects_server.zip/Handheld/aix_hk416/animations/.baf

This folder have the animation for the weapons, it is configured by :

  • Objects_server.zip/Handheld/aix_hk416/AnimationSystem1p.inc (1p animation)
  • Objects_server.zip/Handheld/aix_hk416/AnimationSystem3p.inc (3p animation)

Capture 11

  • Objects_server.zip/Handheld/aix_hk416/Meshes/aix_hk416.collisionmesh


This is the collision mesh, this determines the collisions between the objects, no need to edit it to work


Capture 12

Capture 13

Capture 14

Capture 15

Capture 16

Capture 17

Capture 18

Capture 19

Capture 20

Capture2

Capture3

Capture4

Capture5

Capture6

Capture7

Capture8

Capture9

Capture10

it's over, don't hesitate to ask me if you have any questions.


Feel free to leave a comment if you like my tutorials, and I will make new tutorials after :)


Comments
BF2all
BF2all

Nice, good idea to make such tuts.

Other common questions for beginners are, how to install vehicle/weapons
and the basic structure of Bf2 archives.

One thing i never understood/searched for is why you can't put some common
stuff for weapons into common.zip. It wont work. Hm???

Reply Good karma Bad karma+2 votes
Ryan_Production Author
Ryan_Production

BF2all Thank you, i will make new tutorials in the futur, never try to put weapons into common ^^ always put into my weapon.zip, but i use sounds_client.zip and added into client archive with common prefix and run fine, like bf2142 and bfp4f are do

Reply Good karma+2 votes
BF2all
BF2all

No worries, no hurry ;D

Reply Good karma Bad karma+2 votes
Bluenix_indo
Bluenix_indo

this isn't a basic tutorial, this is very detail, very helpful for beginner. Also a lot of vanilla weapons kill display name is referring to a variable inside localization file, same goes for maps name and description

Reply Good karma Bad karma+2 votes
Ryan_Production Author
Ryan_Production

Bluenix_indo yes i didn't talk about alls elements, like localization file, and alls code we can add to a weapon

Reply Good karma+1 vote
NanohTheGreat
NanohTheGreat

Oh my Dude!! that's really an awesome tutorial !!! Très bon travail l'ami (je parles français haha)!

Reply Good karma Bad karma+2 votes
Ryan_Production Author
Ryan_Production

NanohTheGreat thank you ! merci beaucoup ! ;)

Reply Good karma+1 vote
Guest
Guest

I see some mods are using this:

rem ---BeginComp:SoldierDeviationComp ---
include ../../common/deviation.con "lmg" "undeployed" "mediumbarrel"
rem ---EndComp ---

It looks clear that this helps to use a universal set of parameters for different weapons. So the problem is I can not find this deviation.con anywhere in the zip, but the game still can run without trouble. Do you know how to use this type of technique?

Reply Good karma Bad karma0 votes
Ryan_Production Author
Ryan_Production

Well this is not hard to understand, the file is located into Weapons/common/deviation.con
Then open it and you will see alls the arguments, that look like PR, you will find the deviation into objects_weapons_server.zip\weapons\common\deviation\handheld\lmg.tweak

And look for v_arg "undeployed" "mediumbarrel"

Reply Good karma+1 vote
ATtoo
ATtoo

How About Stationary Weapon,Can you Make The Tutorial?

Reply Good karma Bad karma+1 vote
Suskov
Suskov

Great tutorial, my only problem is that I want to use a mod weapon and give it a more "classic" style by putting the regular dds aim to it but the ShaderWrapper I finded doesn't allow to change the meshes path so you can post here in moddb the program you use for that?

Reply Good karma Bad karma+1 vote
Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.