Wednesday, December 29, 2010

Silent ADS

In past call of duty games when you would aim down the sight, you would not make any noise when moving.  For some reason in black ops you do, so I put in an option to disable footsteps when moving while using the iron sights.  As an engineer I never like taking the easy way over the proper way of implementing something, but unfortunately for this feature I had to go the easier route.  The code for footsteps seem to be solely in the client scripts.  Client scripts do not include many of the player functions that the server scripts do, so this complicated things.  The game however does have a convenient perk that makes your footsteps silent so I decided to just take advantage of that.  It's a simple feature so there is no point getting super complicated.  Anyway I included a video with the audio jacked up about 500% so you can hear the lack of footstep sounds when ADS.


setdvar("gm_silent_ads", true);

Tuesday, December 28, 2010

Popup removal and nade starting count

In the past, smoke/stun/flash nades have been limited to 1 per spawn in competition.  There was no way to do this without modding so I added in a few dvars to force the starting count.

setdvar("gm_equipment_starting_count", "1");
setdvar("gm_tactical_starting_count", "1");
setdvar("gm_lethal_starting_count", "1");

I also added a dvar to remove those annoying popups when you kill or get killed by someone.  This also removed the first blood/rapid kill type popups that appear as well.  See the video below.  Also note how I only start with one flash.

setdvar("gm_popups_enabled", false);


Edit:  I also added an option to disable battlechatter (your guy randomly saying things like "WATCH OUT THERE IS A NADE" and completely giving away your position) 

setdvar("gm_battlechatter_enabled", false);

Sunday, December 26, 2010

Class Restrictions

I wrote some code to limit classes per team.  -1 means there are no limits on the class.

setdvar("gm_class_limits_assault", -1);
setdvar("gm_class_limits_smg", -1);
setdvar("gm_class_limits_lmg", -1);
setdvar("gm_class_limits_shotgun", -1);
setdvar("gm_class_limits_sniper", -1);

I eventually want to do the same thing on a per weapon basis.  So you could say limit the SMG class to 3 per team, but force a limit on the ak74u to 1 per team.

Wednesday, December 22, 2010

Loadout restrictions

If you check the dvar section, there is a massive list of pretty much every weapon, perk, nade, equipment, attachments, etc in the game.  Right now before a class is selected, it will go and scan all those dvars and make sure the selected class does not violate any of the restrictions.  If it does the game will make you choose another class.

When testing I only have the ability to choose from the default 3 classes, but the logic is the same for custom classes.  In this video I used: setdvar("gm_assault_allow_m16", false);

Tuesday, December 21, 2010

Gametype improvements

For some reason treyarch did not add the ability to do multiple rounds for dom tdm or hq so I added that in.

Now every gametype besides dm can use these dvars

scr_ + gametype + _roundlimit
scr_ + gametype + _roundswitch

Treyarch also seemed to think the only way to win a game is by round wins.  So I put in the ability (for tdm, ctf, dom, and hq) to just go by overall score to determine the map winner. 

setdvar("gm_ctf_round_based_scoring", false);
setdvar("gm_tdm_round_based_scoring", false);
setdvar("gm_koth_round_based_scoring", false);
setdvar("gm_dom_round_based_scoring", false);


if the dvar is set to false, the roundlimit set is taken literally ie: if roundlimit = 2 for ctf you will get 2 halfs that are always played.  If its tied after 2, it will go into overtime.

if the dvar is set to false, the roundlimit is assumed to include the overtime round. That's how it was in stock gameplay.  So if the roundlimit is set to 3.  You will play 2 rounds.  If each team splits winning a round it will go into a 3rd overtime.  However if team A wins round 1 and ties round 2, it does not go into overtime (this is how it is in stock).

Roundswitch will swap the side of the map you are on.

Next on my list is custom overtime rules

Monday, December 20, 2010

Video Preview 1

I put together some video of various features.  Shows the different options for hitblips, autoknife, fall damage, red crosshair, and headbob.


setdvar("gm_knife_autoaim_enabled", false);
setdvar("gm_headbob_enabled", false);
setdvar("gm_fall_damage_min_height", 256);
setdvar("gm_fall_damage_max_height", 480);
setdvar("gm_allow_red_enemy_crosshairs", false);
setdvar("gm_hitblips_enabled", true);
setdvar("gm_hitblips_lethal_enabled", false);
setdvar("gm_hitblips_tactical_enabled", false);
setdvar("gm_hitblips_penetration_enabled", false);

Sunday, December 19, 2010

Screenshots Part 1

Since I am able to test now, I'll be taking screens / videos of the different features over the next few days. Since everything is "config" driven, I will post the dvars being set along with a screenshot.  Please note that I've spent next to no time on how the UI looks.  Once all the functionality is complete I'll make the HUD look much better.

Below we have screens of stock, visual effects removed, fog removed, readyup, and players alive gui

   stock


setdvar("gm_mode", "pub");
    setdvar("gm_main_hud_enabled", true);
    setdvar("gm_fx_volumetric_fog_enabled", true);
    setdvar("gm_fx_visual_enabled", false);
setdvar("gm_mode", "pub");
    setdvar("gm_main_hud_enabled", true);
    setdvar("gm_fx_volumetric_fog_enabled", false);
    setdvar("gm_fx_visual_enabled", false);









setdvar("gm_mode", "pub");
    setdvar("gm_main_hud_enabled", true);
    setdvar("gm_fx_volumetric_fog_enabled", false);
    setdvar("gm_fx_visual_enabled", false);
    setdvar("gm_readyup_enabled", true);

setdvar("gm_mode", "pub");
    setdvar("gm_main_hud_enabled", true);
    setdvar("gm_fx_volumetric_fog_enabled", false);
    setdvar("gm_fx_visual_enabled", false);
    setdvar("gm_players_alive_hud_enabled", true);

Saturday, December 18, 2010

Dropping the flag in CTF

Prophet had the wonderful idea of being able to drop the flag as the flag carrier in ctf.  I coded that up and it works fairly well.  I will most likely have to tweak it to prevent you from picking it back up immediately in some situations.

Effects

So I went through and added a dvar to turn off visual effects (fire / smoke / other crap flying around that distracts you).  Also added a dvar to enable/disable volumetric fog.  I must say with fog turned off everything seems to look much better.  I will start posting some screens soon.

Tuesday, December 14, 2010

Testing

Today I had the brilliant idea of running a lot of my code in WAW to hammer out a lot of the syntax errors.  It was surprisingly painless for how much I've coded over the last month.  I managed to test the PB dvar monitoring stuff and it works fairly well.  The only thing I'm uncertain of is whether I can actually get the client portion of the code to run on the clients (the WAW sdk only contains client code for making custom maps, so I couldn't hijack any function calls to test)

Saturday, December 11, 2010

Quick Update

Just a quick update.  Throughout the week I added some additional features to the list that some people have requested.  Also I quickly coded up some stuff to let you turn off the player's head bob, ability to remove red enemy crosshairs/names, and added dvars for min/max heights for fall damage.

Sunday, December 5, 2010

Clientside Dvar Monitoring

One of the things I used to like about punkbuster was it allowed you to monitor client dvars to see if they were within a valid range.  There are a bunch of dvars that a user could set to give them an unfair advantage.  Since MW2 and BO use VAC, this feature is no longer available.  After doing some research I believe it is possible to do via scripting so I coded up some stuff today that should effectively give the PB dvar monitoring functionality.  I cannot be sure it works until the tools come out of course.

I put in a file that server admins can modify/override to change these settings and it looks something like this:

Load()
{
    restrictions = [];
    restrictions["cl_maxpackets"] = "IN 30 100";
   
    return restrictions;
}

I followed a syntax nearly identical to what PB did with the exception of include and exclude can support more than one string.

From evenbalance.com:
PB_SV_CVAR [cvar_name] IN [from_value] [optional_to_value]
If you wish to require that a particular cvar always equals a certain value or falls within a specified range of values, use the "IN" type.  For example, "PB_SV_CVAR handicap IN 10" means that each player's handicap cvar must always equal 10 on your game server.  Issuing "PB_SV_CVAR handicap IN 5 15" means that handicap must always fall inside the 5 to 15 range (inclusive).

PB_SV_CVAR [cvar_name] OUT [from_value] [optional_to_value]
If you wish to require that a particular cvar never equals a certain value or falls within a specified range of values, use the "OUT" type.  For example, "PB_SV_CVAR handicap OUT 0" means that each player's handicap cvar must never equal 0 on your game server.  Issuing "PB_SV_CVAR handicap OUT 11 99" means that handicap must never fall inside the 11 to 99 range (inclusive).

PB_SV_CVAR [cvar_name] INCLUDE [text]
If you wish to require that a particular cvar always includes the specified [text] inside its value, use the "INCLUDE" type.  For example, "PB_SV_CVAR r_drawbuffer INCLUDE gl_back" means that each player's r_drawbuffer cvar must always have the text "gl_back" somewhere in the value.

PB_SV_CVAR [cvar_name] EXCLUDE [text]
If you wish to require that a particular cvar never includes the specified [text] inside its value, use the "EXCLUDE" type.  For example, "PB_SV_CVAR name EXCLUDE ^" means that each player's name cvar must never have the text "^" somewhere in the value (note: the ^ symbol is used to change text colors so using the example would mean that no one could put fancy colors in their playing name on your server without getting kicked once detected by PunkBuster).



Assuming this stuff actually works, I will decide what to do if a player violates ones of these.  For now I have it to just report the violation or set the dvar within a valid range.

Thursday, December 2, 2010

Perks

So it appears that in the game scripts, a perk is represented as an array of "specialties".  So it sounds like we can disable parts of a perk/pro perk or the whole entire thing if we want.  There also seems to be plenty of perks/specialties left over from mw2

I am glad they decided to leave out martydom from the final game:  speciality_grenadepulldeath

Anyway I put up the list of the specialty limiting dvars.  I'll leave it at that for now.  Once the mod tools come out i'll be able to map each specialty to the actual perk.

http://gonemod-blackops.blogspot.com/p/dvars.html

GoneMOD Introduction

GoneMOD is a competition mod for call of duty black ops.  The game is good but there are many things that could have been coded a bit better in my opinion.  Leagues also want to be able to disable weapons/perks/other things and by default the game does not allow that kind of customization.  In past COD games, the community used a mod called PAM to do all of this stuff but development has stopped as far as I know so the odds of getting it ported over to black ops anytime soon is unlikely.  My initial goal is to provide something like this for black ops.

So anyway, instead of posting updates on multiple forums,  I decided to set up a blog to make it much easier to manage.   Check out the other pages for more info.

A first version should be released shortly after the mod tools are released.  For now all I can do is develop with the leaked script files.