MouseMod Version 24834.1 Nov 16, 2001 This document lists the changes made to base Tribes2 to implement MouseMod. MouseMod includes as part of it's load the Tricon2 admin program, an excellent server monitoring and administration program. See www.tricon2.com for more information and the latest version. ************************************************************************************************************************************************************************ Tricon Version 2.50 =============== file Tricon2Server.VL2 file TriconPackageGame.CS Description: Changes made to enable both beacons and beacon boosters to work. Beacons work when player is at 0 velocity. Submitted by: Sir SoilentG_kov ************************************************************************************************************************************************************************ Tribes 2 Version 24834.1 ==================== Mod: Team Friendly Mines ------------------------------------ Description: team friendly mines when team damage is off Submitted by: Rico Suave file: tribes2\gamedata\mousemod\scripts\weapTurretCode.cs ------------------------------------------------------------------------------------- In WeapTurretCode.cs, replace mineCheckVicinity and MineDeployed::oncollision with this.. Real easy, the functions are already together in the original script, just like this. Had it echo out "Friendly Mine" during debug.. still there, just commented out.. Right now, it depends on TD on or off. Easily modifiable to some other server variable, if you wanted to go that far. Haven't messed with too much as far as modding goes yet. This was the first thing I did, because it's the first thing I wanted. :) function mineCheckVicinity(%mine) { // this function is called after the mine has been deployed. It will check the // immediate area around the mine (2.5 meters at present) for players or vehicles // passing by, and detonate if any are found. This is to extend the range of the // mine so players don't have to collide with them to set them off. // don't bother to check if mine isn't armed yet if(%mine.armed) // don't keep checking if mine is already detonating if(!%mine.boom) { // the actual check for objects in the area %mineLoc = %mine.getWorldBoxCenter(); %masks = $TypeMasks::PlayerObjectType | $TypeMasks::VehicleObjectType; %detonateRange = %mine.getDatablock().proximity; InitContainerRadiusSearch(%mineLoc, %detonateRange, %masks); while((%tgt = containerSearchNext()) != 0) { if (%mine.team == %tgt.team && $Host::TeamDamageOn == 0) { //messageClient( %col.client, '', 'Friendly Mine.' ); break; } else { %mine.detonated = true; schedule(50, %mine, "explodeMine", %mine, false); break; } } } // if nothing set off the mine, schedule another check if(!%mine.detonated) schedule(300, %mine, "mineCheckVicinity", %mine); } function MineDeployed::onCollision(%data, %obj, %col) { // don't detonate if mine isn't armed yet if(!%obj.armed) return; // don't detonate if mine is already detonating if(%obj.boom) return; //check to see what it is that collided with the mine %struck = %col.getClassName(); if(%struck $= "Player" || %struck $= "WheeledVehicle" || %struck $= "FlyingVehicle") { //error("Mine detonated due to collision with #"@%col@" ("@%struck@"); armed = "@%obj.armed); if (%obj.team == %col.team && $Host::TeamDamageOn == 0 ) { //messageClient( %col.client, '', 'Friendly Mine.' ); return; } explodeMine(%obj, false); } } ************************************************************************************************************************************************************************ Mod: Enhanced Laser Sniper Rifle ----------------------------------------------- Description: Damage increase for headshots Submitted by: PHX-Mouse file: tribes2\gamedata\mousemod\scripts\weapTurretCode.cs ------------------------------------------------------------------------------------- Code Changes: datablock SniperProjectileData(BasicSniperShot) //mousemod rifleHeadMultiplier = 1.3; rifleHeadMultiplier = 2.75; ************************************************************************************************************************************************************************ Mod: Unlimited Cloaking Pack ----------------------------------------------- datablock ShapeBaseImageData(CloakingPackImage) //mousemod stateEnergyDrain[1] = 12; stateEnergyDrain[1] = 6; ************************************************************************************************************************************************************************ Mod: Unlimited Shield Pack ----------------------------------------------- datablock ShapeBaseImageData(ShieldPackImage) //mousemod stateEnergyDrain[1] = 9; stateEnergyDrain[1] = 1; ************************************************************************************************************************************************************************ Mod: Enhanced Tank Damage ----------------------------------------------- TracerProjectileData(AssaultChaingunBullet) //mousemod directDamage = 0.16; directDamage = 0.20; GrenadeProjectileData(AssaultMortar) //mousemod indirectDamage = 1.0; indirectDamage = 1.5; ************************************************************************************************************************************************************************ Mod: Enhanced Chaingun Damage ------------------------------------------------- datablock TracerProjectileData(ChaingunBullet) //mousemod directDamage = 0.0825; directDamage = 0.1250; ************************************************************************************************************************************************************************ Mod: Enhanced Plasma Gun Damage ---------------------------------------------------- datablock LinearFlareProjectileData(PlasmaBolt) //mousemod indirectDamage = 0.45; indirectDamage = 0.65; ************************************************************************************************************************************************************************ Mod: Enhanced Mortar Damage ----------------------------------------------- datablock GrenadeProjectileData(MortarShot) //mousemod indirectDamage = 1.0; indirectDamage = 1.5; ************************************************************************************************************************************************************************ Mod: Shocklance extended range //-------------------------------------- // Projectile //-------------------------------------- datablock ShockLanceProjectileData(BasicShocker) { // extension = 14.0; // script variable indicating distance you can shock people from extension = 20.0; // script variable indicating distance you can shock people from Mod: Pilot Eject ------------------------------------ Description: Pilot can eject people out of ships Submitted by: Badshot file:scripts/inventory.cs and scripts/player.cs Step #1 -------------------- Inventory.cs -------------------- 1a) add this to function serverCmdSelectWeaponSlot if (%client.player) if (%client.player.getObjectMount()) callEject(%client.player, %data); 1b) Add this function below the other: function callEject(%player, %num) { %veh = %player.getObjectMount(); if (!(%veh.getType() & $TypeMasks::VehicleObjectType)) return; if (%veh.getMountNodeObject(0) == %player) { %obj = %veh.getMountNodeObject(%num); if(%obj) { if (%obj.getType() & $TypeMasks::PlayerObjectType) { %obj.getDataBlock().doDismount(%obj, 0, 1); } } } else if(%num == 5) %player.getDataBlock().doDismount(%player, 0, 1); } The else if(%num == 5) part allows anyone to eject themselves by hitting 6 on thier keyboard. Only small downside to this is passengers can't directly call weapon 6 without ejecting (they can still cycle to it). The Pilot can eject any node, as long as there's someone in it, as such 1 = Pilot(self) 2 = node(1) (turreteer on turret vehicles) 3 = node(2) (passenger) 4 = node(3) (passenger) 5 = node(4) (passenger) 6 = node(5) (passenger) (note: 1-3 won't be availible to pilots if you modified your server so the pilot uses vehicle weapon cycling. I'm looking for a workaround to it). Step #2 -------------------- Player.cs -------------------- Find function Armor::doDismount and change its name to this function Armor::doDismount(%this, %obj, %forced, %Eject) //%Eject All I did was add an extra variable at the end that keeps track of if it's an eject, so it knows to apply a greater impulse Now, in the function just above the line: // Position above dismount point add this: if (%Eject) %push = 75; else %push = 1; Adjust %push = 75 to control how hard they eject. Finially at the bottom of the function, change: %obj.applyImpulse(%pos, VectorScale(%impulseVec, %obj.getDataBlock().mass * 3)); to %obj.applyImpulse(%pos, VectorScale(%impulseVec, %obj.getDataBlock().mass * 3 * %push)); One last thing, I haven't tested it with ejecting others yet (though the code looks correct), because I don't have my server where anyone else can access it, and bots aren't cooperative. So, let me know if it's not working for pilots ejecting others.