How to Set Up a Star Wars RP Server in Garry's Mod ​
Star Wars RP (SWRP) is not a built-in game mode you can simply switch on. An SWRP server is a DarkRP server with Star Wars content such as maps, player models and weapons, plus its own jobs, for example clone troopers. DarkRP is usually renamed through a derived gamemode for this, e.g. to starwarsrp. Complete, ready-made SWRP packages do exist, but they are usually sold by third parties. In this guide you build the foundation yourself from free content.
Warning
Create a backup of your server before the conversion and stop it before uploading files.
Install DarkRP ​
DarkRP is the foundation of your SWRP server. You need the gamemode itself and the darkrpmodification addon, where you will create your jobs later. You can find a detailed guide under Install DarkRP.
Add DarkRP
Add DarkRP (Workshop ID248302805) to your server's Workshop collection. You can find out how to set up a collection under Add mods.Download darkrpmodification
Download darkrpmodification from GitHub and extract the archive.Upload darkrpmodification
Connect to your server via SFTP and upload the folder to/garrysmod/addons/. The extracted folder is named e.g.darkrpmodification-master. Rename it todarkrpmodificationso that theluafolder sits directly inside it:/garrysmod/addons/darkrpmodification/lua/
Important
Never edit the files of DarkRP itself. All customizations belong in the darkrpmodification addon, otherwise they are lost with the next DarkRP update.
Create your own gamemode name (optional) ​
You can also run your server directly with the darkrp gamemode. The only difference is the name your gamemode is displayed with. If you would rather use e.g. starwarsrp, use DarkRP's official derived gamemode DerivedRP for this.
Download DerivedRP
Download the filederivedrp.zipfrom the DerivedRP release on GitHub and extract it.Upload the folder
Upload thederivedrpfolder via SFTP to the following directory:/garrysmod/gamemodes/Rename the folder
Rename thederivedrpfolder tostarwarsrp.Rename the file
Rename the filederivedrp.txtinside the folder tostarwarsrp.txt.Edit the first line
Open the filestarwarsrp.txt. Replace the"darkrp"entry in the first line with the new folder name"starwarsrp"and adjust the title if you like. The"base"entry stays unchanged at"darkrp". The start of the file then looks like this:"starwarsrp" { "base" "darkrp" "title" "StarWarsRP"Important
The folder name, the file name and the first line of the
.txtfile must match exactly and be lowercase. The server runs on Linux, whereStarWarsRPandstarwarsrpare different names.Change the display name
Optionally you can change the value ofGM.Namein the files/garrysmod/gamemodes/starwarsrp/gamemode/init.luaand/garrysmod/gamemodes/starwarsrp/gamemode/cl_init.lua:luaGM.Name = "StarWarsRP"
Warning
DarkRP must remain installed. The derived gamemode is based on darkrp and loads it in the background. Without DarkRP, starwarsrp does not start. If starwarsrp does not load even though DarkRP is in your collection, upload DarkRP from GitHub via SFTP to /garrysmod/gamemodes/darkrp/, as described under Install DarkRP.
Add Star Wars content ​
Add maps, player models and weapons to your Workshop collection. To do this, search the Steam Workshop for Garry's Mod for terms such as "SWRP", "Clone Trooper" or "Star Wars". Examples of free content:
| Workshop ID | Content | Size (approx.) |
|---|---|---|
1257128301 | SW Map : Venator (map) | 296 MB |
111412589 | Star Wars Lightsabers (weapons) | 39 MB |
183549197 | Star Wars Weapons (weapons) | 25 MB |
127992073 | Star Wars Clonetroopers P1 (player models) | 22 MB |
127992588 | Star Wars Clonetroopers P2 (player models) | 30 MB |
Warning
Star Wars content is often very large. Single maps take up several hundred MB, and extensive weapon packs additionally require further addons as a base. Every player has to download all enforced content when joining for the first time. Keep your collection lean and only include what you actually use.
Note
Many player model packs are several years old. Test new content on your server before using it permanently, so that no missing textures or ERROR models appear.
Force players to download the content ​
Players only automatically download the current map from your collection and the gamemode, provided it comes from the collection itself (e.g. darkrp). You have to enforce all models and weapons, otherwise players see ERROR models and missing textures.
Open the file
Open the following file via SFTP:/garrysmod/lua/autorun/server/workshop.luaAdd the content
Replace the emptyresource.AddWorkshop( "" )line and add one line per addon with the respective addon ID – not the collection ID:luaresource.AddWorkshop( "111412589" ) resource.AddWorkshop( "183549197" ) resource.AddWorkshop( "127992073" ) resource.AddWorkshop( "127992588" )Note
If you use the derived gamemode
starwarsrp, also add DarkRP withresource.AddWorkshop( "248302805" ). Only a gamemode that has its own Workshop ID set is transferred automatically, and that is not the case for DerivedRP.Save the file
Save the file.
You can find more on this under Add mods.
Set the gamemode and map ​
Open the dashboard
Open the dashboard of your server.Open the settings
Navigate to the Settings.Enter the gamemode
Enterstarwarsrpin the Gamemode field. If you did not create your own gamemode name, enterdarkrp.Enter the map
Enter the file name of your Star Wars map without the.bspextension in the Map field. The file name is not the title in the Workshop. For the Venator map from the table above, the Workshop description names e.g. the maprp_venator_extensive. Check the exact file name after the download, as it may contain a version suffix. You can find out how to determine it under Change map.Restart the server
Save the setting and restart your server. On startup the server downloads all content of your collection. Due to the size of Star Wars content, the first start can take considerably longer.
Create clone trooper jobs ​
You create jobs in the darkrpmodification addon. They then appear in the in-game F4 menu.
Create a category
Open the file/garrysmod/addons/darkrpmodification/lua/darkrp_customthings/categories.luavia SFTP and add a category below the line "Add new categories under the next line!":luaDarkRP.createCategory{ name = "Clone Army", categorises = "jobs", startExpanded = true, color = Color(200, 200, 200, 255), }Create a job
Open the file/garrysmod/addons/darkrpmodification/lua/darkrp_customthings/jobs.luaand add your job below the line "Add your custom jobs under the following line":luaTEAM_CLONE = DarkRP.createJob("Clone Trooper", { color = Color(200, 200, 200, 255), model = {"models/path/to/your/model.mdl"}, description = [[A clone trooper of the Grand Army of the Republic.]], weapons = {}, command = "clonetrooper", max = 0, salary = 50, admin = 0, vote = false, hasLicense = false, candemote = false, category = "Clone Army", })Replace
models/path/to/your/model.mdlwith the path of a player model from your model addon. Underweaponsyou enter the weapon classes of your weapon addons.commandmust be unique for every job, andmax = 0means there is no limit on the number of players in the job.Restart the server
Save the files and restart your server.
Tip
If new players should spawn directly as clone troopers, change the line GAMEMODE.DefaultTeam = TEAM_CITIZEN further down in jobs.lua (below your jobs) to GAMEMODE.DefaultTeam = TEAM_CLONE. You can disable default DarkRP jobs such as hobo or gundealer in /garrysmod/addons/darkrpmodification/lua/darkrp_config/disabled_defaults.lua in the DarkRP.disabledDefaults["jobs"] section by setting their value to true.