Beginner's Guide to Table Editing

From Red Faction Wiki
Jump to navigationJump to search
Rededitlogo1.jpg Tutorial: Beginner's Guide to Table Editing
Editing Main Page Written by: trigger

NOTE: This tutorial was originally posted on redtechnologies, which is no longer available.

Getting Started

To begin with you will need the VPPBuilder32. Next you need to set up a mod folder for the mod you are going to make. Go to your Red Faction folder and open the mods folders which is already there and create a new folder called "railmadness". NB If you use the same naming conventions as I have, it will cause less confusion for you in future references to these files/names. So you should now have a new folder in your mods folder;

c:\games\RedFaction\mods\railmadness


This is the folder that will contain all the files for your mod. You should also create another folder to work from. Make sure it is outside of your Redfaction folder and call it "Working". Within your working folder make another folder and call it TABLES. Copy the tables.vpp from you redfaction folder into the TABLES folder;

C:\..wherever..\Working\TABLES\tables.vpp


Now to edit some tables. Open up the tables.vpp that you copied to your Working folder. Do not edit the actual game vpp: if you make a mistake and cannot correct it you will have to re-install. Inside the tables.vpp you will notice a lot of .tbl files. Select the game.tbl and extract it to the 'TABLES' folder you created within your 'Working' folder.

The Game Table

To open up the .tbl file you will need a text editing program such as notepad. Once you have the game.tbl open you may realize that the code is all variables. These variables are what can be changed to 'mod' your game.

First change the

$Max Entity Jump Height: 6.00

This increases your jump height from 1.33 metres to 6 metres.

The

$Default Player Weapon:

This variable defines what weapon will be the default weapon. The following list of weapons can be used for this variable;

"shotgun"
"Control Baton"
"Automatic Shotgun"
"Sniper Rifle"
"Rocket Launcher"
"Assault Rifle"
"Machine Pistol"
"rail_gun"
"heavy_machine_gun"
"scope_assault_rifle
"shoulder_cannon"
"Flamethrower"
"Riot Shield"

If you wish to keep to the same naming/file conventions. The shotgun has been made default weapon.

And you can also have your own menu music. Try using 'two_ton_heavy_thing.wav' for the

$Main Menu Music Filename:

This wav file is already in your games music.vpp. To see all the other sound files you have to work with you can open the audio.vpp and the music.vpp.

Save your game.tbl.

Now to test your mod. Open up a new file in your VPPBuilder and drag the new game.tbl into it. Or you can click on the add button and navigate your way to the file. Save the file to your mod folder and call it railmadness.vpp;

C:\games\redfaction\mods\railmadness\railmadness.vpp


To run the mod you will need to go to the Setup options in the Red Faction launcher. Go to Setup, click on the misc tab and type in the following command line;

-mod railmadness


The Weapons Table - Changing the Bullets Fired

Now to edit the weapons.tbl. Extract the weapons.tbl from your tables.vpp and save it to your 'TABLES' folder. What you will do is give the shotgun the rail attributes when firing. This gives quite an interesting effect on the secondary fire ... :).

Open up the weapons.tbl in your text editing program and find the Rail Gun variables. Within the variables look for the following code;

$Launch:
"Rail Fire 1"
$Alt Launch:
"Camera Change"
$Launch Fail:
"Rail Fail"
$Fly Sound:
""
$Impact Sound:
"default" "Gun Hit Default"
$Impact Sound:
"flesh" "Gun Hit Flesh"
$Impact Sound:
"metal" "Gun Hit Metal"
$Impact Sound:
"rock" "Gun Hit Rock"
$Impact Sound:
"water" "Medium Water Splash"
$Impact Sound:
"glass" "Gun Hit Glass"
$Near Miss Sound:
"Rail Flyby"
$Near Miss Underwater:
"Glock Alt Launch"
$Impact Vclips:
("rail_rifle_hit")
$Impact Vclips Radius:
(1.0)
$Damage Radius:
0.0
$Sticky:
false
$Glow:
false
$Muzzle Flash Light:
true
+Inner Radius:
3.0
+Outer Radius:
6.0
+Color:
{192,192,255}
$Scorch Bitmap:
"bullethole01_A.tga"
$Scorch Size:
<0.4, 0.4, 0.4>
$Piercing:
true
+Piercing Power:
100.0
+Ricochet Angle:
180.0
+Ricochet Size:
<0.5, 0.5, 0.5>
$Multi BBox Size Factor:
0.75

Copy the code above from the rail and then go back to the same point of code in the shotgun variables. I would not recommend copying the code directly from this webpage. Some editors will copy more than just the text and your mod will not run. Copy all your code from the .tbl files. The following code shows where to paste your rail variables into the shotgun variables;

$Damage:
40
$Damage Multi:
35
$Lifetime:
0.5
$Homing:
false
PASTE THE RAIL_GUN CODE IN HERE
// ----------------------------------
$Name:
"Sniper Rifle"

Now to test again. Open up the 'railmadness.vpp' that is in your redfaction\mods\railmadness\ folder and add the weapons.tbl that you just edited. Save it and go test. The mod commandline in your setup options (-mod railmadness) will stay there until you remove it.

The Weapons Table - Changing the Rate and Amount of Bullets Fired and the Reload Time

Open up your weapons.tbl file. Go back to the shotgun and find the following lines of code. The list on the far right describes what these variables are for.

$Max Ammo:
48 48
// Max ammo
$Ammo Type:
"10 gauge buckshot"
// Shotgun Ammo type
$AI attack range:
15.0 15.0
// Single play function
$Clip Size:
8 8
// Shotgun Clip size
$Clip Reload Time:
2.0
// Reload time in seconds
$Mass:
0.2
// The bullets mass
$Velocity:
275.0
// The speed bullet travels
$Fire Wait:
1.50
// Delay (seconds) before being able to fire
$Alt Fire Wait:
0.225
// Delay before being able to use secondary fire
$Num Projectiles:
4
// Number of projectiles
$Spread Degrees:
3.0
// Accuracy for SP AI
$Spread Degrees Multi:
2.75
// Accuracy
$AI Spread Degrees:
5.0 6.0
// Accuracy for SP AI
$Alt Spread Degrees:
6.0
// Accuracy for SP AI
$Alt Spread Degrees Multi:
4.0
// Accuracy
$AI Alt Spread Degrees:
10.0 8.0
// Accuracy for SP AI

Now to beef things up. Below is the above code, edited, to enhance your player abilities.

$Max Ammo:
999 999
$Ammo Type:
"aluminum slug" // This is the rail_gun variable
$AI attack range:
15.0 15.0
$Clip Size:
999 999
$Clip Reload Time:
1.0
$Mass:
0.2
$Velocity:
275.0
$Fire Wait:
1.0
$Alt Fire Wait:
0.5
$Num Projectiles:
5
$Spread Degrees:
45.0
$Spread Degrees Multi:
45.0
$AI Spread Degrees:
2.0 2.0
$Alt Spread Degrees:
45.0
$Alt Spread Degrees Multi:
45.0
$AI Alt Spread Degrees:
2.0 2.0
$Damage:
5000
$Damage Multi:
5000

Save the weapon.tbl file and add it to your railmadness.vpp. Now the result of these few modifications is to say the least, a little excessive. The idea was to give you the feel for how things could be edited and swapped around. Go test and have a look at your new rail/shotgun. If you got a dinosaur like me the game may take a while to get going once you fire the gun ... just another thing to keep in mind when making mods.