Random Item Placement v1.0
Mutator for UT2004
Created by Mysterial (mysterial@comcast.net)
3/28/04

This mutator spawns all the pickups in the game in random places. After they get picked up, new ones are spawned in new random places.

To install the .ut2mod version, open RandItemPlacement.ut2mod, which should open the UT2004 installer.
To install the .zip version, extract it to your UT2004\System folder. By default that's C:\UT2004\System

If you want to set up a server with this mutator, make sure to add ServerPackages=RandItemPlacement to the [Engine.GameEngine] section of your UT2004.ini. (NOTE: If you have installed the UT2004 patch you do not need to do this)

This mutator has a configuration menu. The options you can change are:
-Item Probabilities: Clicking this button will bring up a menu that allows you to input the chance that an item from each of the six groups will be selected when an item is chosen to be spawned. The value is treated as a ratio to the sum of all chances. (e.g. WeaponChance * 100 / SumOfAllChances is the % chance a weapon will appear)
-Initial Rand. Only: If checked, the items are only randomized at the start of the level, and as they are picked up, will respawn in the same locations the normal amount of time later. Weapons will even get PickupBases just like in a normal level too! :)
-Bot Search Radius: When searching for items, bots will search this many units in all directions for the best item. 0 will turn off this special bot AI. Too high is actually worse than too low, as it will cause all the bots to gravitate towards a faraway pickup (usually a superweapon) that they have no chance of getting to before somebody else. Values between 1500 and 3000 are generally best. Also keep in mind that larger values use more processing.
-Max Items Percent: the maximum number of items that can be on a level at once, expressed as a percentage of the original level's item count. For example, setting this to 110 will make the max # of items 110% (1.1x) the amount of items that were on the level originally.
-Spawn Time: a new item will be spawned every this many seconds, unless the max # of items is already in the level. Default is 0.2; don't set it too much lower or your processor will pay for it.
-Inv. Spots Only: if checked, items will only spawn in places where items were in the original level.
-Item Lifetime: Items stay on the map for this many seconds before they are destroyed. If 0, items will not be destroyed, and instead the Max # of items allowed will be increased every time 5 seconds goes by without an item being picked up.
-Item Explode Chance: Percentage chance that items, instead of doing the harmless particle un-spawning effect, will instead explode painfully and damage any player about to pick it up.
If Item Explode Chance is > 0, you will be able to click Configure Explosion to access the following extra options:
-Radius: Explosion radius (in Unreal units). The shock combo is 275, if you need a reference.
-Damage: The amount of damage done to somebody at the center of the explosion.
-Momentum: The force the explosion has.
-Effect Detail: Higher numbers result in "fuller" explosions. Note that increasing this will rapidly increase the CPU power needed for the explosions, so it's best to balance it with regards to Item Lifetime and Item Explode Chance.

Notes:
-On levels with lots of weird places to put stuff (e.g. Phobos), the bots won't do as well, because they will have a hard time finding a good path to the items.
-Bots will 'see' items through walls. Sorry, but doing a Line of Sight check to the potentially high number of pickups near to the bot in any one cycle would take way too much processing power.
-If Item Lifetime is enabled (greater than 0), the items spawned at the beginning of the match will be given random lifetimes so that there's no mass item removal/spawning during the game. Items spawned after that will have exactly the lifetime you selected.
-Even if Weapon Stay is on, weapons will not actually stay. THIS IS NOT A BUG. This was done intentionally to prevent the level from filling up with weapons.
-If Weapon Stay is on, you will only be able to collect a weapon once. You will pass through any further pickups of the same weapon if you already have it. This was an uninintentional, but convenient side effect, as it prevents areas from being sucked dry of weapons too quickly. IT IS NOT A BUG. If you don't like this behavior, turn Weapon Stay off.
-Weapon Lockers don't get removed and the weapons inside them don't get randomly spawned (unless they exist elsewhere outside of a weapon locker). This was done so the mutator can be used in Onslaught and Assault to randomly place the more valuable pickups (powerups, superweapons, etc) without screwing the game because there's not enough weapons near the spawn points.


Thanks to Sun Dog from the UT2003HQ forums for coming up with the exploding items idea.

Feel free to discuss this mod on my forums at http://www.error691.com/mysterial/cgi-bin/forum/index.php or email me.
