Jump to content

jeroezie

Member
  • Posts

    109
  • Joined

  • Last visited

Everything posted by jeroezie

  1. Hello, I found an bug when making an scenario with lua files. At Katowice Zawodzie, it is not possible to have both set up an train route from signal P to signal E and an shunting route from signal N10 to signal Tm10 (on the shunting track towards the workshop). If you want to clear one of those routes, it works fine. The problem starts when you also want to have the second signal cleared. If you set up the route from signal P to an other signal (D1, D2 or E3), you can have both the train route from signal P and the shunting route from N10 to Tm10 cleared simultaneously. A sketch with what route are and are not possible at the same time is included. The problem occurs if you try to clear the routes with code in the .lua file and with the developer menu.
  2. Luckily the base year for the simulation is 2018... I believe is wass still mechanical at that time.
  3. This will make dispatching at Lazy LC a lot easier, thanks.
  4. Thats the developer menu, which is available to the public. See here: https://wiki.simrail.eu/LUA/developer-tools
  5. The editor is not released yet. The only current option is to code the lua files manually.
  6. I tried some more today and I keep getting stuck with the signal triggers: Code I have tried: -- SimRail - The Railway Simulator -- LUA Scripting scenario -- Version: 1.0 -- require("SimRailCore") DeveloperMode = function() return true end StartPosition = {-10709.52, 282.68, 1584.34} -- spawn at KO perron 3 --StartPosition = {-10453.90, 271.73, 1498.06} -- spawn close to Katowice dispatcher building --StartPosition = {-8002.45, 265.52, 1563.43} -- spawn at Katowice Zawodzie for testing purposes Sounds = {} --Below are functions called by SimRail --- Function called by SimRail when the loading of scenario starts - generally designed for setting up necessery data and preloading-assets function PrepareScenario() end --- Function called by SimRail when the loading finishes - you should set scenario time in here, spawn trains etc. After calling this mission recorder is started and stuff gets registered function StartScenario() StaticTrains = {} StartRecorder() DisplayMessage("LuaText", 10) DisplayChatText("LuaText2") SetCameraView(CameraView.FirstPersonWalkingOutside) -- Spawn the players train PlayerTrainset = SpawnTrainsetOnSignal("trainset", FindSignal("KO_T"), 64, false, true, false, true, { CreateNewSpawnVehicleDescriptor(LocomotiveNames.EN71_011, false) }) PlayerTrainset.SetState(DynamicState.dsStop, TrainsetState.tsActivation, true) PlayerTrainset.SetRadioChannel(2, true) PlayerTrainset.SetTimetable(LoadTimetableFromFile("Temp/main_vehicle.xml"), false) -- Spawn a scenery train at Katowice Zawodzie SpawnTrainsetOnSignalAsync("static_train_KZ", FindSignal("KZ_N8"), 64, false, false, true, { CreateNewSpawnVehicleDescriptor(LocomotiveNames.ET22_836, false), CreateNewSpawnFullVehicleDescriptor(FreightWagonNames._441V_31516635283_3, false, FreightLoads_412W_v4.Sand, 20, BrakeRegime.P), CreateNewSpawnFullVehicleDescriptor(FreightWagonNames._441V_31516635512_5, true, FreightLoads_412W_v4.Sand, 20, BrakeRegime.P), CreateNewSpawnFullVehicleDescriptor(FreightWagonNames.SGS_3151_3944_773_6, false, "", 0, BrakeRegime.P), CreateNewSpawnFullVehicleDescriptor(FreightWagonNames.EAOS_3356_5300_177_6, false, FreightLoads_412W.Tree_trunk, 5000, BrakeRegime.P), CreateNewSpawnFullVehicleDescriptor(FreightWagonNames.SGS_3151_3947_512_5, false, FreightLoads_412W.RandomContainerAll, 10, BrakeRegime.P), CreateNewSpawnFullVehicleDescriptor(FreightWagonNames.SGS_3151_3944_773_6, false, FreightLoads_412W.RandomContainer2040, 10, BrakeRegime.P), CreateNewSpawnVehicleDescriptor(FreightWagonNames.Zas_8451_7862_699_8, false), CreateNewSpawnVehicleDescriptor(FreightWagonNames.Zaes_3351_7980_031_3, true), CreateNewSpawnVehicleDescriptor(FreightWagonNames.UACS_3351_9307_587_6, false), CreateNewSpawnFullVehicleDescriptor(FreightWagonNames.EAOS_3151_5349_475_9, false, FreightLoads_412W.Coal, 10000, BrakeRegime.P), CreateNewSpawnFullVehicleDescriptor(FreightWagonNames.EAOS_3151_5351_989_9, false, FreightLoads_412W.Coal, 10000, BrakeRegime.P), CreateNewSpawnFullVehicleDescriptor(FreightWagonNames.EAOS_3356_5300_118_0, false, FreightLoads_412W.Coal, 10000, BrakeRegime.P), CreateNewSpawnFullVehicleDescriptor(FreightWagonNames.EAOS_3351_5356_394_5, false, FreightLoads_412W.Coal, 10000, BrakeRegime.P), CreateNewSpawnVehicleDescriptor(FreightWagonNames.Zaes_3351_0079_375_1, true), }) end --function Test() -- PlayerTrainset.SetTimetable(LoadTimetableFromFile("Temp/main_vehicle2.xml"), true) --end PlayerTrainset = nil --- Function below is called by SimRail when VD is ready to start receiving orders function OnVirtualDispatcherReady() Log("Hello world!") DisplayChatText("Het sein wordt zometeen bedient.") VDSetRoute("KO_T", "KO_M1", VDOrderType.TrainRoute) end CreateSignalTrigger(FindSignal("KO_M1"), 360, { check = function(trainset) return trainset == PlayerTrainset end, result = function(trainset) VDSetRoute("KO_M1", "KO_E13", VDOrderType.TrainRoute) end }) --CreateSignalTrigger(FindSignal("KO_M1"), 150, --{ -- check = function (trainset) -- return true -- end, -- result = function(trainset) -- VDSetRouteWithVariant("KO_E13", "KO_Ckps", VDOrderType.TrainRoute, { -- GetMidPointVariant("z_KO_24cd", false), -- GetMidPointVariant("z_KO_24ab", false), -- GetMidPointVariant("z_KO_13cd", false), -- GetMidPointVariant("z_KO_13ab", false), -- GetMidPointVariant("z_KO_6cd", false), -- GetMidPointVariant("z_KO_6ab", false) --}) -- -- end --}) or: CreateSignalTrigger(FindSignal("KO_M1"), 20, { check = function (trainset) return true end, result = function(trainset) VDSetRoute("KO_M1", "KO_E13", VDOrderType.TrainRoute) end }) Is their anybody with I clue what I am doing wrong?
  7. Unfortunately I was not able to get your code to do anything. I am fully aware of the wiki made by the developers and the example scenario template by them, but they don't provide enough information/explanation of the code to made them understandable for someone hoe does not know how to code with lua already.
  8. Rather silly of my to write SPH instead of SHP... 🤔
  9. Thanks, that is the kind of information I was looking for. I will give implementing a try tomorrow.
  10. The Driver Machine Interface should indicate what level you are in, it should be either SPH (the normal level for Poland, you need to press the vigilance button before every signal) or any ETCS/ERTMS level, which should be Level 1 or 2. If you need to pass an signal at danger with an subsidiary signal lit (flashing white), I believe you need to activate the override first. I did not finish the ERTMS tutorial either so I am not 100% sure about how it works in Poland.
  11. Was ETCS active at that point? If yes, where you driving with SPH or in ERMTS levels 1 or 2?
  12. Hello all, I could really use some help with making a LUA scenario. I have found out how to spawn in a train in loading sequence and set up shunting/train routes. My problem is, that I don't understand how to code for letting things happen when out reach a certain track/signal or call the dispatcher at a certain location or moment in the scenario. Does someone know, where to find g good example or explanation on how to do so? I have provided the code I made up so far below. -- SimRail - The Railway Simulator -- LUA Scripting scenario -- Version: 1.0 -- require("SimRailCore") DeveloperMode = function() return true end -- StartPosition = {-10709.52, 282.68, 1584.34} -- spawn at perron 3 StartPosition = {-10453.90, 271.73, 1498.06} -- spawn close to Katowice dispatcher building Sounds = {} --Below are functions called by SimRail --- Function called by SimRail when the loading of scenario starts - generally designed for setting up necessery data and preloading-assets function PrepareScenario() end --- Function called by SimRail when the loading finishes - you should set scenario time in here, spawn trains etc. After calling this mission recorder is started and stuff gets registered function StartScenario() StaticTrains = {} StartRecorder() --VDSetCrossingState("L1_289.317_A", true) DisplayMessage("LuaText", 10) DisplayChatText("LuaText2") --WaitingBeforeZabkowiceEntry = false SetCameraView(CameraView.FirstPersonWalkingOutside) PlayerTrainset = SpawnTrainsetOnSignal(Treintje, FindSignal("KO_Tm26"), 32, false, true, false, false, { CreateNewSpawnVehicleDescriptor(LocomotiveNames.EN57_1821, false) }) PlayerTrainset.SetState(DynamicState.dsStop, TrainsetState.tsActivation, true) PlayerTrainset.SetRadioChannel(2, true) PlayerTrainset.SetTimetable(LoadTimetableFromFile("Temp/main_vehicle.xml"), false) --SetTestScenario() end --function Test() -- PlayerTrainset.SetTimetable(LoadTimetableFromFile("Temp/main_vehicle2.xml"), true) --end --- Function below is called by SimRail when VD is ready to start receiving orders function OnVirtualDispatcherReady() Log("Hello world!") DisplayChatText("Your train is located at track 22. Thats the track next close to platform number 5 and track 26.") VDSetRouteWithVariant("KO_Tm26", "KO_N10", VDOrderType.ManeuverRoute, { GetMidPointVariant("l1_ko_wk6", true), GetMidPointVariant("z_KO_43", false), GetMidPointVariant("z_KO_44", false), GetMidPointVariant("z_KO_46ab", true), GetMidPointVariant("z_KO_46cd", false), GetMidPointVariant("z_KO_47", true) }) DisplayChatText("Its very qwuite at the moment, I will set the shunting routo to the platform for you already. You can drive to the platform track when you are ready do to so.") DisplayChatText("Could you let me know when you are ready for departure from the platform?") end function OnPlayerRadioCall() -- Set train routes and clear signals from KO to SPl VDSetRouteWithVariant("KO_E18", "KO_Akps", VDOrderType.TrainRoute, { -- From KO to KZ GetMidPointVariant("z_KO_21cd", false), GetMidPointVariant("z_KO_21ab", false), GetMidPointVariant("z_KO_14cd", false), GetMidPointVariant("z_KO_14ab", false), GetMidPointVariant("z_KO_8cd", false), GetMidPointVariant("z_KO_8ab", false) }) --- VDSetRouteWithVariant("KO_M10", "KO_E18", VDOrderType.TrainRoute, { -- KO departure from platform GetMidPointVariant("z_KO_47", false), GetMidPointVariant("z_KO_42cd", false), GetMidPointVariant("z_KO_42ab", false), GetMidPointVariant("z_KO_41cd", false), GetMidPointVariant("z_KO_41ab", false), GetMidPointVariant("z_KO_38", false) }) VDSetRoute("KZ_P", "KZ_E", VDOrderType.TrainRoute) -- KZ entry VDSetRoute("KZ_E", "KZ_B2kps", VDOrderType.TrainRoute) -- KZ departure VDSetRoute("SG_Y", "SG_Skps", VDOrderType.TrainRoute) -- SG R52 VDSetRoute("SPł1_T", "SPł1_C", VDOrderType.TrainRoute) -- SPl entry end I hope that there is example with detail comments or instructions on how to do it, the ScenarioTemplate in the game files and the wiki from the developers in its current state do not provide enough information for me to be able to continue tinkering.
  13. Today I found out (by accident), that setting up and clearing train routes towards Myslowice track 1 (left track) does not work. The littele arrow for teh exit direction does not light up when you have selected the signal you want the train to go from, towards Myslowoce track 1. All other exit arrows to light up (exit for Glowny included, even with the lineblock not set up for it)
  14. In what mode is the etcs systeem when the problem occures?
  15. I agree, an general rule for sending slow freight trains in front of an pwj that kan do 160 km/h does not make sence to me.
  16. I agree theire where not enough Dutch speaking players around to justify running an Dutch server.
  17. Thanks, this trick helpt me out in another scenario (that I downloaded from the forum) where I had the same problem.
  18. The Sz button for signal D3 (track 3 from Zawiercie) is mislabeled as Sz D.
  19. Very interesting how this numbering works. Although I don't think the dev's will switch to a numberi g system that allows largdger numbers than 255 for those couple of tracks where it is a problem.
  20. I think you are right. Only passenger trains makes dispatching quite boring to do, especially on the smaller stations. If the speed differences become to lardge, maybe the developers could consider adding more empty stock trains or single locomotive trains. Maybe they could plan these to and from the different workshops along the lines?
  21. Hello Angelo, your website is a very useful tool and it also looks very cool. I noticed a small mistake when playing at Lazy La signal box, track 224 between Lazy Lc and La is mislabelled as track 324.
  22. Theire is already such a setting for cars. Maybe the dev's could consider a simular setting for passengers.
  23. Theire are two batteries for the DE 6400 provided, so you can swap them out easely during your shift. A picture of the battery loader of the 6477 in The Netherlands i provided.
  24. I expect that they will start fairly simple with shunting. For example, bring an passenger train from a siding to the platform. And then see how it goes and expand the shunting process in steps.
×
×
  • Create New...

Important Information

Terms of Use Privacy Policy