I'd say there are two general ways to do that, the direct way and the clean way.
*************
With direct way you'll mod one of the existing weapons directly in vanilla, likely one of Greenbelt's, as you can get to test it quickly in the lobby map which loads when you start the game. The downside of going direct is that you'll change vanilla resources, so trying to play online on public servers with it will be weird. One way to cope with it is to copy the whole game folder elsewhere and use the other one for modding and other one for playing.
1. copy your created weapon visual, the xml file, to media/packages/vanilla/models 2. edit e.g. media/packages/vanilla/weapons/m16a4.weapon, especially part <model filename="assault_rifle4.xml" /> to point to your file (don't use paths, just filenames), and change or add anything you need 3. start the game as normally, access the armory a bit south if you need to switch the weapon
*************
The clean way involves you creating a so called overlay mod where you store your custom resources. This overlay mod gets loaded on top of vanilla replacing any matches on the fly when loading.
1. create a new folder at media/overlays, e.g. my_great_mod, and create "models", "weapons" and "factions" subfolders there, so that you'll have media/overlays/my_great_mod/models, media/overlays/my_great_mod/weapons and media/overlays/my_great_mod/factions 2. copy your created weapon visual xml file to media/overlays/my_great_mod/models 3. copy one of vanilla weapon files from media/packages/vanilla/weapons to media/overlays/my_great_mod/weapons to work as a template for your new weapon 4. rename that file to whatever you see fit, e.g. my_super_rifle.weapon 5. edit my_super_rifle.weapon, change the model reference like with direct way, but also change the key value, it's a good idea to keep it in sync with the filename usually 6. copy media/packages/vanilla/factions/common.resources to media/overlays/my_great_mod/factions 7. edit common.resources and add a line <weapon key='my_super_rifle.weapon' /> in there 8. copy media/packages/vanilla/weapons/all_weapons.xml to media/overlays/my_great_mod/weapons, and add <weapon file='my_super_rifle.weapon' /> there 9a. start the game, go to start quickmatch in menu, setup mods to include my_great_mod, load it, and you're in 9b. create a shortcut to rwr_game.exe, edit its properties, add overlay=media/overlays/my_great_mod as parameter in the target; lobby map will have your overlay loaded already when starting the game using the shortcut
*************
Edited weapons work online, but only if your online buddies also have the mod you've made. With clean approach, they only need to have the overlay mod in place, it's automatically loaded when they join your game. The one hosting the server will need to have started the quickmatch with the mod enabled.
|