Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with command for "other automation" DFHack option #48

Closed
Pidgeot opened this issue Apr 4, 2020 · 0 comments
Closed

Error with command for "other automation" DFHack option #48

Pidgeot opened this issue Apr 4, 2020 · 0 comments
Labels

Comments

@Pidgeot
Copy link
Owner

Pidgeot commented Apr 4, 2020

An error is displayed when enabling Other Automation plugins for DFHack via the launcher. This prevents the "burial" command automation from working correctly.

Setup:

  • Enable "Other Automation plugins" option in LNP (DFHack Tab)
  • Launch DF
  • Load a world

Expected:

  • No errors in console
  • Burial plugin run every 7 days

Outcome:

  • Error displayed (see below)
  • Burial not run at all

When enabling the "Other Automation plugins" option for DFHack, this error is displayed:

Starting autonestbox.
...RFF~3\DWARFF~1\Dwarf Fortress 0.40.24\hack\lua\utils.lua:595: error: invalid arg: 3: timeunits
stack traceback:
        [C]: in function 'error'
        ...RFF~3\DWARFF~1\Dwarf Fortress 0.40.24\hack\lua\utils.lua:595: in function 'processArgs'
        ...\DWARFF~1\Dwarf Fortress 0.40.24\hack\scripts/repeat.lua:19: in main chunk
        (...tail calls...)
Fixed feeding timers for 0 citizens.

It appears to be caused by a lowercase letter in PyLNP_dfhack_onLoad.init - line 9

multicmd autonestbox start; repeat -time 7 -timeunits days -command burial -name burial

The repeat command is used again on line 13 with an uppercase "U" in -timeUnits and appears to work fine

multicmd fix/blood-del enable; repeat -time 1 -timeUnits months -command [ fix/feeding-timers ] -name feeding-timers; repeat -time 1 -timeUnits months -command [ fix/stuckdoors ] -name stuckdoors

Manually editing the line causes a further error, which is then resolved by adding square brackets around the -command parameter, as below:

multicmd autonestbox start; repeat -time 7 -timeUnits days -command [ burial ] -name burial

This line works correctly and launches with no further errors. Note, however, that toggling any option on the DFHack tab will cause this file to be regenerated, and the manual edits lost.


I tried to locate the location this line is stored within the source, but was unable to. Hopefully it's a simple fix.

[Issue created by JyeGuru: 2015-01-30]

[Comment created by JyeGuru: 2015-01-30]
headdesk So sorry. It's been a long week.

[Comment created by Pidgeot: 2015-01-30]
This is a problem with the configuration of the pack you're using, not PyLNP itself - pack authors provide their own commands for this; they're not built-in. (Look in PyLNP.json for the configuration.)

Judging by the partial paths in the error message, I'm assuming you're on Windows, meaning you're using @PeridexisErrant's pack - he's the one you need to talk to. He should be notified about the problem; if he doesn't respond, I recommend you make a post on the forum thread.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant