AWE4 3.0.2 MULTIMODE

AWE4 3.0.2 MultiMode

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

AWE4 is the property of Raiders Gaming Net. All rights reserved.

No part of this modification can be used without the express permission of its creators. Also, do not decompile or memory dump the mod.ff file without the express permission of its authors or owners.

Any attempt to plagiarize any code or feature from this mod will be met with legal action.

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

Introduction to the Mod

What is AWE4 MultiMode? Basically, its all the previous releases of AWE4 rolled into one. However, what’s most important with this release is that the code has been  optimized: we’ve reduced the code loops significantly. Our test servers run far more smoothly now, and players are receiving significantly better FPS now.

These are the main differences in this release as opposed to previous ones:

1. There are now 5 "modes" in 1 mod:

•	PowerRank 
•	Modwarfare 
•	Stock Ranking
•	ForceWeapons
•	AWE OldSchool

Control of these modes is at the top of awe.cfg. 

NB: No 2 mode dvars should be set at the same time. This is fundamental to the running of the mod.

2. We included a separate IWD for short range nades (optional). This halves the throwable distance for any grenade type in the game (stun, flash, smoke, or frag). 

All you do is use the IWD file in the special ZIP folder, and use that one on your server as opposed to the default one.

3. A new dvar for long range sniper rifles. This extends the range for all sniper rifles beyond the stock max distance. Please see in awe.cfg under Server Settings (Misc)

4. By request, we’ve brought back the Server Info Menus. 

5. All relevant dvars are now dvardef-friendly, that is, they can now be set to be map or gametype specific. This means, for example, that you can have a different MOTD for each map or gametype. Or, as another example, the Admin rules on the Server Info menu can now be set seperately for different maps or gametypes. So, you can now set different rules for different maps or gametype.

Example:

set scr_server_rule_1 "Rule 1. Dont Cheat!"
set scr_server_rule_1_mp_carentan "Rule Chinatown. Dont Hack or Cheat!"

Putting the extension mp_carentan on the end of scr_server_rule_1 makes it different only for Chinatown.

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

Full List of AWE4 Features

Those familiar with AWE4 will already recognise most of these features, but for the sake of completeness, here is a full list of the features:

•	prestige ranking enabled
•	long range sniper weapons
•	anti-sprint handler
•	anti-lag handler
•	anti-gravity dvar
•	force autoassign
•	death icon handler
•	hardcore persistent minimap option
•	gametype delay
•	hit icon handler
•	drop weapons handling (fully configurable)
•	server messages
•	welcome messages
•	server logo: text and shader
•	bloody screen
•	pain and death sounds
•	anti-camper
•	anti-bunny hopper, and anti-jump shoot
•	dead body handling
•	team killing handler
•	spawn protection
•	health bar
•	health packs (if stock health regen isn’t used)
•	bleeding out
•	firstaid packs
•	map turret handling
•	end of map voting system
•	map rotation handling
•	team status hud
•	weapon damage mod
•	weapon pools
•	c4 and claymore disarming
•	swap teams at end round
•	laserdot crosshairs
•	crosshairs handling
•	enemy crosshairs handling
•	rank and crosshair names handling

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

AWE4 Custom Gametypes

In addition to the stock gametypes, we added the following custom gametypes to enhance your server’s experience:

•	Capture the Flag
•	Capture the Flag (back)
•	Hold the Flag
•	Capture and Hold
•	Conquest TDM
•	Retrieval 
•	VIP

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

AWE4 Modes

Here are some brief notes on what each AWE4 mode does:

1. AWE4 PowerRank

With PowerRank, you have persistent custom classes, just like in the stock game. Unfortunately, you cannot transfer your stock game custom classes over to AWE4, but PowerRank custom classes are exactly the same, so it wont take long for you to re-create them for AWE4.

In order to get the custom classes working in a mod, everyone starts at level 54 instantly. 

It takes approx. 30 seconds to rank up to level 54 (Commander) starting from any rank, even if it’s the first time you visit a PowerRank server.
 
Then, you can create your own custom classes, and they are persistent just like in the stock game. They will work on any AWE4 PowerRank server.

You can even edit your classes ingame now. No more having to create them offline.

They do, however, take a full map rotation to take effect (we tried hard to overcome this, but it required more menus than the game would allow us to include in the mod.ff. So, sorry about that).

There is a fairly comprehensive weapons and perks limiter with PowerRank. Essentially, it works by not unlocking those weapons, attachments or perks which you don’t want on your server.

It is not possible to “lock” weapons, perks or attachments for the “default” classes. So, the internal code replaces or simply removes those things you don’t want.

Although you reach what is the “top” rank in PowerRank, ranking still carries on, as we activated Prestige mode in AWE4. This means you carry on to get the 10 Prestige ranks, just like in the console version of the game.

Please see power_rank.cfg for a full list of  dvars and settings for this game play mode.

Also, take special note of the dvar for editing weapon, perk and attachment unlocks. There is a small info readme just above it. Read it, and read it again so you understand how it works properly.

NB: This latest version of AWE4 3.0.2 has fixed the server overflow problem. However, if you are still experiencing it, please see the special Appendix 3 at the end of this document.

2. AWE4 Modwarfare

The very first releases of AWE4 were based on Infinity Ward’s stock mod – modwarfare. This mod was designed by the developer’s to give mod servers all weapons and perks unlocked all at once.

It was conceived because, when the game first came out, there were no ranks on modded servers. As such, it would have been impossible to rank up and get weapons and perks unlocked. Hence, IW made the modwarfare mod, with a fully configurable class, weapon, and perk limiter, so that all weapons would be reachable.

The AWE4 team expanded on this mod, and added features which AWE had become known for from previous Call of Duty games.

We even expanded and added features not originally included in the original modwarfare mod. For example, we added:

OverKill Perk – this is not in the original modwarfare mod. You can only find it in AWE4

Double Camo – IW did not include the option for camo overlays on weapons in their modwarfare mod. We made it happen.

Please see modwarfare.cfg for a full list of dvars and settings for this game play mode.

3. AWE4 Force Weapons

Pervious releases of AWE for other Call of Duty games had the option for “forcing” certain weapons onto a player. This was ideal for servers which wanted to run sniper-only, or pistol-only (for so-called “bash” servers). So, we took the basic idea from Old School, and developed it into a fully configurable mod, which you can choose which weapons each player gets.

There is an option to have different weapons per team, so not every team gets exactly the same.

There is an option to choose which perks a player spawns with (this does not work on a per team basis).

Please see forceweapons.cfg for full details of dvars and settings for this game play mode.

4. AWE4 Stock Ranking

If you enable this mode, you start at Private (level 0) and rank up, gaining XP points, and getting unlocks as you go.

For fans of the stock gameplay, this is ideal. However, now you can add the extra features of AWE4 to enhance your server’s experience.

There is no separate config file for this game play mode.

5. AWE4 OldSchool

IW did not include oldschool in their modwarfare mod, so we put it back in. For fans of Quake-style gameplay, this is a blast from the past.

We also added extra flexibility by including similar dvars and settings to our forceweapon mode. Hence, you can choose which weapons a player spawns with. There is even an option to disallow perk pickups altogether, so if you don’t like the oldschool perks, you can have them off.

Works on all stock maps, but be careful with custom ones: not everyone included oldschool in their maps.

Please see oldschool.cfg for full details of dvars and settings for this game play mode.

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

Making a Custom Clan Logo

To make your custom clan logo, you need to edit logo01.iwi (in z_awe4.iwd).

You will need to convert this to DDS, so you will need converters to do this. These can be obtained here:

http://tallys-world.com/downloads/cod4_converters.ZIP

You will also need a DDS plugin for your image editor (Photoshop, Paintshop Pro, or GIMP).

A PS one can be obtained here:

http://developer.nvidia.com/object/photoshop_dds_plugins.html

And a Paintshop Pro one here:

http://www.tallys-world.com/downloads/Paintshop_DDS_Plugin.zip

For a tutorial on "how to create a custom logo", see my tutorial on it here:

http://forums.raidersmerciless.com/showthread.php?t=2178

Once you have your logo, convert the DDS file back to IWI with the converter obtained in the link above.

You now need to place it in z_awe4.iwd\images folder.

Set these dvars to make your custom logo show:

set awe_use_awe_logo 0
set awe_use_custom_logo 1

This turns off the awe logo, and your one on.

You can set the dimensions of the logo with these settings:

set awe_custom_logo_width ?? <---- make this what you want
set awe_custom_logo_depth ?? <---- make this what you want

NB: please do NOT edit the AWE4 logo file (logo00.iwi). We will be upset if you get caught doing that. Please respect our wish not to alter that file.

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

Mod Setup and Use

AWE4 no longer uses 2 IWD files. What was the server side IWD is now in the mod.ff file.

By request, I have returned to giving admin’s the option to run with no “red hit blips” on the minimap. Hence, you will need to choose which download you want: with “red hit blips”, or without.

Place both mod.ff and z_awe4.iwd in your mod folder on your server.

Place both files also on your redirect space for download.

Edit your servers startup command line to something like this:

C:\Program Files\Activision\Call of Duty 4 - Modern Warfare\
iw3mp.exe +set fs_game mods/powerank +set dedicated 2 +set net_ip X.XX.XX.XX +set net_port 28960 +exec mp-server.cfg +set sv_punkbuster 1 +map_rotate

NB: Do not take this command line as Gospel. It assumes many things, such as the install path being same as the games’ default install path. It’s just a guide.

For comprehensive server setup, please see this tutorial at the support site:

http://forums.raidersmerciless.com/showthread.php?t=3181

NB: In the download ZIP file, there are 2 others folders – ‘configs’ and ‘docs’. These should NOT be used as sub-directories within your mod folder (technically called an fs_game folder). They are for convenience sake only.

When setting up your mod server, take all the config files OUT of the ‘configs’ folder that came with the ZIP file, and place them next to the mod.ff file and z_awe4.iwd file on your server.

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

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

Standardization of AWE4 Servers for Ranking Purposes

In order for a player’s rank to be persistent across AWE4 servers, it is recommended that all server admins name their AWE4 fs_game folder ‘awe4’

This will mean that a player will be able to visit many different AWE4 server’s and still have his rank maintained.

There is only 1 problem with this that I foresee – that a particular server admin is running a different version of AWE4. This will mean a visiting player may not get his rank persistent on that particular server.

In order to work-around this, I recommend that server admins place the version number in their server info (do not name the fs_game folder according to your mod version as, obviously, this will defeat our point), so that a player is able to tell what version that particular server is running.

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

Appendix 1

Conquest TDM: An Overview

Conquest TDM is a gametype developed by Slyk (mapper) and Innocent Bystander (code) of After Hourz Gaming, for vCOD and UO.

It is a variation on MOH:SpearHeads “tug-of-war” gametype. 

There are attackers and defenders. When the match starts, the attackers must capture objectives which are dotted around the map. The objectives have to be captured sequentially. You cannot jump around and capture whatever objective you like.

There are “primary” objectives, but once these have all been secured, “bonus” objectives become active, and the teams can gain more points for securing these objectives.

As the “primary” objectives are captured by the attackers, the defenders are forced to spawn further and further back on the map (this does not apply to “bonus” objectives). However, if the defenders take back those objectives, the attackers will then also be forced to spawn further and further back on the map.

The custom spawn system used in CNQ is unlike any other used in a COD game. I have no idea what max client level it will support, but I know its ok with 32 players. Any higher than this, and telefragging might start to occur so please be advised and exercise caution.

Stock Maps Supported

Crossfire
Strike
Pipeline
Overgrown

Custom Maps Supported

Prypriat  by zeroy

Conquest requires large maps, hence finding maps which are right for it will be few and far between. 

I have decided at this stage to avoid putting out any custom map support for Conquest, as I wish to see how it plays out on these stock maps when released to the public.

After that, I’ll do some add-on packs, and write a comprehensive tutorial so others can adapt maps to it themselves.

Its not an easy gametype to adapt, but once you grasp the principles, its not very difficult to do

CNQ Special Features:

CNQ Campaign Mode: 

This gameplay mode essentially determines who the attackers and defenders are on map rotation. When set, the winners of the last map/round become attackers next map. This prevents one particular team being the attackers/defenders each map.

On the first map in a CNQ rotation, the attackers/defenders are defaulted to Allies as attackers, and Axis as defenders. This setting overrides the roles set by a map maker, and set in the level GSC file (for stock maps, attackers are usually Axis). Hence, if campaign mode is not set, then Allies will always be the attackers.

To activate Campaign mode, set this dvar:

set scr_cnq_campaign "1"

CNQ Attacker/Defender Role Swap:

This is essentially “campaign mode per round” (if you play rounds that is) and works exactly the same as campaign mode, only per round – the winner of the last round will be the attackers, and conversely the losers will be defenders.

To activate this, set this davr:

set scr_cnq_swap_roundwinner "0"

Some CNQ FAQs:

The spawning is pretty chaotic at times

Conquest spawns are in blocks, which match each particular objective. Hence, as a particular objective is taken by the enemy, respawning can only take place at that block. This can sometimes lead to over crowding at that particular block.

It is therefore advised that either the playerrespawn delay or the waverespawn delay is used. This will give those ahead of you time to depart from the respawn area for that particular objective.
The game should end if one team flips a bonus switch 
Though not the default setup, this is easily accomplished. In your server config, set "scr_cnq_team_bonus_points" to be a the same number as scr_cnq_scorelimit (500 by default). This way when a team flips the bonus 500 points are awarded and thus the game will end immediately. 
Players should receive points for taking objectives. 
Set "scr_cnq_player_bonus_points" and "scr_cnq_player_objective_points" (both 0 by default) in your server config to a value you want assigned for doing so. Note that when a player recieves points it also counts toward the team score, so you may want to set "scr_cnq_team_bonus_points" and "scr_cnq_team_objective_points" to 0 so that points aren't doubled up. 
The teams should start in the middle of the maps, not at one end. 
Set "scr_cnq_initialobjective" to be the number of the objective you want teams to start at. For example on Strike, if you want the teams to start so that the Allies have the South Gate objective and the Axis the Hotel objective, you would set this value to "2" (the second objective in progression). 
The game values TDM-style killing too much, you should make it objective-only based. 
This was a design intent, but you can modify the game very easily to place MUCH more emphasis on objectives than killing. Simply set "scr_cnq_team_bonus_points" and "scr_cnq_team_objective_points" to higher values than stock (currently 25 and 10, respectively). You may also want to adjust "scr_cnq_scorelimit" to a higher number to compensate for the increases in points being awarded.
=============================================================

Appendix 2

Retrieval Overview

For those of you who don’t know what Retrieval is, it is a gametype which Infinity Ward (Chad Grenier to be precise) wrote and included in vCOD and UO.

In this gametype, there are attackers and defenders. Attackers have to retrieve a VCR and VCR cassetter objective from the defenders. These objectives are randomly spawned each map/round, so there location is always a little unpredictable.

The attackers then have to returned these objectives to their base camp (indicated on the minimap with a blue square).

If the attackers fail to retrieve both objectives, the defenders win the round/map with default “win” points.

If an attacker is carrying an objective and is shot, a defender can return the objective to its original location in much the same way as in CTF. However, there is a progress bar which can be set to any given amount. This is designed to slow down both retrieval and return of an objective. The progress bar works on a proximity basis, much the same way as in DOM.

If an admin wants instant retrieval or return, simply set this:

set scr_re_captime "1"

The spawning for Retrieval uses SAB spawning, so there are start spawns, after which players will spawn on their teams relevant default SAB spawn point.

Stock Maps Supported:

Strike
Citystreets
Crossfire
Pipeline
Overgrown
Farm
Bloc
Bog
Backlot
Convoy
Crash
Winter Crash
Chinatown
Creek
Broadcast

There are now a significant number of custom maps out which support this gametype. Please check the map for its compatability.

Retrieval Special Features:

RE Campaign Mode: 

This gameplay mode essentially determines who the attackers and defenders are on map rotation. When set, the winners of the last map/round become attackers next map. This prevents one particular team being the attackers/defenders each map.

On the first map in a RE rotation, the attackers/defenders are defaulted to the roles set by the map maker. Hence, if campaign mode is not set, then the roles will always be set by the maps level GSC file.

To activate Campaign mode, set this dvar:

set scr_cnq_campaign "1"

RE Attacker/Defender Role Swap:

This is essentially “campaign mode per round” (if you play rounds that is) and works exactly the same as campaign mode, only per round – the winner of the last round will be the attackers, and conversely the losers will be defenders.

To activate this, set this davr:

set scr_re_swap_roundwinner 1

RE Elimination Mode:

If  roundlimit is set to more than 1, and numlives is set (value of 1 or higher), Retrieval functions as a true round-based gametype.

If the enemy team are eliminated, or forfeit by leaving the server, the winning team are awarded default points of twice the value of  scr_re_objective_points.

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

Appendix 3

PowerRank: Server Command Overflow Problem

NB: This was written for the first 2 releases of AWE4 Multimode. The latest version – 3.0.2 – has a “fix” for the problem. Please make sue you have the latest version installed on your server. 

However, I will keep this Appendix just in case others still experience the problem.

The COD4 MP server engine stores lots of server commands in a cache. These commands are often only dealt with at the end of a game, when the map rotates.

Many of these server commands are writes to the clients’ mpdata file. For example, custom classes and unlocks are only written to a clients’ mpdata file when the map rotates. It is only at that stage that the data becomes persistent.

If  the cache which stores all these pending server commands gets filled up before the map rotates, a client will receive an error message saying that a “reliable command was cycled out”.

For example, this happens sometimes when a client connects to a server, downloads a custom map, and the server doesn’t have any free cache in order to store the server commands needed for that client.

As the client needs to receive a write to his mpdata file which tells the game he has that map now (this is how the game “knows” that client has that particular map and so it wont download it to him again), the server can only kick him, as it cannot finish dealing with that clients’ persistent stat.

My PowerRank mod stacks hundreds of server commands during the process of ranking a player up, and all of this data is stored in the server cache pending the end of the game, and a map rotate.

Now, during a game, info such as new client XP, scores and challenges completed, are also server commands which the game must “store” somewhere, that same cache which holds hundreds and hundreds of pending server commands is used to also store a current game’s stats.

Hence, as PowerRank fills up the cache too quickly with too many pending server commands, a single game action like a kill or capturing an objective is enough to tip the game over, as the server runs out of cache memory.

Why Does COD4 Have Insufficient Cache Memory?

This is a good question! Essentially, the problem is caused by COD4 being built to ideally run on 2 or more processors, not 1, and many game servers (so-called "clan" servers) are only allocated one CPU to each customer.

It seems that server cache dealing with pending server commands is doubled for Core Duo, or Quad Core servers. In likelihood, each CPU has an allocation of server cache, and this is why duo or quad core servers don’t experience the problem as much as rented game/“clan” servers.

Because of this, Admins who rent dedicated server boxes, with Core Duo, or Quad Core server blades can run PowerRank far more effectively than those that rent their servers, as the game has more cache memory in which to store pending server commands, and current gameplay commands.

My "Solution" to the Problem

I have spent considerable time working on a way around the problem of server command overflow for people with rented “clan” servers. 

Basically, I’ve now converted all the server dvars to the dvardef method, which means you can set something on or off specifically for a map, a gametype, or both. 

You can now set a games timelimit up differently for different maps, and PowerRank can now be set to only rank up on a specific map instead of all of them, and you can set the timelimit for that "ranking map" (as I call it) to about 45 seconds, whereas you can keep your timelimits to your usual settings on the other maps.

For Example (WAR gametype):

(in awe.cfg)
set awe_power_rank 0
set awe_power_rank_mp_shipment 1

(in healthcenter.cfg)
set awe_spawnprotection 0
set awe_spawnprotection_mp_shipment 45
set awe_spawnpro_freeze 1

(in gametypes.cfg)
set scr_war_scorelimit_mp_shipment .60
set scr_war_timelimit 20

That gives you 20 minutes WAR (TDM) on all maps except mp_shipment, PowerRank is off for all maps except mp_shipment, as is spawnprotection (and no one can move as they are frozen until the map is over).

This will restrict all the heavy burdening on your server's cache memory resources to mp_shipment, where everyone who hasnt ranked up will be able to safely do so without crashing your clients out.

During that timelimit, everyone is frozen (via the spawnprotection code), so there is no gameplay, and so the server can store its pending server commands and rank everyone up without needing to store any new server commands like updating scores or giving new XP to players. 

I would suggest you pick a stock map that you don’t play much - something like mp_shipment (unless of course, you like that map, in which case pick another map). This will mean that there also will be no downloading of a custom map during that time, as downloading causes extra pending server commands, and this is what we are trying to cut down on.

You can, if you like, set this "ranking map" to rotate every 4th or 5th map, thus making it more convenient for those players who haven’t ranked up to level 55 yet, and they wont be stuck with the default classes for too long. But, this is an idea which is entirely up to you.

I know this is not an ideal solution. It will be tiresome for players who have already ranked up to have to sit there frozen for 40 seconds each time the "ranking map" pops up, but it will prevent the server command overflow from happening, and new players joining your server for the first time wont be shoved off and disconnected anymore.

NB: As stated above, this is for rented game servers only. This is not something you will need to do if you rent a dedicated server box.

-----------------------------------------

NB version 3.0.2: I worked out a way to handle the pending server commands, which eliminates the problem entirely. Essentially, I built my own cache and store the pending server commands there instead of the server cache.

I am now working on a way to implement this method so as to stop the command overflow problem affecting downloads of custom maps.

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

Credits

Peluski – for his idea on how to sequence ranking up made my early attempts at PowerRanking finally work. I had already worked out how to rank up to level 55, it was just that I got errors because I didn’t realise at that time that it had to be sequenced in a certain order. Peluski gave me the final “key” to getting it to work. 

Also, his code for disarming C4/Claymores (apparently, he based it on t3chn0r’s code, so a mention should be made to him), and for giving me the basic idea for PowerRank. Also, he’s brilliance in mastering the nightmare which is the new menu coding language. He was the one who got Overkill working where I had failed.

AntnoTeaminMe – his method for custom persistent stats is used in PowerRank

KILL3r – with his permission, I used his script for the long range sniper weapons.

AWE4 is especially dedicated to the following people:

Bell – it’s his creation really, we just carried the mod forward.

Mike Nomad – for RGN, and all his support. We couldn’t do it without him

Nedgerblansky – for taking over AWE when bell retired, and all his contributions to it (lots of code in AWE4 is his).

Worm – for his inspiration, friendship, and some code used in AWE4.

{PST}Joker –  for his support, code, and friendship.

Marc (aka "Wildcard") – creator of ACE mod (some code in AWE4 is his).
NB: Special mention of his firstaid and bleeding code must be made, as this has now been added to AWE4 since version 2.0. Excellent work! 

Sounds – for initial help with some tweaks, ticker-tape style hud messages, and getting strings compiled (I include his name here as it’s the right thing to do, but the guy is a scumbag. Running cracked servers, and developing hacks for PunkBuster is about as wrong as you can get in the gaming community).

Pointy – whose CTF mod for COD2 gave me the idea for dynamically spawning trigger_radii and custom spawn points (although, I suspect Pointy himself took the method from Pvt Parts in his VS-UK “Total War” mod).

All the above (with a couple of noted exceptions) make the COD modding community a "fun" place to live and breath. If it wasn’t for people like them, I doubt I’d be here anymore.

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