Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 99 100 [101] 102 103 ... 244

Author Topic: DFHack 50.14-r1.1  (Read 892934 times)

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r1
« Reply #1500 on: October 01, 2018, 01:57:27 pm »

My last post is somewhat related. Basically, you have to use C++ to modify existing screens. You can use Lua (but not Ruby) to create entirely new screens which draw the screen below them plus some extra text to achieve a similar effect (see gui/extended-status), but it's not recommended, and particularly dangerous in the main fortress/adventure mode screens. A plugin is usually preferable.

Incidentally, I'm not sure what examples you were looking at to find the selected unit. No tool should have to check what the current screen is to do that - DFHack has a Gui::getSelectedUnit() function that will work on nearly any screen where a unit can be selected. Was that a core DFHack script you were looking at?

Logged
DFHack - Dwarf Manipulator (Lua) - DF Wiki talk

There was a typo in the siegers' campfire code. When the fires went out, so did the game.

Fleeting Frames

  • Bay Watcher
  • Spooky cart at distance
    • View Profile
Re: DFHack 0.44.12-r1
« Reply #1501 on: October 02, 2018, 04:01:23 am »

Some DF viewscreens do provide you access to some data on them, which you can then modify, but afaik none of them allow you to set new keybinds.

I personally use a fair few screens like lethosor describes, but in hindsight the lua gui screen support structure I wrote for it is more workarounds for issues linked to this than support. Well, I already spent moths writing things reliant on it or it itself and they work well enough, but if I had known in the beginning I'd might have written the gui section as a lua-facing arbitrary-text C plugin (in fact, I suspect this idea is how the existing lua gui options came to be). Or not written anything substantial at all *shrug*

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: DFHack 0.44.12-r1
« Reply #1502 on: October 02, 2018, 04:32:06 pm »

for adventure mode wise probably make it work like the minecarts push and ride system, where you do loads of menu key press setups to pilot it.
Logged
I thought I would I had never hear my daughter's escapades from some boy...
DAMN YOU RUMRUSHER!!!!!!!!
"body swapping and YOU!"
Adventure in baby making!Adv Homes

Giant Ostrich Bone [29]

  • Bay Watcher
  • ^Elephant birds were a real thing and I love them
    • View Profile
Re: DFHack 0.44.12-r1
« Reply #1503 on: October 04, 2018, 11:20:35 am »

Hello, totally new to the forums here and a bit of a novice at DF. (haven't learned how to make a TOTALLY good military yet, make ore, use lava, a well, etc.) I wanted to use DFHack to view legends mode while having a current/on-going fort because I noticed there are two people I'm having issues with. As in, one is dead and buried but I can't make a memorial slab for him (it doesn't appear on the menu) while the other is a memorial slab I produced assuming it belonged to one of my dead dwarves but this guy has never even set foot in my fortress! I don't want issues with ghosts and I have absolutely no idea why they carved this other memorial to someone I don't know. Finding out about these people would help I think. So...

Whenever I open DFHack the window is open for a split second but closes immediately, displaying no graphics it is so fast. I've looked at my task manager to no avail. I have a Windows 64-bit system and took care to install that one. Can anyone help me? Thank you!

(I just found out one tidbit that may have at least answered my first question. The slain guy was a Monster Slayer instead of a typical dwarf. Can I not make a memorial to him because he was a member of a different race, as a visitor?)
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r1
« Reply #1504 on: October 04, 2018, 11:33:26 am »

Some basic details would help. How did you install DFHack? What version of DFHack and DF are you using?
Logged
DFHack - Dwarf Manipulator (Lua) - DF Wiki talk

There was a typo in the siegers' campfire code. When the fires went out, so did the game.

Giant Ostrich Bone [29]

  • Bay Watcher
  • ^Elephant birds were a real thing and I love them
    • View Profile
Re: DFHack 0.44.12-r1
« Reply #1505 on: October 04, 2018, 12:07:32 pm »

I downloaded it from this url: https://github.com/dfhack/dfhack/releases

Under the DFHack 0.44.12-r1 heading, it was this: dfhack-0.44.12-r1-Windows-64.zip

I have a Windows 64-bit laptop, and am using the most current version, 0.44.12
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r1
« Reply #1506 on: October 04, 2018, 01:11:29 pm »

Are you using the 32-bit or 64-bit version of DF? Can you verify that you installed DFHack correctly from the instructions? If you uninstall DFHack, does DF start normally? (You can do this minimally by renaming SDL.dll to something else, then renaming SDLreal.dll to SDL.dll.)
Logged
DFHack - Dwarf Manipulator (Lua) - DF Wiki talk

There was a typo in the siegers' campfire code. When the fires went out, so did the game.

Staalo

  • Bay Watcher
  • It's all for the betterment of Dwarfkind - honest!
    • View Profile
Re: DFHack 0.44.12-r1
« Reply #1507 on: October 08, 2018, 02:50:53 am »

Hello all and thanks for the invaluable tool you're providing us. I was directed here from the other forum, since the funny features I'm seeing might have something to do with DFHack.

In short, I can access the information of some dwarves who are not residents in my fort by selecting (v)iew in some citizens' relationships screen. There are also some additional effects related to the same thing, a longer description can be found in this thread.

This is happening on Mac DF .44.12 with DFHack 0.44.12-r1 installed without any other mods.
Logged
Kasmko Taldequihu, Human Criminal corrupted zombie is visiting.
Mong Todsporro, Human Criminal death zombie is visiting.

Uhhh... welcome?

taleden

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r1
« Reply #1508 on: October 08, 2018, 12:14:00 pm »

Is there a way for a Lua script to tell if a female egglayer is currently busy sitting on eggs in a nestbox? "unit.job.currentjob" and "unit.actions" don't seem to show it. I can use dfhack.buildings.findAtTile(), :getType() and .claimed_by to check that the bird is standing on her own claimed nest box which is probably close enough, but I wondered if someone knows a more direct way to test for egg-sitting.
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r1
« Reply #1509 on: October 08, 2018, 02:36:34 pm »

Replied at http://www.bay12forums.com/smf/index.php?topic=172314.msg7868194#msg7868194, for reference

Is there a way for a Lua script to tell if a female egglayer is currently busy sitting on eggs in a nestbox? "unit.job.currentjob" and "unit.actions" don't seem to show it. I can use dfhack.buildings.findAtTile(), :getType() and .claimed_by to check that the bird is standing on her own claimed nest box which is probably close enough, but I wondered if someone knows a more direct way to test for egg-sitting.
From what I remember, this isn't an exact science in DF - egglayers can move away from the nestbox for a short time, and the eggs will be fine (unless that's changed). Maybe there's an egg-related timer somewhere in the unit that you can check. I don't know much off the top of my head here, unfortunately.

Edit: maybe a combination of building.claimed_by and eggs.flags.fertile (egg_flags.fertile? not sure) would work, unless you care about birds sitting on unfertilized eggs.
« Last Edit: October 08, 2018, 02:38:11 pm by lethosor »
Logged
DFHack - Dwarf Manipulator (Lua) - DF Wiki talk

There was a typo in the siegers' campfire code. When the fires went out, so did the game.

taleden

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r1
« Reply #1510 on: October 08, 2018, 08:56:27 pm »

Edit: maybe a combination of building.claimed_by and eggs.flags.fertile (egg_flags.fertile? not sure) would work, unless you care about birds sitting on unfertilized eggs.
I'm trying to work around this issue so the question is only whether the hen is sitting on eggs (and thus unable to mate again in time to lay her next clutch), I don't think it matters for my purpose whether the eggs are fertile or not. So I'll try it for now with just the building claim condition, I think that'll suffice.

I do wonder what the actual mechanics are though, it seems like there's a ton of guesses and assumptions around bird breeding.
Logged

canneddeath

  • Escaped Lunatic
    • View Profile
Re: DFHack 0.44.12-r1
« Reply #1511 on: October 09, 2018, 08:58:14 pm »

In Dwarf Manipulator, how do you delete saved professions? I have like 15 clogging up my professions apply list and I want to get rid of them
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r1
« Reply #1512 on: October 09, 2018, 09:37:07 pm »

They're saved in the "manipulator" folder in your DF folder. You can delete them from there.

I know someone was writing a patch to add this to the in-game UI, but apparently they never made a PR, so I have no idea where it is.
Logged
DFHack - Dwarf Manipulator (Lua) - DF Wiki talk

There was a typo in the siegers' campfire code. When the fires went out, so did the game.

Kat

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r1
« Reply #1513 on: October 12, 2018, 12:21:49 pm »

my current fortress is well over the population cap, and many citizens have off-site spouses, which causes a few unhappy thoughts about being away from family, unable to make romance, etc.

If I used the "migrants-now" script, how likely is it that any of these off-site spouses would be amongst the wave ?
Logged

taleden

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r1
« Reply #1514 on: October 12, 2018, 06:01:22 pm »

A few assorted questions for Lua scripts:

edit: Nevermind, no longer relevant to what I'm working on.
« Last Edit: October 17, 2018, 04:08:04 pm by taleden »
Logged
Pages: 1 ... 99 100 [101] 102 103 ... 244