activity full guide plz

General discussions

Moderator: senjer

Post Reply
tankict
Posts: 3
Joined: 17 Feb 2024, 17:49

activity full guide plz

Post 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"?
User avatar
Sjoerd
Posts: 5669
Joined: 26 Dec 2014, 21:14
Location: Alphen aan den Rijn

Re: activity full guide plz

Post 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.
CEO of the Rijndam Electrical Transport company :D
tankict
Posts: 3
Joined: 17 Feb 2024, 17:49

Re: activity full guide plz

Post by tankict »

what about yards? just in this tutorial i not found
tankict
Posts: 3
Joined: 17 Feb 2024, 17:49

Re: activity full guide plz

Post 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>
User avatar
perfecttrains1000
Posts: 496
Joined: 30 Apr 2018, 17:50

Re: activity full guide plz

Post 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>
- Likes London Underground
- Somehow relates anything to trains
Post Reply