Giter Site home page Giter Site logo

derail-valley-modding / custom-car-loader Goto Github PK

View Code? Open in Web Editor NEW
13.0 2.0 6.0 1.4 MB

A Derail Valley mod that allows the addition of new cars and locomotive types to the game.

Home Page: https://nexusmods.com/derailvalley/mods/324

License: MIT License

C# 100.00%
unity derailvalley csharp

custom-car-loader's Issues

Steam locomotives consume sand but don't give extra traction.

when activating sand on a steam locomotive you consume the sand in your sandboxes, but don't get any extra traction.

To Reproduce
Steps to reproduce the behavior:
(optional) install hud mod for data readouts

  1. create a steam locomotive
  2. add sand controls
  3. turn on sand ingame
  4. see your adhesion stay the same.

Expected behavior
I expect to get extra traction when turning on sand

Cargo Models without colliders cause NRE

Custom cargo models that don't have any colliders set up cause null reference when loading cargo. Add empty [colliders] and [collision] to models automatically if not given

Steam Loco Components

  • LocoControllerSteam
  • DamageControllerCustomLoco
  • SteamLocoSimulation
  • Fire / Fire door
  • SteamLocoSimulationEvents
  • #27
  • Steam Audio

Tenders

  • TenderSimulation
  • Coupling/uncoupling logic (AutoCoupleMechanism)
  • ShovelCoalPile (on loco interior)

More values for gauge tracking

There's a handful of gauge tracking that's missing from CCL still.

Namely stored Coal and Water levels for tank locos and tenders. as well was water injector rate for steam engines.

Car exporter overhaul

  • Code:

    • ExportTrainCar window: new temp prefab workflow
    • Validator window: tests for common issues (review docs & common discord convos)
  • Documentation:

    • Update crash course for new export workflow
    • Make sure bogie & collider docs reflect naming requirements etc

CCL tries to load ZSounds config files shipped alongside custom locomotives

https://github.com/katycat5e/DVCustomCarLoader/blob/master/DVCustomCarLoader/CustomCarManager.cs#L31 is trying to load every .json file it can find, which leads to:

[DVCustomCarLoader] Reading JSON file: F:\Derail Valley r92\Mods\DVCustomCarLoader\Cars\st44-1102\zsounds-config.json
[DVCustomCarLoader] [Error] System.NullReferenceException: Object reference not set to an instance of an object
  at DVCustomCarLoader.CustomCarManager.CreateCustomCar (System.String directory, JSONObject jsonFile) [0x0000d] in <9b201ceedc474d74a30111655620d7b1>:0
[DVCustomCarLoader] [Error] Failed to load custom car from F:\Derail Valley r92\Mods\DVCustomCarLoader\Cars\st44-1102

It should probably try to only load info.json files.

Configurable cargo amount for cars

  • Add TrainCarSetup editor field
  • Patch/Transpile methods that are hardcoded to use 1 cargo/car
  • Prevent exception when capacity of saved car is reduced

Locomotive Effects

  • WheelRotationViaCode, WheelRotationViaAnimation
    • Both handled by DrivingAnimation/DrivingAnimationSetup
  • EngineSmokeShunter, EngineSmokeDiesel
    • Both handled by EngineSmokeEmitter/SmokeEmissionSetup

Custom Cargo & Container Types

Adding the ability to define custom cargo types and/or redefine the cargo container classes for job generation

  • Definition/injection of new cargo type values - similar to CarTypeInjector
  • Definition/injection of new cargo container types
  • Ability to set custom container types on cars in editor
  • Association of new cargo types to source/destination stations
  • Custom cargo models for existing and new cargos
  • Documentation of Custom Cargo definitions
  • Documentation of Cargo model setup

Custom buffers: It's worth a version bump!

We've already discussed it, but for others reading this, here's the rundown:

It would be nice if we were able to keep whatever buffers come with a locomotive, instead of having to replace them outright.
Rectangular buffers on some engines just don't look right.

Generic & Diesel Locomotive Components

  • DamageControllerCustomDiesel:
    • DamageControllerShunter
    • DamageControllerDiesel
  • CustomLocoControllerDiesel:
    • LocoControllerShunter
    • LocoControllerDiesel
  • DrivingForce
  • CustomLocoSimDiesel
    • ShunterLocoSimulation
    • DieselLocoSimulation
  • CustomDieselSimEvents
    • ShunterLocoSimulationEvents
    • DieselLocoSimulationEvents
  • Horn
  • MultipleUnitModule

Loco Interiors

  • CabInput
    • Handled by CustomCabInputController & CabInputRelay
    • CabInputShunter, CabInputDiesel, CabInputSteam, CabInputSteamExtra, CabInputHandcar, CabInputCaboose
    • Lives on interior root, takes GameObject references to "C" control objects with ControlSpec attached
    • Controls brake, throttle, and reverser
  • ControlSpec
    • Handled by ControlSetupBase derivatives, CabInputRelay to connect to loco controller
    • Lever, Button, Puller, Rotary, ToggleSwitch, Wheel
    • Attached to transform holding C control "grabbables", set up with properties for that control eg. "C throttle"
    • ControlImplBase is created from the spec when car is instantiated, this is found by CabInput
  • ShunterDashboardControls, DieselDashboardControls
    • Horn, lights, sand, fan, engine shutoff
    • Take GameObject references to controls & LampControl components
  • ShunterDashboardLampController, DieselDashboardLampController
    • Handled by CustomLampController, DashboardLampRelay
    • Listens to simulation events and turns on/off lamps based on changing values
    • Plays warning bell when turning on a lamp
    • Takes LampControl component references
  • IndicatorsShunter, IndicatorsDiesel, IndicatorsSteam, IndicatorsTender
    • Handled by CustomCabIndicators, IndicatorInfo
    • Control the gauges & sliders in cabins on each Update() using values from loco controller
    • Take references to Indicator components in cab
  • Indicator
    • IndicatorGauge (temp, fuel, oil, sand, etc), IndicatorGaugeLagging (only spedo?), IndicatorSlider (fire), IndicatorScaler (fire, water)
  • DoorsControllerShunter, DoorsControllerDiesel
    • Track whether the doors of a car are open or closed (used by snapshot switcher)
  • InternalExternalSnapshotSwitcher
    • Lives on the main prefab (not interior)
    • Controls the audio levels based on whether the player is outside or inside a cab

Steam locos do not produce chuffing sound in reverse

Describe the bug
Title says it all, steam locos make no noise going backwards.

To Reproduce
Steps to reproduce the behavior:

  1. Make a steam engine, including sounds setup
  2. Load it in game
  3. Drive it backwards

Expected behavior
The locomotive to make a chuffing sound

Actual behavior
The locomotive silently moves backwards

video:
https://youtu.be/Y9N3ChC5aVQ

Emission fees not resetting properly

Reproduce:

  • Cause emissions
  • Pay off fee
  • Cause more emissions
  • Quit & reload game
  • Old fees come back in addition to current fees

Investigate whether consumed fuel value is reset properly

Custom Cabooses/Brake Vans

  • Caboose Loco Controller
    • Brake Controls
    • Brake Pipe Gauge
  • Remote charger - RemoteControllerCharger, needs model copied
    • interior -> RemoteControllerCharger
  • Remote range extender
    • interior -> RemoteControllerSignalBooster
  • Onboard Career Manager
    • interior -> CareerManagerTrainInterior
  • Audio snapshot switcher
  • Teleport indicator
  • Documentation

Clearer text for custom bogies checkboxes

The current text is "Replace Front/Rear Bogie", but this can (and has been) misinterpreted as "replace the prefab's front/rear bogie with the default bogie."

Something like "Use Custom Front/Rear Bogie" would be less ambiguous.

Custom Locomotive Manuals

In-game booklets for custom engines

  • Loading page textures
  • PageTextureData creation - investigate existing manual setup
  • Method for spawning manuals in-game

Steam Loco Reverser does not properly function when moved by mouse

When moved by the mouse, the reverser value does not properly update. it functions as an integer reverser, and not a float reverser as it should on steam locomotives.

When using the HUD mod you can see this clearly. It'll set the force to whatever position the reverser was in pre-move, however it will apply it in the correct direction.

To Reproduce

step 1: install my perdy class 86 or 89,
step 2: fire it up,
step 3: move the cutoff wheel by your mouse NOT the keybinds
step 4: open up the throttle

Actual behavior
The force will stay relative to the reverser's starting position, but the direction will be correct.

Expected behavior
I expect the reverser to properly adjust the force and direction. dialing back force when you move closer to center or increasing as you put it in the corner.

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.