-
Notifications
You must be signed in to change notification settings - Fork 219
Modding weapons
Modding weapons can be done by editing script files and replacing the default model/sound files.
An AngelScript script file loads the required model/sound files, renders models at the correct location, and plays gunshot sounds. There are two scripts for each weapon:
- Scripts/Skin/(Rifle|Shotgun|SMG)/ThirdPerson.as - this one is used for all players but the local player.
- Scripts/Skin/(Rifle|Shotgun|SMG)/View.as - this one is for the first-person weapon.
Include the script file in your Mods even when you didn't modify the script, or your Mods are likely to break in the future version of OpenSpades.
Note: if you modified script files, make sure to add your credits to them.
OpenSpades uses KV6 format, so you can use SLAB6 or any software with an ability to export KV6 to create models to be used in OpenSpades.
You can rewrite whole the sound logics to provide more sound diversity or reduce the number of sound files. However, you also have an option to stick to the original sound logics.
Here's purpose of sound files in the original sound logic:
- first person (played when a player you are controlling fired a weapon.)
- FireLocal.wav - Usually stereophonic thus not spatialized.
- third person (played when a player you aren't controlling fired a weapon.)
- Fire.wav - not audible in a long distance. Monophonic and spatialized.
- FireFar.wav - Monophonic and spatialized.
- FireStereo.wav - gives an illusion of a wide and open field. Stereophonic thus not spatialized.
Note: "spatialized" refers to 3D positioned sounds. Non-spatialized sounds aren't positioned at all, so if all sounds are non-spatialized, player cannot know where a gun shot came from. Stereophonic sound files never can be spatialized.
This wiki is in the middle of an update process to match the latest changes of OpenSpades 0.1.2
It may contain outdated, incorrect or incomplete information.
Please contact the repository owner (@yvt) via email or ask a question in the issue tracker if there is any obscure information you are looking for that can't be found in neither the source code nor in this wiki.