Page 2 of 5

Re: How I create an activity

Posted: 20 Jul 2019, 09:24
by Sjoerd
perfecttrains1000 wrote: 20 Jul 2019, 08:59 Special Service NDP-SWP.zip

I have a problem with my activity and i searched over activities to find what was wrong but i found no problem (it happens with 1011PS and 1021SP reach their destinations are don't swap to 1011SP and 1021PS)
The problem is quite simple; first, you refer to the default "Rijndam 2022.ctd" file:

<controldata system="0" pack="Rijndam2022" file="Rijndam2022.ctd">

Then, you say in your services "have service 101 run route S-PS at 07:39:00 followed by S-SP at 07:51:00:

<duty code="101-1" number="101#PS" route="S-PS" time="07:39:00" ai="true"/>
<duty code="101-1" number="101#SP" route="S-SP" time="07:51:00" ai="true"/>

The problem; These routes do not exist in the default CTD file, so the simulator can not find them.

What will happen instead; the simulator sees train 1011PS, looks at the "S", and gives you paths towards Station Westplein. Once arrived there, your train number will not change, as the CTD route information it looks for (which it can't find as it isn't there) would have told the simulator that the route "S-PS" would have ended at the reversing track at Station Westplein (807). It does not have that information, and therefore the train number won't change.
You will also get no departure information on the screens on the platforms along the way (only the destination, as you pass the platforms).

So what you need to do:
1) Copy the default CTD file
2) Add the routes S-PS and S-SP
3) Refer in your activity to your new CTD file
4) Test it
5) When all is well, include it in your download package


For example, this is the route in de CTD file for M2, from Central Station to Westplein ("2-GS"):

Code: Select all

  <route code="2-GS" end="807" totaltime="886" reversetime="30" scrollsign="2-swp" >
   <aimarkers>
    <marker block="808" marker="808-1"/>
   </aimarkers>
   <times>
    <depart platform="RCSK" time="   0" destinationcode="28"  station="rcsk" actions="stop"         stops="RCSK"/>
    <stop   platform="RCS2" time="  90" destinationcode="28"  station="rcs"  actions="stop"         stops="RCS1,RCS2,RCS3,RCS4"/>
    <stop   platform="WHP2" time=" 184" destinationcode="28"  station="whp"  actions="stop"         stops="WHP1,WHP2"/>
    <stop   platform="NOP2" time=" 274" destinationcode="28"  station="nop"  actions="stop"         stops="NOP1,NOP2"/>
    <stop   platform="GGH4" time=" 229" destinationcode="28"  station="ggh"  actions="stop"         stops="GGH3,GGH4"/>
    <stop   platform="MKW2" time=" 387" destinationcode="28"  station="mkw"  actions="stop"         stops="MKW1,MKW2,MKW3,MKW4"/>
    <stop   platform="DMP2" time=" 469" destinationcode="28"  station="dmp"  actions="stop"         stops="DMP1,DMP2,DMP3,DMP4"/>
    <stop   platform="WSP2" time=" 556" destinationcode="28"  station="wsp"  actions="stop"         stops="WSP1,WSP2,WSP3"/>
    <stop   platform="BSL2" time=" 666" destinationcode="28"  station="bsl"  actions="stop"         stops="BSL1,BSL2"/>
    <stop   platform="BGW2" time=" 746" destinationcode="28"  station="bgw"  actions="stop"         stops="BGW1,BGW2"/>
    <stop   platform="SWP2" time=" 826" destinationcode=" 1"  station="swp"  actions="stop"         stops="SWP1,SWP2,SWP3" scrollsign="0-bd"/>
    <arrive platform="SWPK" time=" 886" destinationcode=" 1"  station="swpk" actions="stop,finish"         stops="SWPK"/>
   </times>
  </route>

Re: How I create an activity

Posted: 20 Jul 2019, 11:17
by perfecttrains1000
Sjoerd wrote: 20 Jul 2019, 09:24
The problem is quite simple; first, you refer to the default "Rijndam 2022.ctd" file:

<controldata system="0" pack="Rijndam2022" file="Rijndam2022.ctd">

Then, you say in your services "have service 101 run route S-PS at 07:39:00 followed by S-SP at 07:51:00:

<duty code="101-1" number="101#PS" route="S-PS" time="07:39:00" ai="true"/>
<duty code="101-1" number="101#SP" route="S-SP" time="07:51:00" ai="true"/>

The problem; These routes do not exist in the default CTD file, so the simulator can not find them.

What will happen instead; the simulator sees train 1011PS, looks at the "S", and gives you paths towards Station Westplein. Once arrived there, your train number will not change, as the CTD route information it looks for (which it can't find as it isn't there) would have told the simulator that the route "S-PS" would have ended at the reversing track at Station Westplein (807). It does not have that information, and therefore the train number won't change.
You will also get no departure information on the screens on the platforms along the way (only the destination, as you pass the platforms).

So what you need to do:
1) Copy the default CTD file
2) Add the routes S-PS and S-SP
3) Refer in your activity to your new CTD file
4) Test it
5) When all is well, include it in your download package

I did what you asked and it worked Thanks :D

Re: How I creat an activity

Posted: 30 Jul 2019, 13:41
by Lyon
Helllo, i create my activity, but is not start in the simulator, i need your Help

Re: How I creat an activity

Posted: 30 Jul 2019, 13:52
by MP 85
Lyon wrote: 30 Jul 2019, 13:41 Helllo, i create my activity, but is not start in the simulator, i need your Help
Does your activity appear in the simulator when you have to choose an activity? if this is not the case, there is probably an XML error in your actvity (errors that do not show your activity in the simulator). You can send your activity on the forum so that we can find the XML errors.

Re: How I creat an activity

Posted: 30 Jul 2019, 14:01
by Lyon
i need help with this, is not start in the simulator

Re: How I creat an activity

Posted: 30 Jul 2019, 15:51
by MP 85
I was able to solve all the XML problems of your activity.

Code: Select all

  <consist start="EES1">
   <train pack="TramCitadis" file="Citadis302_Lyon.xml"/>
    <cab id="0" enabled="true" ai="904"/>
    <pantographs raised="true"/>
   </train>
  </consist>
You put an "/" in too much when you put things associating with the rolling stock
"<train pack="TramCitadis" file="Citadis302_Lyon.xml"/>".

Code: Select all

  <consist start="EES1">
   <train pack="TramCitadis" file="Citadis302_Lyon.xml">
    <cab id="0" enabled="true" ai="904"/>
    <pantographs raised="true"/>
   </train>
  </consist>
So code </ train> is needed, no need to put a "/".

Code: Select all

  <consist start="TRM_RBP1">
   <train pack="K4500" file="K4500_Koln.xml">
    <cab id="0" enabled="true" ai="916"/>
    <pantographs raised="true"/>
   </train>
You forgot to close the code consists of forgetting "</consist>"

Code: Select all

  <consist start="TRM_RBP1">
   <train pack="K4500" file="K4500_Koln.xml">
    <cab id="0" enabled="true" ai="916"/>
    <pantographs raised="true"/>
   </train>
  </consist>

Re: How I creat an activity

Posted: 30 Jul 2019, 18:13
by Lyon
Thanks

Re: How I creat an activity

Posted: 30 Jul 2019, 18:14
by Lyon
Now im going to show how my activity

Re: How I creat an activity

Posted: 30 Jul 2019, 18:14
by Lyon
Just need to test

Re: How I creat an activity

Posted: 30 Jul 2019, 18:14
by Lyon
Thanks one more time