Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 318 319 [320] 321 322 ... 373

Author Topic: DFHack 0.34.11 r3  (Read 1388654 times)

ResMar

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4785 on: October 30, 2013, 10:38:48 pm »

A theoretical question: how painful would it be to redeploy Dwarf Therapist with DFHackTM inside?

I am wondering whether or not this is a longer-term possibility.
Logged
ヽ(´ー`)┌[>゜))))彡]   Dwarf Therapist User Guide

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4786 on: October 30, 2013, 10:40:31 pm »

What do you mean? Have Therapist include a DFHack window? Have Therapist work on a DFHack base?

Tonren

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4787 on: October 30, 2013, 10:51:27 pm »

Is anyone now unable to run dfhack since upgrading to OS X 10.9 Mavericks? I get an error about libdfhack being the wrong architecture.
Logged

narhiril

  • Bay Watcher
  • [DUTY_BOUND]
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4788 on: October 30, 2013, 11:50:18 pm »

Can someone smarter than I am explain what's going on with the new autoSyndrome?  I have "autoSyndrome 1" in my dfhack.init, but the console is printing out "autoSyndrome disabled".  I have several reactions that rely very heavily on it, so I really need to know if it's working or not.  Is it a conflict with having syndromeTrigger enabled at the same time?

Also, is there any more detailed documentation for syndromeTrigger?  Namely, what's new and how to use it?
 

Nevermind, found the new documentation.  https://github.com/peterix/dfhack#syndrometrigger
« Last Edit: October 31, 2013, 12:04:11 am by narhiril »
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4789 on: October 31, 2013, 12:04:02 am »

here's the pertinent code from autosyndrome

Code: [Select]
command_result autoSyndrome(color_ostream& out, vector<string>& parameters) {
    if ( parameters.size() > 1 )
        return CR_WRONG_USAGE;

    bool enable = false;
    if ( parameters.size() == 1 ) {
        if ( parameters[0] == "enable" ) {
            enable = true;
        } else if ( parameters[0] == "disable" ) {
            enable = false;
        } else {
            int32_t a = atoi(parameters[0].c_str());
            if ( a < 0 || a > 1 )
                return CR_WRONG_USAGE;

            enable = (bool)a;
        }
    }

    out.print("autoSyndrome is %s\n", enabled ? "enabled" : "disabled");
    return plugin_enable(out, enable);
}

I don't see anything wrong, so... I would probably just have it be "autoSyndrome enable" instead of "autoSyndrome 1".

ag

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4790 on: October 31, 2013, 02:36:34 am »

Code: [Select]
    out.print("autoSyndrome is %s\n", enabled ? "enabled" : "disabled");

This ends up printing the state the plugin was in before running the command, not what it becomes. It should really be "enable ?", not "enabled ?".

In any case, the new way to enable stuff is "enable autosyndrome". :)
Logged

Roses

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4791 on: October 31, 2013, 09:47:45 am »

Is it possible to have custom workshops require power using DFhack?
Logged

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4792 on: October 31, 2013, 12:10:40 pm »

Is it possible to have custom workshops require power using DFhack?
I think so. But afaik only with c++ plugin.

Tonren

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4793 on: October 31, 2013, 02:42:56 pm »

ATTENTION OS X USERS!

"WRONG ARCHITECTURE" ERROR

If you upgraded to OS X 10.9 Mavericks and are now receiving the following error upon running the "dfhack" script:

Code: [Select]
dyld: could not load inserted library './hack/libdfhack.dylib' because no suitable image found.  Did find:
        ./hack/libdfhack.dylib: mach-o, but wrong architecture

Then you must perform the following workaround:

  • Open a terminal by hitting Cmd + Space, typing "terminal", and hitting Return.
  • Navigate to your Dwarf Fortress directory by typing "cd", a space, and then the directory, for example:

    cd /Users/tonren/Downloads/df_osx

    ... then hit Return.

  • Now type this mystical incantation:

    install_name_tool -add_rpath @executable_path/hack/libdfhack.dylib dwarfort.exe

    ... and hit Return.

    This command should have no output. If it has any output other than your terminal prompt (something like "username@computername: ~/Downloads/df_osx"), paste it here.

  • Until the next official update is released, use the df script and NOT the dfhack script to run the game.

"X11 REQUIRED" ERROR

If you get a popup asking if you'd like to install X11, but you have already installed it, there is a (thankfully simple) workaround: just re-install from the package file you originally downloaded way back when. It should be called something like XQuartz-2.7.4.dmg. Now Dwarf Fortress will detect X11 and you can get back to playing.
« Last Edit: October 31, 2013, 02:45:11 pm by Tonren »
Logged

nekoexmachina

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4794 on: November 01, 2013, 12:54:00 pm »

Please, don't use ridicolous wine thing and use this:
http://dethware.org/dfhack/download/dfhack-0.34.11-r3-Darwin.zip
Logged
Whenever i read the "doesn't care about anything anymore" line, i instantly imagine a dwarf, sitting alone on a swing set. Just slowly rocking back and forth, somberly staring at the ground, and stopping every once in a while to sigh.
It's mildly depressing.

TuefelHundenIV

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4795 on: November 01, 2013, 04:08:11 pm »

I have been tinkering around and testing a few build ideas out and I don't want to spend large amounts of time gathering or trading for the resources just to dink around.

I tried using the createitem command but for the life of me I can't suss out how to generate either raw ore for non-alloy metal or refined bars.  I can't seem to find anywhere that points out the command line for createitem.
« Last Edit: November 01, 2013, 04:13:06 pm by TuefelHundenIV »
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4796 on: November 01, 2013, 05:05:29 pm »

I have been tinkering around and testing a few build ideas out and I don't want to spend large amounts of time gathering or trading for the resources just to dink around.

I tried using the createitem command but for the life of me I can't suss out how to generate either raw ore for non-alloy metal or refined bars.  I can't seem to find anywhere that points out the command line for createitem.

http://dwarffortresswiki.org/index.php/Item_token
http://dwarffortresswiki.org/index.php/DF2012:Material_token

TuefelHundenIV

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4797 on: November 02, 2013, 12:28:56 am »

Of course.  It had to be so simple I would have tripped over it.  Thanks for the info man.

To make sure I am not mangling this. createitem BAR:INORGANIC:IRON or STEEL:(amount here) correct?
« Last Edit: November 02, 2013, 12:49:42 am by TuefelHundenIV »
Logged

BlackFlyme

  • Bay Watcher
  • BlackFlyme cancels Work: Interrupted by bird.
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4798 on: November 02, 2013, 01:46:44 am »

Of course.  It had to be so simple I would have tripped over it.  Thanks for the info man.

To make sure I am not mangling this. createitem BAR:INORGANIC:IRON or STEEL:(amount here) correct?

createitem ITEM:SUBTYPE MATERIAL #

So for 5 steel bars it would be

createitem BAR INORGANIC:STEEL 5
Logged

urmane

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4799 on: November 02, 2013, 08:38:59 am »

(I see r4 is out - will try that shortly, the following is for r3)

Doing some testing with fix/growthbug.rb on linux.  Based on what I'm seeing for unit birth_times - mostly 0, 1, double digit ints, or huge positive/negative ints - and the large number getting modified every time I run - ~100 "fixed" each time I run "fix/growthbug now", once a second immediately after start - I would guess that perhaps the birth_time variable is not mapping to the correct memory location.  This theory is bolstered by the fact that the hang happens when an assignment is attempted - running a version of the script that does not write to unit.relation.birth_time works just fine.

Thoughts?

Cut-n-paste of current (ie not original, modified for testing) code snippet:
Code: [Select]
def process
                count = 0
                df.world.units.active.each do |unit|
                        if unit and unit.relations and unit.relations.birth_time then
                                puts "unit has birth_time #{unit.relations.birth_time}"
                                if unit.relations.birth_time > 0 then
                                        r = unit.relations.birth_time % 10
                                        if r > 0 then
                                                unit.relations.birth_time -= r
                                                puts "  unit now has birth_time #{unit.relations.birth_time}"
                                                count += 1
                                        end
                                end
                        end
                end
                puts "FixGrowth: Fixed #{count} units so that their size will grow/thicken." unless count == 0

End of output just before hang:
Code: [Select]
unit has birth_time 0
unit has birth_time 7012459
  unit now has birth_time 7012450
unit has birth_time 0
unit has birth_time 0
unit has birth_time 0
unit has birth_time 0
unit has birth_time 274006465
  unit now has birth_time 274006460
unit has birth_time -1
unit has birth_time 40
unit has birth_time 0
unit has birth_time -1
unit has birth_time -1718639376
unit has birth_time 0
unit has birth_time 0
unit has birth_time -1702744808
unit has birth_time 1
  unit now has birth_time 0
unit has birth_time 69
  unit now has birth_time 60
unit has birth_time -1258291026
unit has birth_time 35
  unit now has birth_time 30
unit has birth_time 0
unit has birth_time 0
unit has birth_time -1370843632
unit has birth_time 50332165
  unit now has birth_time 50332160
unit has birth_time 69
  unit now has birth_time 60
unit has birth_time 0
unit has birth_time 0
unit has birth_time 0
FixGrowth: Fixed 106 units so that their size will grow/thicken.
[DFHack]# fix/growthbug now
(hung)
Logged
Pages: 1 ... 318 319 [320] 321 322 ... 373