# Q2Java Gamelets

barryp.map.ShuffleWeapons
Shuffle Weapons Barry Pederson

Shuffles the positions of weapons around a map at level startup. The same number of each type of weapon is retained - so for example if a map had one RocketLauncher and two GrenadeLaunchers, it'll still have one RL and two GLs, but their positions will be randomly swapped.

barryp.map.RandomWeapons
Random Weapons Barry Pederson

Randomly changes the class of each spawned weapon at level startup. It might be a bit -too- random, in that a map with no BFGs might end up having several. Mostly written as a simple demo of how a gamelet can manipulate the DOM document that describes a level's initial starting info.

barryp.map.MapGamelets
Map Gamelets Barry Pederson

At level start, this gamelet looks in the level DOM document for tags of the form: <gamelet class="xxx" alias="yyy/>, and for each one, loads the named gamelet with the specified alias. When the level ends, it unloads these gamelets. Great for associating certain gamelets with certain maps.

barryp.map.MapCVars
Map CVars Barry Pederson

At level start, this gamelet looks in the level DOM document for tags of the form: <cvar name="xxx" value="yyy/>, and for each one, sets the named cvar to the specified value. When the level ends, it restores the changed cvars to their original values.

barryp.map.NoBFG
No BFGs Barry Pederson

Prevents BFGs from being spawned, by stripping them out of the DOM document that describes the map at level start time.

barryp.map.XMLMaps
XML Maps Barry Pederson

Attempts to read map information from an external XML file named q2java/maps/(mapname).xml - if it can't find one, it creates a new XML file based on the info embedded in the maps themselves, and writes it to q2java/sandbox/(mapname).xml. Admins can easily edit those XML files and move them to the "maps" directory.

barryp.misc.GlubGlub
Glub Glub Barry Pederson

Prevent players from chatting while underwater by changing their messages to "..glub...glub..glub.." (demonstrates print message filtering)

Q2Java homepage