Tintin

From Flexible Survival
Jump to: navigation, search

Install

Required packages (for Debian Linux)

Become root, either via sudo -i or some other method.

Run all of these commands as root (yes, bash is probably pre-installed, this is just making sure).

apt-get update
apt-get install tmux tintin++ bash git nano \
libcommon-sense-perl \
libdatetime-perl \
libdatetime-event-sunrise-perl \
libfile-changenotify-perl \
libfile-pid-perl \
libjson-perl \
libtest-lwp-useragent-perl \
libpath-class-perl \
libtime-duration-perl

Type exit (or ctrl+d) to end the session if you opened a new root session for this.

FIXME: Are Getopt::Long and Term::ANSIColor built in, there don't seem to be Debian packages.

Download the script package

Next, run these commands as your normal user account (not root). Replace any bold names with file-paths of your choosing. Also remember that once a path exists, tab-complete often works for typing it out.

cd AnywhereYouWant
git clone https://gitlab.com/inutt/flexible-survival-ui.git fs-ui
chmod +x fs-ui/flexible_survival
fs-ui/flexible_survival

Very minimal config.json

nano fs-ui/config.json

Above nano is used to edit the config file, if you prefer a different editor use that. The launcher script should have setup the config file to be readable only by admins (root) and your exact user account.

  • "character": "", and
  • "password": "", MUST be filled out.

JSON ignores non-printing 'whitespace' and requires that a key/value sets (contained in { } and called an object) have values in the middle separated by commas, but NO comma at the end. {"character": "USER", "password": "PASSWORD"}. Any values you don't want to change can be deleted. Thus this might be an example minimal configuration file:

{
    "fs": {
       "character": "YOURUSER",
       "password": "YOURPASS"
    }
}

In the above the extra commas after the password line, and that closing } after the "fs" key have been removed. Again, the whitespace doesn't matter, so it could also be just (with no spaces even).

{"fs":{"character":"YOURUSER","password":"YOURPASS"}}

Setting where the window splits to panes

The numbers in the tmux section are how you configure the split of the window. You'll probably want to keep them and change them to suit your own needs.

    14 chat
 ------+-----------
 status|
 ------|   main
 map 27|
 64=>  |
   "chat_height": 14,
   "map_width": 64,
   "map_height": 27,
   "status_height": 16

Note: status_height doesn't actually set the height. It tells the status update script how tall this section is so that it might omit some spacing or features to fit.

Final config.json

You probably also want to set "data_dir": "SOMETHING", which is where your map data and log files will be stored. This won't be created for you, so make sure you create it first. E.G.

mkdir "~/Documents/Flexible Survival Logs"

Then your config.json file might look something like this

nano fs-ui/config.json
{
    "tmux": {
        "session_name": "Flexible Survival",
        "chat_height": 14,
        "map_width": 64,
        "map_height": 27,
        "status_height": 16
    },
    "fs": {
        "character": "YOURUSER",
        "password": "YOURPASS",
        "data_dir": "~/Documents/Flexible Survival Logs"
    }
}

If you want near-realtime weather, please sign up for An OpenWeatherMap account and make sure you retain and fill out the api_key with your account key. (NOT a login/password, but an account token that looks a bit like HEX00341AFEAAA0358 but longer, and probably actually all hex.)

If you're using WSL this gets more complicated. "/mnt/c/Users/WindowsAccountName/My Documents/Flexible Survival Logs" might work for most. If it doesn't, talk to whomever maintains the PC. Tab-completion is really helpful here... mkdir /mnt/c/User (TAB) and then hit tab a couple more times to get a good guess at user account and My Documents locations to start in.

With that setup you SHOULD be able to (after setup!)

Get updates

cd fs-ui
git pull

This can be run any time (in where-ever you had the download stored). If there are any updates or bugfixes; though you might need to update your config.json file to use new features.

Connect

  • fs-ui/flexible_survival

When running Ctrl+B (arrow key) (hold down control, tap b, release both; then press an arrow key) can be used to move the input-focus between panes (text areas within that window). Up and Down arrow keys are the ones you'll care about. Up to go to the chat channels, down to go back to muck input. You type all commands in the main muck window, even though the text shows up above.

Automapping

Inutt automated a lot of the mapping stuff, the 80% of it that's easy and not dependent on foreknowledge of inconsistencies.

On perfectly grid like streets, where all of the rooms are pixels on a grid, it works very well.

Undo

If you tried to go a given direction, and it wasn't a valid direction, you MAY need to undo. Inutt's main.tin script catches some, but not all, of these error messages. Undo will move you back on the map and delete the most recently created room.

#map undo

Leaving the Grid (in a grid direction)

When you _leave_ the main streets, the room-scale changes. For any combination of N, E, W, S, U, D that is NOT on the same 3D grid you need to insert a void room to tell the auto-mapper you're leaving that scale and thus also map.

Unfortunately due to the way TinTin++'s mapping works you have to do this 'in reverse' (after you've already left the grid).

DIRECTIONOUT is whichever way goes back the way you came. DIRECTIONIN is the direction you'd take FROM that other room to go back to where you're actually standing now.

#map insert DIRECTIONOUT void
#map goto VNUM (the void room ID that got created)
#map roomflag hide
#map move DIRECTIONIN

Leaving the Grid (not a cardinal direction)

When entering a room that is NOT one of the cardinal directions you'll first need to 'dig' a room towards that path.

#map dig OFFGRID new (if you've never been there before, new is optional)
#map dig OFFGRID VNUM (the number of the room you're going back to)

#map info (will list info about the current room, including 'exits' that lead here)

An example, Zypher's Front Door and Main Lobby.

#map dig o
o
#map info
#map dig z ROOMID

You get the ROOMID from the Entrance list in the info dump.

Searching for what you want

While you might think that #map find is what you want, it isn't. This finds a route to someplace you might be thinking of. If you want a list of results, that's what #map list is for. (I know, someone years ago should have called 'find' 'route' instead.)

This can be rather useful for getting a list of rooms in an area. Like Zypher's building. Which has both an elevator and a stairwell.

Go up/down the stack in Zephyr if you haven't already. Since my gohome takes me to Triage, Basement 1 I like to dig E1 from there first.

#map list {roomarea} {Zephyr Inc}
#map dig e1
e1

I'm going to use the names in this example in place of VNUMs, please use the VNUM instead.

Inside of E1
#map dig b1 Living Quarters & Child Care, Basement 1
#map dig f1 Main Lobby, Floor 1
#map dig f2 Main Lobby, Floor 2
#map dig f3 Main Lobby, Floor 3
#map dig f4 Circular Hallway, Floor 4
#map dig b2 Dormitories
#map dig b3 new
#map info

I hadn't been to b3 yet, new is optional, but clarifies the directions. The NEXT info command shows there isn't an exit back to e1 yet. The dig command will be used to create one (use the VNUM from the info run while above, inside of E1).

b3
#map info
#map dig o VNUM
o
b2
#map dig e1 VNUM
e1
f1
#map dig e1 VNUM
e1
f2
#map dig e1 VNUM
e1
f3
#map dig e1 VNUM
e1
f4
#map dig e1 VNUM

Delete / Remove an Exit (unlink)

The command isn't any of the words you'd probably think to look for; Not Delete (which kills a room, by VNUM or relative exit towards), Nor is it Remove (not a command), it's Unlink.

#map unlink ExitDirection

Global Teleports

A special, in this case for normal players fake, room is needed for holding a list of 'exits' that work globally (anywhere).

In my example beneath, I went to my respawn point and decided to call 'GLOBAL', an exit that doesn't exist, the way to the global room.

Note your current Room vnum: room number to return to, this will be called VNUMBACK later. Then move the context of the map system to the newly created GLOBAL room.

#map info
#map dig GLOBAL
#map goto VNUM(from dig's new room)
#map set {roomarea} {GLOBAL}
#map set {roomname} {GLOBAL}
#map info

You can use #map list {roomarea} {GLOBAL} to find this room's vnum again, these don't all have to be added at the same time; you can return later to add new 'global exists' as you find more one line commands that uniquely take you to an exact room. This is less helpful for, E.G. scripted NPC movements (like going to bed with an NPC in their room, or to another city).

#map list {roomarea} {GLOBAL}
#map goto VNUM
#map dig gohome VNUM
#map dig home VNUM
#map dig respawn VNUM
#map dig upgrade dojo VNUM
#map dig tport ...
...
#map goto VNUMBACK (that VNUM of where you actually are on the MUCK / MUD)

Eureka

Eureka is recent enough to have an OK coverage on the official map. However as you can see from glancing at it, there will need to be a judicious use of void (but not hidden) rooms to make the scaling match.

#map insert (directionback) void

The actual bad part comes with inserting void rooms to join spans.

#map leave
#map return
(Note the room number)
... Go around the gap
#map dig ((direction of gap)) ((actual room number))
#map insert ((direction of gap)) void
(Note the ***void***room number)
((direction of gap; this moves you to the side that's missing a - (has a space instead) ))
#map dig ((Direction towards that new voidroom)) ((voidroom number))

Off the Map

This pair of commands allows you to stop adding to the map automatically, and then toggle it back on when you've returned to the same room you started the command inside of.

#map leave
#map return
OR
#map goto VNUM (useful if you gohome / etc)

As another reminder, you can also search for the room area (between the [ ] brackets) to get a room VNUM to return to if you've gone to a different spot.

#map list {roomarea} {AREA NAME}

Windows 10 WSL

If you'd like to use TinTin++ on Windows, installing a WSL based distribution such as Debian is highly recommended. If you have experience with a different distribution maintaining a server, including getting perl5 dependencies installed based on error messages, then go ahead and go with that. Debian has been selected here for being focused on Freedom, Liberty, and Stability, as well as generally providing clear directions for upgrades.

Note: Windows 10 S tries to be a "safe" OS that restricts user freedom, and thus won't run even WSL. They also offer an upgrade, for a fee, to normal-freedom Windows 10 (no S).

Please follow Debian's official guide for installing on WSL. It will likely have links updated as versions of things change.

History

TinTin++ is the result of almost 30 years of development by a series of programmers. While an absolute dinosaur of a computer from the era of it's origin in the mid 1990s probably couldn't run it today, just about anything from the last 20 years probably can.

Several older versions of this wiki page exist (updated during 2013 and 2015) with the final version of that series updated on 2015-08-25T14:09:09 you might find Anden's examples useful if interested in battle tactics, though they're written assuming python2 (which is no longer supported); while Inutt's code repository uses some perl5 helpers that could be replaced or omitted entirely without breaking the basic multipane functionality. (They help produce the formatted status window and optionally near realtime weather.)

Inutt, one of the coding wizards for FS, has a nice setup for TinTin that's published on their GitLab page. Ketsueki made some small contributions (currently a pull request) to make it more suitable for users with different terminal sizes. Though it does expect a computer screen capable of displaying at least 120 columns of characters across (in that case a split of about 29 for the map and status area, and thus 90 or so for the main text area is recommended). If you're on a 1080p+ monitor, using a normal Graphical User Interface (E.G. Windows, OS X, anything else that runs a web browser) and using a full-screen "terminal" program of any sort (find one you like for your OS) you probably do have that many columns.