Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: DFcontrol, a python command-line launcher  (Read 1582 times)

jcd

  • Bay Watcher
    • View Profile
DFcontrol, a python command-line launcher
« on: December 29, 2015, 04:03:44 pm »

This is a python command-line utility to launch and manage dwarffortress and its utilities.
The functionality is right now much worse than that of pyLNP, but the utility is also faster to work with and may appeal to command line users.


To run it you should have: A linux installation with python 3 installed. (or you could modify it to work elsewhere)


Features:
  • run dwarffortress
  • run dwarffortress as well as dwarftherapist and/or soundsense (dwarftherapist asks for sudo privileges)
  • read ini options set on the "dfcontrol_init_settings.txt" file and apply them to the relevant df .init files
  • rebuild dwarftherapist (2016) for linux
  • download and install a newer version of dwarffortress, without deleting the save folder and with the option to also apply the user settings as described in dfcontrol.ini


Usage:
1. It is assumed you have your df installation in the "df_linux/" folder, your sounsense installation in "utils/soundsense/", and your dwarftherapist in "utils/dwartherapist".
You can have those installed elsewhere if you take the time to enter the correct paths in the "dfcontrol.py" file (lines 8-10)

2. Unzip the "dfcontrol.py" and the "dfcontrol_init_settings.txt" files in the parent directory of those folders (unless you entered your own paths)

3. Set your preferred options in the "dfcontrol_init_settings.txt" file. Keeping the same format you can add/remove options to be set and you can do it for any file within the "df_linux/data/init/" folder

4. Look the usage with "./dfcontrol.py -h"
In short:

  • Running it with no args just runs df
  • with -s                               starts soundsense
  • with -t                               starts dwarftherapist
  • with -T                               downloads, builds and installs dwarftherapist 2016
  • with -R                               reads and applies the options set in "dfcontrol_init_settings.txt"
  • with --update_df                  needs a df version name (e.g. 42_04) and it will download, install that version, keeping save folder and reapplying options
  • with --update_reset_df         just like update_df but without reapplying options


Support:
I won't be providing support. You are on your own. On the flip-side, you can modify it however you wish, expanding and using it as you will.


Installation:
You can download the script here, and a full working df_42_04_linux-soundsense-dwarftherapist installation here. Unzip and use at will.


Most linux users should have their scripts already i would guess, but still some people might find it useful. I personally find it convenient.


PS. It was developed in Arch linux so incompatibilities with other linux distro's may exist. (e.g. in the building of dwarf therapist and in the launching of dwarfortress) These should be easily solvable.
PS2. If you cannot use the prebuilt dwarftherapist, consider rebuilding it.
PS3. If you cannot rebuild dwarftherapist read its BUILDING.rst file.
PS4. Tileset installation is not a part of it, mainly bc i don't use tilesets. Feel free to support them, or i may do it myself in the future. Same with mod support.
« Last Edit: December 29, 2015, 04:08:02 pm by jcd »
Logged