Thread Rating:
  • 2 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tutorial How to create a gametype
#1
Hi guys this is my first tutorial i hope this can help you.

How to create a custom gametype


You need:

Quote:mod.csv | this file is on the root of the mod folder
_gametypes.txt | you can find this file here: raw\maps\mp\gametypes
gametypename.gsc | you have to create this file in the same folder of _gametypes.txt
gametypename.txt | you have to create this file in the same folder of _gametypes.txt
modname.str | you have to create this file here: raw\english\localizedstrings\
gametypesTable.csv | you can find this file here: raw\mp\

Create or copy these file in the right folder

Let's start make the gametype! Smile

1 - Edit your gametypename.gsc you have to make your custom gametype, if you want you can take tdm,gsc or sd,gsc or sab.gsc etc and rename the file in what you want. Exsample: take tdm.gsc and rename it as zom.gsc

2 - Go to mod.csv open it and add this line
Quote:rawfile,maps/mp/gametypes/_gametypes.txt
rawfile,maps/mp/gametypes/gametypename.txt
rawfile,maps/mp/gametypes/gametypename.gsc
stringtable,mp/gametypestable.csv
localize,modname.str

3 - Go to modname.str open it and add those line
(this is a modname.str made by me)
Example:
Quote:VERSION "1"
CONFIG "C:\projects\cod\t5\bin\StringEd.cfg"
FILENOTES ""

REFERENCE TITLE
LANG_ENGLISH "Zombies"

REFERENCE TITLE_CAPS
LANG_ENGLISH "ZOMBIES"

REFERENCE TITLE_SHORT_CAPS
LANG_ENGLISH "ZOM"

REFERENCE SHORT
LANG_ENGLISH "Zombies"

REFERENCE NAME
LANG_ENGLISH "ZOMBIES"

REFERENCE GAMETYPE_DESC
LANG_ENGLISH "survive at the zombies!" //This appear when you are on the gametype menu and you have to chose one.

ENDMARKER

4 - Now edit the gametypename.txt and add this line
Quote:"MODNAME.str_TITLE"
"MODNAME.str_TITLE_CAPS"
"MODNAME.str_TITLE_SHORT_CAPS"
obviously without .str

4 - Go to _gametypes.txt open it and add the abbreviation of your mod
Exsample:
Quote:dm
dom
sd
sab
tdm
koth

ctf



dem
oic
hlnd
gun
shrp

zom

5 - Last step, you have to edit gametypestable.csv
This is my gametypestable.csv
Quote:#Gametypes Table,,,,,,
a0,b1,c2,d3,e4,f5,g6
maxnum_gametype,9,,,,,
total_filesharegametype,12,,,,,
FOLLOW THIS
#gametype reference,#gametype names,#gametype description,#image,#index,#splitscreen,#gametime names lowercase
tdm,MPUI_TEAM_DEATHMATCH_CAPS,MENU_KILL_PLAYERS_ON_THE_OPPOSING,playlist_tdm,0,YES,MPUI_TEAM_DEATHMATCH
dm,MPUI_DEATHMATCH_CAPS,MENU_KILL_EVERYONE_FIRST_PLAYER,playlist_ffa,1,YES,MPUI_DEATHMATCH
sd,MPUI_SEARCH_AND_DESTROY_CAPS,MENU_TEAMS_TAKE_TURNS_DEFENDING_NO_SPAWN,playlist_search_destroy,2,YES,MPUI_SEARCH_AND_DESTROY_CLASSIC
dom,MPUI_DOMINATION_CAPS,MENU_CAPTURE_AND_HOLD_THE,playlist_domination,3,YES,MPUI_DOMINATION
koth,MPUI_HEADQUARTERS_CAPS,MENU_CAPTURE_THE_HEADQUARTERS,playlist_headquarters,4,YES,MPUI_HEADQUARTERS
dem,MPUI_DEMOLITION_CAPS,MENU_TEAMS_TAKE_TURNS_DEFENDING,playlist_demolition,5,YES,MPUI_DEMOLITION
ctf,MPUI_CAPTURE_THE_FLAG_CAPS,MENU_CTF_DESC,playlist_ctf,6,YES,MPUI_CAPTURE_THE_FLAG
sab,MPUI_SABOTAGE_CAPS,MENU_1_BOMB_IN_THE_CENTER,playlist_sabotage,7,YES,MPUI_SABOTAGE
Add a line like this
zom,ZOMBIES_TITLE_CAPS,ZOMBIES_GAMETYPE_DESC,playlist_ffa,8,YES,ZOMBIES_TITLE_CAPS
hlnd,MPUI_HLND_CAPS,MENU_KILL_EVERYONE_FIRST_PLAYER,playlist_sticksnstones,9,YES,MPUI_HLND
oic,MPUI_OIC_CAPS,MENU_TEAMS_TAKE_TURNS_DEFENDING,playlist_oic,10,YES,MPUI_OIC
gun,MPUI_GUN_CAPS,MENU_TEAMS_TAKE_TURNS_DEFENDING,playlist_gungame,11,YES,MPUI_GUN
shrp,MPUI_SHRP_CAPS,MENU_TEAMS_TAKE_TURNS_DEFENDING,playlist_sharpshooter,12,YES,MPUI_SHRP
,,,,,,
maxnum_basictraining_gametype,5,,,,,
#gametype reference,#gametype names,#gametype description,#image,#index,#splitscreen,#gametime names lowercase
tdm,MPUI_TEAM_DEATHMATCH_CAPS,MENU_KILL_PLAYERS_ON_THE_OPPOSING,playlist_tdm,bt0,YES,MPUI_TEAM_DEATHMATCH
hc_tdm,MPUI_TDM_HARDCORE_CAPS,MENU_HC_KILL_PLAYERS_ON_THE_OPPOSING,playlist_tdm,bt1,YES,MPUI_TEAM_DEATHMATCH
dm,MPUI_DEATHMATCH_CAPS,MENU_KILL_EVERYONE_FIRST_PLAYER,playlist_ffa,bt2,YES,MPUI_DEATHMATCH
hc_dm,MPUI_DM_HARDCORE_CAPS,MENU_HC_KILL_EVERYONE_FIRST_PLAYER,playlist_ffa,bt3,YES,MPUI_DEATHMATCH
Add your gametype line here too to play with bots
zom,ZOMBIES_TITLE_CAPS,ZOMBIES_GAMETYPE_DESC,playlist_ffa,8,YES,ZOMBIES_TITLE_CAPS
,,,,,,
maxnum_lbtype,11,,,,,
#Leaderboard string names,,,,,,
#num,#lb_type ref,#lb gametype names,#gametype names,,#lb index,
0,tdm,MPUI_LB_TEAM_DEATHMATCH_CAPS,MPUI_TEAM_DEATHMATCH_CAPS,,0,
1,dm,MPUI_LB_FFA_CAPS,MPUI_DEATHMATCH_CAPS,,1,
2,sd,MPUI_LB_SEARCH_AND_DESTROY_CAPS,MPUI_SEARCH_AND_DESTROY_CAPS,,5,
3,dom,MPUI_LB_DOMINATION_CAPS,MPUI_DOMINATION_CAPS,,3,
4,koth,MPUI_LB_HEADQUARTERS_CAPS,MPUI_HEADQUARTERS_CAPS,,6,
5,dem,MPUI_LB_DEMOLITION_CAPS,MPUI_DEMOLITION_CAPS,,7,
6,ctf,MPUI_LB_CAPTURE_THE_FLAG_CAPS,MPUI_CAPTURE_THE_FLAG_CAPS,,2,
7,sab,MPUI_LB_SABOTAGE_CAPS,MPUI_SABOTAGE_CAPS,,4,
8,hctdm,MPUI_LB_TEAM_DEATHMATCH_HC_CAPS,MPUI_HCTDM_CAPS,,8,
9,hcdm,MPUI_LB_FFA_HC_CAPS,MPUI_HCDM_CAPS,,9,
10,hcsd,MPUI_LB_SEARCH_AND_DESTROY_HC_CAPS,MPUI_HCSD_CAPS,,13,
,,,,,,
,,,,,,
#Leaderboard reset period names,,,,,,
#lb_typeByResetPeriod ref,#resetperiod names,#index,,,,
all_time,MPUI_LB_ALL_TIME_CAPS,0,,,,
monthly,MPUI_LB_MONTHLY_CAPS,1,,,,
weekly,MPUI_LB_WEEKLY_CAPS,2,,,,
,,,,,,
,,,,,,
#Leaderboard filter names,,,,,,
#lb_filter ref,#filter names,#index,,,,
none,MPUI_LB_EVERYONE_CAPS,0,,,,
friends,MPUI_LB_FRIENDS_ONLY_CAPS,1,,,,
lobbymembers,MPUI_LB_PLAYERS_IN_LOBBY_CAPS,2,,,,

Compile your mod and test
I hope this guide will help you, you can also see the official to this page Wink
Reply

#2
Another great tutorial. Thank you.
Reply

#3
great tutorial. keep it up
Reply

#4
Thanks for the great tutorial.
Now I can finally start making my AI Surival mod as a seperate gamemode. Smile
I got two questions though, and it might be nice to add the answers to the tutorial too:
If you want a script to get the gametype that is playing, then can you use GetDvar( #"g_gametype" ) or is it better to use something else?
And what does it return, the abbreviation of the gametype that you setted in _gametype.txt?
Reply

#5
In _gametypes.txt you set the abbreviation of gamemode, so in game you can open console and type g_gametype zom, map_restart and gametype will change! lol im making me too a AI Survival with bot Big Grin
Reply

#6
I tried several ways to load "survive" gametype, if start game change in "free for all" or realy start mod but you will put in ufo mode without any menu or sometime swich from map to map. I don't now if is laggy menu inside but realy i wana play it , however seems that the code to get safe zone work and is usefull to make "vip" gametype.

add me in steam
Reply

#7
(07-03-2011, 18:31)Gladio Wrote: I tried several ways to load "survive" gametype, if start game change in "free for all" or realy start mod but you will put in ufo mode without any menu or sometime swich from map to map. I don't now if is laggy menu inside but realy i wana play it , however seems that the code to get safe zone work and is usefull to make "vip" gametype.

add me in steam

What is your id?
Reply

#8
I have an idea of gametype but I'd need some help to get it working could you help me with that?

steam id: Scripts18
Reply

#9
Added Smile
Reply

#10
nice tuturial! thanks
C++/Obj-Cdeveloper. Neko engine wip
Steam: Click
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  Who can create this script First_Semyon 3 4,254 09-24-2013, 18:19
Last Post: First_Semyon
  [Tutorial] Custom gametype HUD iAegle 17 15,344 07-14-2013, 01:16
Last Post: Nekochan
Wink [Release] Shop system for Infected gametype Nekochan 125 76,273 07-05-2013, 18:09
Last Post: mohammadnanaa
  Help Create plugins ltybcs 46 26,421 05-23-2013, 17:31
Last Post: [HARD] Tony.
  Help Gametype WAR FaiR_PLaY 1 2,099 05-07-2013, 20:40
Last Post: DidUknowiPwn
  Making a gametype multi-rounded? DidUknowiPwn 6 4,624 04-22-2013, 22:14
Last Post: Pozzuh
Video [Tutorial] (Video) How to create the Beretta (or any CoD4's weapon) in Black Ops hitmax 19 13,857 02-08-2013, 00:18
Last Post: Gamemaster20
  [Request] Plugin = Spectate for admin only (INFECTED Gametype) choobie 7 4,871 01-18-2013, 04:34
Last Post: abidullah
  Help change gametype with current map raminr63 6 4,095 09-30-2012, 14:27
Last Post: raminr63
  Help How do I create a hack lobby CharlieKing 4 4,667 09-21-2012, 14:25
Last Post: JariZ

Forum Jump:


Users browsing this thread:
3 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.