Commands - ShadowJonathan/ByteCart GitHub Wiki
/mego
This command gives a ticket to the player. After its execution, the player can use the network to go to this destination with a minecart.
This command has the same effect as right-clicking a BC7010 sign.
Usage
/mego x.y.z|name [train]
where x, y are numeric values between 1 and 2047 representing region and ring numbers, respectively, and z representing station number between 1 and 255, and name a station name.
The optional train
parameter will mark the owner of the ticket as the head of a train. All carts following the cart of the player closely will go to same destination, allowing the player to take storage carts with him.
Permission
bytecart.mego
/bcback
This command sets the return address as destination address for a player. The player executing the command must have a ticket in its inventory with a return address previously recorded using BC7015 sign.
This command is equivalent to right-clicking on a BC7017 sign or passing on it while riding a cart.
Usage
/bcback
Permission
bytecart.bcback
sendto
This command puts a ticket in the inventory of a storage minecart. After its execution, the storage minecart can use the network to go to the destination stored in the ticket.
This command has the same effect as if the cart was passing on a BC7011 sign.
Usage
/sendto x.y.z|name [train]
where x, y are numeric values between 1 and 2047 representing region and ring numbers, respectively, and z representing station number between 1 and 255, and name a station name.
The optional train
parameter will mark the storage minecart holding the ticket as the head of a train. All carts following this cart closely will go to same destination without additional commands.
Permission
bytecart.sendto
/bcupdater
usage
This command is used by administrators to configure the network.
Synopsis
bcupdater region n [new]
: creates an updater for region 'n'.
bcupdater local n
: creates a local updater for region 'n'.
bcupdater reset_region|reset_local n [full]
: creates a reset updater for region 'n'.
bcupdater backbone
: creates an updater for the backbone.
bcupdater reset_backbone [full]
: creates a reset updater for the backbone.
Description
This command designates an empty storage cart as an updater. Updaters are special carts used by ByteCart to configure the network. This command works only if there is at least one router in the network.
To configure a network, commands must be launched in this order:
bcupdater region n new
thenbcupdater local n
in each region.bcupdater backbone
in the backbone if you have a backbone network.
To use this command, go to a possible launching spot (see below), type the command and right-click on an empty storage cart.
This article describes each use case of the command.
/bcupdater region
This command instanciates an updater that will initialize and maintain the configuration of the rings in a specific region.
A region updater performs the following actions:
- Create ring numbers and write them on BC8010 signs
- Create a route in the routing table of each router for the rings created
- Replicate routes across all routers of the region
- Measure time taken to cross each ring to be used as metric for pathfinding algorithm
- If BCProtect is installed, creates the protection of the routers.
Since region updater action is limited to a region, the command must be repeated for each region.
Initial configuration safety lock
The fist time you run the command on a region is very critical since the configuration done at this moment is not undoable without loosing all. the bcupdater region
command understands that it is an initial configuration if the first router met is not configured, or more accurately the 1st BC8010 sign met has no address on the 4th line. In this case, the configuration will be updated and some possibly existing information will be erased. This situation can lead to a misconfigured network on an already configured network. At this point, the only solution is to make a full reset.
To avoid that the updater enters wrongly this initial configuration mode in an already configured network, administrator must explicitly tell that it is a new network. To do so, the keyword new must be added at the end of the command.
If the updater detects that it enters a possibly new network, it will turn back when reaching the first router and the following message will be displayed in the chat window of the player who ran the command, or in the console if the player is not connected:
First BC8010 sign met has no address. If it is an initial configuration, add option 'new' at the end of bcupdater command to confirm. If this is not a new network (i.e. you have already used bcupdater), you should start from anywhere but here.
Launching spot
During first configuration, updater will configure the ring from where it is launched as ring 0. You must carefully choose the first launching spot since it is near it that you will build the garbage collector or make connection with other regions. If unsure, choose a ring that will not have stations plugged in and connected to only 1 router.
If you did not launch the first updater from the spot where there will be the garbage collector, or want to change the location of the garbage collector, you must perform a full reset (see below) before retrying.
After initial configuration
After initial configuration, a region updater must be launched if a new router was added since last run of region updater. Launching spot can be anywhere, but the first router met by the updater must have been already configured: it means that you must not launch the updater from a new ring.
/bcupdater local
This command instanciates an updater that will initialize and maintain the network topology of the subrings and stations in a specific region.
This command should not be run if the region updater has not finished is job.
A local updater performs the following actions:
- Discover the network, create station and subring numbers and write them on BC9XXX signs
- Update dynmap layer with station data
- If BCProtect is installed, creates the protection of main rings, subrings and stations.
Note that the first action can be performed manually, provided that you have network skills.
Since local updater action is limited to a region, the command must be repeated for each region.
Launching spot
A local updater can be launched from anywhere inside or outside the region, providing that a route to the region exists.
After initial configuration
After initial configuration, a local updater can be launched safely to update dynmap information, discover new subrings or stations and/or ptotect them with BCProtect.
/bcupdater backbone
This command instanciates an updater that will initialize and maintain the configuration of the routes to regions, in a backbone network.
A backbone updater performs the following actions:
- Create the region 0 and the route associated with it
- Discover region access point (the ring(s) 0 of each region) and create a route in the routing table of each router for the regions discovered
- Replicate routes across all routers of the backbone
- Measure time taken to reach a region to be used as metric for pathfinding algorithm
A backbone updater will only discover regions, so region must have been previously configured with a region updater.
Initial configuration
During first configuration, updater will configure the track from where it is launched as region 0. You must carefully choose the first launching spot since it is near it that you will build the garbage collector or create a gate to another distant backbone. If unsure, choose a ring connected to only 1 router.
If you did not launch the backbone updater from the spot where there will be the garbage collector, or want to change the location of the garbage collector, you must perform a full reset of the backbone (see below) before retrying.
Note that this full reset does not affect regions and does not erase importaant data. In other words, you loose nothing. You still have to relaunch a backbone updater.
After initial configuration
A backbone updater must be launched each time a new region is connected to the backbone, or disconnected, or a new path to the region is possible through a new ring 0.
Backbone updaters must be launched from region 0, near the garbage collector.
Reset updaters
Updaters with type prefixed with reset (reset_region, reset_local and reset_backbone) will cancel all configuration done in the considered perimeter:
- Region reset updaters will erase all routes registered of the region (except route to ring 0).
- Local reset updaters will erase malformed address on BC9XXXs.
- Backbone reset updaters will erase all routes describing interconnection between regions (except route to region 0)
After a simple reset, stations address, ring and region numbers are preserved, but a region updater (or a backbone updater in the backbone case) must be launched to recreate routes.
Full reset
By adding the option full
to the command when creating a reset updater, a deeper reset is done:
- Region reset updaters will erase ring numbers on BC8010 signs of each router of the region.
- Local reset updaters will erase address on BC9XXXX signs.
- Backbone reset updaters will erase region numbers on BC8020 signs of each router of the backbone.
After a full reset, the network is restored to factory default configuration and must be entirely reconfigured. If the reset updater is a local or a region updater, all station address are lost, and BC701X signs must be rewritten manually.
Completion
An updater has completed its configuration if it has run through all the entries of all routers, and through all entire rings. Additional travels may be required, sometimes doing until 3 times the same travel. Unless you know what you are doing, keep updater running until automatic timeout (when timeout is reached, the updater will go to the garbage collector).
- Local and region updaters go in all rings of the region they are attached to.
- Backbone updaters go in all backbone link of the backbone network.
The network is generally not usable until initial configuration is done.
After initial configuration, it is safe to launch again updaters if an update was done in the tracks: updaters respect existing configuration if it is consistent.
Interruption
Interruptions are transparent for updaters. You may even delete a running updater and launch a new one (from launching spot) to finish the job. It will keep work done and reinitialize unfinished jobs, at the cost of time spent to reanalyze the situation.
Timeout
All updaters have a timeout of twice the time spent to configure the network, starting from the time of the last write operation performed. If the updater took 1 hour to update the network, it runs for 2 hours and is deactivated if no write operation was done during this time.
Permission
bytecart.bcupdater
/bcticket
This command gives a ticket to a player. It can be used in a command block. for normal usage, see mego.
Usage
/bcticket [player] x.y.z [train]
where x, y are numeric values between 1 and 2047 representing region and ring numbers, respectively, and z representing station number between 1 and 255.
If the parameter player
is omitted, the ticket is given to the command sender just like the mego
command does.
The optional train
parameter will mark the owner of the ticket as the head of a train. All carts following the cart of the player closely will go to same destination, allowing the player to take storage carts with him.
Permission
bytecart.bcticket
/bcreload
This command reloads the configuration file.
Usage
/bcreload
Permission
bytecart.bcreload
/bcdmapsync
This command delete obsolete markers from dynmap layer.
Automatic deletion of station markers is performed during runtime when needed, so there is normally no obsolete markers, but, if some stations are deleted "offline" (WorldEdit, MCEdit, etc.), ByteCart won't take this event into account and markers will still be present on dynmap layer. This command allows to remove these markers.
Usage
/bcdmapsync
Permission
bytecart.bcdmapsync
/bctracker
This command displays the position of the updaters.
Usage
/bctracker
Permission
bytecart.bctracker