Skip to content
yvt edited this page Mar 9, 2014 · 11 revisions

Modding weapons can be done by editing script files and replacing the default model/sound files.

Scripting

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 credit to them.

Models

todo.

Sounds

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.

todo: meanings of Fire.wav, FireFar.wav, FireLocal.wav, and FireStereo.wav