Code Monkey home page Code Monkey logo

openrct2-proxypather's Introduction

ProxyPather plugin for OpenRCT2

This plugin lets you quickly cover guide paths with full paths without changing the guests pathfinding. This method is called 'proxy pathing'.

(Video example of applying proxy pathing)

In short; to make it look like your guests are using the full width of the path, you can create so called 'guide paths'. These paths will guide the guests along your preferred routes without having the game turn it into wide paths (which are mostly ignored by guests).

If you then hide this guide path and cover it with another path object via the Tile Inspector, guests will be none the wiser and they will still follow the original path under it. They always use the lowest path in the tile element list.

Since making these double layered proxy paths can be quite tedious, this plugin does it for you by converting all the paths in the specified area to said proxy paths with a simple drag of the mouse.

The newest version also supports smoothing the edges and preserving any placed footpath additions (like benches and lamps). And guests can still use them!

(Video example of the newest version of the plugin)

Thanks to Darkoro and Manticore from the DKMP server for explaining proxy pathing.

Installation

  1. Download the latest version of the plugin from the Releases page.
  2. To install it, put the downloaded *.js file into your /OpenRCT2/plugin folder.
    • Easiest way to find the OpenRCT2-folder is by launching the OpenRCT2 game, click and hold on the red toolbox in the main menu, and select "Open custom content folder".
    • Otherwise this folder is commonly found in C:/Users/<YOUR NAME>/Documents/OpenRCT2/plugin on Windows.
    • If you already had this plugin installed before, you can safely overwrite the old file.
  3. Once the file is there, it should show up ingame in the dropdown menu under the map icon.

Building the source code

This project is based on wisnia74's Typescript modding template and uses Nodemon, ESLint and TypeScript from this template.

  1. Install latest version of Node and make sure to include NPM in the installation options.
  2. Clone the project to a location of your choice on your PC.
  3. Open command prompt, use cd to change your current directory to the root folder of this project and run npm install.
  4. Find openrct2.d.ts TypeScript API declaration file in OpenRCT2 files and copy it to lib folder (this file can usually be found in C:/Users/<YOUR NAME>/Documents/OpenRCT2/bin/ or C:/Program Files/OpenRCT2/).
    • Alternatively, you can make a symbolic link instead of copying the file, which will keep the file up to date whenever you install new versions of OpenRCT2.
  5. Run npm run build (release build) or npm run build:dev (develop build) to build the project.
    • Default output folder for release builds: (project directory)/dist
    • Default output folder for develop builds: (documents)/OpenRCT2/plugins
    • If your plugin folder is located elsewhere (on for example a non-Windows OS), you can modify it in rollup.config.js.

Hot reload

This project supports the OpenRCT2 hot reload feature for development.

  1. Make sure you've enabled it by setting enable_hot_reloading = true in your /OpenRCT2/config.ini.
  2. If you are on a non-Windows OS, open rollup.config.js and change the output file path to your plugin folder.
    • Example: C:/OpenRCT2/plugin/ProxyPather.js.
    • Make sure this path uses / instead of \ slashes!
  3. Open command prompt and use cd to change your current directory to the root folder of this project.
  4. Run npm start to start the hot reload server.
  5. Use the /OpenRCT2/bin/openrct2.com executable to start OpenRCT2 with console and load a save or start new game.
  6. Each time you save any of the files in ./src/, the server will compile ./src/registerPlugin.ts and place compiled plugin file inside your local OpenRCT2 plugin directory.
  7. OpenRCT2 will notice file changes and it will reload the plugin.

Notes

Don't touch app.js, even though it's just an empty file. Its existence makes Nodemon happy, and Nodemon is what watches your files for changes & fires off new dev builds for hot reloading.

Thanks to wisnia74 for providing the template for this mod and readme.

openrct2-proxypather's People

Contributors

basssiiie avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

openrct2-proxypather's Issues

Plugin does not function in multiplayer.

The plugin doesn't appear to work in multiplayer, works as expected in single player.
I also tried throwing the plugin on the server as well just in case it needed to be present server-side to function, however that didn't change anything.

Plugin version: v0.3
Game version: v0.4.5 (76ca840)
Platform: Windows
Server Platform: Linux (Unraid Docker)

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.