Creating a new gamemode
Moderator: Core Staff
-
- CJ Wannabe
- Posts: 4
- Joined: October 5th, 2012, 10:13 pm
Creating a new gamemode
Hi,
maybe this is the wrong forum for this kind of request but you seem to be the last active forum that has something to do with CoD4 modding, so I decided to try it here. I hope you can help
I recently had an idea for a new gamemode. The problem is: I don't get the basic systems behind gamemode mods. Actually, I'm playing the gungame mod for quite a while and was also fooling around with the files and modified the mod (modception ) to know count the points in another way. But not more. Basically all I've done is searching for the corresponding lines in the corresponding files and changing them. But I have no clue how to actually make more advanced changes - such as an completely own gamemode.
As hobby-programer I'm quite sure I'll manage the scripting itself as it seems to be some kind of c. My problem much more is that I don't understand how the concept behind these mods in general work. When I look into my gungame folder I see lots of different files seeming to be not connected at all. I have no clue what file does what, why it does what it does and how the game knows what files to call.
In the CoD scripting handbook there is an tutorial to implement an anti-camping-function into deathmatch. Although I can follow his instructions, I still have no clue how to actually create a new gamemode. Do I have to edit files? Create new ones and catch certain events that happen (such as the player being shot)?
Can someone please explain how all these files work, when they are called and so on? Or at least give a starting spoint or a good tutorial from where to work forward?
If this is of relevance: My gameidea is to create something like crashday's "pass the bomb" gamemode: http://www.youtube.com/watch?v=buT7UglMKiM
I hope you can help me
Greets
Royal_Flush
maybe this is the wrong forum for this kind of request but you seem to be the last active forum that has something to do with CoD4 modding, so I decided to try it here. I hope you can help
I recently had an idea for a new gamemode. The problem is: I don't get the basic systems behind gamemode mods. Actually, I'm playing the gungame mod for quite a while and was also fooling around with the files and modified the mod (modception ) to know count the points in another way. But not more. Basically all I've done is searching for the corresponding lines in the corresponding files and changing them. But I have no clue how to actually make more advanced changes - such as an completely own gamemode.
As hobby-programer I'm quite sure I'll manage the scripting itself as it seems to be some kind of c. My problem much more is that I don't understand how the concept behind these mods in general work. When I look into my gungame folder I see lots of different files seeming to be not connected at all. I have no clue what file does what, why it does what it does and how the game knows what files to call.
In the CoD scripting handbook there is an tutorial to implement an anti-camping-function into deathmatch. Although I can follow his instructions, I still have no clue how to actually create a new gamemode. Do I have to edit files? Create new ones and catch certain events that happen (such as the player being shot)?
Can someone please explain how all these files work, when they are called and so on? Or at least give a starting spoint or a good tutorial from where to work forward?
If this is of relevance: My gameidea is to create something like crashday's "pass the bomb" gamemode: http://www.youtube.com/watch?v=buT7UglMKiM
I hope you can help me
Greets
Royal_Flush
-
- Core Staff
- Posts: 13313
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
Re: Creating a new gamemode
Learn how the game calls functions and then trace them around.
It is worth reading everything and making a diagram of linking files with functions. Write pseudocode for every function, saying exactly what the function is used for and the process.
With CoD4, the gametype files control very basic core gametpy eesentials (dm.gsc, tdm.gsc, etc) and the globallogic file hold the key gaming elements along with all the other files.
Creating a new gametype can be done by modifying an existing gametype or from scratch...
It is worth reading everything and making a diagram of linking files with functions. Write pseudocode for every function, saying exactly what the function is used for and the process.
With CoD4, the gametype files control very basic core gametpy eesentials (dm.gsc, tdm.gsc, etc) and the globallogic file hold the key gaming elements along with all the other files.
Creating a new gametype can be done by modifying an existing gametype or from scratch...
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010
-
- CJ Wannabe
- Posts: 4
- Joined: October 5th, 2012, 10:13 pm
Re: Creating a new gamemode
Ok thanks. It's still quite confusing, but it gets a bit clearer from time to time. I'll simply ask as soon as I have a concrete question.
-
- CJ Wannabe
- Posts: 4
- Joined: October 5th, 2012, 10:13 pm
Re: Creating a new gamemode
every term being in quotation marks (e.g. "mp_dm_spawn") are aliases, aren't they? Where can I find the *.csv where these are listed? I found tons of sound lists but these are of no use for me at the moment.
-
- Core Staff
- Posts: 2030
- Joined: July 24th, 2006, 11:21 am
- Location: Cramped in a small cubicle/making another jump map
Re: Creating a new gamemode
There is no such .csv file. And they're not exactly aliases, they're key/value pairs; I'm assuming you're refering to getent("mp_dm_spawn","classname"); or something similar.every term being in quotation marks (e.g. "mp_dm_spawn") are aliases, aren't they? Where can I find the *.csv where these are listed? I found tons of sound lists but these are of no use for me at the moment.
Drofder2004: Drofder's rules for reviewing a map
[...]
#5 If your name is Rezil, minimum 5/5.
---
<LT>YosemiteSam[NL]:
I heard somewhere that the best way to start is juggling 2 balls with one hand, so you will get a feel for it.
[...]
#5 If your name is Rezil, minimum 5/5.
---
<LT>YosemiteSam[NL]:
I heard somewhere that the best way to start is juggling 2 balls with one hand, so you will get a feel for it.
-
- CJ Wannabe
- Posts: 4
- Joined: October 5th, 2012, 10:13 pm
Re: Creating a new gamemode
Is there a database that contains all the valid keys?Rezil wrote:There is no such .csv file. And they're not exactly aliases, they're key/value pairs; I'm assuming you're refering to getent("mp_dm_spawn","classname"); or something similar.every term being in quotation marks (e.g. "mp_dm_spawn") are aliases, aren't they? Where can I find the *.csv where these are listed? I found tons of sound lists but these are of no use for me at the moment.
I have got another question. While it is clear when functions like "onSpawnPlayer" are called, I have no clue, when e.g. _globallogic's "Callback_PlayerKilled" is called. Furthermore, I assume that it isn't a good idea to change this function to make something happen if a special player gets killed. I should do this in my gametype file. But how do I tell the game to call my function?
An example: In the sab.cfg file there is a function named "onDrop". Its name suggests it is the function being calles when the game sends some kind of "bomb dropped event". Again, I would need a reference for these events.
-
- CJ G0D!
- Posts: 1575
- Joined: June 3rd, 2009, 9:02 pm
- Location: Cardiff University, UK
Re: Creating a new gamemode
Most of the time in functions such as these, somewhere inside the function, normally near the very start, there should be a line something likeRoyal_Flush wrote:Is there a database that contains all the valid keys?Rezil wrote:There is no such .csv file. And they're not exactly aliases, they're key/value pairs; I'm assuming you're refering to getent("mp_dm_spawn","classname"); or something similar.every term being in quotation marks (e.g. "mp_dm_spawn") are aliases, aren't they? Where can I find the *.csv where these are listed? I found tons of sound lists but these are of no use for me at the moment.
I have got another question. While it is clear when functions like "onSpawnPlayer" are called, I have no clue, when e.g. _globallogic's "Callback_PlayerKilled" is called. Furthermore, I assume that it isn't a good idea to change this function to make something happen if a special player gets killed. I should do this in my gametype file. But how do I tell the game to call my function?
An example: In the sab.cfg file there is a function named "onDrop". Its name suggests it is the function being calles when the game sends some kind of "bomb dropped event". Again, I would need a reference for these events.
Code: Select all
self/player waittill("bomb_dropped");
If that was a bad example I know for certain that in onPlayerSpawned() there is a line
Code: Select all
player waittill("spawned_player");
-
Who is online
Users browsing this forum: Semrush [Bot] and 17 guests