Tool designed to simplify content management for Garry's Mod server owners.
It allows you to organize your addons into "addon packs," merging materials, models, and more.
Check out the structure in the Usage
section for a visual guide.
To get started, follow these steps:
- Install Rust
- Clone this repository using the following command:
git clone https://github.com/RavMda/content_manager
- Now, build it
cargo build
Once the build process is complete, locate the executable in the target
folder and proceed to the next section.
- Download latest release here
- Organize your server content in the following folder structure:
. βββ my_content/ βββ input/ β βββ playermodels/ β βββ neco_arc_pm/ β β βββ models/ β β βββ materials/ β β βββ lua/ β βββ spongebob_pm/ β β βββ models/ β β βββ materials/ β β βββ lua/ β βββ models.json βββ output/ β βββ _lua/ β βββ _lua_merged/ β βββ playermodels/ β βββ models/ β βββ materials/ βββ source-mdl-rs.exe βββ Config.toml
- Run the
source-mdl-rs
executable
Your repacked addons will be available in the output
folder.
The tool allows you to create a whitelist for models in your addon packs, eliminating unnecessary content. This is useful for playermodels.
Follow these steps:
-
Use this example lua script for DarkRP to generate a list of used models
local models = {} for _, job_extra in ipairs(RPExtraTeams) do if not job_extra.model then continue end if isstring(job_extra.model) then table.insert(models, job_extra.model) end if istable(job_extra.model) then table.Add(models, job_extra.model) end end local json = util.TableToJSON(models, true) SetClipboardText(json)
-
Paste the generated content into a file named
models.json
` within your addon pack.
Customize the tool to fit your needs:
input_folder
: Specifies the original server content folder. (Default:"input"
)output_folder
: Sets the folder for repacked addons. (Default:"output"
)ignored_addon_packs
: Skips specified addon packs during repacking. (Default:["playermodels", "playermodels2"]
)model_whitelist
: Enables (true) or disables (false) the models whitelist feature. (Default:**true**
)