Tintin

From Flexible Survival
Revision as of 09:24, 1 May 2020 by Ketsueki (talk | contribs) (Missed a set of extra [])
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'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.

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.