Gametype
Moderator: Moderators
-
chrisjbooth2001
- Colour Sergeant
- Posts: 77
- Joined: Thu Dec 18, 2003 12:57 am
Gametype
When you type g_gametype 1 for Free for all... Where is the file that tells the game 1 is Free For All 2 is TDM ect.
-
dcoshea
- Colour Sergeant
- Posts: 94
- Joined: Thu Mar 04, 2004 3:00 am
- Location: Sydney, Australia
- Contact:
Re: Gametype
Well for one thing, in Spearhead and Breakthrough you can get that information from the callvote.cfg since it changes the gametype based on what was selected.chrisjbooth2001 wrote:When you type g_gametype 1 for Free for all... Where is the file that tells the game 1 is Free For All 2 is TDM ect.
Regards,
David
Re: Gametype
It's gamex86.dll in your /main folderchrisjbooth2001 wrote:When you type g_gametype 1 for Free for all... Where is the file that tells the game 1 is Free For All 2 is TDM ect.
-
dcoshea
- Colour Sergeant
- Posts: 94
- Joined: Thu Mar 04, 2004 3:00 am
- Location: Sydney, Australia
- Contact:
Re: Gametype
Oh yes, that answer is betterjv_map wrote:It's gamex86.dll in your /main folderchrisjbooth2001 wrote:When you type g_gametype 1 for Free for all... Where is the file that tells the game 1 is Free For All 2 is TDM ect.
May I ask why you're asking, chrisjbooth? Do you want to add a new gametype?
Regards,
David
-
chrisjbooth2001
- Colour Sergeant
- Posts: 77
- Joined: Thu Dec 18, 2003 12:57 am
-
dcoshea
- Colour Sergeant
- Posts: 94
- Joined: Thu Mar 04, 2004 3:00 am
- Location: Sydney, Australia
- Contact:
That's some sort of mode where you have to capture locations on the map which are possibly hills, right?chrisjbooth2001 wrote:Im thinking of summit
Are you running Spearhead or Breakthrough there? I once thought of a way to add extra gametypes which could be voted through the menu - when someone votes for a particular map with your new gametype, the vote option should not only set g_gametype to some value, it could set a new variable of your choosing to some other value, e.g. if I was adding a summit mode to The Hunt (probably not a good map for it) I would have a menu option like this:
Code: Select all
"Summit Map" "g_gametype" list
{
"The Hunt - obj/obj_team1" "4;set g_gametype_ex 1;map obj/obj_team1"
I don't guarantee that it will actually work since I haven't tested it, but I figure you should be able to set two variables in the one vote option, and other than that it's pretty straightforward stuff.
I hope this helps if you can't find a better solution!
Regards,
David
-
omniscient
- Major General
- Posts: 694
- Joined: Tue Sep 16, 2003 12:02 am
-
omniscient
- Major General
- Posts: 694
- Joined: Tue Sep 16, 2003 12:02 am
-
dcoshea
- Colour Sergeant
- Posts: 94
- Joined: Thu Mar 04, 2004 3:00 am
- Location: Sydney, Australia
- Contact:
Oh yes, of course! Well unfortunately I highly doubt that stuff is scriptable. FYI, the server returns GameSpy (or whatever other program is querying the server) two fields, "gametype" which is the textual version of the game type, and "gametype_i" which is the number we're familiar with seeing the "gametype" set to in map scripts. I guess, assuming there isn't a way of changing things via script that I don't know about (which is possible since I doubt it's possible so much that I haven't even lookedomniscient wrote:hehe, u know when u open up say gamespy, and it says what game type ur joining (Objective etc) how do u get it to say Capture the flag?
Anyway, here are the two possibilities I can think of:
1. hex edit the game binaries to provide different strings; or
2. write a program which intercepts queries to the server and changes the data returned to the client.
I figure you'd much prefer to look into #1 than #2, and I can tell you #2 would probably be difficult and require you to have some specific NAT configuration on your router so that when the server tells the GameSpy master server that it is accepting queries on port X, requests to that port that are coming into the server are redirected to port Y where your program is running and can create queries to the server on port Y, then modify them before returning the responses to the original client.
It looks like the strings you'd need to edit for #1 are in gamex86.dll.
Regards,
David
-
omniscient
- Major General
- Posts: 694
- Joined: Tue Sep 16, 2003 12:02 am
-
Bjarne BZR
- Site Admin
- Posts: 3298
- Joined: Wed Feb 05, 2003 2:04 pm
- Location: Sweden
- Contact:
-
dcoshea
- Colour Sergeant
- Posts: 94
- Joined: Thu Mar 04, 2004 3:00 am
- Location: Sydney, Australia
- Contact:
I just took a look at my disassembly and it looks like the text "Objective-Match", etc., is put into a cvar called "g_gametypestring". I guess it is probably done before the map script runs, allowing you to update that cvar in your map script to whatever you want the text to say. Presumably that variable is the one returned at the "gametype" to remote queries.
Regards,
David
Regards,
David
-
omniscient
- Major General
- Posts: 694
- Joined: Tue Sep 16, 2003 12:02 am


