Results 1 to 8 of 8

Thread: Random Race Generator and API

  1. #1
    Superkart Pilot JasonSandwich's Avatar
    Join Date
    Jun 2017
    Location
    Arizona (UTC -7)
    Posts
    204
    Platform
    XBOX1 X

    Random Race Generator and API

    In the spirit of Spongleton's Randomizer page, I've created my own that spits out a bit more detail. This takes the list of cars, tracks, weather, classes, and times to try to give you a pretty crazy race. I turned the script into an API just to play with Azure functions.

    Here's the most basic output both tall and wide.

    The API will spit out HTML or XML to be used how you like. Here's the API documentation https://pc2randostorage.blob.core.wi...C2RandAPI.html

    I'm hosting all of the images myself and am missing a good amount so I did the best I could with what I had. Let me know if you find this useful or have any questions. If it gets too expensive to host, I'll make sure to give plenty of warning before it moves or is taken down.

    Click image for larger version. 

Name:	Capture.JPG 
Views:	150 
Size:	46.5 KB 
ID:	255199
    Last edited by JasonSandwich; 30-05-2018 at 02:57. Reason: deleted an image
    Xbox One X with public OS release - Thrustmaster TX with T3PA - Arizona (UTC -7h) - Check out the Randomizer (pc2rando.jasonsandwich.com)
    The following 6 users likes this Post: Maskmagog, pcars rookie, Rober, sas5320, VelvetTorpedo, Zeratall


  2. #2
    Kart Driver pcars rookie's Avatar
    Join Date
    May 2015
    Posts
    44
    Platform
    PC
    Thank you JasonSandwich, this is a great idea, well done.
    Windows 10 Pro, I7-6700K, 16GB Ram, G27, GTX 1080 Gaming X 8GB, triple monitor, G27 Controller
    The following user likes this Post: JasonSandwich


  3. #3
    Superkart Pilot JasonSandwich's Avatar
    Join Date
    Jun 2017
    Location
    Arizona (UTC -7)
    Posts
    204
    Platform
    XBOX1 X
    I sloppily put together a mobile-friendly page that lets you choose the options in the API. Give it a swing.

    https://pc2randostorage.blob.core.wi...2RandCell.html

    It looks terrible on desktop. I'm not a CSS wizard or a web developer.
    Last edited by JasonSandwich; 01-06-2018 at 16:01. Reason: saved too early
    Xbox One X with public OS release - Thrustmaster TX with T3PA - Arizona (UTC -7h) - Check out the Randomizer (pc2rando.jasonsandwich.com)
    The following user likes this Post: Maskmagog


  4. #4
    Superkart Pilot JasonSandwich's Avatar
    Join Date
    Jun 2017
    Location
    Arizona (UTC -7)
    Posts
    204
    Platform
    XBOX1 X
    A few more minor updates make the cell page and the desktop page more friendly.

    https://pc2randostorage.blob.core.wi...2RandCell.html

    Click image for larger version. 

Name:	Screenshot_20180605-134429.jpg 
Views:	1 
Size:	58.4 KB 
ID:	255649Click image for larger version. 

Name:	Screenshot_20180605-134434.jpg 
Views:	0 
Size:	46.7 KB 
ID:	255650
    Xbox One X with public OS release - Thrustmaster TX with T3PA - Arizona (UTC -7h) - Check out the Randomizer (pc2rando.jasonsandwich.com)
    The following user likes this Post: ShneebnaMRR108


  5. #5
    Superkart Pilot JasonSandwich's Avatar
    Join Date
    Jun 2017
    Location
    Arizona (UTC -7)
    Posts
    204
    Platform
    XBOX1 X
    I just made another minor update and a few tweaks on the back end. The primary landing page will now redirect to the narrow width (mobile) site if it detects a narrow display.

    I know some people out there are using this. I hope you enjoy! http://pc2rando.jasonsandwich.com
    Xbox One X with public OS release - Thrustmaster TX with T3PA - Arizona (UTC -7h) - Check out the Randomizer (pc2rando.jasonsandwich.com)
    The following user likes this Post: Maskmagog


  6. #6
    Superkart Pilot JasonSandwich's Avatar
    Join Date
    Jun 2017
    Location
    Arizona (UTC -7)
    Posts
    204
    Platform
    XBOX1 X
    Want to use this in your stream chat? I made a quick custom command for a random car or track and simplified it to be used with common chat bots. If you'd like to add these to your chat, create a custom command to call the API.

    In each sample below, "car" can be replaced with "track". You can specify dlc and karts for the car. Example is in the Nightbot command below.

    Click image for larger version. 

Name:	cartrack.JPG 
Views:	20 
Size:	16.8 KB 
ID:	257733

    • Nightbot:
      Code:
      $(urlfetch https://pc2randomizer.azurewebsites.net/api/PC2Randomizer?format=car&karts=false&dlc=false)
    • Streamlabs Chatbot:
      Code:
      $readapi(https://pc2randomizer.azurewebsites.net/api/PC2Randomizer?format=car)
    • Deepbot:
      Code:
      @customapi@[https://pc2randomizer.azurewebsites.net/api/PC2Randomizer?format=car]


    Let me know if you find more. Thanks.
    Last edited by JasonSandwich; 17-07-2018 at 21:19. Reason: i don't know how to un-auto-URL the links
    Xbox One X with public OS release - Thrustmaster TX with T3PA - Arizona (UTC -7h) - Check out the Randomizer (pc2rando.jasonsandwich.com)

  7. #7
    WMD Member DinoM's Avatar
    Join Date
    Oct 2011
    Location
    Sopianae
    Posts
    76
    Platform
    PC
    Can you just mix multiclass races?
    MoBo=Asus Z97 Pro Gamer, CPU=Intel Core i5 4690, GPU=Asus STRIX GTX970 DCII 4GB GDDR5, RAM=16 GB HyperX Beast/Savage DDR3 2400 MHz CL11, Case=Phanteks P400 TG AG,
    Screen=Sony KDL32W705 1080p, OS=Win 10 Pro 64bit, Audio=Realtek bilt in MB SPDIF/OPT, Connect=1000/200 mbit/sec, Wheels=Fanatec CSR, PSU=Thermaltake Smart SE 730W,
    Group: 5% CLUB
    SORRY, MY BAD ENGLISH.

  8. #8
    Superkart Pilot JasonSandwich's Avatar
    Join Date
    Jun 2017
    Location
    Arizona (UTC -7)
    Posts
    204
    Platform
    XBOX1 X
    Quote Originally Posted by DinoM View Post
    Can you just mix multiclass races?
    I'm not sure what you mean. If you want a second or third class to set up a multiclass race, just run it again. The car class is the final thing in parenthesis when the car is returned.

    The big randomizer (in my signature) returns as many as four classes along with a car for you to drive from one of those classes.
    Xbox One X with public OS release - Thrustmaster TX with T3PA - Arizona (UTC -7h) - Check out the Randomizer (pc2rando.jasonsandwich.com)

Similar Threads

  1. Why AI random fuel in pratice, qualifyng and in race?
    By jamespoly86 in forum General Discussion
    Replies: 5
    Last Post: 13-12-2017, 09:05
  2. [Bug?] Random flickering during Race
    By xeek in forum Technical Help & Support (PC)
    Replies: 2
    Last Post: 23-09-2017, 20:14
  3. about the random wheather in a custom race
    By Didd31 in forum XB1 - Technical Help & Support
    Replies: 0
    Last Post: 23-06-2015, 19:08
  4. Probably a stupid idea but what about a track and car generator
    By nomen nescio in forum Feature Suggestions
    Replies: 0
    Last Post: 22-06-2015, 09:57
  5. Track generator
    By gp20 in forum Feature Suggestions
    Replies: 6
    Last Post: 21-05-2015, 10:56

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •