How to make GTR2 Championships

From Simwiki.net
Jump to navigation Jump to search

I wrote this up to for the SHO PnG Retrofit README and I hope it encourages people to learn how to make championships and to contribute historic championships to the mod.

This is barebones but I'd be happy to take feedback to make it better and help for any confusing areas.

I have attached these 1961 BSCC Championship files for reference: BRSCC_1961.gdb(*), BRSCC_1961.txt, and BRSCC_1961_ICON.TGA(*)

  • I had to rename these to .txt to attach them so just fix the extension to use it yourself.

How to Contribute Historic Championships

You can help contribute historic championships and it's pretty easy, actually.

I'd like to encourage crowd-sourced historic championships instead of taking on that role myself as I could never cover more than a fraction of series out there.

Contact me if you created a championship for Power & Glory. I'd be happy to include it in the mod.

Overview: 1. Find Championship Details 2. Create the Description, Schedule, and Graphic (Optional) 3. Copy Files Into GTR2 Folder and Play!

Once you get rolling, and get used to how things function, you'll probably be able to write a full historic championship and be driving it in less than an hour.

Steps:

1. Find Championship Details

For example, details on the 1961 British Saloon Car Championship can be found here:

BSCC

Archive: https://web.archive.org/web/20220610002544/http://touringcarracing.net/Pages/BSCC.html

You can find details that you will use in the Schedule and Description files. For example, for the first 1961 BSCC race at Snetteron you can find details such as:

- Circuit (Ex. Snetterton, Great-Britain) - Date (Ex. March 25, 1961) - Starters / Finishers - Distance in Laps or Time (Ex. 15 laps) - Weather (Ex. Dry) - Classes (Ex. Class, A and B) - Heats (Ex. Heat 1 and 1) - Grids with positions, car models, driver names, etc

Depending on your source, you might have all or some of this information. The vital parts are the circuit and distance. The rest is nice to have to gain more realism.

Find your own championship details by simply doing a web search or perhaps ask on your favourite forum.

2. Create the Description, Schedule, and Graphic (Optional)

2.1 The Championship TXT Description File

This is a plain-text file you can edit in any editor (Ex. the free Notepad++) and simply contains a plain-written description of the championship.

See \GameData\Championships\Official\BRSCC_1961.txt for an example.

Formatting tags are available. For example, here are a few:

    <SET_FONT>
    FT_LISTBOX_HEADER
    
    <DRIVER_NAME>
    <BEST_FINISH>
    <CHAMP_STATUS>
    <SET_FONT>
    FT_LISTBOX_RED_SMALL
    <TOUNLOCK>
    <SET_FONT>
    FT_LISTBOX_HEADER
    <DRIVER_POSITION>
    <NEXT_ROUND>

The example above sets the font to FT_LISTBOX_HEADER and then, if you've run a race, dynamically fills in your driver name, your best finish, the championship status, your position, and details about the next round.

This example was taken from \GameData\Championships\Official\BRSCC_1961.txt Open it for yourself and see what it's like.

Other tags are available, as well. Use other Championship TXT files from Power & Glory and GTR2 for reference to what you can do, too.

Once you've learned to see and separate the tags from the text it becomes very easy.

2.2 The Championship GDB Schedule File

This is a plain-text file you can edit in any editor (Ex. the free Notepad++) and contains parameters that define a championship, such as car/class/ai filters, championship description, AI strength/realism, race rules, scoring, races and their circuit, practice/qualify/race parameters, weather, and more.

See \GameData\Championships\Official\BRSCC_1961.gdb for an example.

An example of the top few lines of the 1961 BSCC Championship GDB Schedule File:

    // Copied from 60's Sportscar Championship.gdb
    // Schedule based on 1961 British Saloon Car Championship: http://touringcarracing.net/Pages/1961%20BSCC.html
    // Custom Championships
    Game Name = 1961 British Saloon Car Championship
    Game Filter = AND: Gr2 AND: TC60
    Selection Filter = AND: Gr2 AND: TC60
    AI Filter = AND: Gr2 AND: TC60
    Description = The 1961 British Saloon Car Championship featured Group 2 cars and raced historic British tracks.

The lines including "AND:" allow you to filter on car classes which are defined in CAR files in \GameData\Teams\ folder. For example, \GameData\Teams\Power&Glory\60's Touring\Abarth 1000TC\67015\67015_tc60_abarth1000tc.car.

Gr2 stands for Group 2 and TC60 stands for 60's Touring Cars. Only cars from this group, class, and era are tagged in this way using the classes="..." parameter in CAR files.

If unsure, use Windows Explorer and search the GTR2 \GameData\Teams\ folder for *.CAR and open some or all of the files in an editor like Notepad++ and then look at each classes="..." line to see what tags they have (classes is usually at the bottom of each CAR file).

An example of the "SceneOrder" which defines the Locations (circuits) and the practice/qualify/race parameters for that round:

    SceneOrder
    {
        // Snetterton Lombard Trophy (March 3, 1961)
        64snett
         {
          TestDayDay = Wednesday
          TestDayStart = 6:30
          Practice1Day = Friday
          Practice1Start = 10:00
          Qualify1Day = Saturday
          Qualify1Start = 9:00
          WarmupDay = Sunday
          WarmupStart = 9:10
          RaceDay = Sunday
          RaceStart = 14:30
          RaceLaps = 15
          RaceTime = 30
          Weather=1 // Weather: 0=changable, 1=dry, 2=rain, 3=monsoon
          StartMode=Standing
          Max Vehicles=24
         }
        
         // Aintree International 200 Meeting (April 22, 1961)
        Aintree
         {
          TestDayDay = Wednesday
          TestDayStart = 9:00
          Practice1Day = Friday
          ...
         }
        
         ...
     }

The labels "64snett" and "Aintree" refer to the GTR2 \GameData\Locations\*\*.GDB filename. For example, "Aintree" in \GameData\Locations\Aintree\Aintree.gdb.

2.3 The Championship TGA Graphic File

This is an optional image file that can be created/edited in Gimp or Photoshop and can be included in the Description file.

You can include the TGA file in a Description file with the following code:

    <CHAMP_ICON_CENTERED>

Note: I had trouble exporting these files in Gimp in a compatible way for GTR2. If anyone knows how to properly make and edit these files please let me know.

2.4 Championship File Naming

The GDB and TXT should be named the same except for their extension.

The TGA file should use the same name with "_ICON" appended and retaining the TGA extension.

Examples:

    BRSCC_1961.gdb
    BRSCC_1961.txt
    BRSCC_1961_ICON.jpg

3. Copy Files Into GTR2 Folder and Play!

Copy GDB, TXT, and TGA files to your GTR2 \GameData\Championships\Official\ folder then launch GTR2 and play!

That's it. It's really pretty straightforward and, once you know the rules and quirks, you can make new championships pretty easily.

Attachments:

File:BSCC 1961 gdb.txt
File:BSCC 1961.txt
BSCC 1961 ICON.jpg