Skip to content
Chinsky edited this page Jul 18, 2020 · 2 revisions

Generic computer network is a replacement for global NTNet the modular computers have been using. It offers the advantage of letting different places (e.g. different ships) use computers without cross-contamination (e.g. people on derelict emailing people on main map). Also some saner checks for programs that would allow them to work with limited functionality if network is down etc.

Another notable difference is that most virtual things are now actual ingame files. Crew records, programs for download by software downloader, network logs, report forms are all stored on mainframe machines.

Network devices

Any object can be made network-capable by giving it a /network_device extension. On init it would try and hook up to any non-passworded network it can reach. Network device extension provides some common user interactions like setting parameters, but you still would need to add some way for user to trigger them from the holder object, e.g. a verb. Notable vars

  • network_id- ID of computer network it's (supposedly) connected to
  • key - passkey for the network
  • address - globally unique network address, cannot be set by user
  • network_tag - human-readable network address, can be set by user. Networks enforce uniqueness, will change it if there's clash.
  • connection_type - affects signal strength (wired, wireless, strong wireless etc)

Network range

Network has limited range, originating from routers. With default values, long-range network cards (like installed by default on routers) will cover 100x100 area centered on device. Default relays cover 50x50. Network only covers one zlevel, need relays to extend to other connected zlevels.

Special network devices

There are some subtypes of network devices implementing special behavior for the network

Routers

Routers host the network. When router device goes offline, network picks next router to be its main, and if there's none left, network is destroyed. They also broadcast the network in range, devices won't connect to it if outside of it.

Mainframes

Mainframes expose storage to the network, and networks use them according to roles set on the mainframe. For example software download program would only get files listed from mainframes with 'software repo' role enabled.

Relays

These are needed to extend networks to other connected zlevels, and to extend its range on same zlevel.

Networks

Networks are where the magic happens. They hold the devices and expose a lot of helper procs for various program stuff, like getting certain files from certain roles mainframes. Devices must have matching network_id and passkey when trying to connect, and after that they're put into general device lists and specific mainframe ones for cutting down of big loops.

How do I map all this crap?

Well, you're in luck because it's geared for ad-hoc setup. Easiest way is to just put a router and a mainframe (with all roles set) on your map. Router will create a random network and mainframe will join it. All mapped network devices (like computers) in range will connect to it too. Slap relays on each connected zlevels, ~25 tiles apart. If you want network to be called something specific, you can set initial_network_id on mainframe, relays and router machines. Client devices have no way of pre-setting that and will only connect to what's nearby.

Since there's no cybersecurity in place, you should use a separate mainframe for fileservers, since people can rename/delete files there and they might delete important things like software or crew records.