|
#1
|
|||
|
|||
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 10:35 AM. Reason: Forgot some rabbitears in the ITEMINFO section |
#2
|
|||
|
|||
As a quick question, how would I remove weapons from being usable/appearing in the game, without deleting their files? Or rather, which files must I remove their entries from for the game to remain stable? (That is, to avoid CTDs due to removing the weapon incompletely.)
|
#3
|
|||
|
|||
The easiest way to remove a weapon from the game without having to alter the ini files AND the enemy inventory files that might carry this weapon would be to remove them from the ShopINI files. that would remove the possibility for the player to buy them, but still be able to find them on fallen enemies.
Just do a "search in files" in the ShopINI folder and you'll get a list of the files/shops that sells the weapon and deleter the entry. If you wanna remove it from the enemy inventories as well, do a similar search in the InventoryINUI folder, but I recommend that you use the editor to remove the weapons. If you do it by editing the files manually there might be an issue later since the possible attachments might not be directly below in those files. If you have the 3d models of a gun, both folded and unfolded, you have to creat 2 versions of the weapon in all the files I showed above. With the HK416 I am missing the folded 3d model for it, if I had it I would simply add a pointer in the WEAPONINFO file that said which new weapon the folding of a stock would use. ITEM "HK416" Class Rifle Caliber "5.56x45 mm" Weight 3392 PrepareTime 0.32 SingleFireTime 0.58 BurstFireTime 0.07 SpeedModifier 1.01 Resource 2000 DirtResource 220000 MisfireProb 0.004 HeatCapacity 50 Single 1 Burst 1 CutOff 3 BurstHitStart 1 MaxRange 300 EffectiveRange 148 RangeCurvature 5.1 Balance 0.51 Unfold "HK416 folded" ClipInSound "Reload\clip_in.wav" ClipOutSound "Reload\clip_out.wav" ReLockSound "Reload\strifle_slide.wav" ShootSound "Weapon\shoot\HK416.WAV" ATT Laser 1 "Rifle Laser" ATT Light 1 "Rifle Light" ATT Scope 1 "WR" ATT Bipod 1 "SniperBipod" blocks ILauncher ATT Silencer 1 "Supressor - 5,56" ATT ILauncher 1 "M203PI" blocks Bipod ATT Bayonet 0 ATT Magazine 3 "NATO 5.56""5.56 Double""M16 mag" StdPlug "C-MAG (M16/100)" ACTOR "items\hk416.act" IMAGE "hk416_14.e5b" HANDS ahtRifle Then I would create the entires in the ini files for the new "HK416 folded". This means every time I fold the stock in the game, it changes the weapon to use the "HK416 folded" settings instead. When it comes to how many squares the weapon uses in the inventories, that can be changed too. In the lower part of the WEAPONINFO file, in this example the IMAGE "hk416_14.e5b", you change that to say "2x4.e5b" or "2x5.e5b" depending on how big you want the weapon to be. If you want the M4 to use less space, change their IMAGE entires in the WEAPONINFO file to say "2x4.e5b" for the unfolded version and "2x3.e5b" for the folded one. Yes, it's that simple Last edited by R@S; 07-09-2010 at 08:46 AM. |
#4
|
|||
|
|||
Quote:
I understood the example for creating a new folding stock variant, thanks for confirming that... Quote:
By the way, what's the difference between the BSM-default WEAPONINFO and your WEAPONINFO_ALT? When I try to switch the two (i.e. by renaming) it causes the Editor to immediately CTD... |
#5
|
|||
|
|||
Quote:
I forgot to mention, if you add a folded version of a weapon, you can then set their characteristics to fit the properties you think is fitting. Keep in mind that the engine also calculates the weight distribution of a weapon, so some changes might not do what you intend. But with a little testing you can trick the engine to do make it do what you want. Quote:
Quote:
EDIT: The reason some of the weapons has an IMAGE "hk416_14.e5b" entry instead of the "3x4.e5b" is to save resources. I also think it's a remnant from BE5 the devs dint bother removing. In 7.62 the picture in the shops is rendered from the 3d model and the image that is called in the "hk416_14.e5b" file is only used when the model is placed on the ground, never in the shops. Last edited by R@S; 07-09-2010 at 09:17 AM. |
#6
|
|||
|
|||
By "search" I assume you mean using Windows search? That's a bit more workable for XP, but for some reason Windows 7 isn't very good at finding these entries, even though I indexed the game directory...
The "class system v5 beta" WEAPONINFO_ALT fixed my issue; when renamed to WEAPONINFO, it no longer causes an editor CTD. Should I be extracting the rest of those files (ADDONINFO, AMMOINFO, GRENADEINFO, and MINEINFO) for stability's sake though, considering that I'm running regular non-class BSM? I vaguely remember seeing the XM-18's model and its ammo in regular/original BSM WEAPONINFO, so I'm actually not sure why you had a WEAPONINFO_ALT, as trying to glance through them didn't make me see any additional weapons, just different values for certain weapons' stats (i.e. Ready time, or Wear/Durability), much less what the "class system v5 beta" WEAPONINFO_ALT changed compared to them, besides correcting the CTD when used. Last edited by Chortles; 07-09-2010 at 11:48 AM. |
#7
|
|||
|
|||
Hi I'm trying to add an AK-104 by cloning AK-102, I've followed the steps above but my game keeps CTD probably because I couldn't find and copy the "*.ACT.INF" for the AK-102
*EDIT* I checked the log and it says 00:11.998 ERROR [0] .\Items\items.cpp (697) Item not found by name: 'Assault Rifle AK-104 (7.62x39mm)' Last edited by echoco; 02-18-2011 at 11:12 PM. |
#8
|
|||
|
|||
You must've forgotten to add the new weapon to one of the files, or made a typo in it's name in one of them. Make sure you've added the new weapon in all the files mentioned in the first post in this thread.
|
#9
|
|||
|
|||
It was a typo in the name thanks
|
#10
|
|||
|
|||
hi, im trying to create a weapon with higher balance after everything has gone on. It seems like the weight of the weapon itself in ratio with total weight of ammo and attachments affects it.
Im still confused with the 'Balance' attibute in WeaponINFO tho. Is there an alternate way to ensure high balance? Especially with the already heavy LMGs. edit: Using 3.0 as balance seems to sort LMGs out. Talk about missing the obvious lol. Oh, and can anyone please explain what affects damage? The Mk48 im using to test has lower damage than the original both before and after loading ammo. Could it be from changes in the 'FireTime' value? Last edited by freedom5515; 07-06-2011 at 09:31 AM. Reason: made balance testing |
|
|