Page 1 of 1

activity full guide plz

Posted: 21 Feb 2024, 19:42
by tankict
i want make custom activity, but i need know all thing, like yard, constist start... In general - full advanced tutorial or instruction, maybe i want too much, but it will be easier for me to understand all this if you explain what and how.

another question, where i can find XML-files of consist and trains? Or all this located in files like "Moscow.000"?

Re: activity full guide plz

Posted: 21 Feb 2024, 21:32
by Sjoerd
Sjoerd wrote: 27 Nov 2023, 15:06 Anyone can create new activities, you do not need a developer for that. You just need to learn the XML coding the simulator uses for this.
Read this (in Dutch, you might need Google Translate): viewtopic.php?t=1137
And the XML's for trains are included inside the 000-database files. Their names (for use in activities) are listed on the trains wiki-page and/or in the textfile included in the download.

Re: activity full guide plz

Posted: 22 Feb 2024, 10:36
by tankict
what about yards? just in this tutorial i not found

Re: activity full guide plz

Posted: 22 Feb 2024, 13:44
by tankict
idk why but train not want spawn...
I take 717 because i like this train.

Code: Select all

<activity name="ai" mappack="Simvliet" mapfile="simvliet1982.map" time="6:00:00">

 <controldata system="0" pack="Simvliet1982" file="Routes.ctd">
   <train code="101">
   <duty code="101-4" number="101#XO" route="CO"  time="6:30:30" ai="true"/>
   </train>
 </controldata>

 <constists>
  <consist start="SVC1">
   <train pack="Moscow" file="81-717.xml" number="1014">
    <cab id="1" scrollsign2="99"/>
   </train>
   <train pack="Moscow" file="81-714.xml"/>
   <train pack="Moscow" file="81-714.xml"/>
   <train pack="Moscow" file="81-717.xml" reversed="true">
    <cab id="0" scrollsign2="99"
   </train>
  </consist>
 </consists>
</activity>

Re: activity full guide plz

Posted: 22 Feb 2024, 17:19
by perfecttrains1000
tankict wrote: 22 Feb 2024, 13:44 idk why but train not want spawn...
I take 717 because i like this train.
A simple XML error is all, make sure to send code through an XML validator as code will not work with formatting errors

Code: Select all

<cab id="0" scrollsign2="99"
This bit of code on the bottom carriage/unit doesn't end with a "/>" on the code you provided.
Additionally, you spelt consists wrong at the start of the consists section, spelling it as "constists"

A corrected version can be found below:

Code: Select all

<activity name="ai" mappack="Simvliet" mapfile="simvliet1982.map" time="6:00:00">

 <controldata system="0" pack="Simvliet1982" file="Routes.ctd">
   <train code="101">
   <duty code="101-4" number="101#XO" route="CO"  time="6:30:30" ai="true"/>
   </train>
 </controldata>

 <consists>
  <consist start="SVC1">
   <train pack="Moscow" file="81-717.xml" number="1014">
    <cab id="1" scrollsign2="99"/>
   </train>
   <train pack="Moscow" file="81-714.xml"/>
   <train pack="Moscow" file="81-714.xml"/>
   <train pack="Moscow" file="81-717.xml" reversed="true">
    <cab id="0" scrollsign2="99"/>
   </train>
  </consist>
 </consists>
</activity>