Different weapons to maps -1 reply

Please wait...

Guest

I didn't make it!

0 XP

 
#1 11 years ago

Hi is there anyway to have different weapon choice in each map on a mapcycle automatically.. so that maybe one map u can have all the automatuc rifles and another just sniper etc New to COD. I know u can in some other soldier games




Guest

I didn't make it!

0 XP

 
#2 11 years ago

???




your_mom_iss

GF Pwns Me!

50 XP

5th November 2006

0 Uploads

72 Posts

0 Threads

#3 11 years ago

cfg files boy you can set it so when the map changes it exec's a certian cfg file that has the weapons configured eg set sv_maprotation "gametype tdm map mp_carentan exec carentanweapons.cfg gametype tdm map mp_brecourt exec brecourtweapons" u could go wherever u want with that email me and ill get in detail or visit our forums at www.moddershell.freephpnuke.org my email is [email]big-red-one1@hotmail.com[/email]




Tally

COD Über Support

50 XP

20th November 2004

0 Uploads

3,439 Posts

0 Threads

#4 11 years ago
your_mom_iss;3455389cfg files boy you can set it so when the map changes it exec's a certian cfg file that has the weapons configured eg set sv_maprotation "gametype tdm map mp_carentan exec carentanweapons.cfg gametype tdm map mp_brecourt exec brecourtweapons" u could go wherever u want with that email me and ill get in detail or visit our forums at www.moddershell.freephpnuke.org my email is [EMAIL="big-red-one1@hotmail.com"]big-red-one1@hotmail.com[/EMAIL]

This doesnt work - you cannot execute a cfg from within a map rotation.

To answer the question - there are 2 ways to do it, both with mods:

1. Create a weapons loadout for each map by edting the map gsc files.

Each map has a file which sets up all the map stuff, and you can put cvars in them to turn weapons on or off.

For example, you might want snipers only on mp_brecourt. So, you would need to edit the mp_brecourt.gsc file (iw_07.iwd\maps\mp\mp_brecourt.gsc) and turn all the weapons you dont want off, and turn just the sniper rifles on. Use the standard server settings:

set scr_allow_XXX

etc.

Then you pack the edited file into a set of nested folders - maps\mp, and create an IWD file and put everything in that. Place it on your server, and when brecourt comes around, only the snipers will be used.

2. the other method involves switching all the standard server settings over to something called the cvardef method. Cvardef = cvar definition. It basically makes a setting specific to either a map or a gametype.

Every single cvar in COD2 can be switched over to the cvardef method, and it is a very powerful tool. It is used by all the big mods like AWE, eXtreme+ (who I am a developer with), Admiral mod, etc.

If you want this, I can let you have a mod which does this.

NB - it takes some getting used to. There are a lot of things to think about. Not for the faint hearted.




Blake222

I post to get attention

50 XP

15th October 2006

0 Uploads

81 Posts

0 Threads

#5 11 years ago

jeez tally, who the heck r u? u kno evrything about anything and u shoot down just about evry kool idea u seem like a game encyclopedia




your_mom_iss

GF Pwns Me!

50 XP

5th November 2006

0 Uploads

72 Posts

0 Threads

#6 11 years ago

tally is the moderating god




Tally

COD Über Support

50 XP

20th November 2004

0 Uploads

3,439 Posts

0 Threads

#7 11 years ago
Blake222;3465419jeez tally, who the heck r u? u kno evrything about anything and u shoot down just about evry kool idea u seem like a game encyclopedia

:confused:

Dont know if that was a compliment or not.

I dont mean to "shoot down" anyone or anything. Its just that on a help/modding forum, its not good practice to allow incorrect information to pass unchecked.

I still think its a "cool idea" to have different weapons settings on different maps. I have such an idea in my own mod, which allows you to set weapons according to map or gametype. So, sorry if I came across as knocking the idea down.

============================

Here is a mod that will give a different weapon setting per map or gametype:

/* Original Idea: [-7-] */ init() { // ----Weapons----- _w = []; _w[0] = "springfield"; _w[1] = "enfieldsniper"; _w[2] = "nagantSniper"; _w[3] = "kar98kSniper"; _w[4] = "enfield"; _w[5] = "nagant"; _w[6] = "kar98k"; _w[7] = "m1carbine"; _w[8] = "m1garand"; _w[9] = "svt40"; _w[10] = "g43"; _w[11] = "bar"; _w[12] = "bren"; _w[13] = "mp44"; _w[14] = "greasegun"; _w[15] = "thompson"; _w[16] = "sten"; _w[17] = "pps42"; _w[18] = "ppsh"; _w[19] = "mp40"; _w[20] = "shotgun"; _w[21] = "fraggrenades"; _w[22] = "smokegrenades";

for(i = 0; i < _w.size; i++) { weapon = _w[i]; setCvar("scr_allow_" + weapon, cvardef("cod_allow_" + weapon, 1, 0, 1, "int")); } }

cvardef(varname, vardefault, min, max, type) { mapname = getcvar("mapname"); // "mp_dawnville", "mp_rocket", etc.

gametype = getcvar("g_gametype"); // "tdm", "bel", etc.

tempvar = varname + "_" + gametype; // i.e., scr_teambalance becomes scr_teambalance_tdm if(getcvar(tempvar) != "") // if the gametype override is being used varname = tempvar; // use the gametype override instead of the standard variable

tempvar = varname + "_" + mapname; // i.e., scr_teambalance becomes scr_teambalance_mp_dawnville if(getcvar(tempvar) != "") // if the map override is being used varname = tempvar; // use the map override instead of the standard variable

// get the variable's definition switch(type) { case "int": if(getcvar(varname) == "") // if the cvar is blank definition = vardefault; // set the default else definition = getcvarint(varname); break; case "float": if(getcvar(varname) == "") // if the cvar is blank definition = vardefault; // set the default else definition = getcvarfloat(varname); break; case "string": default: if(getcvar(varname) == "") // if the cvar is blank definition = vardefault; // set the default else definition = getcvar(varname); break; }

// if it's a number, with a minimum, that violates the parameter if((type == "int" || type == "float") && definition < min) definition = min;

// if it's a number, with a maximum, that violates the parameter if((type == "int" || type == "float") && definition > max) definition = max;

return definition; }

Copy and paste that into a .txt file, and name it something like _map_weapons.gsc (i.e. change the file extension to .gsc to make it a gsc file).

Create a set of nested folders: maps\mp\gametypes

Place _map_weapons.gsc in the set of nested folders.

Go to iw_07.iwd, and look inside maps\mp\gametypes and pull out _callbacksetup.gsc

Edit it and have this callout to _map_weapons.gsc:

----------snip------------------ /*================ Called by code after the level's main script function has run. ================*/ CodeCallback_StartGameType() { // If the gametype has not beed started, run the startup if(!isDefined(level.gametypestarted) || !level.gametypestarted) { [[level.callbackStartGameType]]();

level.gametypestarted = true; // so we know that the gametype has been started up } thread maps\mp\gametypes\_map_weapons::init(); }

/*================

-----------snip----------------

Place the edited _callbacksetup.gsc in the set of nested folders as well, along with _map_weapons.gsc.

Pack it all into an IWD file.

Place this in the 'main' folder of your COD2 server.

Change all the weapon cvars in your server config file to these:

// All weapon vars accept a value of 0 or 1 (default = 1)

// Snipers set cod_allow_springfield 1 set cod_allow_enfieldsniper 1 set cod_allow_nagantSniper 1 set cod_allow_kar98kSniper 1

// Bolt-action set cod_allow_enfield 1 set cod_allow_nagant 1 set cod_allow_kar98k 1

// Semi-auto set cod_allow_m1carbine 1 set cod_allow_m1garand 1 set cod_allow_svt40 1 set cod_allow_g43 1

// Machineguns set cod_allow_bar 1 set cod_allow_bren 1 set cod_allow_mp44 1

// Noobieguns set cod_allow_greasegun 1 set cod_allow_thompson 1 set cod_allow_sten 1 set cod_allow_pps42 1 set cod_allow_ppsh 1 set cod_allow_mp40 1

// Shotgun set cod_allow_shotgun 1

// Nades set cod_allow_fraggrenades 1 set cod_allow_smokegrenades 1

You can now set the weapons per map or per gametype.

For example:

set cod_allow_fraggrenades 0 <--------- off for all maps or gametypes set cod_allow_fraggrenades_mp_carentan 1 <--------- on for mp_carentan

Or

set cod_allow_fraggrenades 0 <--------- off for all maps or gametypes set cod_allow_fraggrenades_mp_carentan_tdm 1 <--------- on for mp_carentan when TDM is played.

Very powerful method of doing it.

Hope that helps someone




Guest

I didn't make it!

0 XP

 
#8 11 years ago

Mnay thanks for that info...... I know just about all re sof2 but cod!! fish outa water. in sof2 you can exec weapon cfgs from the mapcycle so when i saw first reply i thought ahhh easy like sof lol. Not so easy.... Thanks for the detailed reply, Im not sure I understand but i`ll try