.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   Half-Life 1 SDK (http://forums.bots-united.com/forumdisplay.php?f=33)
-   -   [CZ] Changing model directory "on the fly"? (http://forums.bots-united.com/showthread.php?t=4158)

Rusty Le Cyborg 02-07-2005 11:23

Re: [CZ] Changing model directory "on the fly"?
 
Superb Lazy... thanks :)

I will make a list and post it soon (just got up and eyes not focusing properly yet!!)

Cheers for now

<edit>

Okay... the eyes are now working after a quick sugar and coffee hit :)

The models used in CZ are as follows -

models/player/arctic/arctic.mdl
models/player/gign/gign.mdl
models/player/gsg9/gsg9.mdl
models/player/guerilla/guerilla.mdl
models/player/leet/leet.mdl
models/player/militia/militia.mdl
models/player/sas/sas.mdl
models/player/spetsnaz/spetsnaz.mdl
models/player/terror/terror.mdl
models/player/urban/urban.mdl
models/player/vip/vip.mdl

It is a little difficult to add the hostages into an updated CZ install as the models have been changed from standard CS type ones.

But would it be possible (not to sound greedy!) to make a second dll which could be used by a standard CD install of CZ and CS?

This would need to change the models for -

models/player/arctic/arctic.mdl
models/player/gign/gign.mdl
models/player/gsg9/gsg9.mdl
models/player/guerilla/guerilla.mdl
models/player/leet/leet.mdl
models/player/sas/sas.mdl
models/player/terror/terror.mdl
models/player/urban/urban.mdl
models/player/vip/vip.mdl
models/hostage.mdl

Now then, I had intended that this be used with "cl_minmodels 1" on, so you would actually only have to change the leet and gign models, but I'm not sure that you can change just the variable "models/player" to "models/mapname/player/". Does it have to be the full path to each model? I shall leave that to you :)

Thanks again for your offer. If you need any more information, just give me a shout!

Cheers for now
</edit>

Rusty Le Cyborg 02-07-2005 13:03

Re: [CZ] Changing model directory "on the fly"?
 
Posting just to add a new "timestamp" in case you already read my reply..

Doh me!

By the way, added your AOL, so I'll try to catch you online too.

Rusty Le Cyborg 02-07-2005 13:49

Re: [CZ] Changing model directory "on the fly"?
 
Hmmm... actually, this may be of some use.

Just for interest, the XBox version of CS uses a "cfg" file to decide which models to use on which map.

It refers to a file called "playermodels.txt" which contains this information -

Code:

de_dust        models/player/de_dust/leet.mdl models/player/de_dust/seal.mdl
de_dust2        models/player/de_dust2/leet.mdl models/player/de_dust2/seal.mdl
de_fastline models/player/de_fastline/militia.mdl models/player/de_fastline/gsg9.mdl
cs_italy        models/player/cs_italy/militia.mdl models/player/cs_italy/gign.mdl models/hostages/businessman_young.mdl
cs_training        models/player/cs_italy/militia.mdl models/player/cs_italy/gign.mdl models/hostages/schoolgirl.mdl
de_truth        models/player/de_truth/guerilla.mdl models/player/de_truth/gsg9.mdl
cs_havana        models/player/cs_havana/militia.mdl models/player/cs_havana/seal.mdl models/hostages/latina.mdl
cs_miami        models/player/cs_miami/militia.mdl models/player/cs_miami/seal.mdl models/hostages/blonde.mdl
cs_militia        models/player/cs_militia/arctic.mdl models/player/cs_militia/spetsnaz.mdl models/hostages/jumpsuit.mdl
de_tides        models/player/de_tides/guerilla.mdl models/player/de_tides/gign.mdl
de_vostok        models/player/de_vostok/arctic.mdl models/player/de_vostok/spetsnaz.mdl
cs_office        models/player/cs_office/arctic.mdl models/player/cs_office/gsg9.mdl models/hostages/businessman.mdl
de_airstrip        models/player/de_airstrip/arctic.mdl models/player/de_airstrip/seal.mdl
de_aztec        models/player/de_aztec/guerilla.mdl models/player/de_aztec/seal.mdl
de_cbble        models/player/de_cbble/terror.mdl models/player/de_cbble/gsg9.mdl
de_chateau        models/player/de_chateau/guerilla.mdl models/player/de_chateau/sas.mdl
de_inferno        models/player/de_inferno/terror.mdl models/player/de_inferno/gign.mdl
de_piranesi        models/player/de_piranesi/arctic.mdl models/player/de_piranesi/gign.mdl
de_prodigy        models/player/de_prodigy/militia.mdl models/player/de_prodigy/spetsnaz.mdl
de_stadium        models/player/de_stadium/arctic.mdl models/player/de_stadium/sas.mdl
de_training        models/player/de_dust/leet.mdl models/player/de_dust/seal.mdl
cs_downed        models/player/cs_downed/guerilla.mdl models/player/cs_downed/seal.mdl models/hostages/pilot.mdl
de_corruption        models/player/de_corruption/guerilla.mdl models/player/de_corruption/gsg9.mdl

Would this be an easier way to do this?

Lazy 02-07-2005 15:23

Re: [CZ] Changing model directory "on the fly"?
 
The one dll I create should work across all mods, all it needs to do is adjust some paths.

ie. from "models/hostage.mdl"
to "models/cs_office/hostage.mdl"

It doesn't get any easier than creating a directory with the same name of the map in your models directory.
When the model is being precached, I'll tell it to look for it in models/mapname/ first. If that doesn't work ( pfnPrecacheModel returns <= 0 ) then it will use the default model instead.

No config files needed :)

Rusty Le Cyborg 02-07-2005 15:38

Re: [CZ] Changing model directory "on the fly"?
 
Ah right.. I understand :)

That will be excellent as it will work with the spetsnaz and militia for CZ also.

Thanks again!! :D

Lazy 02-07-2005 23:53

Re: [CZ] Changing model directory "on the fly"?
 
Shouldn't be too much longer, the code to change models is already complete.
I just have to figure out why the version of gcc that comes with cygwin won't compile it.

Rusty Le Cyborg 03-07-2005 01:24

Re: [CZ] Changing model directory "on the fly"?
 
Sounds good Lazy!

But....

I had a thought earlier about the updated Hostages in CZ. It seems that instead of just being called hostage.mdl they are called hostageA.mdl, hostageB.mdl, hostageC.mdl and hostageD.mdl

Would this cause an issue if it were to be added in a possible future release?

Then there are the hostage sound files to consider :)

I will have to check it all out once you have figured your compile problem.

Good luck and good night!!

Lazy 03-07-2005 01:29

Re: [CZ] Changing model directory "on the fly"?
 
Well, to override a default model all you'd need to do is put the replacement in models/mapname/ and it should be done automatically.

Rusty Le Cyborg 03-07-2005 10:54

Re: [CZ] Changing model directory "on the fly"?
 
Ah yes of course. I had forgotn that you were making "global" changes to the path :)

Just another question then, would it be to much of an issue to add a change to sounds? So that it would look in "sound/mapname/player or hostage" and then check "sound/player or hostage"?

Or is this a big change?

Cheers for now

Lazy 03-07-2005 19:54

Re: [CZ] Changing model directory "on the fly"?
 
Not at all, the only problem may be with playermodels but that can be fixed easily ( models on the server are models/player.mdl for everyone ).

I'm just going to install visual studio for now, I've spent all the time I should have been coding on trying to get it to compile under cygwin.


All times are GMT +2. The time now is 16:57.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.