TrainHeist

TrainHeist 0.2.22

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
This update is for the game update in a few hours. Do not install this prior to the upcoming game update

Fixed for Rust update
  • Like
Reactions: NedFlanders
Prevent train car being destroyed with explosives
Also mark player hostile if they attack the scientists on the train so the turret will target them
Added config option to change NPC health
Set initial train speed to config option
Changed config option for train speed to show the available options
  • Love
Reactions: TheDoc
Created custom extension method for checking contents of query buffer as Oxides isn't null checking
Added 'trainheist' console command
Send periodic network updates for loot as it can be slow to show on clients