For Call of Pripyat, it is highly recommended to leave this ON.
$npc - Whether or not npcs can use this weapon. Unnecessary, but it doesn't hurt to define it. $spawn - The location when searching for it in the SDK Level Editor.
$prefetch = 8 scheduled = off option for ALife Simulator cform = skeleton class = WP_AK74 description = st_wpn_lr300_descr ef_main_weapon_type = 2 ef_weapon_type = 8 default_to_ruck = false sprint_allowed = true Naming $spawn = "weapons\lr-300" option for Level Editor
But we want our gun to work, and to be different.įor the next part of this tutorial, I'll be explaining various variables most commonly manipulated, and how to change them to your tastes. It'll behave just like an LR-300, and traders and techs won't know what on earth it is, but you can carry it by yourself without ruining the game. :wpn_lr300 This tells the game our gun is based off of the LR-300. Not the most popular weapon, but it's a solid all around weapon, letting you see what kind of effects your scripting has compared to the standard gun.Īt the top of the w_tester.ltx, put in this: In short, anything we add in will take priority in the finished product.įor simplicity, we'll base this off of the LR-300. A reference in the LTX is essentially a way of telling the game that a gun is based off of another gun, and thus inherits all of the statistics of that weapon unless otherwise stated. To get past the need for animation, bones, and other complicated areas, we'll use a reference. These are the most noticeable, and less trial-and-error then the other facets of scripting. We'll cover the fun stuff - like rate of fire, damage, and durability - and the not-quite as fun stuff - accuracy, recoil management, and ammunition types. These are arduous, requiring a fair amount of work to get working properly. Since this is your first weapon, you likely won't want to deal with all of the dirty, back-end scripting, such as animation references, attachment points, and bone placement. You can make a LTX file in notepad, by selecting "All File Types", and then defining it as w_tester.ltx, making sure to add the file extension. We make an #include reference, pointing to the script we'll be making for the rifle. If this file isn't modified, your gun won't load up properly - it might load up if you tell other #include files to load it, but it's best to encourage clean, tidy modification from the start.Īll we have to do here is fairly simple.
This is the master file that tells the game which scripts to include as weapon scripts.
Navigate to your gamedata\configs\weapons\ folder, and search for the weapons.ltx. First off, we need to make sure that the game will load the necessary script.