Had a player today wanting to know how to add a new weapon to the game, told him I would post a simple Tutorial, so here it is.. If I forgot something, please Devs, let me know...
---------------------------------------------------------------------------------------------------------------
Tutorial: Thumper
Game: Legions Overdrive
Author: Defender
Email: jackhemphill66@aol.com
Install Level: Easy
Files to Edit: 5
Last updated Mon Feb 3, 2014 8:34 pm
---------------------------------------------------------------------------------------------------------------
This tutorial makes a simple Thumper weapon, that fires two grenade projectiles each time the gun fires.
The projectiles have high areaImpulse, that knock players around.
To add new weapons, you will need to edit just a few .cs files.
I recommend you download notepad2 or notepad++, both work nicely for me and have line count.
Files To edit:
loadouts.cs
BasePlayer.cs
Sentinel.cs
Raider.cs
Outrider.cs
New file to add:
thumper.cs
File subfolder locations:
server\game\loadouts.cs
server\game\dataBlocks\preload\BasePlayer.cs
server\game\dataBlocks\players\
server\game\dataBlocks\weapons\
---------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------
Step #1
// ------------------------------------------
// loadouts.cs --- server\game\loadouts.cs
// ------------------------------------------
Go down to line 68, after
$LOWeapon[9] = "GrenadeLauncherHeavy";
Add
$LOWeapon[10] = "Thumper";
change and move RepairGun just below the new Thumper weapon
$LOWeapon[10] = "RepairGun";
To
$LOWeapon[11] = "RepairGun";
This is how it should look like below..
// These are the names of the datablocks
$LOArmor[0] = "OutriderPlayer";
$LOArmor[1] = "RaiderPlayer";
$LOArmor[2] = "SentinelPlayer";
$LOGrenade[0] = "BoostGrenade";
$LOGrenade[1] = "FragGrenade";
$LOGrenade[2] = "EmpGrenade";
$LOWeapon[0] = "Rifle";
$LOWeapon[1] = "Chaingun";
$LOWeapon[2] = "RocketLauncher";
$LOWeapon[3] = "MortarLauncher";
$LOWeapon[4] = "GrenadeLauncher";
$LOWeapon[5] = "Plasma";
$LOWeapon[6] = "Blaster";
$LOWeapon[7] = "SkyboltLauncher";
$LOWeapon[8] = "GrenadeLauncherSpecial";
$LOWeapon[9] = "GrenadeLauncherHeavy";
$LOWeapon[10] = "Thumper"; // Mod <=========================================
$LOWeapon[11] = "RepairGun";
---------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------
Step #2
// ------------------------------------------
// BasePlayer.cs --- server\game\dataBlocks\preload\BasePlayer.cs
// ------------------------------------------
If you want all players to use the new weapon, just add to BasePlayer.cs
After the GrenadeLauncher, about line 37 in BasePlayer.cs add.....
maxInventory[GrenadeLauncher] = 1;
maxInventory[GrenadeLauncherAmmo] = 16;
// ADD
maxInventory[Thumper] = 1;
maxInventory[ThumperAmmo] = 16;
If you don"t want all players to use the new gun,
Edit Sentinel.cs Raider.cs Outrider.cs in server\game\dataBlocks\players\
Set to 0, for each of the armors you don"t want using the new weapon.
maxInventory[Thumper] = 0;
maxInventory[ThumperAmmo] = 0;
---------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------
Step #3
// ------------------------------------------
// weapons folder --- server\game\dataBlocks\weapons\
// ------------------------------------------
1# Make a Copy the grenadeLauncher.cs, then past it back in to the weapons folder..
2# Rename the file to Thumper.cs
3# Copy all the code in the next post below, in to the new Thumper.cs, and click save.
Start your game up and host a game, if your new gun is in the game and working everything must have went ok.
---------------------------------------------------------------------------------------------------------------
Tutorial: Thumper
Game: Legions Overdrive
Author: Defender
Email: jackhemphill66@aol.com
Install Level: Easy
Files to Edit: 5
Last updated Mon Feb 3, 2014 8:34 pm
---------------------------------------------------------------------------------------------------------------
This tutorial makes a simple Thumper weapon, that fires two grenade projectiles each time the gun fires.
The projectiles have high areaImpulse, that knock players around.
To add new weapons, you will need to edit just a few .cs files.
I recommend you download notepad2 or notepad++, both work nicely for me and have line count.
Files To edit:
loadouts.cs
BasePlayer.cs
Sentinel.cs
Raider.cs
Outrider.cs
New file to add:
thumper.cs
File subfolder locations:
server\game\loadouts.cs
server\game\dataBlocks\preload\BasePlayer.cs
server\game\dataBlocks\players\
server\game\dataBlocks\weapons\
---------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------
Step #1
// ------------------------------------------
// loadouts.cs --- server\game\loadouts.cs
// ------------------------------------------
Go down to line 68, after
$LOWeapon[9] = "GrenadeLauncherHeavy";
Add
$LOWeapon[10] = "Thumper";
change and move RepairGun just below the new Thumper weapon
$LOWeapon[10] = "RepairGun";
To
$LOWeapon[11] = "RepairGun";
This is how it should look like below..
// These are the names of the datablocks
$LOArmor[0] = "OutriderPlayer";
$LOArmor[1] = "RaiderPlayer";
$LOArmor[2] = "SentinelPlayer";
$LOGrenade[0] = "BoostGrenade";
$LOGrenade[1] = "FragGrenade";
$LOGrenade[2] = "EmpGrenade";
$LOWeapon[0] = "Rifle";
$LOWeapon[1] = "Chaingun";
$LOWeapon[2] = "RocketLauncher";
$LOWeapon[3] = "MortarLauncher";
$LOWeapon[4] = "GrenadeLauncher";
$LOWeapon[5] = "Plasma";
$LOWeapon[6] = "Blaster";
$LOWeapon[7] = "SkyboltLauncher";
$LOWeapon[8] = "GrenadeLauncherSpecial";
$LOWeapon[9] = "GrenadeLauncherHeavy";
$LOWeapon[10] = "Thumper"; // Mod <=========================================
$LOWeapon[11] = "RepairGun";
---------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------
Step #2
// ------------------------------------------
// BasePlayer.cs --- server\game\dataBlocks\preload\BasePlayer.cs
// ------------------------------------------
If you want all players to use the new weapon, just add to BasePlayer.cs
After the GrenadeLauncher, about line 37 in BasePlayer.cs add.....
maxInventory[GrenadeLauncher] = 1;
maxInventory[GrenadeLauncherAmmo] = 16;
// ADD
maxInventory[Thumper] = 1;
maxInventory[ThumperAmmo] = 16;
If you don"t want all players to use the new gun,
Edit Sentinel.cs Raider.cs Outrider.cs in server\game\dataBlocks\players\
Set to 0, for each of the armors you don"t want using the new weapon.
maxInventory[Thumper] = 0;
maxInventory[ThumperAmmo] = 0;
---------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------
Step #3
// ------------------------------------------
// weapons folder --- server\game\dataBlocks\weapons\
// ------------------------------------------
1# Make a Copy the grenadeLauncher.cs, then past it back in to the weapons folder..
2# Rename the file to Thumper.cs
3# Copy all the code in the next post below, in to the new Thumper.cs, and click save.
Start your game up and host a game, if your new gun is in the game and working everything must have went ok.
Last edited: