TrainHeist

TrainHeist 0.2.26

Ensure despawn timer always includes crate hack time
  • Like
Reactions: Red
All train heist cars ignore the terrain collider. You don't need to add terrain triggers for this to work
Added config options "Use spawn overrides" and a "Preferred spawn overrides" list that you can enter positions in. This will evaluate valid track positions close to these point randomize the starting position between the closest valid points near the positions in the list
Added support for SamSites
Adhere to spawn amount for APC spawns
Ignore track prefabs that register as a loop because they lead on to a rail path loop
Reverse direction if train comes to a complete stop for more than 3 seconds
Added support for spawning APCs on trains (default layouts have these disabled, you will need to add them if you want to use it)
This plugin update is for the coming Rust update. It will only work on staging branch until then

Fixed for Rust update
Attempt to not select tracks that don't have further tracks connected
Track selection changes for better compatibility with new rail branching and rail sidings
Added support for rail loops made out of the rail prefabs (your track pieces need to be properly aligned, and you can't scale them)
Changed NPC parenting to use the trains parent trigger instead of manually parenting
Turrets only target players
Fixed loot max value being 1 lower than set
Disable front and rear coupling points so nothing can be coupled to the train
Custom turret behaviour that calls no hooks so other plugins cant fuck with turret targeting
If train has hazards both in front and behind it set the fastest track speed and crash into whatever is blocking us
  • Like
Reactions: TwoShoes
Added support for branch switching if obstacles are in the way.
Added option to attach carriages to the train with their own loot, scientist and turret layouts
Prevent uncoupling of carriages (workaround currently pending hook approval and oxide update)

Moved loot table to its own data file
Moved train engine layout to its own data file, added separate data files for each carriage layout

Changed spawn position calculation, since the rails are in use now it will sort all the potential spawn positions by the one that is furthest away from players and other train cars.
It will determine whether it has the required track space to spawn the engine and however many carriages you have setup. If it doesn't it will pick the next best spawn position. If it fails 3 times it will abort and restart the spawn timer

Added config option "Use TruePVE exclusion hook" for turret targeting which when enabled it will tell TPVE to allow sentry turrets to shoot at players. This is disabled by default, you will be better off adding a exclusion to TruePVE but its there if you want to use it

Added config option "Helicopter Settings"/"Loot crates to spawn"
Added config option "Train Settings"/"Health regeneration per second"
Added config option "Train Settings"/"Train engine force"
Added config option "Train Settings"/"Train max speed"
Added config option "Train Settings"/"Amount of damage required to slow the train down"
Added config option "Train Settings"/"Amount of time the train slows down when damaged (seconds)"
Added config option "Train Settings"/"Maximum velocity the train can travel when slowed due to damage"
Added config option "Train Settings"/"Carriage layout"

Added chat command '/trainheist startnear' for admins to start the event near your position
Added support for branch switching if obstacles are in the way.
Added option to attach carriages to the train with their own loot, scientist and turret layouts
Prevent uncoupling of carriages (workaround currently pending hook approval and oxide update)

Moved loot table to its own data file
Moved train engine layout to its own data file, added separate data files for each carriage layout

Changed spawn position calculation, since the rails are in use now it will sort all the potential spawn positions by the one that is furthest away from players and other train cars.
It will determine whether it has the required track space to spawn the engine and however many carriages you have setup. If it doesn't it will pick the next best spawn position. If it fails 3 times it will abort and restart the spawn timer

Added config option "Use TruePVE exclusion hook" for turret targeting which when enabled it will tell TPVE to allow sentry turrets to shoot at players. This is disabled by default, you will be better off adding a exclusion to TruePVE but its there if you want to use it

Added config option "Helicopter Settings"/"Loot crates to spawn"
Added config option "Train Settings"/"Health regeneration per second"
Added config option "Train Settings"/"Train engine force"
Added config option "Train Settings"/"Train max speed"
Added config option "Train Settings"/"Amount of damage required to slow the train down"
Added config option "Train Settings"/"Amount of time the train slows down when damaged (seconds)"
Added config option "Train Settings"/"Maximum velocity the train can travel when slowed due to damage"
Added config option "Train Settings"/"Carriage layout"

Added chat command '/trainheist startnear' for admins to start the event near your position