Project CARS 2 Randomizer API

Desktop Cell Basic forum thread

Updated May 24, 2019

The randomizer was created to add some fun and variety into race nights. Want to level the playing field? Nobody practices Indycars on an RX track...in the rain.

Even if you're just looking for a random car, some random classes, anything - the randomizer is designed to make those decisions for you.

Updated for v. 1.7.1 - notes at the bottom. Contact me on Discord at JasonSandwich#1976 with all feedback. Made in Arizona and free to use. Enjoy!

API

Path

All calls are made to https://pc2randomizer.azurewebsites.net/api/PC2Randomizer

Flags

Default values are bold. Order does not matter.

format

Determines output from API. No default; required.

images

Include images in HTML output. The default may change if it is expensive for me.

dlc

Include DLC cars and tracks.

karts

Include kart tracks.

rx

Include rally cross tracks.

snow

Chance of snow on a track that would allow it. If Fuji is randomly chose, there is a chance of snow being chosen as the season. "Snow" is a season type
different from the snow weather type. If this is set to false, snow can still fall but the track will not be pre-covered in snow.

snowpct

If the above is true, this is the likelihood of snow being chosen if the track supports snow. By default, this is 30 percent. For no snow, set above flag to false.

laps

This sets the maximum number of laps. This number is used to calculate the race time also, guessing an average speed of 90mph. This is wildly inaccurate
so consider it just another alternate recommendation for the race length.

avs

Average speed in MPH used to figure race length. Default is 90. Take a good guess!

Samples

Car and Track

XML

HTML

Chat Bots

To use the random car and track call with a command chat bot, add these custom commands. Accepted arguments for car are dlc and karts.

Beta Testing

I'm currently testing pc2rando.com in place of pc2randomizer.azurewebsites.net but I do not have a valid certificate for it. If you'd like to simplify these API calls, feel free to replace the domain "pc2randomizer.azurewebsites.net" with "pc2rando.com" but expect to see invalid certificate errors.

Notes

Latest at top

  1. 20190524 - added sample code for Stream Labs OBS (SLOBS) and indicated testing for pc2rando.com
  2. 20190310 - added "tt" as an input, creates a car/track suggestion for time trial and some emoji to the tt, car, and track output for some color
  3. 20190224 - minor change, track and car output now use square brackets
  4. 20181022 - fixed a dumb bug, didn't consider LeMans vintage track dlc as dlc and fixed a typo
  5. 20180916 - added Ferrari DLC
  6. 20180722 - added km to track output for single use "track", best for chat bots, changed some brackets to ">" because bots make emojis with ")"
  7. 20180721 - added info for joining Botisimo
  8. 20180720 - changed "Average Speed" to "Average MPH" on both the cell and desktop landing page
  9. 20180717 - added "car" and "track" to output, a single element returned and provided custom bot use commands
  10. 20180628 - primary landing page redirected to mobile site if narrow display is detected
  11. 20180604 - added le mans legend dlc
  12. 20180601 - added dlc flag to documentation and updated examples, forgot to include it with initial documentation
  13. 20180528 - added avs argument to feed average speed, changed assets to transfer via https only