View Single Post
  #1  
Old 07-08-2010, 05:30 PM
R@S R@S is offline
Approved Member
 
Join Date: Apr 2009
Posts: 560
Default Weapon Turorial 101

Since the weapon limit has been increased and some people might start making their own clones, here's a quick tutorial.

I use the AKM as a base since it uses the 7.62x39 caliber and it's model looks, at least to my novice eyes, like most clones. But one can use any other weapon as a base if it has the model you wanna use. If you wanna change the caliber, which means other types of clips, one might need to alter the coordinates of weapon attachments. Since I find that the most boring, and sometimes frustrating part, I recommend finding a model with the same caliber. The same goes for other attachments and the file that controls where the attachments are located on the 3d model is the *.ACT.INF in the 7.62\\Actors\Items folder.

Most of the weapons in the game has two names, one that the game engine uses and another the player sees in the shops, the former is it's ITEM name and is used in all the files, the latter is it's RealName which is the name shown in shops. The only file that contains the RealName in the ITEMINFO file, all other files use the ITEM name, including the ShopINI files. The reason for this is that the engine needs to differentiate between a folded/unfolded weapon and still be able to chow the same name in the shops.

The ITEM name in this example is "AK-47 Clone (7.62x39mm)", you can change this to something else as long as there isn't any others having it already. You could even just call it "1" if you'd like, as long as you call it that in all the files.


\7.62\INI\Economy.ini
The last number here is the global price, you set the real price in the ShopINI files.

Item "AK-47 Clone (7.62x39mm)" 1350.0


\7.62\INI\Items\FLASHPARAM.INI
The numbers are the coordinates for the muzzle flash

"AK-47 Clone (7.62x39mm)"
1
1.5
1.5



\7.62\INI\Items\ITEMBONES.INI
Here's the file for the possible attachments, but you also need to change the ATT entries in the WEAPONINFO file if you do any changes.


ITEM "AK-47 Clone (7.62x39mm)"
BONES "LASER""FLASH""TL""LAUNCHER""BIPOD""BAYONET"



\7.62\INI\Items\ITEMINFO
Here you have the RealName, or the shop name if you like. You can give many weapons the same RealName, it's just the display name for the shops. Keep in mind that the description has a limit, if you write too much here it'll result in a CTD.


ITEM "AK-47 Clone (7.62x39mm)"
RealName "AK-47 Clone"
Add the description of your new weapon here. Avoid using letters the engine might confuse with other things.
END



\7.62\INI\Items\ITEMLEVELS.INI
The first number after the ITEM name is the global CGL, the second is the percentage chance the weapon will appear in the shops.


"AK-47 Clone (7.62x39mm)"7 50


\7.62\INI\Items\ITEMSROTATION
This controls how the 3d model will appear in the weapon description window.


"AK-47 Clone (7.62x39mm)"
X 0
Y -90
Z 0



\7.62\INI\Items\WEAPONINFO
Here you have all the weapon characteristics. Most are selfexplanatory and if you are unsure, just ask about it and I'll explain further.

If you wanna edit some of the models, like make the textures darker or something, the ACTOR entry points at the ACT file which in turn points at the actual texture of the model. Just grab the ACT file, rename it. Then open it op and see what texture files it uses, find those an edit them. To avoid changing the original weapon textures as well, rename the textures and the edit the ACT file accordingly.


ITEM "AK-47 Clone (7.62x39mm)"
Class Rifle
Caliber "7.62x39 mm"
Weight 2930
PrepareTime 0.43
SingleFireTime 0.8
BurstFireTime 0.1
SpeedModifier 1.08
Resource 2900
DirtResource 400000
MisfireProb 0.005
HeatCapacity 70
Single 1
Burst 1
CutOff 0
BurstHitStart 1
MaxRange 250
EffectiveRange 150
RangeCurvature 1
Balance 0.59
ClipInSound "Weapon\ClipIn\clip_in.wav"
ClipOutSound "Weapon\ClipOut\clip_out.wav"
ReLockSound "Weapon\ReLock\strifle_slide(AKM).wav"
ShootSound "Weapon\Shoot\AKM.wav"
ATT Laser 1 "Rifle Laser"
ATT Light 1 "Rifle Light"
ATT Scope 0
ATT Bipod 1 "AssaultBipod" blocks ILauncher and Bayonet
ATT Silencer 1 "PBS - 7,62x39" blocks ILauncher and Bayonet
ATT ILauncher 1 "GP-30" blocks Bipod and Bayonet and Silencer
ATT Bayonet 1 "StdBayonet" blocks Bipod and ILauncher and Silencer
ATT Magazine 2 "AK 7.62""RPK"
StdPlug "Rifle ammo clip (AK 7.62/30)"
ACTOR "Items\akm.act"
IMAGE "akm.e5b"
HANDS ahtRifle



\7.62\ShopINI\*.ini
Then add it to the various shops.

Item "AK-47 Clone (7.62x39mm)"
Level 7
Price 1350


For more advanced weapon editing, post your queries and I'll try to explain it more thoroughly.

Last edited by R@S; 07-10-2010 at 09:35 AM. Reason: Forgot some rabbitears in the ITEMINFO section
Reply With Quote