Creating an activity
Moderator: senjer
Creating an activity
Hi guys, after years of using the game activities I finally decided to create my own activity.
Activity on line D (Simvliet 2020) between Strandboulevard and Simvliet Centraal with a 15 min interval between trains to start with
I took inspiration from the "Morning line D" activity to make the code lines and of course from the activity guide
I think I have succeeded in starting (start time and program of my train), placing the 4 trains in station (including mine from Sim Central) but I am stuck on some points: the programming of the other trains, I can't understand a line of code that I saw in an activity + lines of code that I don't really understand
Thank you for clarifying this for me.
What is this line of code and do I need it?
<controldata system="0" pack="Simvliet2020" file="Routes.ctd">
<trains pack="Simvliet2020" file="Activities/TimetableWeekA.xml"/>
<trains pack="Simvliet2020" file="Activities/TimetableWeekB.xml"/>
<trains pack="Simvliet2020" file="Activities/TimetableWeekC.xml"/>
<trains pack="Simvliet2020" file="Activities/TimetableWeekD.xml"/>
<trains pack="Simvliet2020" file="Activities/TimetableWeekTrain.xml"/>
<trains pack="Simvliet2020" file="Activities/TimetableWeekTramCentrum.xml"/>
<trains pack="Simvliet2020" file="Activities/TimetableWeekTramStadhuis.xml"/>
<trains pack="Simvliet2020" file="Activities/TimetableWeekTramLightrail.xml"/>
<yard pack="Simvliet" file="sbv-metro.cty" departures="auto" arrivals="auto">
<shedule name="morning" time="05:00:00" autodepartures="05:20:00" autoarrivals="08:30:00">
<arrive code="408" train="4082EV" target="SBV" time="08:48:30" ai="true" track="SBVp2" direction="-1" units="2" stop="6"/>
<arrive code="409" train="4092EV" target="SBV" time="08:58:30" ai="true" track="SBVp2" direction="-1" units="2" stop="4"/>
<arrive code="411" train="4112EV" target="SBV" time="09:08:30" ai="true" track="SBVp2" direction="-1" units="2" stop="2"/>
<arrive code="413" train="4132EV" target="SBV" time="09:38:30" ai="true" track="SBVp1" direction="-1" units="2" stop="4"/>
</shedule>
<shedule name="evening" time="14:00:00" autodepartures="15:30:00" autoarrivals="17:30:00">
<depart code="415" train="4152VE" target="SBV" time="15:59:45" ai="true" track="SBVp1" direction="1" units="2" signnumber="15" signdest="d-scs"/>
<depart code="417" train="4172VE" target="SBV" time="16:09:45" ai="true" track="SBVp2" direction="1" units="2" signnumber="17" signdest="d-scs"/>
<depart code="418" train="4182VE" target="SBV" time="16:19:45" ai="true" track="SBVp2" direction="1" units="2" signnumber="18" signdest="d-scs"/>
<depart code="419" train="4192VE" target="SBV" time="16:29:45" ai="true" track="SBVp1" direction="1" units="2" signnumber="19" signdest="d-scs"/>
I have the impression that these lines of code correspond to the schedule for the departure and arrival of the depot, if this is the case. What do the lines of code correspond to for the schedule of the other 3 trains?
Activity on line D (Simvliet 2020) between Strandboulevard and Simvliet Centraal with a 15 min interval between trains to start with
I took inspiration from the "Morning line D" activity to make the code lines and of course from the activity guide
I think I have succeeded in starting (start time and program of my train), placing the 4 trains in station (including mine from Sim Central) but I am stuck on some points: the programming of the other trains, I can't understand a line of code that I saw in an activity + lines of code that I don't really understand
Thank you for clarifying this for me.
What is this line of code and do I need it?
<controldata system="0" pack="Simvliet2020" file="Routes.ctd">
<trains pack="Simvliet2020" file="Activities/TimetableWeekA.xml"/>
<trains pack="Simvliet2020" file="Activities/TimetableWeekB.xml"/>
<trains pack="Simvliet2020" file="Activities/TimetableWeekC.xml"/>
<trains pack="Simvliet2020" file="Activities/TimetableWeekD.xml"/>
<trains pack="Simvliet2020" file="Activities/TimetableWeekTrain.xml"/>
<trains pack="Simvliet2020" file="Activities/TimetableWeekTramCentrum.xml"/>
<trains pack="Simvliet2020" file="Activities/TimetableWeekTramStadhuis.xml"/>
<trains pack="Simvliet2020" file="Activities/TimetableWeekTramLightrail.xml"/>
<yard pack="Simvliet" file="sbv-metro.cty" departures="auto" arrivals="auto">
<shedule name="morning" time="05:00:00" autodepartures="05:20:00" autoarrivals="08:30:00">
<arrive code="408" train="4082EV" target="SBV" time="08:48:30" ai="true" track="SBVp2" direction="-1" units="2" stop="6"/>
<arrive code="409" train="4092EV" target="SBV" time="08:58:30" ai="true" track="SBVp2" direction="-1" units="2" stop="4"/>
<arrive code="411" train="4112EV" target="SBV" time="09:08:30" ai="true" track="SBVp2" direction="-1" units="2" stop="2"/>
<arrive code="413" train="4132EV" target="SBV" time="09:38:30" ai="true" track="SBVp1" direction="-1" units="2" stop="4"/>
</shedule>
<shedule name="evening" time="14:00:00" autodepartures="15:30:00" autoarrivals="17:30:00">
<depart code="415" train="4152VE" target="SBV" time="15:59:45" ai="true" track="SBVp1" direction="1" units="2" signnumber="15" signdest="d-scs"/>
<depart code="417" train="4172VE" target="SBV" time="16:09:45" ai="true" track="SBVp2" direction="1" units="2" signnumber="17" signdest="d-scs"/>
<depart code="418" train="4182VE" target="SBV" time="16:19:45" ai="true" track="SBVp2" direction="1" units="2" signnumber="18" signdest="d-scs"/>
<depart code="419" train="4192VE" target="SBV" time="16:29:45" ai="true" track="SBVp1" direction="1" units="2" signnumber="19" signdest="d-scs"/>
I have the impression that these lines of code correspond to the schedule for the departure and arrival of the depot, if this is the case. What do the lines of code correspond to for the schedule of the other 3 trains?
Re: Creating an activity
This tells the simulator which XML files to load containing timetables for all the trains in the simulation.metro1 wrote: ↑16 Oct 2022, 13:47 What is this line of code and do I need it?
<controldata system="0" pack="Simvliet2020" file="Routes.ctd">
<trains pack="Simvliet2020" file="Activities/TimetableWeekA.xml"/>
<trains pack="Simvliet2020" file="Activities/TimetableWeekB.xml"/>
<trains pack="Simvliet2020" file="Activities/TimetableWeekC.xml"/>
<trains pack="Simvliet2020" file="Activities/TimetableWeekD.xml"/>
<trains pack="Simvliet2020" file="Activities/TimetableWeekTrain.xml"/>
<trains pack="Simvliet2020" file="Activities/TimetableWeekTramCentrum.xml"/>
<trains pack="Simvliet2020" file="Activities/TimetableWeekTramStadhuis.xml"/>
<trains pack="Simvliet2020" file="Activities/TimetableWeekTramLightrail.xml"/>
This are departure / Arrival instructions for the depots. For example at 15:59:45 a train with trainnumber 4152VE should leave the depot from track SBVp1, and it consists out of 2 coupled units.metro1 wrote: ↑16 Oct 2022, 13:47
<yard pack="Simvliet" file="sbv-metro.cty" departures="auto" arrivals="auto">
<shedule name="morning" time="05:00:00" autodepartures="05:20:00" autoarrivals="08:30:00">
<arrive code="408" train="4082EV" target="SBV" time="08:48:30" ai="true" track="SBVp2" direction="-1" units="2" stop="6"/>
<arrive code="409" train="4092EV" target="SBV" time="08:58:30" ai="true" track="SBVp2" direction="-1" units="2" stop="4"/>
<arrive code="411" train="4112EV" target="SBV" time="09:08:30" ai="true" track="SBVp2" direction="-1" units="2" stop="2"/>
<arrive code="413" train="4132EV" target="SBV" time="09:38:30" ai="true" track="SBVp1" direction="-1" units="2" stop="4"/>
</shedule>
<shedule name="evening" time="14:00:00" autodepartures="15:30:00" autoarrivals="17:30:00">
<depart code="415" train="4152VE" target="SBV" time="15:59:45" ai="true" track="SBVp1" direction="1" units="2" signnumber="15" signdest="d-scs"/>
<depart code="417" train="4172VE" target="SBV" time="16:09:45" ai="true" track="SBVp2" direction="1" units="2" signnumber="17" signdest="d-scs"/>
<depart code="418" train="4182VE" target="SBV" time="16:19:45" ai="true" track="SBVp2" direction="1" units="2" signnumber="18" signdest="d-scs"/>
<depart code="419" train="4192VE" target="SBV" time="16:29:45" ai="true" track="SBVp1" direction="1" units="2" signnumber="19" signdest="d-scs"/>
If you are a beginner, I would suggest not using departure/arrival in the depots in your first activity. It's easier to make an activity with all the needed trains already in service.
CEO of the Rijndam Electrical Transport company
Re: Creating an activity
In fact I'm not sure I understood the function of each file,
the route.ctd file : I know that at first sight it is essential to make an activity ok
The .act file : I wrote the schedule of my train and the placement of the other trains but I would like to know what is its precise function in relation to the simulator ?
The .xml file: What is also its function even if I think I have the idea that it is related to the schedule?
What file should I put the timetable of other trains in?
<controldata system="0" pack="Simvliet2020" file="Routes.ctd">
<trains pack="Simvliet2020" file="Activities/TimetableWeekA.xml"/>
<trains pack="Simvliet2020" file="Activities/TimetableWeekB.xml"/>
<trains pack="Simvliet2020" file="Activities/TimetableWeekC.xml"/>
<trains pack="Simvliet2020" file="Activities/TimetableWeekD.xml"/>
<trains pack="Simvliet2020" file="Activities/TimetableWeekTrain.xml"/>
<trains pack="Simvliet2020" file="Activities/TimetableWeekTramCentrum.xml"/>
<trains pack="Simvliet2020" file="Activities/TimetableWeekTramStadhuis.xml"/>
<trains pack="Simvliet2020" file="Activities/TimetableWeekTramLightrail.xml"/>
And concerning this line of code, do I have to keep all of them or can I only keep the first line?
the route.ctd file : I know that at first sight it is essential to make an activity ok
The .act file : I wrote the schedule of my train and the placement of the other trains but I would like to know what is its precise function in relation to the simulator ?
The .xml file: What is also its function even if I think I have the idea that it is related to the schedule?
What file should I put the timetable of other trains in?
<controldata system="0" pack="Simvliet2020" file="Routes.ctd">
<trains pack="Simvliet2020" file="Activities/TimetableWeekA.xml"/>
<trains pack="Simvliet2020" file="Activities/TimetableWeekB.xml"/>
<trains pack="Simvliet2020" file="Activities/TimetableWeekC.xml"/>
<trains pack="Simvliet2020" file="Activities/TimetableWeekD.xml"/>
<trains pack="Simvliet2020" file="Activities/TimetableWeekTrain.xml"/>
<trains pack="Simvliet2020" file="Activities/TimetableWeekTramCentrum.xml"/>
<trains pack="Simvliet2020" file="Activities/TimetableWeekTramStadhuis.xml"/>
<trains pack="Simvliet2020" file="Activities/TimetableWeekTramLightrail.xml"/>
And concerning this line of code, do I have to keep all of them or can I only keep the first line?
Re: Creating an activity
This file tells the simulator how to control the switches; in each junction, how to set paths for trains based on their destination codes.
Also, all the routes (from start to end station, the departure times (in seconds from departure rom the first stop), and the destination codes for the information displays at the stops are defined here.
This is your activity. In here, you define where all trains are at the beginning of the activity, and which service they are on. Also, if it applies, arrivals and departures from depots. You also define the start time, name, and driver instructions (the timetable the driver can acces) here.
The XML files store the services for all trains. You need to load the ones that are relevant to the trains in your activity. If you assign a service number to a train, it will look in these XML files to see what it has to do. Like start on a certain route at a certain time. That route is defined in the CTD file.
All the timetables are in the xml files.
In older activities, the timetables for all trains may be included in the act-file, and there are no xml files loaded.
The first line tells the simulator to load which CTD file ("Routes.ctd") and where to find it (in the pack "Simvliet2020"). If you leave it out, none of the switches and depature boards in the simulation will function.metro1 wrote: ↑19 Oct 2022, 16:10 <controldata system="0" pack="Simvliet2020" file="Routes.ctd">
<trains pack="Simvliet2020" file="Activities/TimetableWeekA.xml"/>
<trains pack="Simvliet2020" file="Activities/TimetableWeekB.xml"/>
<trains pack="Simvliet2020" file="Activities/TimetableWeekC.xml"/>
<trains pack="Simvliet2020" file="Activities/TimetableWeekD.xml"/>
<trains pack="Simvliet2020" file="Activities/TimetableWeekTrain.xml"/>
<trains pack="Simvliet2020" file="Activities/TimetableWeekTramCentrum.xml"/>
<trains pack="Simvliet2020" file="Activities/TimetableWeekTramStadhuis.xml"/>
<trains pack="Simvliet2020" file="Activities/TimetableWeekTramLightrail.xml"/>
And concerning this line of code, do I have to keep all of them or can I only keep the first line?
The other lines are the timetable XMLs which are used for trains in this activity. Without these files, the trains will not find their assigned service, and will not know what to do.
CEO of the Rijndam Electrical Transport company
Re: Creating an activity
Hello !
I made two simple activities where the concept is simple.
Activity one (City Of thames with MF73):
Activity two (RijndamMetro2022 with M5-RET metro):
I made two simple activities where the concept is simple.
- Train A&B are coupled and arrive at station.
- They uncouple, and A left the station somewhere else.
- Train C arrive, head into the station and couple with B, still on platform.
- Then, B&C coupled go for their next shedule.
Activity one (City Of thames with MF73):
Code: Select all
<activity name="JoinSplit" mappack="LUI" mapfile="lui.map" time="08:00:00">
<playerduty title="JoinSplit tests" starttime="08:00:00" endtime="08:20:00">
<duty startpos="Southwick Park" starttime="08:00:00" endpos="Simpleton" endtime="08:05:00">
<line1>Drive train 4012KS</line1>
<line2>Make some tests</line2>
</duty>
</playerduty>
<controldata system="0" pack="LUI" file="Routes316.ctd">
<train code="401">
<duty code="401" number="401#VS" route="Green-VS" time="08:03:00" ai="true">
<!-- <split blocks="4301,4302,4303" cab="2" newcode1="9994SS" newcode2="4013SA"/> -->
<split blocks="4301,4302,4303" cab="-1" newcode2="9993NN" newcode1="4013SA"/>
</duty>
<duty code="401" number="401#SA" route="Green-SA" time="08:09:00" ai="true"/>
</train>
<train code="402">
<duty code="402" number="402#AS" route="Green-AS" time="08:03:00" ai="true">
<!-- <join blocks="4301,4302,4303" junctiongroup="SPT" signals="SP12,SP34,SP14" train="999" reverseorder="true" newcode="4029SV"/> -->
<join blocks="4301,4302,4303" junctiongroup="SPT" signals="SP12,SP34" train="999" newcode="4029SV"/>
</duty>
<duty code="402" number="402#SV" route="Green-SV" time="08:13:00" ai="true"/>
</train>
<train code="444">
<duty code="444" number="444#KG" route="Green-KG" time="08:28:00" ai="true" />
<duty code="444" number="444#GJ" route="Green-GJ-Fast" time="08:52:00" ai="true" />
</train>
<yard pack="LUI" file="SWD.cty" departures="auto" arrivals="auto">
<shedule name="All" time="08:00:00" autodepartures="08:00:00" autoarrivals="08:00:00">
<arrive code="402" train="4026SV" target="SWP" time="08:20:00" ai="true" track="4523" direction="-1" units="2" stop="1" />
<depart code="444" train="4447KG" target="SWP" time="08:25:00" ai="true" track="4532" direction="1" units="1" signnumber="444" signdest="Green-GWR"/>
</shedule>
</yard>
</controldata>
<consists>
<consist start="SWD11" controlsystem="0" trainnumber="4019VS" timetable="401" position="-9">
<!-- <train pack="AlstomMetro" file="MF67_4car_Auteuil.xml">
-->
<train pack="AlstomMetro" file="MF67_3car_2012.xml">
<cab id="0" ai="401" mycontrol="true"/>
<car id="0" scrollsign1="1" scrollsign2="9" scrollsign3="09"/>
<car id="1" scrollsign3="09"/>
<car id="2" scrollsign1="1" scrollsign2="9" scrollsign3="09"/>
</train>
<train pack="AlstomMetro" file="MF67_3car_2012.xml">
<car id="0" scrollsign3="14" scrollsign2="01" scrollsign1="1"/>
<car id="1" scrollsign3="14"/>
<!-- <car id="2" scrollsign3="14"/> -->
<!-- <car id="3" scrollsign3="14"/> -->
<car id="2" scrollsign3="14" scrollsign2="01" scrollsign1="1"/>
</train>
</consist>
<consist start="ADG6" controlsystem="0" trainnumber="4025AS" timetable="402">
<train pack="AlstomMetro" file="MF67_3car_2012.xml">
<cab id="0" enabled="true" ai="402"/>
<car id="0" scrollsign3="14" scrollsign2="02" scrollsign1="12"/>
<car id="1" scrollsign3="14"/>
<!-- <car id="2" scrollsign3="14"/> -->
<!-- <car id="3" scrollsign3="14"/> -->
<car id="2" scrollsign3="14" scrollsign2="02" scrollsign1="12"/>
</train>
</consist>
<consist start="SWD32">
<train pack="London" file="LUS7.xml"/>
</consist>
</consists>
</activity>
Code: Select all
<activity name="M5 train OP" mappack="RijndamMetro2022" mapfile="RijndamMetro2022.map" time="07:59:40">
<playerduty title="Line M5 - service 0" starttime="08:00:00" endtime="09:41:30">
<duty startpos="x" starttime="08:00:00" endpos="x" endtime="08:12:00">
<line1>Drive train x</line1>
</duty>
</playerduty>
<controldata system="0" pack="RijndamMetro2022" file="RijndamMetro2022.ctd">
<train code="451">
<duty code="451-#" number="451#CT" route="5-CT" time="07:53:00" ai="true">
<split blocks="828,848" cab="-1" newcode1="4511TQ" newcode2="5411TC"/>
</duty>
<duty code="451-#" number="451#TQ" route="5-TD" time="08:04:00" ai="true"/>
</train>
<train code="551">
<duty code="551-#" number="551#DC" route="5-DT" time="08:05:00" ai="true">
<!-- <join blocks="828,848" junctiongroup="TRD2" train="541" newcode="5412TC"/> -->
<join blocks="828,848" junctiongroup="TRD2" train="541" newcode="5412TC" signals="8491,#S1813,#S3062"/>
</duty>
</train>
<train code="541">
<duty code="541-#" number="541#TC" route="4-TC" time="08:13:00" ai="true"/>
</train>
<trainnumber old="F10001" new="9909NN" />
<trainnumber old="F10002" new="4512CT" timetable="451"/>
<trainnumber old="F10003" new="5511DC" timetable="551"/>
</controldata>
<consists>
<consist start="RKD2">
<train pack="Amsterdam" file="M5_RET.xml">
<cab id="0" enabled="true" ai="451"/>
<car id="0" scrollsign3="4" scrollsign2="41" scrollsign1="19"/><car id="1" scrollsign3="4" scrollsign1="19"/><car id="2" scrollsign3="4" scrollsign2="41" scrollsign1="19"/>
</train>
<train pack="Amsterdam" file="M5_RET.xml">
<car id="0" scrollsign3="4" scrollsign2="41" scrollsign1="16"/><car id="1" scrollsign3="4" scrollsign1="16"/><car id="2" scrollsign3="4" scrollsign2="41" scrollsign1="16"/>
</train>
</consist>
<consist start="DNA1">
<train pack="Amsterdam" file="M5_RET.xml">
<cab id="0" enabled="true" ai="551" mycontrol="true"/>
<car id="0" scrollsign3="5" scrollsign2="42" scrollsign1="21"/><car id="1" scrollsign3="5" scrollsign1="21"/><car id="2" scrollsign3="5" scrollsign2="42" scrollsign1="21"/>
</train>
</consist>
</consists>
</activity>
Citadis : French Type of trams (yes, i'm french )
Sorry for my english but enjoy Metro Sim Beta !
Sorry for my english but enjoy Metro Sim Beta !
Re: Creating an activity
Hi, I am creating an activity, but I have to do split codes on the evening trains, trams, and metros to complete it. Even with my numerous attempts to do it, the simulator never runs the timetable files on the activity when I put the split codes on the timetable. I don't know what I am doing wrong and I tried to modify the timetable files multiple times, I reached the forum for an answer but was unsuccessful.
I brought an example of what I am doing, and I want to know from you guys, that are more experient with this if you can tell me what am I doing wrong?
I brought an example of what I am doing, and I want to know from you guys, that are more experient with this if you can tell me what am I doing wrong?
Code: Select all
<train code="362">
<duty code="362-x" number="362#DE" route="C-DE" time="19:19:30" ai="true"/>
<split blocks="601,602" cab="-3" newcode1="3622ED" newcode2="3722EX"/>
</duty>
<duty code="362-x" number="362#ED" route="C-ED" time="20:04:30" ai="true"/>
</train>
<train code="372">
<duty code="372-x" number="372#EX" route="X-EX" time="20:06:30" ai="true"/>
</train>
Last edited by Lyon on 26 Feb 2023, 13:05, edited 1 time in total.
You dont love tram much i love
- perfecttrains1000
- Posts: 506
- Joined: 30 Apr 2018, 17:50
Re: Creating an activity
The problem is that route X-EX does not exist on the routes xml file, unless you created one yourself for your own version
- Likes London Underground
- Somehow relates anything to trains
- Somehow relates anything to trains
Re: Creating an activity
Oh yes i created it, but even with it, the activity file does not read my timetable file.
If i remove the (</duty>) the activity file reads the timetable file but doesnt do the split
If i remove the (</duty>) the activity file reads the timetable file but doesnt do the split
You dont love tram much i love
- perfecttrains1000
- Posts: 506
- Joined: 30 Apr 2018, 17:50
Re: Creating an activity
Oh I know why, you need to remove the '/' after the first duty block
Currently you have it as
when it should be
it is because the split blocks is within that duty block so just like when you add additional information to consists, you remove the '/', its a syntax issue
Currently you have it as
Code: Select all
<duty code="362-x" number="362#DE" route="C-DE" time="19:19:30" ai="true"/>
Code: Select all
<duty code="362-x" number="362#DE" route="C-DE" time="19:19:30" ai="true">
- Likes London Underground
- Somehow relates anything to trains
- Somehow relates anything to trains
Re: Creating an activity
Omg thank you very much, when i arrive at home i will change it
You dont love tram much i love