-
Notifications
You must be signed in to change notification settings - Fork 5
Tool Modding
Rubat edited this page Feb 23, 2021
·
3 revisions
This page teaches how to add new stuff to the Sandbox tool. All of the code in this section must be called shared - both on client and server.
list.Set( "LightsaberModels", "<pathToModel>", {} )
-
<pathToModel>
is your path to the model file.- Must start with
models/
and end with.mdl
, for examplemodels/weapons/stuff.mdl
.
- Must start with
list.Set( "rb655_LightsaberIgniteSounds", "#myCustomUniqueInternalName", {
rb655_lightsaber_onsound = "<pathToOnSound>",
rb655_lightsaber_offsound = "<pathToOffSound>"
} )
-
<pathToOnSound>
is your path to the sound file for the Ignition sound.- Must NOT start with
sound/
, for examplelightsabers/myOnSound1.wav
. - File format MUST be compatible with Garry's Mod, so either
.wav
or.mp3
will do. Recommended format is.wav
.
- Must NOT start with
-
<pathToOffSound>
is the same as above, but for the Extinguish sound. -
#myCustomUniqueInternalName
is your internal name for the sound, that will appear in the tool UI.- You should translate it to a real/proper name with language.Add like so:
language.Add( "#myCustomUniqueInternalName", "My Custom Sound" )
list.Set( "rb655_LightsaberSwingSounds", "#myCustomUniqueInternalName", {
rb655_lightsaber_swingsound = "<pathToSwingSound>"
} )
-
<pathToSwingSound>
is your path to the looping sound file for swings. Rules from above apply.- Learn how to make looping
.wav
files here.
- Learn how to make looping
list.Set( "rb655_LightsaberHumSounds", "#myCustomUniqueInternalName", {
rb655_lightsaber_humsound = "<pathToHumSound>"
} )
-
<pathToHumSound>
is your path to the looping sound file for idle hum. Rules from above apply.
Please do not upload edited or not version of this mod anywhere. You should upload self contained addons that use the APIs listed on this wiki.
The only official source for this mod is this repository and this Steam Workshop page.