act bestand

Algemene discussies over de simulator.

Moderator: senjer

Post Reply
Giovanni1998
Posts: 22
Joined: 02 May 2018, 21:22

act bestand

Post by Giovanni1998 »

Zou iemand me kunnen uitleggen hoe ik een act bestand maak ik heb de wiki gevolgd maar hij word niet herkend in de menu.
Iemand enig idee wat ik fout doe ?

Code: Select all

<activity name="Spoorwerkzaamheden " mappack="Custom" mapfile="simvliet2020.map" time="12:00:00"> 
 <playerduty title="Vismarkt" starttime="12:00:00" endtime="12:49:45">
  <duty startpos="SVC2" starttime="12:00:00" endpos="BGN3" endtime="12:09:45">
   <line1>Drive train 7312CB</line1>
  </duty>
  <duty startpos="BGN3" starttime="12:12:00" endpos="SVCK" endtime="12:27:15">
   <line1>Drive train 7312BK</line1>
  </duty>
  <duty startpos="SVC2" starttime="12:34:00" endpos="BGN3" endtime="12:49:45">
   <line1>Drive train 7312CB</line1>
  </duty>
 </playerduty>
 <controldata system="0" pack="Simvliet2020" file="Routes.ctd">
  <!----LIJN A---->
  <train code="731"> <!-- SVC2 -->
   <duty code="731-2" number="731#CB" route="A-CB"  time="12:02:00" ai="true"/>
   <duty code="731-2" number="731#BK" route="A-BK"  time="12:12:00" ai="true"/>
   <duty code="731-2" number="731#CB" route="A-CB"  time="12:20:00" ai="true"/>
   <duty code="731-2" number="731#BK" route="A-BK"  time="12:28:00" ai="true"/>
   <duty code="731-2" number="731#CB" route="A-CB"  time="12:35:00" ai="true"/>
   <duty code="731-2" number="731#BK" route="A-BK"  time="12:52:00" ai="true"/>
   <duty code="731-2" number="731#CX" route="A-CX"  time="13:00:00" ai="true"/>
  </train>
  <train code="732"> <!-- BGN3 -->
   <duty code="732-2" number="732#BK" route="A-BK"  time="12:02:00" ai="true"/>
   <duty code="732-2" number="732#CB" route="A-CB"  time="12:12:00" ai="true"/>
   <duty code="732-2" number="732#BK" route="A-BK"  time="12:20:00" ai="true"/>
   <duty code="732-2" number="732#CB" route="A-CB"  time="12:28:00" ai="true"/>
   <duty code="732-2" number="732#BK" route="A-BK"  time="12:35:00" ai="true"/>
   <duty code="732-2" number="732#CB" route="A-CB"  time="12:52:00" ai="true"/>
   <duty code="732-2" number="732#BK" route="A-BK"  time="13:00:00" ai="true"/>
  </train>
  
  <!----LIJN B---->
  <train code="281"> <!-- SDW2 -->
   <duty code="281-2" number="281#SM" route="B-SM"  time="12:02:00" ai="true"/>
   <duty code="281-2" number="281#MS" route="B-MS"  time="12:12:00" ai="true"/>
   <duty code="281-2" number="281#SM" route="B-SM"  time="12:20:00" ai="true"/>
   <duty code="281-2" number="281#MS" route="B-MS"  time="12:28:00" ai="true"/>
   <duty code="281-2" number="281#SM" route="B-SM"  time="12:35:00" ai="true"/>
   <duty code="281-2" number="281#MS" route="B-MS"  time="12:52:00" ai="true"/>
   <duty code="281-2" number="281#SW" route="B-SW"  time="13:00:00" ai="true"/>
  </train>
  <train code="282"> <!-- MLS1 -->
   <duty code="282-2" number="282#MS" route="B-MS"  time="12:02:00" ai="true"/>
   <duty code="282-2" number="282#SM" route="B-SM"  time="12:12:00" ai="true"/>
   <duty code="282-2" number="282#MS" route="B-MS"  time="12:20:00" ai="true"/>
   <duty code="282-2" number="282#SM" route="B-SM"  time="12:28:00" ai="true"/>
   <duty code="282-2" number="282#MS" route="B-MS"  time="12:35:00" ai="true"/>
   <duty code="282-2" number="282#SM" route="B-SM"  time="12:52:00" ai="true"/>
   <duty code="282-2" number="282#MV" route="B-MV"  time="13:00:00" ai="true"/>
  </train>
    
  <!----LIJN C---->
  <train code="301"> <!-- LEL1 -->
   <duty code="301-3" number="301#LT" route="C-LT"  time="12:02:00" ai="true"/>
   <duty code="301-3" number="301#TL" route="C-TL"  time="12:24:00" ai="true"/>
   <duty code="301-3" number="301#LS" route="C-LS"  time="12:34:00" ai="true"/>
   <duty code="301-3" number="301#SL" route="C-SL"  time="12:44:00" ai="true"/>
   <duty code="301-3" number="301#LT" route="C-LT"  time="13:06:00" ai="true"/>
   <duty code="301-3" number="301#TL" route="C-TL"  time="13:28:00" ai="true"/>
   <duty code="301-3" number="301#LX" route="C-LX"  time="13:42:00" ai="true"/>
  </train>
  <train code="302"> <!-- SAP2 -->
   <duty code="302-3" number="302#TL" route="C-TL"  time="12:02:00" ai="true"/>
   <duty code="302-3" number="302#LT" route="C-LT"  time="12:24:00" ai="true"/>
   <duty code="302-3" number="302#TB" route="C-TB"  time="12:34:00" ai="true"/>
   <duty code="302-3" number="302#BT" route="C-BT"  time="12:44:00" ai="true"/>
   <duty code="302-3" number="302#TL" route="C-TL"  time="13:06:00" ai="true"/>
   <duty code="302-3" number="302#LT" route="C-LT"  time="13:28:00" ai="true"/>
   <duty code="302-3" number="302#TX" route="C-TX"  time="13:42:00" ai="true"/>
  </train>

  <timetables title="Timetable">
   <timetable title="Timetable Eastbound" sort="BGN">
    <route>A-TX</route>
    <route>A-TA</route>
    <route>A-CX</route>
	<route>A-CA</route>
    <route>B-TX</route>
    <route>B-TM</route>
    <route>B-CX</route>
	<route>B-CM</route>
    <route>C-TX</route>
    <route>C-TL</route>
    <route>C-CX</route>
	<route>C-CL</route>
    <route>X-TX</route>
    <route>X-CX</route>
    <station code="SAP"/>
    <station code="WTC" group="SAP"/>
    <station code="UNI" group="SAP"/>
    <station code="WPK" group="SAP"/>
    <station code="SVC"/>
    <station code="ADP" group="SVC"/>
    <station code="KVL" group="SVC"/>
    <station code="BGN"/>
    <station code="VMT" group="BGN"/>
    <station code="RSL" group="BGN"/>
    <station code="SDW"/>
    <station code="NPL" group="SDW"/>
    <station code="VRW" group="SDW"/>
    <station code="SST"/>
    <station code="ARA"/>
    <station code="TVD"/>
    <station code="BLN"/>
    <station code="RZP" group="BLN"/>
    <station code="WTL" group="BLN"/>
    <station code="MLS"/>
    <station code="DMW"/>
    <station code="EDW" group="DMW"/>
    <station code="PLN" group="DMW"/>
    <station code="OPK" group="DMW"/>
    <station code="LEL"/>
   </timetable>
   <timetable title="Timetable Westbound" sort="BGN">
    <route>A-AX</route>
    <route>A-AC</route>
    <route>A-AK</route>
	<route>A-AT</route>
    <route>A-XC</route>
    <route>A-XK</route>
	<route>A-XT</route>
	<route>B-MX</route>
	<route>B-MC</route>
    <route>B-MK</route>
    <route>B-MT</route>
	<route>B-XC</route>
	<route>B-XK</route>
    <route>B-XT</route>
    <route>C-LX</route>
	<route>C-LC</route>
	<route>C-LK</route>
	<route>C-LT</route>
	<route>C-XC</route>
	<route>C-XK</route>
    <route>C-XT</route>
	<route>X-XC</route>
	<route>X-XK</route>
    <route>X-XT</route>
    <station code="LEL"/>
    <station code="OPK" group="LEL"/>
    <station code="PLN" group="LEL"/>
    <station code="EDW" group="LEL"/>
    <station code="DMW" group="LEL"/>
    <station code="MLS"/>
    <station code="WTL" group="MLS"/>
    <station code="RZP" group="MLS"/>
    <station code="BLN" group="MLS"/>
    <station code="TVD"/>
    <station code="ARA"/>
    <station code="SST"/>
    <station code="VRW" group="SST"/>
    <station code="NPL" group="SST"/>
    <station code="SDW"/>
    <station code="RSL" group="SDW"/>
    <station code="VMT" group="SDW"/>
    <station code="BGN"/>
    <station code="KVL" group="BGN"/>
    <station code="ADP" group="BGN"/>
    <station code="SVC"/>
    <station code="WPK" group="SVC"/>
    <station code="UNI" group="SVC"/>
    <station code="WTC" group="SVC"/>
    <station code="SAP"/>
   </timetable>
  </timetables>

  <trainnumber old="F10001" new="7312CB" timetable="731"/>
  <trainnumber old="F10002" new="7322BK" timetable="732"/>

  <trainnumber old="F10003" new="2812SM" timetable="281"/>
  <trainnumber old="F10004" new="2822MS" timetable="282"/>

  <trainnumber old="F10005" new="3013LT" timetable="301"/>
  <trainnumber old="F10006" new="3023TL" timetable="302"/>
  
  <command>9911GG NA TRI</command>
  <command>9921EE XB TRI</command>
  <command>9931QQ CB TRI</command>
  <command>9941RR CD TRI</command>
 </controldata>

 <consists>
  <!-- LIJN A -->
  <consist start="SVC2">
   <train pack="RET" file="5500.xml">
    <car id="0" scrollsign1="6.0"  scrollsign2="31"/>
	<car id="1" scrollsign1="6.0"  scrollsign2="31"/>
    <car id="2" scrollsign1="6.0"  scrollsign2="31"/>
   </train>
   <train pack="RET" file="5600-2017.xml">
    <car id="0" scrollsign1="6.0"  scrollsign2="31"/>
	<car id="1" scrollsign1="6.0"  scrollsign2="31"/>
    <car id="2" scrollsign1="6.0"  scrollsign2="31"/>
   </train>
  </consist>
  <consist start="BGN3">
   <train pack="RET" file="5500.xml">
    <car id="0" scrollsign1="6.0"  scrollsign2="31"/>
	<car id="1" scrollsign1="6.0"  scrollsign2="31"/>
    <car id="2" scrollsign1="6.0"  scrollsign2="31"/>
   </train>
   <train pack="RET" file="5600-2017.xml">
    <car id="0" scrollsign1="6.0"  scrollsign2="31"/>
	<car id="1" scrollsign1="6.0"  scrollsign2="31"/>
    <car id="2" scrollsign1="6.0"  scrollsign2="31"/>
   </train>
  </consist>
  <consists>
  
  <!-- LIJN B -->
  <consist start="SDW2">
   <train pack="RET" file="5500.xml">
    <car id="0" scrollsign1="6.0"  scrollsign2="81"/>
	<car id="1" scrollsign1="6.0"  scrollsign2="81"/>
    <car id="2" scrollsign1="6.0"  scrollsign2="81"/>
   </train>
   <train pack="RET" file="5500.xml">
    <car id="0" scrollsign1="6.0"  scrollsign2="81"/>
	<car id="1" scrollsign1="6.0"  scrollsign2="81"/>
    <car id="2" scrollsign1="6.0"  scrollsign2="81"/>
   </train>
  </consist>
  <consist start="MLS1" position="23">
   <train pack="RET" file="5600-2017.xml">
    <cab id="0" enabled="true" ai="732"/>
	<pantographs raised="true"/>
    <car id="0" scrollsign1="6.0"  scrollsign2="82"/>
	<car id="1" scrollsign1="6.0"  scrollsign2="82"/>
    <car id="2" scrollsign1="6.0"  scrollsign2="82"/>
   </train>
   <train pack="RET" file="5600-2017.xml">
    <pantographs raised="true"/>
    <car id="0" scrollsign1="6.0"  scrollsign2="82"/>
	<car id="1" scrollsign1="6.0"  scrollsign2="82"/>
    <car id="2" scrollsign1="6.0"  scrollsign2="82"/>
   </train>
  <consists>
  
  <!-- LIJN C -->
  <consist start="LEL1">
   <train pack="RET" file="5600-2017.xml">
    <car id="0" scrollsign1="15.0"  scrollsign2="01"/>
	<car id="1" scrollsign1="15.0"  scrollsign2="01"/>
    <car id="2" scrollsign1="15.0"  scrollsign2="01"/>
   </train>
   <train pack="RET" file="5600-2017.xml">
    <car id="0" scrollsign1="15.0"  scrollsign2="01"/>
	<car id="1" scrollsign1="15.0"  scrollsign2="01"/>
    <car id="2" scrollsign1="15.0"  scrollsign2="01"/>
   </train>
   <train pack="RET" file="5600-2017.xml">
    <cab id="1" enabled="true" ai="301"/>
    <car id="0" scrollsign1="15.0"  scrollsign2="01"/>
	<car id="1" scrollsign1="15.0"  scrollsign2="01"/>
    <car id="2" scrollsign1="15.0"  scrollsign2="01"/>
   </train>
  </consist>
  <consist start="SAP2">
   <train pack="RET" file="5600-2017.xml">
    <cab id="0" enabled="true" ai="302"/>
    <car id="0" scrollsign1="21.0"  scrollsign2="02"/>
	<car id="1" scrollsign1="21.0"  scrollsign2="02"/>
    <car id="2" scrollsign1="21.0"  scrollsign2="02"/>
   </train>
   <train pack="RET" file="5600-2017.xml">
    <car id="0" scrollsign1="21.0"  scrollsign2="02"/>
	<car id="1" scrollsign1="21.0"  scrollsign2="02"/>
    <car id="2" scrollsign1="21.0"  scrollsign2="02"/>
   </train>
   <train pack="RET" file="5600-2017.xml">
    <car id="0" scrollsign1="21.0"  scrollsign2="02"/>
	<car id="1" scrollsign1="21.0"  scrollsign2="02"/>
    <car id="2" scrollsign1="21.0"  scrollsign2="02"/>
   </train>
  </consist>

  <consist start="BPK11">
   <train pack="RET" file="5600-2017.xml"/>
   <train pack="RET" file="5600-2017.xml"/>
   <train pack="RET" file="5600-2017.xml"/>
  </consist>
  <consist start="BPK11" position="130">
   <train pack="RET" file="5600-2017.xml"/>
   <train pack="RET" file="5600-2017.xml"/>
   <train pack="RET" file="5600-2017.xml"/>
  </consist>  
  <consist start="BPK12" position="180">
   <train pack="RET" file="5600-2017.xml"/>
   <train pack="RET" file="5600-2017.xml"/>
  </consist>
  <consist start="BPK14" position="90">
   <train pack="RET" file="5500.xml"/>
   <train pack="RET" file="5500.xml"/>
  </consist>  
  <consist start="BPK15" position="90">
   <train pack="RET" file="5500.xml"/>
   <train pack="RET" file="5500.xml"/>
  </consist>
  <consist start="BPK16">
   <train pack="RET" file="5500.xml"/>
   <train pack="RET" file="5500.xml"/>
  </consist>
  <consist start="BPK16" position="90">
   <train pack="RET" file="5500.xml"/>
   <train pack="RET" file="5500.xml"/>
  </consist>
  <consist start="SST3" position="90">
   <train pack="RET" file="5500.xml"/>
  </consist>
  <consist start="SST3" position="135">
   <train pack="RET" file="5500.xml"/>
  </consist>
  <consist start="SST3" position="180">
   <train pack="RET" file="5500.xml"/>
   <train pack="RET" file="5500.xml"/>
  </consist>
  <consist start="OPK4">
   <train pack="RET" file="5600-2017.xml"/>
   <train pack="RET" file="5600-2017.xml"/>
   <train pack="RET" file="5600-2017.xml"/>
  </consist>
  <consist start="OPK4" position="130">
   <train pack="RET" file="5600-2017.xml"/>
   <train pack="RET" file="5600-2017.xml"/>
  </consist>
  
  <consist start="BPK45">
   <train pack="RET" file="Werkwagen.xml" number="7101"/>
   <train pack="RET" file="Loc.xml"/>
  </consist>
  <consist start="BPK53">
   <train pack="RET" file="Werkwagen.xml" number="7201"/>
  </consist>
  <consist start="BPK52">
   <train pack="RET" file="PlattebakContainer.xml"/>
   <train pack="RET" file="Plattebak.xml"/>
   <train pack="RET" file="Plattebak.xml"/>
  </consist>
  <consist start="BPK58" position="20">
   <train pack="RET" file="Loc.xml"/>
   <train pack="RET" file="PlattebakContainer.xml"/>
   <train pack="RET" file="PlattebakContainer.xml"/>
   <train pack="RET" file="Plattebak.xml"/>
  </consist>
  <consist start="BPK59">
   <train pack="RET" file="Plattebak.xml"/>
   <train pack="RET" file="Plattebak.xml"/>
   <train pack="RET" file="Plattebak.xml"/>
  </consist>

  <consist start="SVH1">
   <train pack="RET" file="5000-1982.xml" number="5024"><car id="0" scrollsign1="1.0" scrollsign2="99"/><car id="1" scrollsign1="1.0" scrollsign2="99"/></train>
  </consist>
  <consist start="SVH1" position="45">
   <train pack="RET" file="LocGeel.xml"/>
  </consist>
  <consist start="SVH2">
   <train pack="RET" file="5200-1982.xml" number="5218"><car id="0" scrollsign1="1.0" scrollsign2="99"/><car id="1" scrollsign1="0.0" scrollsign2="99"/></train>
   <train pack="RET" file="5200-1988.xml" number="5239"><car id="0" scrollsign1="0.0" scrollsign2="99"/><car id="1" scrollsign1="1.0" scrollsign2="99"/></train>
  </consist>
 </consists>
</activity>
User avatar
Sjoerd
Posts: 5632
Joined: 26 Dec 2014, 21:14
Location: Alphen aan den Rijn

Re: act bestand

Post by Sjoerd »

Je hebt XML-fouten gemaakt.

Ik zie bijvoorbeeld drie keer <consists> staan. Die hoor je maar één keer te hebben. Na deze opening plaats je alle treinsets in je route, en dan sluit je af met </consists>.
CEO of the Rijndam Electrical Transport company :D
Giovanni1998
Posts: 22
Joined: 02 May 2018, 21:22

Re: act bestand

Post by Giovanni1998 »

Sjoerd wrote: 05 May 2018, 14:18 Je hebt XML-fouten gemaakt.

Ik zie bijvoorbeeld drie keer <consists> staan. Die hoor je maar één keer te hebben. Na deze opening plaats je alle treinsets in je route, en dan sluit je af met </consists>.
Zou u me misschien een beetje uitleg kunnen geven. Ik ben echt slecht met deze dingen
User avatar
Sjoerd
Posts: 5632
Joined: 26 Dec 2014, 21:14
Location: Alphen aan den Rijn

Re: act bestand

Post by Sjoerd »

Een beetje basiskennis van hoe XML-programmeren werkt is wel nodig, aangezien alles in XML gecodeerd is.
Vooruit;

Met de < en > maak je zeg maar 'hoofdstukken' aan (er is vast een officiële term voor, maar ik noem het even zo), waarbinnen je de computer verteld wat die moet doen. Zo'n hoofdstuk sluit je weer af met "/". Aan het eind binnen dezelfde haakjes als alles in zo'n hoofdstuk in één regel past, of verderop als je binnen zo'n hoofdstuk nog sub-hoofdstukken hebt.

Dus:

<consists> -> Open het hoofdstuk "consists".
-> Nu plaats je alle consists in het netwerk. Bijvoorbeeld:

<consist start="BPK14" position="90">
<train pack="RET" file="5500.xml"/>
<train pack="RET" file="5500.xml"/>
</consist>


-> Opent een hoofdstuk "consist", die start op spawnpunt "BPK14", op positie 90 meter vanaf dat spawnpunt.
-> Dan opent er een hoofdstuk "train". Er wordt een trein genomen uit het pack "RET", namelijk een 5500. Het hoofdstuk wordt in dezelfde regel afgesloten met "/".
-> Dan een tweede identieke regel. Deze consist bevat dus twee gekoppelde 5500-metro's.
-> Het hoofdstuk "consist" wordt weer afgesloten.

-> Als je alle consists geplaatst hebt, sluit je met </consists> het hoofdstuk "consists" af.

Als je zo'n 'hoofdstuk' opent, en je sluit dit niet af (of als je een hoofdstuk afsluit wat je nooit geopend hebt), dan is dat een XML-fout. En als er XML fouten in je bestand zitten, dan verschijnt de activiteit niet in het Metrosimulator menu.
CEO of the Rijndam Electrical Transport company :D
Giovanni1998
Posts: 22
Joined: 02 May 2018, 21:22

Re: act bestand

Post by Giovanni1998 »

Sjoerd wrote: 05 May 2018, 14:58 Een beetje basiskennis van hoe XML-programmeren werkt is wel nodig, aangezien alles in XML gecodeerd is.
Vooruit;

Met de < en > maak je zeg maar 'hoofdstukken' aan (er is vast een officiële term voor, maar ik noem het even zo), waarbinnen je de computer verteld wat die moet doen. Zo'n hoofdstuk sluit je weer af met "/". Aan het eind binnen dezelfde haakjes als alles in zo'n hoofdstuk in één regel past, of verderop als je binnen zo'n hoofdstuk nog sub-hoofdstukken hebt.

Dus:

<consists> -> Open het hoofdstuk "consists".
-> Nu plaats je alle consists in het netwerk. Bijvoorbeeld:

<consist start="BPK14" position="90">
<train pack="RET" file="5500.xml"/>
<train pack="RET" file="5500.xml"/>
</consist>


-> Opent een hoofdstuk "consist", die start op spawnpunt "BPK14", op positie 90 meter vanaf dat spawnpunt.
-> Dan opent er een hoofdstuk "train". Er wordt een trein genomen uit het pack "RET", namelijk een 5500. Het hoofdstuk wordt in dezelfde regel afgesloten met "/".
-> Dan een tweede identieke regel. Deze consist bevat dus twee gekoppelde 5500-metro's.
-> Het hoofdstuk "consist" wordt weer afgesloten.

-> Als je alle consists geplaatst hebt, sluit je met </consists> het hoofdstuk "consists" af.

Als je zo'n 'hoofdstuk' opent, en je sluit dit niet af (of als je een hoofdstuk afsluit wat je nooit geopend hebt), dan is dat een XML-fout. En als er XML fouten in je bestand zitten, dan verschijnt de activiteit niet in het Metrosimulator menu.
bedankt voor de uitleg. Ik begrijp het nu wel een beetje. ik zal proberen de fouten op te zoeken en het te herstellen. (misschien als u tijd heeft het te kunnen verbeteren of aanwijzen waar de fouten zitten ) mvg Giovanni
Giovanni1998
Posts: 22
Joined: 02 May 2018, 21:22

Re: act bestand

Post by Giovanni1998 »

het is al gelukt meneer dankuwel :D
Post Reply