mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2025-01-13 23:37:58 +03:00
Updated Modding with Mapbase (markdown)
parent
5166121151
commit
2092c76bbf
@ -1,16 +1,41 @@
|
||||
This is a general-purpose page for both the process of making existing mods begin running on Mapbase as well as the process of creating a new mod using Mapbase from the start.
|
||||
|
||||
There are three distribution/usage schemes for running on Mapbase:
|
||||
# File structure
|
||||
|
||||
There are two distribution/usage schemes for running on Mapbase:
|
||||
|
||||
* **Drawing from external folders**
|
||||
* This would involve your mod drawing directly from the Mapbase mod folders. This is the easiest and most balanced way of distributing a mod running on Mapbase. It's recommended that you include the latest Mapbase build with your installation to avoid confusion, but that will bloat the mod package's file and you may need to update it when Mapbase updates.
|
||||
* **Completely built-in**
|
||||
* This would involve merging Mapbase's assets directly with your mod, making your mod fully independent. This will bloat the mod's package file (and a user's hard drive if they have Mapbase installed separately) and may need to be kept up with Mapbase updates, but it is the only option for mods going on Steam and is the least confusing and convenient installation method for users.
|
||||
|
||||
## Mod Templates
|
||||
### Drawing from external folders
|
||||
|
||||
#### Mod Templates
|
||||
|
||||
Mapbase's ModDB page contains two lightweight mod templates for creating mods based off of HL2 or EP1/EP2. They are set up to use the basic dependency scheme (draw from adjacent Mapbase folders) and do not contain many files. You can use them to start your mod or see how `gameinfo.txt`'s Mapbase dependency works.
|
||||
|
||||
### Completely built-in
|
||||
|
||||
This is the more difficult and less common approach, but it allows your mod to run fully independently of Mapbase and eliminates any possibility for confusion or error involving the additional `mapbase_` folders.
|
||||
|
||||
This is usually done by copying *(not extracting)* Mapbase's VPKs. Here are some instructions for copying and organizing Mapbase's VPKs in this way for your mod:
|
||||
|
||||
1. First, you will need a place to put the VPKs. You can create a `mapbase` folder in your mod's root folder for this. (e.g. `sourcemods/mod_name/mapbase`).
|
||||
2. Inside of your new folder, you will need additional subfolders to separate Mapbase's content VPKs, reflecting the `mapbase_shared`, `mapbase_hl2`, `mapbase_episodic` scheme. This is often done by naming the folders after Mapbase's folders, but without the `mapbase_` part (e.g. `shared`, `hl2`, and `episodic`)
|
||||
3. Now copy Mapbase's VPKs to your new subfolders. These VPKs are found in the release build. (e.g. go to `mapbase_episodic/content` and copy its contents to `mod_name/mapbase/episodic`, etc.) (**Note:** `mapbase_shared/shared_misc/bin` can be merged with your own mod's root `bin` folder)
|
||||
4. If your mod is **not** using its own code, copy Mapbase's DLLs in the mod of your choice (`mapbase_episodic`, etc.) to your own mod's `bin` folder. (`discord_rpc.dll` and `game_shader_dx9.dll` count too)
|
||||
5. In `gameinfo.txt`, add the following commands to where you would normally mount Mapbase externally (see the mod templates for reference):
|
||||
```
|
||||
game+mod |gameinfo_path|mapbase/episodic/*
|
||||
game+mod |gameinfo_path|mapbase/hl2/*
|
||||
game+mod |gameinfo_path|mapbase/shared/shared_content.vpk
|
||||
```
|
||||
|
||||
Your mod should now be able to run independently of Mapbase's original sourcemod folders. You may need to update these copied files yourself whenever Mapbase is updated.
|
||||
|
||||
# Assets
|
||||
|
||||
## Materials (.vmt files)
|
||||
|
||||
Mapbase runs with modified versions of Source 2013's shaders. These modified versions are supposed to fully replace the original shaders, but because of in-engine caveats and Mapbase's choice of implementation, each `.vmt` file must manually point to the new shaders. HL2/EP1/EP2's materials are converted already, but **all of a mod's custom materials should be changed to use the new shaders**. Not converting them could make them look weird alongside the converted HL2 materials, and they won't use any of the shader benefits.
|
||||
|
Loading…
x
Reference in New Issue
Block a user