Difference between revisions of "Hosts (Programming)"
imported>Spunky |
imported>Chinaski |
||
| Line 18: | Line 18: | ||
|- | |- | ||
| #2603 || Security Node || Used to interface with a security system in the real world. | | #2603 || Security Node || Used to interface with a security system in the real world. | ||
|- | |||
| #664609 || Terminal Node || Used in the same way as a real world terminal. | |||
|} | |} | ||
Latest revision as of 09:31, 29 October 2019
Hosts (aka systems, nodes) are the representations of a particular piece of hardware on the internet.
Building Hosts
The host object itself is a type of area which you can create by typing:
@create $host named "My Awesome Host"
Once you have the host object, you will want to move it someplace appropriate and begin populating it with nodes. 'Node' is a generic term for a particular place in cyberspace, so it can actually be used to mean a host (if you are in a network area) or a room within a host (if you are in a host). There are several types of nodes available for different purposes, outlined in the table below:
| Object Number | Name | Description |
|---|---|---|
| #17210 | Login Node | Used to control access to a host. |
| #38108 | Datavault | Used to store data in a host. |
| #2603 | Security Node | Used to interface with a security system in the real world. |
| #664609 | Terminal Node | Used in the same way as a real world terminal. |
There are also many other more specialized node types, you can get a complete list by typing:
@tree #1835
The usual procedure for creating a new host is to create a login node, place it in the host, and @dig the rest from there, as you would with a 'real' area. You will probably want to set your @build-options to use the generic matrix exit (#2178) and the generic matrix room (#1835) (or some objects further down the tree) when building in matrix-land.
Using Blueprints to Create Hosts
If you need to build a host that will be associated with some piece of hardware that players can buy (as is the case with cyberdecks) you will need to make that host a blueprint. This is done because each instance of the hardware needs its own host. Full documentation for blueprints can be found in the Blueprints (Programming) entry. What follows is a mini-tutorial on using them to create a host type.
Before you begin, you'll need a cyberdeck and a place to jack in. This is necessary because the matrix doesn't really work properly (even in a blueprint) unless you're connected to a cyberdeck. So, get one and jack in before you start making the blueprint.
Construction begins when you create blueprint. BluePrints are another topic of their own, so for now we'll focus exclusively on what you'll need for creating matrix area blueprints. Anyway, the first thing you'll need to do is create your blueprint:
@create #27727 named "My System"
Once you've created the blueprint object, you'll want to store it someplace safe while you work on it. It's not a $thing, so it doesn't really belong in the real world, but it also can't be on your person while you work with it, since editing it actually puts you inside the blueprint. It's okay to just leave it in your cyberdeck, as long as you don't lose your cyberdeck, but keep in mind that if your deck is online anyone can look at or edit your blueprint if they find it.
Now that you've stored your blueprint somewhere you can edit it:
edit <object number of the blueprint>
Now you'll be inside the blueprint. If you need to get out, you can always type 'commit' and be returned to where you were when you began editing it.
The first thing you'll probably want to do is rename the node you're in. The first node is usually the login node, you you may want to include that in the title.
> focus here You focus on the generic matrix node. > rename FCPD Login Node Changed the aliases from generic host node to FCPD Login Node.
Notice that we begin by focusing on the room that we're in ('focus here'). In order to work with objects in the blueprint (including rooms themselves) you must focus on them. The blueprint commands will only work on an object you've focused on.
The next thing you'll want to do is set up the login node for your system. The login node is where your host interfaces with the rest of the matrix. That is, it's the place players will first appear when they connect to your system. You can change the type of node you're in using the 'type' command when you're in a blueprint node:
> type Available types for FCPD Login Node: 1. generic matrix room 2. generic network node 3. generic host node 4. generic cyberdeck control center 5. generic security node 6. generic login node 7. generic datavault > type 6 Changing FCPD Login Node from generic matrix node to generic login node.
We use the 'type' command with no arguments to list the available types for the node you're focusing on. Once you've decided on a type, you can select it by giving its number following the type command ('type 6'). This is the command that actually changes the parent type of the node you're focused on. Note that all node types are not created equal, they each have verbs that relate to particular bit sof matrix functionality. For instance, a Datavault will allow users to store programs, a login node will control access to other nodes, etc.
You should also describe the node with the 'desc' command:
> desc A cool blue node with a rotating yellow star on the far wall. Description set for FCPD Login Node.
Now that you've set up the login node, you'll want to create an exit into the more protected parts of the system. You can create an exit and a new node using the 'dig' command:
> dig "portal to main bus"|"portal to login node" to "Main Bus" Creating destination room 'Main Bus'. Created 'Main Bus' destination room. Created 'portal to main bus'as an exit. Created 'portal to login node' as an exit. Exit fully linked!
Note that cardinal directions mean nothing in cyberspace, but there's nothing stopping you from using them if you really want to. There may be some matrix areas that are designed to look like areas in the real world, but you won't be able to get around the fact that getting around in the net is just fundamentally different than it is in the real world. Anyway, I recommend naming your exists something themely to the net in general or to the type of system you're creating.
Now that you've got a link out of the node that you're in, you should see it when you 'look':
> look FCPD Login Node (blueprint for FCPD Systems) A cool blue node with a rotating yellow star on the far wall. L I N K S [1] [bpt] portal to main bus
The way one gets around in the net is by choosing a link to follow. These links are accessed via number, as listed in the LINKS list when you look at the node you're in. Also notice that links have an 'icon', which in this example is still [bpt], which your system is inheriting from the generic host. To change the icon for your system, you merely need to set its 'icon' property. If you're inside the blueprint, you'd do it like this:
> ; here.location.icon = "XXX" => "XXX"
Feel free to use ANSI color to jazz things up a little bit in your icon.
Now that you've made another node, you can travel to it by selecting the link number, which in this case will be 1, since there are no other links yet. Typing the number of the link should move you into the node it's connected to.
The nodes you'll want to create really depend on the type of system you're creating, but there are some specialized nodes for cyberdeck hosts, so be careful when you're choosing the node type that you don't take one that's inappropriate for the system you're creating.