#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
|
|||
|
|||
I asked in the other thread, but do you know how the hit probability curve is calculated? I think max range is the 0 point of the graph. I know effective range is not the 50% point, but I don't think it's fixed to any percent either (in my last post I mentioned editing a weapon to have 100 efective range and 150 or 300 max range. The first had 25% chance to hit at 100m, but the second had a slightly better chance). It also seems like the game looks at effective as a percent of max range, so having 100/150 gives better accuracy then using 100/300 (except at the very tail end).
Likewise, range curve seems to effect how much accuracy looks like a step function vs. linear. The thing about this is that it seems to me that it's effect is most pronounced on the "aimed" function, all of the "standard" graphs look pretty much the same (standard never seems to have an inflection point, some aimeds do, some don't). Also, what seems to effect whether or not the aimed and standard graphs converge? I edited my merc to have 100 shooting, and for most weapons aimed is almost exactly the same as standard. For some weapons, like sniper rifles, the aimed never converges. Even with 100 shooting the aimed is way below the standard graph, and only a scope brings them up. Is that because there's some switch for certain guns, or does shooting maybe effect how far out you can accurately shoot, limited by a gun's curve (so with 100 shooting I can shoot accurately out to 125m, say. This means for a pistol, which can only shoot out to 50m, I'm perfect. With an SBR thats ok out to 100m, I'm also near perfect. Then with a sniper rifle, which is accurate out to 300m, since I can only do 125m my aimed curve is nowhere near the standard curve). |
#8
|
|||
|
|||
What is the meaning of the parameter "balance" on weapons? When I put silencer or laser it gone down.
|
#9
|
|||
|
|||
Quote:
Total Commander Quote:
Quote:
safoolfool, as I mentioned somewhere else, I usually ignore the graphs and other info in the weapon description window. It only gives some approximate information and doesn't mean much when the bullets start flying. Maybe Quickdagger can help explain the ins- and outs of those settings, I*m too tired to do it right now. |
#10
|
|||
|
|||
Quote:
To expand on the alternative weapon info file's range changes, it looks to me that it makes pistols and shotguns shoot a bit further in general. SBRs and ARs shoot way further, but with more linear declines in accuracy. So in the closer ranges they'll be a bit less accurate, but they'll retain accuracy a lot further out (so before where an AR was a guaranteed hit at 50m, and did pretty well at 90, but couldn't do anything at 150 it'll now be pretty good at 50m, fine at 100m, and still do ok out to 250m). I think the idea is to make ranges more like real life, instead of scaled to fit the maps. In vanilla 7.62 you preserve pistols<smgs<SBRs<ARs, but the ranges are 15m, 50m, 75m, and 100m, when in reality its something more like 30, 80, 150, 300 (or something, those are pulled out of my ass to be demonstrative of what's going on). Since engagement ranges never really get to more than 100m I don't plan to use the alt, since it would wreck the balance, in my eyes. You'd end up with three classes of guns that have the exact same ranges (SMGs, SBRs, and ARs would all be good till 80m, and 99% of fights happen at most at that range; the fact that in AR can still hit at 400m while an SMG can't becomes purely academic, no maps are half that big). If you like more simmy and less arcadey though, it's really cool and I'm glad the option is there. |
|
|