Jump to content

TACLS Config File Generator v0.1.0: 2020-05-13


Recommended Posts

Ever find yourself tired of calculating life support stats for pods? Had enough of copy-pasting from spreadsheets?

I present my first modding-related release, a TACLS config generator!

$ python3 tacls-cfg-gen.py --help
usage: tacls-cfg-gen.py [-h] -p PART -c CREW -d DAYS [--partial RESOURCE [RESOURCE ...]] [--day-length HOURS] [--for MOD] [-o FILE]

TACLS config generator v0.1.0

optional arguments:
  -h, --help            show this help message and exit
  -p PART               name of part to patch
  -c CREW               number of Kerbals to support
  -d DAYS               number of days (6.0 hours by default) to supply
  --partial RESOURCE [RESOURCE ...]
                        generate configs only for the specified resources; cannot use with -o
  --day-length HOURS    length of a day, in hours
  --for MOD             add a ModuleManager :FOR[] flag
  -o FILE               output config to file in create-or-append mode, print to stdout if omitted

$ python3 tacls-cfg-gen.py -p DummyPart -c 3 -d 5 --day-length=24 --for DummyMod
@PART[DummyPart]:NEEDS[TacLifeSupport]:FOR[DummyMod]
{
    %RESOURCE[Food]
    {
        %amount = 21.9375
        %maxAmount = 21.9375
    }
    %RESOURCE[Water]
    {
        %amount = 14.4998
        %maxAmount = 14.4998
    }
    %RESOURCE[Oxygen]
    {
        %amount = 2220.7446
        %maxAmount = 2220.7446
    }
    %RESOURCE[CarbonDioxide]
    {
        %amount = 0.0000
        %maxAmount = 1918.7868
    }
    %RESOURCE[WasteWater]
    {
        %amount = 0.0000
        %maxAmount = 18.4650
    }
    %RESOURCE[Waste]
    {
        %amount = 0.0000
        %maxAmount = 1.9950
    }
}

In the future, I plan to add support for other life support mods and possibly other types of configs. Suggestions are welcome.

Source Code and Download

https://github.com/al2me6/tacls-cfg-gen

Version History

  • v0.1.0, 2020-05-13
    • Initial release

License

GNU GPLv3

Edited by Al2Me6
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...