Giter VIP home page Giter VIP logo

openrct2-trafficmanager's Introduction

TrafficManager for OpenRCT2

This is a plugin for OpenRCT2. It will randomize vehicles on a ride to resemble more realistic traffic.

traffic-manager-demo-3 0

Usage

For moving traffic, this plugin works ideally on a ride that has several trains, each with one cars. For parking lots, using one very long train is recommended, as you can then use the Ride Vehicle Editor to move the cars around.

If you want the colors to properly randomize, set the color dropdown in the ride window to "Different colors per car".

Select the ride you want to modify from the drop-down list. The plugin window will appear, showing which vehicle types are supported in your map. The currently-supported vehicle types are:

  • Monster Trucks (rct2.ride.4x4)
  • Bicycles (rct2.ride.monbk)
  • Racing Cars (rct2.ride.rcr)
  • Soap Boxes (rct2.ride.sbox)
  • Sports Cars (rct2.ride.spcar)
  • Pickup Trucks (rct2.ride.truck1)
  • Vintage Cars (rct2.ride.vcr)
  • Automobile Cars (rct2.ride.wcatc)
  • Gangster Cars (rct2tt.ride.ganstrcr)
  • Police Car Trains (rct2tt.ride.polchase)
  • Police Cars (rct2tt.ride.policecr)
  • School Bus Trams (rct2tt.ride.schoolbs)
  • Black Cabs (rct2ww.ride.blackcab)
  • Limousine Trains (rct2ww.ride.caddilac)
  • Routemaster Buses (rct2ww.ride.londonbs)
  • Trabant Cars (rct2ww.ride.rssncrrd)
  • Yellow Taxi Trains (rct2ww.ride.taxicstr)

When you click "Go", the plugin will randomize the type of vehicle, selecting from the list above and weighting based on the weights input by the user. The plugin will also randomize the colour of each vehicle.

Note: If you want to manually edit the ride list to add more rides, it is possible to do so by editing the .js file directly. Look for (for example) ['rct2.ride.4x4',10] in the code. This corresponds to the monster trucks with a weight of 10. You can add new entries to the array here, as long as you know the internal id of the ride.

The plugin will also randomize the speed of vechicles, if they're moving (your ride is open or testing). You can specify the average speed for each vehicle, and how much the variation in speed will be randomized. If the variation is set to "None", the vehicles will all go the same exact speed. Increasing the variation will cause some vehicles to go faster or slower. (Note that if you set the variation to "A lot", it can result in some nasty traffic jams!)

Troubleshooting

There are a bunch of supported vehicles missing from the plugin! The plugin can only use vehicle types that are included in your map. Use the object selection tool to add the vehicles you'd like.

Roadmap

Please submit any ideas under issues.

Version history

  • Version 1: Randomizes vehicles based on a hard-coded list of vehicle types and weights.
  • Version 2: Allows the user to select their own weights, if they (for example) prefer a lot of pickup trucks.
  • Version 3: Randomizes the speed of powered vehicles, for moving traffic.

Features in consideration

  • Better colour weights that take vehicle type into consideration
  • Customizable colour weights
  • Automatically setting vehicle placement for parking lots (this is probably very hard)
  • Allow the user to select their own vehicle types (in addition to the ones already hard-coded into the plugin)

Installation

  1. This plugin requires at least OpenRCT2 version v0.4.1 (release) or the newest develop version.
  2. Download the latest version of the plugin from the Releases page.
  3. Put the downloaded .js file into your /OpenRCT2/plugin folder.
  4. The plugin settings window can be found in-game in the dropdown menu under the map icon.

Modifying this plugin

This plugin's codebase is based on wisnia74's TypeScript template. See the steps in Basssiiie's Ride Vehicle Editor plugin README for instructions on building and running the source code.

Notes

Thanks to wisnia74 for providing the template for this mod and readme. Thanks to Basssiiie for additional templating for the source code and this README, and for some of the vehicle object code.

openrct2-trafficmanager's People

Contributors

fidwell avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

openrct2-trafficmanager's Issues

Toggle to use only powered vehicles

Add a checkbox or something to only use powered vehicles, for moving traffic. That way you can set everything up in one click if #1 is implemented.

Car rides get real messed up

The plugin doesn't handle car rides correctly. If you have a ride of many trains of one sports car each, each train is actually three cars; the first and last are invisible. The plugin currently adjusts all 3 cars which winds up being a glitchy mess. The plugin should only touch the second car and leave the others alone

Powered vehicle speed

If a vehicle type is powered, set its speed to a random value. Probably in the 60โ€“90 range.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.