Model Swapping

All public release bug reports or requests for help, large and small, go in here.
Post Reply
ElSpicyMeme
Posts: 2
Joined: Mon Feb 20, 2017 11:30 pm

Model Swapping

Post by ElSpicyMeme » Mon Feb 20, 2017 11:32 pm

Could someone please give me some help, im hoping to swap some models in this game. Where are the games models located and what file format do they need to be?

User avatar
ProgSys
Developer
Posts: 230
Joined: Mon Dec 17, 2012 10:24 pm

Re: Model Swapping

Post by ProgSys » Tue Feb 21, 2017 11:47 am

The models are inside the .vpk archives. You can use GCFScape to open and edit them.
The models themself are stored as .mdl files which is a source engine model format. A compiler for it is provided with every Source SDK, which you can get on steam. You can find some decompilers on the web.

If I remember right though we have a easier way to swap models of units, without swaping models files, but I forgot how it works as nobody ever used it :lwsad: .

ElSpicyMeme
Posts: 2
Joined: Mon Feb 20, 2017 11:30 pm

Re: Model Swapping

Post by ElSpicyMeme » Tue Feb 21, 2017 3:47 pm

Ah ok, thank you, if you remember the easier method please share


I have in fact worked out a way to do it without swapping files, however its not much easier and can only be done on sandbox mode

User avatar
ProgSys
Developer
Posts: 230
Joined: Mon Dec 17, 2012 10:24 pm

Re: Model Swapping

Post by ProgSys » Sun Mar 05, 2017 7:50 pm

Well ye, it will only work in sandbox or on your own server as this could be used as a cheat.

Like you already found you can use the sandbox interface to swap the models. Alternatively you can also create a .json file in "scripts\gamedefs" to define a new unit or change the attributes of existing ones.

For example this code will chage unit_rebel model to Alyx:

Code: Select all

{
    "name": "model_swap_mod",
    "dependencies": [
        "wars_game"
    ],
    "defs": {
        "units": {
            "unit_rebel": {
                "__base__": "unit_rebel",
                "modelname": "models/alyx.mdl"
            }
        }
    }
}
To activate it just type 'load_gamepackage model_swap_mod' into the console.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests