The Railway Update – Drivable Trains and More

Driveable Trains

The Railway Update Release

Trains have been promised for a while and the wait is finally over. A fully working metro system is in place, and mappers can easily create their own using new World Builder objects. The rideable metro spans the entire Default map, but it should be straightforward for mappers to copy and paste the self-contained system into their own map. Trains are spawned randomly and can be either AI or human controlled – including switching tracks. There are some extra added features to complement this new transport class so let’s cover those next.

Trains and Public Transit

Random Passengers

A transit system wouldn’t be very useful without passengers. So AI passengers are randomly spawned in trains, cars, or any vehicle for that matter. The implementation is available in the LifeSource Plugin so admins and modders can adjust spawn rates or any other parameters to best fit their server. Careful now, law enforcement travels with backup this way and I want to improve their squad behavior next along with gangs.

Interior NPC Spawns

Interior Spawns

NPC spawning was limited to the overworld only ever since BP was released years ago. That changes today with some extra options in the World Builder. Now mappers can set the possibility to spawn NPCs on a per-waypoint basis. There’s also an extra option to add a timed Delay parameter on waypoints so AI will pause for a defined amount of time. This is how train stops are implemented but can be configured to construct more elaborate scripted AI patrol routes.

Tow Truck Updates

Improved Tow Trucks

Broke Protocol is opening up slowly to community development. TheUnishark is a longtime modder for excellent plugins and assets and is now officially adding content to the base game as a developer. You can see some improvements to Tow trucks with dynamic line rendering for tow lines and some new emergency lights. Best part is that all this is easy to mod with your own vehicles so check out the latest BPResources to see how it’s done.

UI Elements Modding

Modding UI Elements

As a longtime plugin author, TheUnishark took the effort to expand and improve UI modding support. UIElements is a really powerful and customizable UI framework similar to HTML/CSS and it’s awesome to see more features unlocked in the modding API. We now have support for Sliders, Dropdowns, Radio Buttons, Toggles, and more with the new UI modding interface. There’s also a way to Set the Text field on Text Elements dynamically now and more fixes regarding packets and UI blocking interaction.

Physics and Other Improvements

Vehicle Physics

There’s been a huge physics overhaul with a more realistic torque curve for all vehicles. Engine and skid sounds are tweaked to be less ear-piercing and multiple exits are now supported. Older mods might need minimal tweaks. PLASMA_Chicken, admin and developer of the PointLife server, has been instrumental in this release in discovering and patching important errors and exploits. The community work on this update is extremely helpful and I hope to leverage that more in future updates.

Here’s the full Railway Update changelog:

v1.38 Railway Update Changelog

Game Changes:

  • New rideable and steerable trains (Metro, MetroCarriage)
  • Default map now has active subway system
  • Random passenger spawning in all vehicles (moddable in LifeSource)
  • TrainLicense item added
  • New Waypoint Type for train spawning
  • UI Elements modding enhancements and fixes(TheUnishark)
  • Random AI spawning supported in any interior level
  • Optimized an AI waypoint lookup
  • New Waypoint properties in World Builder
    • ‘Random Spawns’ property to spawn NPCs in any area
    • ‘Delay’ field so AI pedestrians or vehicles will pause for any # of seconds
  • Major physics overhaul
    • Torque is moddable property on all movable types
    • MaxSpeed on aircraft now actually matters
    • Some mods will likely need tweaks
  • Support maxSpeed = 0 for modding / disabling vehicles
  • Support for fully serverside physics on some entities
  • Fix vehicles instantly stopping when entering driver seat
  • Tow joint tweaks and improvements
  • New /MaxSpeed command for admins (updated permission files)
  • Fixed potential desync with relocating entities on clients
  • Fixed network correction feedback loop during desync
  • Fixed SendFire() packet spam kick in some situations (Thanks Plasma)
  • Minor network optimizations (cull useless packets)
  • Disallow restraint escape attempts when being dragged/mounted
  • Fixed clientside ammo desync in some situations
  • Fixed bad spawns if disconnecting from an Interior Apartment (Plasma)
  • Fixed wrong packet on GetTextFieldText (Plasma/TheUnishark)
  • Fixed TriggerSphere not having IsTrigger set to true (TheUnishark)
  • Fixed Vote/Call Panel input and UI coloring bugs
  • Fixed wheel rendering and physics for mods with scaling
  • Towing line renderer support (TheUnishark)
  • TowTruck has new emergency lights (TheUnishark)
  • Fix for cracking exploit (Thanks Plasma)
  • InActionRange() should work correctly for animated entities
  • Fixed range bug in CanSeeEntity()
  • No longer embark restrained players into driver’s seat (Thanks Plasma)
  • Fixed some default keybinding conflicts with equipment
  • Some audio sources now played with random pitch offsets
  • Support zero maxSteeringAngle
  • Removed mobsUpdate backwards compatibility hack
  • Better handle attack state for passengers
  • Hit registration rewritten and bugs fixed
  • Tab menu has more ping and FPS info
  • /ping command returns server FPS too
  • Equipment Menu layout improvements and fixes
  • Fixes for projectile collision handling
  • Boosted Biplane fire rate
  • Adjusted all aircraft flight models
  • Tweaked and fixed tank physics
  • Unity Engine upgrade to 2023.1
  • LiteDB, Voice, and Steamworks libraries updated to latest
  • Using more accurate / better voice encoding
  • API Changes:
  • New ShTrain class for modding
  • Multiple ExitTransforms are supported on vehicles (closest to player is selected)
  • Old vehicle mods using the single ExitTransform might need updates (mainly important for boats)
  • SvEntity.SvRepositionSelf() -> SvPhysical.SvRelocateSelf()
  • ClPacket.RepositionSelf -> RelocateSelf
  • UI Elements modding API (TheUnishark)
    • New methods supporting Sliders, Dropdowns, Radio Buttons, Toggles, Etc.
    • Removed one generic param in the query of ClManager.GetVisualElement()
    • Fixed ClManager.GetTextFieldText method was sending the wrong packet
    • Added SvPlayer/ClManager.SetTextElementText(string element, string text)
    • Solved an issue where disabled/invisible elements were blocking UI clicks
  • Util.Log() is the recommended method for logging now
  • SpawnBot() targetVehicle parameter removed (prefer SvMount() after spawn)
  • CanSee(Vector3 direction, float distance) => CanSee(Vector3 position)
API Changes

See you!

-Benz

Official Discord