Code Monkey home page Code Monkey logo

slowroads-handling-editor's Introduction

Opinion's Handling Editor for slowroads.io Opinion's Handling Editor is a mod for slowroads.io which gives you access to a simple handling editor. Get more out of your vehicle by customizing it on the fly.

--- Project abandoned by request from the SlowRoads creator ---

I wish you good luck with your game!

  • Opinion

How it works

  • You install a userscript in Violentmonkey or Greasemonkey (similar extensions not tested).
  • The userscript will attempt to block the original game script and replace it with a modified game script (hosted here).
    • The modified game script exposes a variable containing the game's state.
    • Because we now have acces to the game's state, we can modify game settings on the fly.
    • The userscript adds an in-game menu for the handling editor.

Installation

Go to the latest release and follow our installation guide.

Mod preview

Preview of Opinion's Handling Editor

Things you might want to know

Setting values too high or too low can cause the game to crash.
If the game crashes or freezes, just reload the page.

After a crash, sometimes reloading the page isn't enough and the game can get laggier over time.
To resolve this, simply open the game in a new tab.

Switching vehicle does not update values shown in the handling editor. Recommended to reload the page after switching vehicles.

The default vehicle handling is currently stored when the handling editor starts. In order to update the stored default handling you must reload the page after switching vehicles.
Switching vehicle and pressing "reset handling" without reloading the page will not restore the correct handling for your chosen vehicle.

Editing values or pressing the "reset handling" button will steal the focus from the game. For best results, click anywhere inside the game after interacting with the handling editor.

slowroads-handling-editor's People

Contributors

opinion avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

slowroads-handling-editor's Issues

Add support for slowroads.io v1.0.1 on 'main.9fb6165b.chunk.js'

Game appears to still be in version 1.0.1 but the main.js file has changed to main.9fb6165b.chunk.js.

I have made decent progress on v1.2. I will make necessary changes to get this mod working again ASAP (read today) and release it as a part of v1.2.

For the future I want to make sure I can easily patch updates like this without needing mod users to download an entirely new version. I will make a new issue for this topic after I get v1.2 released.

Automatic game focus on handling update can seem delayed

  • Game version: 1.0.1
  • Userscript version: 1.2

Description

When an input changes in the handling editor, the handling will be updated and the focus will be put back on the game's canvas.

If you update a value and click another input, it can sometimes ignore the new input you focused on and instead give focus to the game's canvas.

Desired outcome:

Give focus to the game if another input is not already in focus.

Game still getting focus when attempting to edit multiple values

After the 1.3 release I was surprised when I noticed the auto focus fix was no longer working.
A quick fix might be to add 100 ms delay before updating the input. Everything else from #8 should work fine.

setTimeout(() => {
    /* Insert code to update handling here.... */
}, 100)

Support game version 1.0.2

Slowroads.io just updated to v1.0.2. Userscript v1.2 will not support this version even if I add the modified game script.

Before I modify the game script I have to check if I can still use the same method for exposing the game's state.

Required changes

  • Change Core.settings.supportedVersion to 1.0.2
  • Add new modified game script for main.131c9059.chunk.js to the /dist directory

Changelog for v1.0.2

slowroads-v1 0 2-changelog

Works on Greasemonkey

  • The script works using Violentmonkey version 2.13.3. Have yet to try it using Greasemonkey.
  • The script does not work on Chrome, and breaks the loading of the original script, which, as far as I can tell, can only be fixed by clearing the cookies for slowroads.io.

Feature Suggestion: Add tooltips to the settings, to make it easier to grasp what each setting affects.

Check version on game's start screen

Check the game version on the game's start screen.
If the version doesn't match, don't trigger the rest of the script.

  • Script starts
  • Checks version
    • On match
      • Allow script to run like normal
    • On mismatch
      • Load Toastify dependency
      • Wait until Toastify is ready
      • Display toast

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.