Difference between revisions of "Mapping/Model Replacement Guide"
Outerbeast (talk | contribs) m (Added information for swapping sprites) |
|||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
==What is Model Replacement?== | ==What is Model Replacement?== | ||
− | Model replacements allows you to replace | + | Model replacements allows you to replace models or sprites with something else on a global basis. This is useful for well themed maps to easily use alternative models for weapons, without having to define the model for each weapon/ammo entity you put in your maps. You can replace models globally and locally. |
==How to set up Global Model Replacement== | ==How to set up Global Model Replacement== | ||
Line 11: | Line 11: | ||
:''"models/v_crowbar.mdl" "models/christmas/v_candycane.mdl"'' | :''"models/v_crowbar.mdl" "models/christmas/v_candycane.mdl"'' | ||
:''"models/w_crowbar.mdl" "models/christmas/w_candycane.mdl"'' | :''"models/w_crowbar.mdl" "models/christmas/w_candycane.mdl"'' | ||
+ | |||
+ | Here is an example of swapping a sprite: | ||
+ | :''"sprites/xspark4.spr" "sprites/glow01.spr"'' | ||
3. Open or create the map CFG file (eg. mymap.cfg) in the "maps" folder and add this line to the end for your map: | 3. Open or create the map CFG file (eg. mymap.cfg) in the "maps" folder and add this line to the end for your map: | ||
Line 37: | Line 40: | ||
* You also need to use the quotation marks " ". | * You also need to use the quotation marks " ". | ||
* You cannot use comments (// or ##) in the GMR file. | * You cannot use comments (// or ##) in the GMR file. | ||
+ | * It is not possible to replace sprites used on the HUD. | ||
* Be aware that you should not take out remove donor specific models just because you don't expect any donors to be joining your server. | * Be aware that you should not take out remove donor specific models just because you don't expect any donors to be joining your server. | ||
[[Category:Mapping]] | [[Category:Mapping]] | ||
[[Category:Tutorials]] | [[Category:Tutorials]] |
Latest revision as of 14:55, 28 October 2024
1 What is Model Replacement?
Model replacements allows you to replace models or sprites with something else on a global basis. This is useful for well themed maps to easily use alternative models for weapons, without having to define the model for each weapon/ammo entity you put in your maps. You can replace models globally and locally.
2 How to set up Global Model Replacement
1. Create a GMR file in the "maps" folder matching a map name (eg. mymap.gmr).
2. Copy and paste groups of weapon models into the file. In this example I'm replacing the crowbar model with a custom candy cane model.
- "models/p_crowbar.mdl" "models/christmas/p_candycane.mdl"
- "models/v_crowbar.mdl" "models/christmas/v_candycane.mdl"
- "models/w_crowbar.mdl" "models/christmas/w_candycane.mdl"
Here is an example of swapping a sprite:
- "sprites/xspark4.spr" "sprites/glow01.spr"
3. Open or create the map CFG file (eg. mymap.cfg) in the "maps" folder and add this line to the end for your map:
- globalmodellist ../../maps/mymap.gmr
4. Save both the GMR and CFG file and load up your map.
3 How to set up Local Model Replacement
Each individual entity can also have a custom model by simply adding the path to the custom model in the 'Custom Model' field of the entity. This Barney for example now uses the Blue Shift model.
For weapons you can select custom models for p_, w_ and v_ models.
4 Using Global Model Replacement to free up resources
It can also be used to strip out default weapon models for maps that have the "512 model limit exceeded" crash upon loading. You can take out weapon models that aren't used in the map to free up some model precache slots. In the following example I'm not using the Egon, so I'm going to replace it with the not-precached model.
- "models/p_egon.mdl" "models/not_precached.mdl"
- "models/v_egon.mdl" "models/not_precached.mdl"
- "models/w_egon.mdl" "models/not_precached.mdl"
5 Notes
- In the CFG file using "../../" is important, as the working directory doesn't start at "svencoop".
- You also need to use the quotation marks " ".
- You cannot use comments (// or ##) in the GMR file.
- It is not possible to replace sprites used on the HUD.
- Be aware that you should not take out remove donor specific models just because you don't expect any donors to be joining your server.