Difference between revisions of "User:Zamujasa/DWAINE for Smartasses"

From Space Station 13 Wiki
Jump to navigation Jump to search
m
m
Line 1: Line 1:
This is a work-in-progress guide on using DWAINE powerfully.
This is a work-in-progress guide on using DWAINE more better. Or something. I guess.


== DWAINE usage ==
I wanted to put fun programs and programming techniques here but it turns out DWAINE is actually ''really'' awful and all the basic stuff breaks the moment you try to do anything fun with it.




== Useful DWAINE info ==
== DWAINE usage ==


== Programs and scripts ==
== Programs and scripts ==
Line 21: Line 21:




=== Telescience for people who love typing ===
=== Telescience ===


You'll need <code>su</code> access to access the file. The first thing you should (probably) do is copy <code>teleman</code> out of the <code>/sys/srv</code> folder into one you make yourself. Then run these wherever you copied it:
You'll need <code>su</code> access, but the first thing you should do is copy <code>teleman</code> out of the <code>/sys/srv</code> folder into one you make yourself. Then run these wherever you copied it:


<pre>echo #!|nteleman coords $arg0 $arg1 $arg2|nteleman scan ^ scan
<pre>echo #!|nteleman coords $arg0 $arg1 $arg2|nteleman scan ^ scan
Line 31: Line 31:
echo #!|nteleman relay $arg0 $arg1 $arg2 $arg3 $arg4 $arg5 ^ relay</pre>
echo #!|nteleman relay $arg0 $arg1 $arg2 $arg3 $arg4 $arg5 ^ relay</pre>


These will combine the "set coordinates" and "do a thing" commands into one, simplifying things a great deal. The copy of <code>teleman</code> also means you won't need su to access it again.
These will combine the "set coordinates" and "do a thing" commands into one, simplifying things a great deal. The copy you make of <code>teleman</code> also means you won't need su to access it again.


As an AI or Cyborg, terminal windows will stay with you and update, making it much more effective to use than trying to use the telescience computer itself, since the interface for that doesn't update if you aren't near it (and people can modify the numbers you input). As a human, if you can make a copy of this, you can use it anywhere a wireless computer can reach the mainframe! (Or if you're REALLY into it, PDA messages...)
As an AI or Cyborg, terminal windows will stay with you and update, making it much more effective to use than trying to use the telescience computer itself, since the interface for that doesn't update if you aren't near it (and people can modify the numbers you input). As a human, if you can make a copy of this, you can use it anywhere a wireless computer can reach the mainframe! (Or if you're REALLY into it, PDA messages...)
Line 37: Line 37:
Right now there's some bug that causes this to result in a stack overflow after enough uses (and some other weird bugs) so you have to occasionally reset the terminal and reconnect.
Right now there's some bug that causes this to result in a stack overflow after enough uses (and some other weird bugs) so you have to occasionally reset the terminal and reconnect.


=== Artifact research for people who hate typing ===


This will make a copy of the artlab utilities in the event some dummy breaks the tape drive or it goes offline or whatever, and provide a list of very handy shortcuts to make everything much easier.
=== Artifact Research ===
 
This will make a copy of the artlab utilities in the event some dummy breaks the tape drive or it goes offline or whatever, and provide a list of very handy shortcuts to make everything much easier. You'll still have to <code>gptio poke</code> a few things but you usually only have to do that once.


<pre>mkdir /artlab
<pre>mkdir /artlab
Line 55: Line 56:
</pre>
</pre>


Now just use <code>a heater</code> to start something up, <code>d heater</code> to turn it off, <code>r xray</code> to automatically sense shit and print it out.
This creates a bunch of shortcuts in the current directory that let you use the Artlab equipment ''much'' faster:
* '''a (device)''': Activates a device.
* '''d (device)''': Deactivates a device.
* '''r (device)''': Reads and displays results.
* '''i (device)''': Gets information.
* '''hot''': Sets the heater's temperature target to the highest setting.
* '''cold''': Sets the heater's temperature target to the lowest setting.
* '''raise''': Raises the impact pad's stand.
* '''lower''': Lowers the impact pad's stand.
* '''radstrength (number)''': Sets the X-Ray's radiation strength.
* Sorry, nothing for the pitcher's power or the elecbox's wattage/voltage yet.


<s>Hell, get creative and do <code>a x_ray ^ /mnt/lp-whatever/butt</code> to automatically print out info! ''wow''</s> this didn't seem to work, have to try again later
You also don't need to type the underscores in device names. <code>impactpad</code> works for <code>impact_pad</code>, <code>xray</code> works for <code>x_ray</code>, etc.


'''Bonus''': You don't need to type the underscores in device names. <code>impactpad</code> works for <code>impact_pad</code>, <code>xray</code> works for <code>x_ray</code>, etc.


=== Fixing the mainframe ===


=== Oops the mainframe died, now what ===
When the mainframe is restored (e.g. from a temporary power outage/APC issue), <code>gptio</code> will helpfully forget all of the device names -- they'll all show up as <code>UNKNOWN</code>, so you can't refer to them by name.
 
When the mainframe is restored (e.g. from a temporary power outage/APC tomfoolery), <code>gptio</code> will helpfully forget all of the device names -- they'll all show up as <code>UNKNOWN</code>, so you can't refer to them by name.


To get their names back, use <code>gptio info <i>address</i></code>, which will update its name and allow you to use it as a shortcut again.
To get their names back, use <code>gptio info <i>address</i></code>, which will update its name and allow you to use it as a shortcut again.
Line 71: Line 80:




=== The goddamn [[Research Director|RD]] deleted prman ===
=== Files not found ===
 
If you're missing some files you expected to be there, there's a backup ThinkTape in the RD's office you can insert into the databank. It contains a copy of everything in <code>/mnt/control</code>, and when inserted into the RD's databank will show up at <code>/mnt/rd</code>.
There's a backup ThinkTape in the RD's office you can insert into the databank. It contains a copy of everything in <code>/mnt/control</code>, and when inserted into the RD's databank will show up at <code>/mnt/rd</code>. Be sure to let your local RD know that he is very mean.


You can then copy them back to where they're supposed to be (or other places, if you want).


=== Scanning paper and other junk ===


Put piece of paper or other doodad onto a scanner. Go to your local DWAINE terminal and look for <code>/mnt/sc-<i>location</i></code>. Run <code>cat /mnt/sc-<i>location</i>/document</code> to take a look at it (or copy it or whatever). Note that half-broken HTML and other garbage comes along for the ride. Welp!
=== Scanning documents ===
You can scan paper and some other stuff by placing it on one of the scanners. Once it beeps, go to your local DWAINE terminal and look for <code>/mnt/sc-<i>location</i></code>. The scanned document will be at <code>/mnt/sc-<i>location</i>/document</code>. Note that the formatting on scanned documents may be garbled or completely messed up.

Revision as of 21:30, 5 March 2019

This is a work-in-progress guide on using DWAINE more better. Or something. I guess.

I wanted to put fun programs and programming techniques here but it turns out DWAINE is actually really awful and all the basic stuff breaks the moment you try to do anything fun with it.


DWAINE usage

Programs and scripts

Advanced tips and tricks

DWAINE for Dummies is pretty basic and there's a lot of weird shit you can do with the terminals and mainframe beyond what it explains (it also seems to be pretty out of date).

I'd like to make a better tutorial/guide for using it here.

Super user access

Run this somewhere. Requires /mnt/term to exist.

echo registered=A|nassignment=A|naccess=34 ^ /mnt/term/loginpacket
su
file_send


Telescience

You'll need su access, but the first thing you should do is copy teleman out of the /sys/srv folder into one you make yourself. Then run these wherever you copied it:

echo #!|nteleman coords $arg0 $arg1 $arg2|nteleman scan ^ scan
echo #!|nteleman coords $arg0 $arg1 $arg2|nteleman receive ^ recv
echo #!|nteleman coords $arg0 $arg1 $arg2|nteleman send ^ send
echo #!|nteleman coords $arg0 $arg1 $arg2|nteleman portal ^ portal
echo #!|nteleman relay $arg0 $arg1 $arg2 $arg3 $arg4 $arg5 ^ relay

These will combine the "set coordinates" and "do a thing" commands into one, simplifying things a great deal. The copy you make of teleman also means you won't need su to access it again.

As an AI or Cyborg, terminal windows will stay with you and update, making it much more effective to use than trying to use the telescience computer itself, since the interface for that doesn't update if you aren't near it (and people can modify the numbers you input). As a human, if you can make a copy of this, you can use it anywhere a wireless computer can reach the mainframe! (Or if you're REALLY into it, PDA messages...)

Right now there's some bug that causes this to result in a stack overflow after enough uses (and some other weird bugs) so you have to occasionally reset the terminal and reconnect.


Artifact Research

This will make a copy of the artlab utilities in the event some dummy breaks the tape drive or it goes offline or whatever, and provide a list of very handy shortcuts to make everything much easier. You'll still have to gptio poke a few things but you usually only have to do that once.

mkdir /artlab
cp /mnt/artlab/gptio /artlab
cd /artlab
echo #!|ngptio activate $arg0 ^ a
echo #!|ngptio deactivate $arg0 ^ d
echo #!|ngptio sense $arg0|ngptio read $arg0 ^ r
echo #!|ngptio info $arg0 ^ i
echo #!|ngptio poke heater temptarget 200 ^ cold
echo #!|ngptio poke heater temptarget 400 ^ hot
echo #!|ngptio poke impactpad stand 1 ^ raise
echo #!|ngptio poke impactpad stand 0 ^ lower
echo #!|ngptio poke xray radstrength $arg0 ^ radstrength

This creates a bunch of shortcuts in the current directory that let you use the Artlab equipment much faster:

  • a (device): Activates a device.
  • d (device): Deactivates a device.
  • r (device): Reads and displays results.
  • i (device): Gets information.
  • hot: Sets the heater's temperature target to the highest setting.
  • cold: Sets the heater's temperature target to the lowest setting.
  • raise: Raises the impact pad's stand.
  • lower: Lowers the impact pad's stand.
  • radstrength (number): Sets the X-Ray's radiation strength.
  • Sorry, nothing for the pitcher's power or the elecbox's wattage/voltage yet.

You also don't need to type the underscores in device names. impactpad works for impact_pad, xray works for x_ray, etc.


Fixing the mainframe

When the mainframe is restored (e.g. from a temporary power outage/APC issue), gptio will helpfully forget all of the device names -- they'll all show up as UNKNOWN, so you can't refer to them by name.

To get their names back, use gptio info address, which will update its name and allow you to use it as a shortcut again.

If someone REALLY fucked it up and removed the memory core (only doable when it's unpowered), you'll have to get a replacement from Hemera or maybe the Lava Moon. Good luck!


Files not found

If you're missing some files you expected to be there, there's a backup ThinkTape in the RD's office you can insert into the databank. It contains a copy of everything in /mnt/control, and when inserted into the RD's databank will show up at /mnt/rd.

You can then copy them back to where they're supposed to be (or other places, if you want).


Scanning documents

You can scan paper and some other stuff by placing it on one of the scanners. Once it beeps, go to your local DWAINE terminal and look for /mnt/sc-location. The scanned document will be at /mnt/sc-location/document. Note that the formatting on scanned documents may be garbled or completely messed up.