Medieval Engineers

Medieval Engineers

Train Parts Couplers
11 Comments
Dragon Fire 813 10 Jul, 2023 @ 4:54pm 
Figured out the problem, if you build the couplers in survival via a blueprint
the script for the block doesn't trigger. It thinks it's a normal rope hook and crashes when you try to connect, even after a reload. Picking up and replacing the block fixes it.
Dragon Fire 813 10 Jul, 2023 @ 4:33pm 
Here is the error part of the log:
=============================== FATAL EXCEPTION ================================
Exception occurred: System.NullReferenceException: Object reference not set to an instance of an object.
at Medieval.Entities.Components.Mechanical.MyRopeDrumComponent.CalculateMinRopeLength(MyRopeConstraint rope)
at Medieval.Entities.Components.Mechanical.MyRopeDrumComponent.OnConstraintActivate(MyConstraint rope)
at VRage.Components.Physics.MyConstraint.Activate(MyPhysicsComponentBase left, MyPhysicsComponentBase right)
at VRage.Components.Physics.MyPhysicsConstraintGroup.Activate(MyConstraint constraint, MyPhysicsComponentBase left, MyPhysicsComponentBase right)
at
Dragon Fire 813 10 Jul, 2023 @ 4:33pm 
VRage.Components.Physics.MyPhysicsConstraintGroup.AddLink(MyConstraintAttachmentComponent left, MyConstraintAttachmentComponent right, MyConstraint constraint)
at VRage.Scene.MyScene.GroupAddDataLinkInternal[TGroup,TObject,TLink](TGroup group, TObject left, TObject right, TLink link)
at VRage.Scene.MyScene.GroupAddDataLinkSynchronized[TGroup,TObject,TLink](TGroup group, TObject left, TObject right, TLink link)
at VRage.Scene.MyScene.Link[TGroup,TObject,TLink](TObject left, TObject right, TLink link)
at
Medieval.Entities.Components.Mechanical.MyMechanicalRopeAttachmentComponent.AttachRope(IMyRopeAttachmentComponent secondEntityAttachmentComp, MyRopeConstraintDefinition ropeDefinition)
at Medieval.GameSystems.Tools.MyRopeToolBehavior.AddRopeRequest(Int64 holder, Int64 entityA, Int64 entityB)
Dragon Fire 813 10 Jul, 2023 @ 4:32pm 
at VRage.Network.MyReplicationLayerBase.InvokeLocally[T1,T2,T3,T4,T5,T6,T7](CallSite`7 site, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7)
at VRage.Network.MyReplicationLayer.DispatchEvent[T1,T2,T3,T4,T5,T6,T7,T8](CallSite callSite, EndpointId recipient, Single unreliablePriority, T1& arg1, T2& arg2, T3& arg3, T4& arg4, T5& arg5, T6& arg6, T7& arg7, T8& arg8)
at VRage.Network.MyReplicationLayerBase.RaiseEvent[T1,T2,T3,T4,T5](T1 arg1, T5 arg5, Func`2 action, T2 arg2, T3 arg3, T4 arg4, EndpointId endpointId, Single unreliablePriority)
at Medieval.GameSystems.Tools.MyRopeToolBehavior.AttachRope()
at Medieval.GameSystems.Tools.MyRopeToolBehavior.Hit()
at Sandbox.Game.EntityComponents.Character.MyToolBehaviorBase.ActionHit(Int64 deltaFrames)
Dragon Fire 813 10 Jul, 2023 @ 4:32pm 
at VRage.Components.MyUpdateScheduler.RunTimedUpdates()
at VRage.Components.MyUpdateScheduler.RunUpdates(TimeSpan currentTime)
at Sandbox.Game.World.MySession.UpdateComponents()
at Sandbox.Game.World.MySession.Update(MyTimeSpan updateTime)
at Sandbox.MySandboxGame.Update()
at Sandbox.Engine.Platform.Game.UpdateInternal()
at Sandbox.Engine.Platform.Game.RunSingleFrame()
at VRage.Components.MyUpdateScheduler.RunFixedUpdates()
at VRage.Components.MyUpdateScheduler.RunUpdates(TimeSpan currentTime)
at Sandbox.Engine.Platform.MySandboxUpdate.<RunLoop>b__18_0()
at VRage.Utils.FixedLoop.Run(Action tickCallback)
at Sandbox.Engine.Platform.MySandboxUpdate.RunLoop()
at Medieval.MyProgram.Main(String[] args)
=============================== FATAL EXCEPTION ================================
Dragon Fire 813 10 Jul, 2023 @ 4:25pm 
I'm trying to connect 2 cars with chain hook-a couplers with the chain tool and every time I do the game crashes. The grids are dynamic so that's not the problem. I've connected cars in this save before with those couplers.
Hektor Riven 15 Jun, 2021 @ 5:44am 
Thank you very much!
We're trying to keep the mod list as small as possible, so we would like to avoid adding mods that are mainly cosmetic, however you're telling me how useful these components are and I'm going to add them immediately!
Xaerthus  [author] 15 Jun, 2021 @ 4:08am 
Please be welcome to ask as many questions as you please ;)

The couplings are not simple rope eyes, they are rather lockable drums without being able to turn and permanently locked. So every time you want to connect railcars together, just push them as close as possible and connect - they will automatically adjust the coupling length to the optimal one.

As for the connection itself, you can either use normal rope or the reusable 'coupling link' which is considerably stronger, but limited to 1m of length. Sadly for now it is impossible to change the texture on rope constraints so they all look like vanilla rope.
Hektor Riven 15 Jun, 2021 @ 2:25am 
I'm sorry if I'm having so many questions about all of these mods included in this wonderful pack, your patience is incredible!
I see by the pictures that there are components acting like the "rope eye" so that users can connect cars by the mean of a rope. I wonder if these blocks are exactly like the vanilla rope eyes but with a different look, more suitable to trains (so entirely cosmetics), or if the physics around them is changed (mass, strength, mechanics).
Thanks in advance!
Xaerthus  [author] 25 Sep, 2019 @ 4:46am 
@Dr Fraud The blocks itself not, but they can be mounted on 1x1 and 1x2 metal catches for them to be sprung and fully working - they can withstand the impact of several tons up to 50-60 km/h. (that is actually how the coupled cars are set up in the picture)
Dr Fraud 24 Sep, 2019 @ 2:11pm 
Are the Buffers sprung to absorb shock?