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.