.:: Bots United ::.  
filebase forums discord server github wiki web
cubebot epodbot fritzbot gravebot grogbot hpbbot ivpbot jkbotti joebot
meanmod podbotmm racc rcbot realbot sandbot shrikebot soulfathermaps yapb

Go Back   .:: Bots United ::. > Developer's Farm > SDK Programming discussions > Half-Life 1 SDK
Half-Life 1 SDK For developments focused around Half-Life (and its mods) Half-Life

Reply
 
Thread Tools
cz map dir how?
Old
  (#1)
Austin
Moderator
 
Austin's Avatar
 
Status: Offline
Posts: 403
Join Date: Nov 2003
Default cz map dir how? - 07-02-2005

Not sure if this should be posted here or in the dev forums.

CZ loads maps from two different directories.
..\condition zero\cstrike
..\condition zero\czero

In a metamod plugin running under cz on a LAN game:
GET_GAME_DIR ();
returns "czero" always.

gpGlobals->mapname
is jsut the map name.

1) So how can I find the full path to the loaded map?

2) Also, for the standard cz maps they must be bundled in some cache.
How would I load/save these maps in game form my metamod plugin?
I guess I can't and would have to install them as a custom map in the cstrike folder with a different name and load them from there??
Tx.
  
Reply With Quote
Re: cz map dir how?
Old
  (#2)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: cz map dir how? - 08-02-2005

the game directory for CZ is "czero", hence the maps' official directory is "../condition zero/czero/maps".

To extract stuff (like the official maps) from Steam's GCF cache, use the LOAD_FILE_FOR_ME() macro. Look in my PMtools plugin to find out how it works. You can't save stuff back into the GCF file, though.

If you want some code to create the directory for you in case it doesn't exist, use the _mkdir() macro.

I'm moving this to the coders section, alright?



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Re: cz map dir how?
Old
  (#3)
Austin
Moderator
 
Austin's Avatar
 
Status: Offline
Posts: 403
Join Date: Nov 2003
Default Re: cz map dir how? - 08-02-2005

Quote:
Originally Posted by Pierre-Marie Baty
the game directory for CZ is "czero", hence the maps' official directory is "../condition zero/czero/maps".
Yes, but here is still the problem.
I am reading / modifying / writing the bsp file in a mm dll. If it is a non-cz map then it is "probably" in the ../condition zero/cstrike/maps folder. But it doesn't HAVE to be. Someone could install a custom map in the ../condition zero/czero/maps or ../condition zero/cstrike/maps folder. How can I know? I need the complete physical path to open / modify / write out he bsp.

I guess I could check for it in both places and the keep track of where it is.
Not a big deal since it is one of two places, but I thought there would be a cleaner way....
Tx.
  
Reply With Quote
Re: cz map dir how?
Old
  (#4)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: cz map dir how? - 08-02-2005

I don't think CZ or non-CZ maps will go in different places. The game is Condition Zero, thus the game directory is "czero". The "cstrike" one is just for external game resources that come straight from CS, kind of like what the "valve" one was for Counter-Strike for Half-Life elements.

I would stick to "czero/maps" without worrying much if I were you.



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Re: cz map dir how?
Old
  (#5)
Whistler
Summoner
 
Whistler's Avatar
 
Status: Offline
Posts: 1,499
Join Date: Feb 2004
Location: Mist Village
Default Re: cz map dir how? - 08-02-2005

If I remember it right, there is a "gamedir_fallback" item in CZero liblist.gam which is set to "cstrike". As this the HL engine will find data files in the czero->cstrike->valve order.
  
Reply With Quote
Re: cz map dir how?
Old
  (#6)
Austin
Moderator
 
Austin's Avatar
 
Status: Offline
Posts: 403
Join Date: Nov 2003
Default Re: cz map dir how? - 10-02-2005

Thanks for the replys guys.
Whistler:
I never knew about this:
fallback_dir "cstrike"
I knew cz works fine with maps installed in either the czero or cstrike folders.

PM.
Good call again.
As far as I need to be concerned, the maps will have to be correctly installed off of czero period. I guess some installer put them in my cstrike folder (or even the cz install?) and I felt I had to support this. I don't!

So PM, Whistler.
What is you focus now?
Are you totally cs source and the new source sdk?
Are you still working with classic cs/cz ?
Tx...
  
Reply With Quote
Re: cz map dir how?
Old
  (#7)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: cz map dir how? - 11-02-2005

I still code my bot when I have time ; I am neither totally Source SDK nor HL1 SDK. Find out why here:

http://forums.bots-united.com/showthread.php?t=3121

heh



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Re: cz map dir how?
Old
  (#8)
Whistler
Summoner
 
Whistler's Avatar
 
Status: Offline
Posts: 1,499
Join Date: Feb 2004
Location: Mist Village
Default Re: cz map dir how? - 11-02-2005

I don't have access to HL2 and its SDK (well, I don't plainly say "have" now as it's inaccurate, and that's also what Valve guys like to say ), as I'm one of those who refuse to buy HL2 due to the Steam.

Also I don't have a fast machine so I didn't even bother trying the demo or a warez non-steam version
  
Reply With Quote
Re: cz map dir how?
Old
  (#9)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: cz map dir how? - 11-02-2005

Steam works very well for me; thanks to it Valve just made HL2 dickhead proof, which is a very good thing IMO. Believe me, HL2 is worth your money, and Steam shouldn't be a problem for you when you're a normal user. The only people Steam causes trouble to is wannabe crackers, because they can't do what they want. But I tell you, from a coder's point of view, all the tools you need exist and there's nothing you can't do with Steam that you could do with the pre-Steam Half-Life !
And HL2 runs very well on slow machines. The Source engine really kicks ass for that. Not only the game deserves your money, but IMO Valve deserves it too.



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Re: cz map dir how?
Old
  (#10)
Austin
Moderator
 
Austin's Avatar
 
Status: Offline
Posts: 403
Join Date: Nov 2003
Default Re: cz map dir how? - 12-02-2005

Quote:
Originally Posted by Pierre-Marie Baty
Steam works very well for me; ...
all the tools you need exist and there's nothing you can't do with Steam that you could do with the pre-Steam Half-Life !...
And HL2 runs very well on slow machines. The Source engine really kicks ass for that. Not only the game deserves your money, but IMO Valve deserves it too.
Wow.
I have been running cz and starting to hack it with some mm plugins but it seems lacking. Besides I dislike the hack + (poorly documented) nature of how we have to develop on this platform.

I am going to buy HL2/CS Source and check it out.
The Steam stuff FINALLY seems to be working well and has some advantages. If HL2 kicks as you say I think I will drop everything but the new stuff. and be very happy to move on.
tx
  
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com