Difference between revisions of "TrainCarts/Signs"
Bergerkiller (talk | contribs) |
|||
(13 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | [[TrainCarts|« Go back]] | + | <languages/> |
+ | <translate> | ||
+ | <!--T:1--> | ||
+ | [[Special:MyLanguage/TrainCarts|« Go back]] | ||
+ | <!--T:2--> | ||
TrainCarts allows you to perform actions on trains or single cars using signs. | TrainCarts allows you to perform actions on trains or single cars using signs. | ||
− | = Structure and Behaviour = | + | = Structure and Behaviour = <!--T:3--> |
[[Image:TrainCarts signs intro image.png|thumb|right|A first glance at the sign format]] | [[Image:TrainCarts signs intro image.png|thumb|right|A first glance at the sign format]] | ||
− | A sign is always structured the same way. The first line contains either | + | <!--T:4--> |
+ | A sign is always structured the same way. The first line contains either '''cart''' or '''train''' depending on if you want to target each cart separately or the train as a whole. You can then optionally specify the way the sign responds to redstone and what direction the train must be coming from. | ||
− | == Redstone == | + | == Redstone == <!--T:5--> |
− | + | <!--T:6--> | |
− | < | + | '''TrainCarts signs require Redstone power to function.''' This means signs will not do anything unless you put a redstone torch or other power signal next to it. If you want to use signs without adding redstone torches, you can make use of a special syntax on the first line, which is the same for [train] and [cart]. Generally you will want to use '''[+train]''' to make the sign function. |
− | |||
− | |||
− | + | <!--T:27--> | |
+ | {| class="wikitable" style="margin:auto" | ||
+ | |+ TrainCarts Sign Power Modes | ||
+ | |- | ||
+ | ! First Line !! Explanation | ||
+ | |- | ||
+ | | [train] || The default mode. Sign only works when redstone power is provided | ||
+ | |- | ||
+ | | [+train] || Always on power mode. Signs works all the time regardless of whether redstone power is provided | ||
+ | |- | ||
+ | | [!train] || Inverted power mode. Sign works all the time and turns off when redstone power is provided. Works the same as [+train] when no redstone torch is used. | ||
+ | |- | ||
+ | | [-train] || Always off power mode. Signs don't respond to redstone power. Only useful for the [[TrainCarts/Signs/Switcher|switcher sign]]. | ||
+ | |- | ||
+ | | [/train] || On-pulse power mode. Signs only activate once when redstone power goes from off to on, and don't respond to trains riding over it | ||
+ | |- | ||
+ | | [\train] || Off-pulse power mode. Signs only activate once when redstone power goes from on to off, and don't respond to trains riding over it | ||
+ | |- | ||
+ | | [/\train] || Redstone change power mode. Signs only activate once when redstone power switches state, and don't respond to trains riding over it | ||
+ | |} | ||
+ | |||
+ | === Lever Output === <!--T:28--> | ||
+ | Signs can output a redstone signal as well by attaching a '''lever''' to the same block the sign is also attached to. Only a few signs activate the lever, like the [[TrainCarts/Signs/Station|station]] sign that activates it when trains stop on top of the station. | ||
+ | |||
+ | == Activation Direction == <!--T:29--> | ||
+ | By default signs only activate when the train ''sees'' the front or sides of the sign. This means you should place signs facing the direction of train movement. To override this behavior you can set these activation directions by adding a colon (:) followed by one or more [[Special:MyLanguage/TrainCarts/Signs/Direction|directions]]. If you want the sign to always respond, just use '''[train:*]'''. | ||
− | + | <!--T:30--> | |
+ | For example, '''[-train:lr]''' on a switcher sign would activate a lever when a train enters from either the sign-relative left or right direction and doesn't for the remaining ones. It uses '''-train''' [[TrainCarts/Signs/Switcher#Syntax|so that it does not switch the track]]. | ||
− | == Remote Control == | + | == Remote Control == <!--T:10--> |
+ | <!--T:11--> | ||
A few sign systems support remote control: the ability to control trains by name. You then use the ''[train <name>]'' format, or the shorter alias ''[t <name>]''. Remotely controlled signs only respond to redstone changes, thus where you place them is not important. So far the property, destination, destroy, eject and setblock sign systems support remote control. | A few sign systems support remote control: the ability to control trains by name. You then use the ''[train <name>]'' format, or the shorter alias ''[t <name>]''. Remotely controlled signs only respond to redstone changes, thus where you place them is not important. So far the property, destination, destroy, eject and setblock sign systems support remote control. | ||
+ | <!--T:12--> | ||
Remote control can also affect multiple trains. Just like the tag system, remote control uses *-signs to identify the trains to affect. For example, the following remote control sign will set the destination to ''home'' for all intercity trains: | Remote control can also affect multiple trains. Just like the tag system, remote control uses *-signs to identify the trains to affect. For example, the following remote control sign will set the destination to ''home'' for all intercity trains: | ||
+ | </translate> | ||
{{sign|[train Intercity*]|property|destination|interhome}} | {{sign|[train Intercity*]|property|destination|interhome}} | ||
+ | <translate> | ||
− | the | + | <!--T:14--> |
+ | You can use this to recall all your trains easily. If you use tags to navigate trains, you can also add a tag saying that the train should return. | ||
− | + | = Placement = <!--T:15--> | |
− | |||
− | = Placement = | ||
[[Image:Track switcher example 1.png|thumb|right|Empty minecarts are blocked]] | [[Image:Track switcher example 1.png|thumb|right|Empty minecarts are blocked]] | ||
[[Image:TrainCarts sign example 2.png|thumb|right|Trains are switched left and right using a 1:1 counter]] | [[Image:TrainCarts sign example 2.png|thumb|right|Trains are switched left and right using a 1:1 counter]] | ||
Each sign targets a certain track piece above. Signs attached to walls take the block they are attached to and look up until they find a piece of track. That track is then used for that sign. Sign posts look up until they find a piece of track. There may not be blocks without signs between the bottom sign and the tracks. | Each sign targets a certain track piece above. Signs attached to walls take the block they are attached to and look up until they find a piece of track. That track is then used for that sign. Sign posts look up until they find a piece of track. There may not be blocks without signs between the bottom sign and the tracks. | ||
+ | <!--T:16--> | ||
You can make a pillar of blocks below a single track piece and attach signs to it, to make a bundle of actions on a single track piece. Trains look down when they enter a new track piece to check for signs, so make sure you put the output signs above the signs that use this output for correct results. | You can make a pillar of blocks below a single track piece and attach signs to it, to make a bundle of actions on a single track piece. Trains look down when they enter a new track piece to check for signs, so make sure you put the output signs above the signs that use this output for correct results. | ||
+ | <!--T:17--> | ||
A noticeable exception would be add-ons for the TrainCart plugin, which may change the (relative) position a sign would need to be placed on in order to work for the track. For example, would the ''TC Hang Rail'' add-on require you to add the signs '''above''' the Hang rail track to work, while the ''TCC'' (TrainCarts Coasters) add-on uses the block of a node for the sign, which can be moved to any other block. | A noticeable exception would be add-ons for the TrainCart plugin, which may change the (relative) position a sign would need to be placed on in order to work for the track. For example, would the ''TC Hang Rail'' add-on require you to add the signs '''above''' the Hang rail track to work, while the ''TCC'' (TrainCarts Coasters) add-on uses the block of a node for the sign, which can be moved to any other block. | ||
− | For most signs the sign '''direction''' influences what happens: | + | <!--T:18--> |
+ | For most signs the sign '''direction''' influences what happens, as also discussed earlier (''Activation Direction''): | ||
− | * The train '''has to face the text on the sign''' to make the sign respond | + | <!--T:19--> |
+ | * The train '''has to face the text on the sign''' to make the sign respond | ||
* Signs with the same alignment as the tracks (faces to or away from the tracks) '''always''' respond | * Signs with the same alignment as the tracks (faces to or away from the tracks) '''always''' respond | ||
* The train is spawned in the direction the sign faces | * The train is spawned in the direction the sign faces | ||
− | |||
− | + | ==Types== <!--T:20--> | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | <!--T:21--> | |
+ | *[[Special:MyLanguage/TrainCarts/Signs/Animate|Animate]] - play an animation configured in the train's attachments | ||
+ | *[[Special:MyLanguage/TrainCarts/Signs/Announce|Announce]] - sends a message to players in the cart and/or train above | ||
+ | *[[Special:MyLanguage/TrainCarts/Signs/Blocker|Blocker]] - blocks trains coming from a certain direction | ||
+ | *[[Special:MyLanguage/TrainCarts/Signs/BlockChanger|Block Changer]] - change the block types displayed in a minecart | ||
+ | *[[Special:MyLanguage/TrainCarts/Signs/Crafter|Craft]] - crafts items inside the storage minecarts of a train using a nearby workbench | ||
+ | *[[Special:MyLanguage/TrainCarts/Signs/Destination|Destination]] - marks a destination for the path finding and sets the next destination for the train | ||
+ | *[[Special:MyLanguage/TrainCarts/Signs/Destroyer|Destroy]] - destroy trains | ||
+ | *[[Special:MyLanguage/TrainCarts/Signs/Detector|Detector]] - detect trains on a set region of rails | ||
+ | *[[Special:MyLanguage/TrainCarts/Signs/Effect|Effect]] - plays a particle or sound effect at the minecart, train or sign | ||
+ | *[[Special:MyLanguage/TrainCarts/Signs/Ejector|Eject]] - eject trains (let passengers exit) | ||
+ | *[[Special:MyLanguage/TrainCarts/Signs/Elevator|Elevator]] - teleports trains including passengers up and down to another elevator | ||
+ | *[[Special:MyLanguage/TrainCarts/Signs/Enter|Enter]] - lets nearby players and/or mobs enter the train | ||
+ | *[[Special:MyLanguage/TrainCarts/Signs/Flip|Flip]] - Lets you flip a cart 180 degrees | ||
+ | *[[Special:MyLanguage/TrainCarts/Signs/Launcher|Launcher]] - launch or brake trains to start moving at a desired speed | ||
+ | *[[Special:MyLanguage/TrainCarts/Signs/Mutex|(Smart) Mutex]] - prevents train collisions at intersections by blocking multiple trains from entering the same area | ||
+ | *[[Special:MyLanguage/TrainCarts/Signs/Property|Property]] - set properties on the train such as tags, destinations and owners | ||
+ | *[[Special:MyLanguage/TrainCarts/Signs/Skip|Skip]] - skips execution of signs up ahead based on statements | ||
+ | *[[Special:MyLanguage/TrainCarts/Signs/Sound|Sound]] - plays a named sound effect | ||
+ | *[[Special:MyLanguage/TrainCarts/Signs/Spawner|Spawn]] - spawn an entire train, cart types can be set | ||
+ | *[[Special:MyLanguage/TrainCarts/Signs/Station|Station]] - stop and launch trains | ||
+ | *[[Special:MyLanguage/TrainCarts/Signs/Switcher|Switcher]] - switch levers and rails based on properties on the train | ||
+ | *[[Special:MyLanguage/TrainCarts/Signs/Teleporter|Teleport]] - teleport trains including passengers (requires MyWorlds) | ||
+ | *[[Special:MyLanguage/TrainCarts/Signs/Transfer|Transfer]] - transfer items between trains and chests/furnaces/dispensers | ||
+ | *[[Special:MyLanguage/TrainCarts/Signs/Trigger|Trigger]] - display train information and a countdown of the arrival time of trains on signs (requires SignLink) | ||
+ | *[[Special:MyLanguage/TrainCarts/Signs/Ticket|Ticket]] - let passengers pay for a ride (requires Vault) | ||
+ | *[[Special:MyLanguage/TrainCarts/Signs/Waiter|Waiter]] - waits the train until the track is clear of other trains | ||
− | + | = Permissions = <!--T:24--> | |
− | + | <!--T:25--> | |
− | + | Each sign has a separate build permission. [[TrainCarts/Permissions#Building_Action_Signs|See the main permissions page]]. For using remote control, the player requires the <code>train.build.feature.remotecontrol</code> permission which is OP-only by default. | |
− | ! | + | |
− | + | </translate> | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | | | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Latest revision as of 13:31, 29 December 2023
TrainCarts allows you to perform actions on trains or single cars using signs.
Structure and Behaviour
A sign is always structured the same way. The first line contains either cart or train depending on if you want to target each cart separately or the train as a whole. You can then optionally specify the way the sign responds to redstone and what direction the train must be coming from.
Redstone
TrainCarts signs require Redstone power to function. This means signs will not do anything unless you put a redstone torch or other power signal next to it. If you want to use signs without adding redstone torches, you can make use of a special syntax on the first line, which is the same for [train] and [cart]. Generally you will want to use [+train] to make the sign function.
First Line | Explanation |
---|---|
[train] | The default mode. Sign only works when redstone power is provided |
[+train] | Always on power mode. Signs works all the time regardless of whether redstone power is provided |
[!train] | Inverted power mode. Sign works all the time and turns off when redstone power is provided. Works the same as [+train] when no redstone torch is used. |
[-train] | Always off power mode. Signs don't respond to redstone power. Only useful for the switcher sign. |
[/train] | On-pulse power mode. Signs only activate once when redstone power goes from off to on, and don't respond to trains riding over it |
[\train] | Off-pulse power mode. Signs only activate once when redstone power goes from on to off, and don't respond to trains riding over it |
[/\train] | Redstone change power mode. Signs only activate once when redstone power switches state, and don't respond to trains riding over it |
Lever Output
Signs can output a redstone signal as well by attaching a lever to the same block the sign is also attached to. Only a few signs activate the lever, like the station sign that activates it when trains stop on top of the station.
Activation Direction
By default signs only activate when the train sees the front or sides of the sign. This means you should place signs facing the direction of train movement. To override this behavior you can set these activation directions by adding a colon (:) followed by one or more directions. If you want the sign to always respond, just use [train:*].
For example, [-train:lr] on a switcher sign would activate a lever when a train enters from either the sign-relative left or right direction and doesn't for the remaining ones. It uses -train so that it does not switch the track.
Remote Control
A few sign systems support remote control: the ability to control trains by name. You then use the [train <name>] format, or the shorter alias [t <name>]. Remotely controlled signs only respond to redstone changes, thus where you place them is not important. So far the property, destination, destroy, eject and setblock sign systems support remote control.
Remote control can also affect multiple trains. Just like the tag system, remote control uses *-signs to identify the trains to affect. For example, the following remote control sign will set the destination to home for all intercity trains:
You can use this to recall all your trains easily. If you use tags to navigate trains, you can also add a tag saying that the train should return.
Placement
Each sign targets a certain track piece above. Signs attached to walls take the block they are attached to and look up until they find a piece of track. That track is then used for that sign. Sign posts look up until they find a piece of track. There may not be blocks without signs between the bottom sign and the tracks.
You can make a pillar of blocks below a single track piece and attach signs to it, to make a bundle of actions on a single track piece. Trains look down when they enter a new track piece to check for signs, so make sure you put the output signs above the signs that use this output for correct results.
A noticeable exception would be add-ons for the TrainCart plugin, which may change the (relative) position a sign would need to be placed on in order to work for the track. For example, would the TC Hang Rail add-on require you to add the signs above the Hang rail track to work, while the TCC (TrainCarts Coasters) add-on uses the block of a node for the sign, which can be moved to any other block.
For most signs the sign direction influences what happens, as also discussed earlier (Activation Direction):
- The train has to face the text on the sign to make the sign respond
- Signs with the same alignment as the tracks (faces to or away from the tracks) always respond
- The train is spawned in the direction the sign faces
Types
- Animate - play an animation configured in the train's attachments
- Announce - sends a message to players in the cart and/or train above
- Blocker - blocks trains coming from a certain direction
- Block Changer - change the block types displayed in a minecart
- Craft - crafts items inside the storage minecarts of a train using a nearby workbench
- Destination - marks a destination for the path finding and sets the next destination for the train
- Destroy - destroy trains
- Detector - detect trains on a set region of rails
- Effect - plays a particle or sound effect at the minecart, train or sign
- Eject - eject trains (let passengers exit)
- Elevator - teleports trains including passengers up and down to another elevator
- Enter - lets nearby players and/or mobs enter the train
- Flip - Lets you flip a cart 180 degrees
- Launcher - launch or brake trains to start moving at a desired speed
- (Smart) Mutex - prevents train collisions at intersections by blocking multiple trains from entering the same area
- Property - set properties on the train such as tags, destinations and owners
- Skip - skips execution of signs up ahead based on statements
- Sound - plays a named sound effect
- Spawn - spawn an entire train, cart types can be set
- Station - stop and launch trains
- Switcher - switch levers and rails based on properties on the train
- Teleport - teleport trains including passengers (requires MyWorlds)
- Transfer - transfer items between trains and chests/furnaces/dispensers
- Trigger - display train information and a countdown of the arrival time of trains on signs (requires SignLink)
- Ticket - let passengers pay for a ride (requires Vault)
- Waiter - waits the train until the track is clear of other trains
Permissions
Each sign has a separate build permission. See the main permissions page. For using remote control, the player requires the train.build.feature.remotecontrol
permission which is OP-only by default.