Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 28 29 [30] 31 32 ... 360

Author Topic: DFHack 0.43.03-r1  (Read 1124253 times)

Euius

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.08-r2
« Reply #435 on: August 16, 2014, 01:22:18 pm »

Spoiler (click to show/hide)

Have been noticing this problem in every pre-release, but as they weren't official I didn't report.  Simple fix, just wrap the statement in a "if v then"

(Of course, you have to completely restart because it's cached in memory)

Second issue: Alt-key keybindings are being applied to non-alt keypresses.  This is immediately noticeable when hitting r to turn on repeat in a workshop will bring up the room list

Third: Running showmood when the dwarf has already started construction hard crashes the game.
« Last Edit: August 16, 2014, 02:11:29 pm by Euius »
Logged

vjek

  • Bay Watcher
  • If it didn't work, change the world so it does.
    • View Profile
Re: DFHack 0.40.08-r2
« Reply #436 on: August 16, 2014, 02:06:06 pm »

Thanks to the dfhack team and contributors for the new version!  :D

I've updated my scripts accordingly.

I've read through the scripting guidelines in the first post of this thread, and I'll do my best to try and follow the guidelines as time goes on.

yxe

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.08-r2
« Reply #437 on: August 16, 2014, 02:06:27 pm »

first ... thanks for this utilitie =) ...

If you set more than a link to a stockpile, the linked list of "give: stockpile #1", "take: stockpile #2", ETC/ETC gets overlapped by: "J: No Job Selected" ??, its anybody else having this issue?


EDIT:
and this:
Code: [Select]
http://es.tinypic.com/view.php?pic=11lpoi0&s=8
my resolution is: 1920x1080
« Last Edit: August 16, 2014, 02:16:26 pm by yxe »
Logged

adgriff2

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.08-r2
« Reply #438 on: August 16, 2014, 02:26:04 pm »

Is there any way to export Workflow settings that were set using the gui? I'd like to save them to use with a different worldgen. Thanks!
Logged

Nopenope

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.08-r2
« Reply #439 on: August 16, 2014, 02:38:35 pm »

An indirect method would be to save a list of dfhack workflow command-line instructions and paste them every time. Not sure if the gui can do that though.
Logged

adgriff2

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.08-r2
« Reply #440 on: August 16, 2014, 02:57:48 pm »

I currently have a small list of workflow settings I'd like to load. I tried adding them to dfhack.init but got spammed with "World is not loaded: please load a game first". Is there a way to run a batch of dfhack commands (preferably post world load)?

I saw that I can use 'dfhack-run' to execute dfhack commands from an OS console, so I can probably rig it up with:

dfhack-run workflow amount BLOCKS 256 64
dfhack-run workflow amount HATCH_COVER 10 5
.
.
.

in a *.bat file if I have to...
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack 0.40.08-r2
« Reply #441 on: August 16, 2014, 03:05:11 pm »

onLoad.init in the save should work, I think.

adgriff2

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.08-r2
« Reply #442 on: August 16, 2014, 03:26:17 pm »

I didn't have an onLoad.init file in the folder with dfhack.init, so I made one and added the items but it didn't try to run the commands on load.

After doing some research it looks like the LNP has it's own onLoad.init file named LNP_dfhack_onLoad.init. I added the commands to this file and it seems to work fine. I just hope this file doesn't get overwritten by the LNP from time to time.
Logged

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: DFHack 0.40.08-r2
« Reply #443 on: August 16, 2014, 05:31:39 pm »

Thanks to everyone's really hard work, I got DFHack working, and even ported over a version of the old spawn-unit command which seems to function.  But I'm having two issues with it.

First, this bit throws an error

Code: [Select]
    for k,v in pairs(tmp_soul.traits) do
        local min,mean,max
        min=caste.personality.a[k]
        mean=caste.personality.b[k]
        max=caste.personality.c[k]
        tmp_soul.traits[k]=clampedNormal(min,mean,max)
    end

saying "Cannot read field unit_soul.traits: not found."
For now I just commented that out since it probably doesn't even apply to animals... just thought it might be useful to any of the authors working on a fork of that thing.

The other error is specific to my application, where I wanted to extract the name of a unit.

Code: [Select]
local unit_name
if not unit_id then
unit_name = "Something" -- The player activated the script in an interactive window.
else
unit_name = dfhack.TranslateName(dfhack.units.getVisibleName(unit_id))
end

That one says "Cannot write field (global).getVisibleName(): incompatible pointer type."

I'm not trying to write to that field, I just want to read it.  The unit_id contains a number that I typed in by hand (from what cprobe showed me), since I'm guessing that would be passed in the interaction trigger I'll be using eventually.


Logged
Just got back, updating:
(0.42 & 0.43) The Earth Strikes Back! v2.15 - Pay attention...  It's a mine!  It's-a not yours!
(0.42 & 0.43) Appearance Tweaks v1.03 - Tease those hippies about their pointy ears.
(0.42 & 0.43) Accessibility Utility v1.04 - Console tools to navigate the map

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack 0.40.08-r2
« Reply #444 on: August 16, 2014, 05:33:44 pm »

getVisibleName takes a unit, not the unit's ID. You want df.unit.find(unit_id) for that.

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: DFHack 0.40.08-r2
« Reply #445 on: August 16, 2014, 05:35:15 pm »

getVisibleName takes a unit, not the unit's ID. You want df.unit.find(unit_id) for that.
Thanks.

I like it much better when your answer isn't just "No."
Logged
Just got back, updating:
(0.42 & 0.43) The Earth Strikes Back! v2.15 - Pay attention...  It's a mine!  It's-a not yours!
(0.42 & 0.43) Appearance Tweaks v1.03 - Tease those hippies about their pointy ears.
(0.42 & 0.43) Accessibility Utility v1.04 - Console tools to navigate the map

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack 0.40.08-r2
« Reply #446 on: August 16, 2014, 05:41:29 pm »

My answer isn't no when my answer is allowed to be no, heh. In this thread, that's usually the case.

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: DFHack 0.40.08-r2
« Reply #447 on: August 16, 2014, 05:46:49 pm »

To update, that worked.  Now on to interaction triggers when I have some more time.

FYI, dfhack.gui.showAnnouncement(text, color) now seems to write into the gamelog all by itself.  The io commands shown in my script above are no longer required.
Logged
Just got back, updating:
(0.42 & 0.43) The Earth Strikes Back! v2.15 - Pay attention...  It's a mine!  It's-a not yours!
(0.42 & 0.43) Appearance Tweaks v1.03 - Tease those hippies about their pointy ears.
(0.42 & 0.43) Accessibility Utility v1.04 - Console tools to navigate the map

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack 0.40.08-r2
« Reply #448 on: August 16, 2014, 05:48:38 pm »

Now I wanna find a way to add sexual orientations to unit descriptions.

Or maybe I could just add it to unit-info-viewer somehow (if I can figure out what the hell all that code is supposed to be doing).

Dwarf_Fever

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.08-r2
« Reply #449 on: August 16, 2014, 06:17:38 pm »

Are there any .init file collections, specifically one geared towards FPS optimization?

Edit: I guess that would be scripts, rather? Or does the default init already do all the fixes for this?

Edit Edit: Nevermind, 40_08 Starter Pack r03 has an option "Performance Tweaks" for DFHack so I will just copy that .init to the pack I am trying now. (Modest Accelerated)
« Last Edit: August 16, 2014, 06:26:27 pm by Dwarf_Fever »
Logged
"Whatever exists, having somehow come into being, is again and again reinterpreted to new ends, taken over, transformed, and redirected by some power superior to it; all events in the organic world are a subduing, a becoming master, and all subduing and becoming master involves a fresh interpretation, an adaptation through which any previous 'meaning' and 'purpose' are necessarily obscured or obliterated."
Pages: 1 ... 28 29 [30] 31 32 ... 360