Difference between revisions of "TrainCarts/Signs/Spawner/en"
(Updating to match new version of source page) |
(Updating to match new version of source page) |
||
(5 intermediate revisions by the same user not shown) | |||
Line 7: | Line 7: | ||
[[File:TrainCarts-Spawner.gif|frame|right]] | [[File:TrainCarts-Spawner.gif|frame|right]] | ||
The train spawner sign allows you to spawn complete trains. Trains are spawned to the text-side of the sign on the rails above. When it receives power while it was unpowered before, it will trace down the tracks and spawn a train on it if there are no other trains occupying the rails. | The train spawner sign allows you to spawn complete trains. Trains are spawned to the text-side of the sign on the rails above. When it receives power while it was unpowered before, it will trace down the tracks and spawn a train on it if there are no other trains occupying the rails. | ||
− | |||
== Syntax == | == Syntax == | ||
{{sign|[train]|spawn 2|psmmmmmsp}} | {{sign|[train]|spawn 2|psmmmmmsp}} | ||
− | |||
− | |||
=== First line === | === First line === | ||
Line 24: | Line 21: | ||
''spawn'', optionally followed up by the forward force to spawn the train at. | ''spawn'', optionally followed up by the forward force to spawn the train at. | ||
+ | === Third and fourth lines === | ||
− | + | The [[Special:MyLanguage/TrainCarts/Spawning|spawn pattern]]. Here the Minecart types or saved train names to spawn can be specified. | |
− | + | This pattern supports: | |
+ | * Vanilla Minecart types: <code>mmm</code> | ||
+ | * Saved train names: <code>MyTrain</code> | ||
+ | * Amount prefixes: <code>30s60m</code> | ||
+ | * Randomness: <code>3[50%TrainOne 50%TrainTwo]</code> | ||
− | + | See the [[Special:MyLanguage/TrainCarts/Spawning|spawn pattern page]] for more details about all this. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | | | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
+ | To spawn some Vanilla Minecarts: | ||
+ | {{sign|[train]|spawn|mmm}} | ||
+ | To spawn a saved train name: | ||
+ | {{sign|[train]|spawn|<saved train name>}} | ||
== Automated spawning == | == Automated spawning == | ||
− | + | It is possible to spawn trains at a set interval: | |
{{sign|[+train]|spawn 1:20 0.5|mmm}} | {{sign|[+train]|spawn 1:20 0.5|mmm}} | ||
Will spawn 3 minecarts every 1 minute and 20 seconds at a velocity of 0.5 blocks/tick. The interval time has to be set after spawn and before the launching velocity. The automatic spawner will load a 7x7 chunk area around the sign, and spawn a minecart. Try not to set the interval too low as that may cause issues when the chunks around the signs unload a lot. | Will spawn 3 minecarts every 1 minute and 20 seconds at a velocity of 0.5 blocks/tick. The interval time has to be set after spawn and before the launching velocity. The automatic spawner will load a 7x7 chunk area around the sign, and spawn a minecart. Try not to set the interval too low as that may cause issues when the chunks around the signs unload a lot. | ||
+ | |||
+ | === Spawn Limit === | ||
+ | To limit how many trains the spawn sign can spawn, you can set a '''spawn limit''' for a saved train. To set one, first save the train to spawn with the spawn sign (<code>/train save name</code>). Then, use the <code>/savedtrain name spawnlimit <limit></code> command to set a limit. This is useful when automatically populating a train network with trains. | ||
+ | |||
+ | This can be combined with enabling <code>destroyAllOnShutdown</code> in '''config.yml''' so that on server restart everything starts with a clean slate. | ||
== Failure Colors == | == Failure Colors == | ||
Line 75: | Line 62: | ||
| <span style="color:#800080">Purple</span> || Rails are occupied by another train | | <span style="color:#800080">Purple</span> || Rails are occupied by another train | ||
|- | |- | ||
− | | <span style="color:#FF0000">Red</span> || Spawned train has a spawn limit that is exceeded ([[TrainCarts/Lag#Saved_Train_Spawn_Limits|SavedTrain spawn limit]]) | + | | <span style="color:#FF0000">Red</span> || Spawned train has a spawn limit that is exceeded ([[Special:MyLanguage/TrainCarts/Lag#Saved_Train_Spawn_Limits|SavedTrain spawn limit]]) |
|- | |- | ||
− | | <span style="color:#FFA500">Orange</span> || Maximum number of carts per world reached ([[TrainCarts/Lag#Limit_the_number_of_trains|config.yml maxCartsPerWorld setting]]) | + | | <span style="color:#FFA500">Orange</span> || Maximum number of carts per world reached ([[Special:MyLanguage/TrainCarts/Lag#Limit_the_number_of_trains|config.yml maxCartsPerWorld setting]]) |
|- | |- | ||
− | | <span style="color:#800000">Maroon</span> || Spawned train is too long ([[TrainCarts/Lag#Limit_the_number_of_trains|config.yml maxCartsPerTrain setting]]) | + | | <span style="color:#800000">Maroon</span> || Spawned train is too long ([[Special:MyLanguage/TrainCarts/Lag#Limit_the_number_of_trains|config.yml maxCartsPerTrain setting]]) |
|- | |- | ||
| <span style="color:#BBBB00">Yellow</span> || Spawn sign cooldown prevents spawning ('''config.yml spawnSignCooldown setting''') | | <span style="color:#BBBB00">Yellow</span> || Spawn sign cooldown prevents spawning ('''config.yml spawnSignCooldown setting''') | ||
|} | |} |
Latest revision as of 15:13, 23 September 2024
Introduction
The train spawner sign allows you to spawn complete trains. Trains are spawned to the text-side of the sign on the rails above. When it receives power while it was unpowered before, it will trace down the tracks and spawn a train on it if there are no other trains occupying the rails.
Syntax
First line
[train], a spawn direction can be set by specifying trigger directions. For example: [train:left] or [train:right]. If none is set, the train is spawned based on what side is powered by redstone. For automatic spawners, [+train] (always powered) is recommended.
Second line
spawn, optionally followed up by the forward force to spawn the train at.
Third and fourth lines
The spawn pattern. Here the Minecart types or saved train names to spawn can be specified.
This pattern supports:
- Vanilla Minecart types:
mmm
- Saved train names:
MyTrain
- Amount prefixes:
30s60m
- Randomness:
3[50%TrainOne 50%TrainTwo]
See the spawn pattern page for more details about all this.
To spawn some Vanilla Minecarts:
To spawn a saved train name:
Automated spawning
It is possible to spawn trains at a set interval:
Will spawn 3 minecarts every 1 minute and 20 seconds at a velocity of 0.5 blocks/tick. The interval time has to be set after spawn and before the launching velocity. The automatic spawner will load a 7x7 chunk area around the sign, and spawn a minecart. Try not to set the interval too low as that may cause issues when the chunks around the signs unload a lot.
Spawn Limit
To limit how many trains the spawn sign can spawn, you can set a spawn limit for a saved train. To set one, first save the train to spawn with the spawn sign (/train save name
). Then, use the /savedtrain name spawnlimit <limit>
command to set a limit. This is useful when automatically populating a train network with trains.
This can be combined with enabling destroyAllOnShutdown
in config.yml so that on server restart everything starts with a clean slate.
Failure Colors
When the spawn sign fails to spawn, it shows dust particles at the sign to explain why.
Color | Reason |
---|---|
Blue | Not enough rails to spawn on |
Purple | Rails are occupied by another train |
Red | Spawned train has a spawn limit that is exceeded (SavedTrain spawn limit) |
Orange | Maximum number of carts per world reached (config.yml maxCartsPerWorld setting) |
Maroon | Spawned train is too long (config.yml maxCartsPerTrain setting) |
Yellow | Spawn sign cooldown prevents spawning (config.yml spawnSignCooldown setting) |