Creating Your Own Races

There are three files that need to be edited to create a new race.
racing_sr2_city.cts, racing_sr2_city.xtbl and diversion_start_sr2_city.cts.

The diversion_start_sr2_city.cts file is just used to place race locations
on the player map so that after you have created a race and forgotten about
it you can find it again later.

In my case I have added a race called Island Hop, out by Pirate Ship Cove.
Even though you can't see the race until you are close to the Sunken Pirate
Ship the icon will appear on your map when you are near it.

Just open the diversion_start_sr2_city.cts file and find the Navpoints
section. (It should be the second section right under the groups section)
Scroll down to the last entry in that section. (It should be the last entry
above the 'Paths' section and enter your race info.

Here is mine:
Code:
$Navpoint:    "diversion_start_sr2_city_race_islandhop"
$Type:        "ground"
$Pos:            <4010.233 -6.07 -178.247>
$Orient:        [3.15]

So your file should look similar to this:
Code:
// -------
#Groups
// -------

// -------
#Navpoints
// -------

$Navpoint:    "diversion_start_sr2_city_race_car_tp"
$Type:        "ground"
$Pos:            <898.656799 11.344189 -1696.259521>
$Orient:        [I]

$Navpoint:    "diversion_start_sr2_city_race_car_sx"
$Type:        "ground"
$Pos:            <507.904358 22.355417 -1882.312256>
$Orient:        [I]

$Navpoint:    "diversion_start_sr2_city_race_bike_ht"
$Type:        "ground"
$Pos:            <-496.891388 19.802258 -2214.040771>
$Orient:        [-2.348822]

...

$Navpoint:    "diversion_start_sr2_city_race_jetski_cv"
$Type:        "ground"
$Pos:            <-1014.921875 0.905655 824.622009>
$Orient:        [I]

$Navpoint:    "diversion_start_sr2_city_race_atv_mall"
$Type:        "ground"
$Pos:            <-215.134674 30.301528 -1646.984619>
$Orient:        [1.570796]

$Navpoint:    "diversion_start_sr2_city_race_islandhop"
$Type:        "ground"
$Pos:            <4010.233 -6.07 -178.247>
$Orient:        [3.15]

// -------
#Paths
// -------

Save your work. You are done with this file. Now we will
move on the the 'racing_sr2_city.cts' file.

Here are the entries for my race:
Code:
// Pirate Ship Cove
$Navpoint:    "racing_sr2_city_islandhop_$start"
$Type:        "ground"
$Pos:            <4010.233 -6.07 -178.247>
$Orient:        [3.15]

// Bone Island
$Navpoint:    "racing_sr2_city_islandhop_coop_$start"
$Type:        "ground"
$Pos:            <4010.233 -6.07 -178.247>
$Orient:        [3.15]

// Super Secret Island
$Navpoint:    "racing_sr2_city_islandhop_$cp1"
$Type:        "ground"
$Pos:            <3855.100 -4.09 -961.25>
$Orient:        [3.15]

// Ruins Island
$Navpoint:    "racing_sr2_city_islandhop_$cp2"
$Type:        "ground"
$Pos:            <3485.366 -6.20 -1323.008>
$Orient:        [3.15]

// Lookout Island
$Navpoint:    "racing_sr2_city_islandhop_$cp3"
$Type:        "ground"
$Pos:            <2946.787 -6.10 -1904.84>
$Orient:        [3.15]

// Waypoint Island
$Navpoint:    "racing_sr2_city_islandhop_$cp4"
$Type:        "ground"
$Pos:            <2961.70 -6.19 -2569.00>
$Orient:        [0.75]

// Cabbit Cove
$Navpoint:    "racing_sr2_city_islandhop_$cp5"
$Type:        "ground"
$Pos:            <3883.74 -6.19 -2626.897>
$Orient:        [0.75]

$Navpoint:    "racing_sr2_city_islandhop_$finish"
$Type:        "ground"
$Pos:            <3867.87 -6.21 -3748.455>
$Orient:        [3.15]

Once again these entries should be placed just above the 'Paths'
section at the end of the Navpoints entries.

the // lines are comments and are not read by the game. I used them to help me keep
track of which check points I had already entered.

The $Type can be one of two things. It can either be ground or floating.
Ground is used for anything touching a game surface. Like concrete or water, etc..
Floating is used in airplane and Heli races for mid air checkpoints.

$Pos is the coordinate position

$Orient is the checkpoint orientation. Since the checkpoint is a sphere any number
should work for the orientation. Do not worry about the arrows that point to the
next checkpoint, they will be set automatically.

As for the $Navpoint name it is easier to use the "racing_sr2_city_(race_name)_$cp#
format. The navpoint name is a convenient naming convention to make differentiating
between races easier.) You can name the race as you see fit. but using underscores is
advised. the $cp# is the Checkpoint number. You need to use the '$' in front of it.
That way the game knows that it is a variable.

Notice that there is a start entry as well as a coop start entry. Then there are
5 checkpoints and finally a finish entry. You do not need a coop finish entry because the race
ends in the same place for both players.

Save your work. It's time to add the race info to the xtbl. Place it right above the </Table>
line. (note the / in front of table.)

Here is my info:
Code:
<Racing>
        <Name>islandhop</Name>
        <Start_Location>diversion_start_sr2_city_race_islandhop</Start_Location>
        <Race_Type>Jetski</Race_Type>
        <Opponents></Opponents>
        <Rewards>
            <Reward>
                <Money_Reward>10000</Money_Reward>
                <Respect_Reward>5000</Respect_Reward>
                </Reward>
            <Reward>
                <Money_Reward>2500</Money_Reward>
                <Respect_Reward>2500</Respect_Reward>
                </Reward>
            <Reward>
                <Money_Reward>500</Money_Reward>
                <Respect_Reward>1000</Respect_Reward>
                </Reward>
            </Rewards>
        <_Editor>
            <Category>Entries</Category>
            </_Editor>
        <Start_Line_Offset>0</Start_Line_Offset>
        <Silver_Time>600</Silver_Time>
        <Bronze_Time>800</Bronze_Time>
        <Max_Time>900</Max_Time>
        <Acceptable_Vehicle>boat_wavecraft01</Acceptable_Vehicle>
        <Race_Number>28</Race_Number>
        <Coop_Spawn_Location>racing_sr2_city_$islandhop_coop_start</Coop_Spawn_Location>
        <Lose_Vehicle></Lose_Vehicle>
        </Racing>

The first thing to change is the name. Name it to suit you. You may need to use
underscores for this. I am not sure.

The start location is the coordinates in the racing_sr2_city_islandhop_$start variable
(located in the racing_sr2_city.cts file).

Race type: In this case Jetski. But for other types of races that will change.

Here is the list:
Code:
<Class>Airplane</Class>
                <Class_Types>
                    <Class>Airplane</Class>
                    </Class_Types>

<Class>Motorcycle</Class>
                <Class_Types>
                    <Class>Motorcycle</Class>
                    </Class_Types>

<Class>Speed Boat</Class>
                <Class_Types>
                    <Class>Speed Boat</Class>
                    <Class>Jetski</Class>
                    </Class_Types>

<Class>Average</Class>
                <Class_Types>
                    <Class>Average</Class>
                    <Class>Modified</Class>
                    <Class>Sports</Class>
                    <Class>Special</Class>
                    </Class_Types>

<Class>Helicopter</Class>
                <Class_Types>
                    <Class>Helicopter</Class>
                    </Class_Types>

Opponents - This is where your opponent info is located.

Here is a section from the Vanilla version of racing_sr2_city.xtbl
Code:
<Opponents>
            <Opponent>
                <Model>npc_young_male_generic</Model>
                <Vehicle>bike_rocket02</Vehicle>
                <Max_Speed>100</Max_Speed>
                </Opponent>
            <Opponent>
                <Model>npc_young_male_generic</Model>
                <Vehicle>bike_standard01</Vehicle>
                <Max_Speed>100</Max_Speed>
                </Opponent>
            <Opponent>
                <Model>npc_young_male_generic</Model>
                <Vehicle>bike_rocket02</Vehicle>
                <Max_Speed>100</Max_Speed>
                </Opponent>
            </Opponents>

As you can see each opponent entry needs the Model info
(the npc that will be used)

It need a vehicle entry (What are they driving?)

And it needs a max speed entry.

The rewards entry lists the rewards for each medal type.
Gold, Silver, Bronze. It lists the amount of money and respect you win
for each medal type.

Startline Offset - Distance in meters in which the start line is offset from
the ground (used for when there is ground geometry below the actual start location
(from the tables section of the xtbl file.)

Time
====
Code:
<Silver_Time>600</Silver_Time>
        <Bronze_Time>800</Bronze_Time>
        <Max_Time>900</Max_Time>

The complete race time is 900 seconds which translates to 15 minutes.
You have 600 seconds (10 minutes) to get gold
and 800 seconds (roughly 13.33 minutes) to get silver
anything longer than that will be bronze unless the time runs out.

<Acceptable_Vehicle>boat_wavecraft01</Acceptable_Vehicle>
Which vehicle can you use in this race?

<Race_Number>28</Race_Number>
To find out the number of your race just look in the 'racing_sr2_city.xtbl'
file and find the number of the race just above yours.

<Coop_Spawn_Location>racing_sr2_city_$islandhop_coop_start</Coop_Spawn_Location>
This is telling your game that this race can be run in coop. be sure to note the
'$' preceding the race name.

<Lose_Vehicle></Lose_Vehicle>
Will you lose your vehicle after the race? If the game supplies a vehicle
then you will lose it afterwards but if you bring your own you can keep it.

Note: To avoid any confusion when trying out this mod. I have added it to an already
existing mod of mine that removes all opponents from the races and gives the player 15 minutes
total to complete all the races. It also swaps the airplanes for helicopters in the airplane races.
So if you start to use this mod and things are different than what you expect that is why.
 

Attachments

  • Islandhop.zip
    17.1 KB · Views: 5
Back
Top