Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 139 140 [141] 142 143 ... 373

Author Topic: DFHack 0.34.11 r3  (Read 1404388 times)

expwnent

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r1
« Reply #2100 on: July 04, 2012, 11:51:07 am »

I was playing with mode set and when I was back in Fortress Mode I noticed I no longer had the option to Save Game, instead all I had was the option to Abort Game, at which point it dropped me out quickly and didn't save anything.

Any idea how to force a Save in Fortress Mode?

Speaking of which, is it possible to force an "Abort Game"? It'd be nice to have an alternative to the "die" command.
Logged

Andux

  • Bay Watcher
  • [PREFSTRING:semicolons]
    • View Profile
    • Andux's DFWiki page
Re: DFHack 0.34.11 r1
« Reply #2101 on: July 04, 2012, 04:14:29 pm »

I was playing with mode set and when I was back in Fortress Mode I noticed I no longer had the option to Save Game, instead all I had was the option to Abort Game, at which point it dropped me out quickly and didn't save anything.

Any idea how to force a Save in Fortress Mode?

Speaking of which, is it possible to force an "Abort Game"? It'd be nice to have an alternative to the "die" command.

I'm not sure how to get at it from DFHack, but there is a flag in memory which controls whether you can save; it's at offset 0x0165288E in DF 0.34.11 SDL (5 bytes before pause_state).
Logged
(Do not sign anything.) -- Fell, Planescape: Torment

MADMAN · Save Tools · WTF Tools · Generated Raws Extractor · Tweak for 0.31–34.xx

Eric Blank

  • Bay Watcher
  • *Remain calm*
    • View Profile
Re: DFHack 0.34.11 r1
« Reply #2102 on: July 04, 2012, 04:39:51 pm »

Alright, I've got a quick question:

I just reclaimed a fortress of mine, and all 114 my old dwarves are still alive and wandering around in it. And drinking all my damn booze as soon as I unpaused.

They're listed as 'friendly' under the 'other' section of the unit screen, and as such they're just useless booze-hogs. I embarked under the same civilization as I did when I built this fort. Is there any way, through DFhack, to convince them to actually start acting as proper members of my fortress rather than as parasites? If not, everyone will die of thirst/hunger as the massive horde of useless dwarves consumes food and booze faster than it can be produced.

To make matters worse, they don't appear to be putting the barrels down after drinking from them...
« Last Edit: July 04, 2012, 04:41:38 pm by Eric Blank »
Logged
I make Spellcrafts!
I have no idea where anything is. I have no idea what anything does. This is not merely a madhouse designed by a madman, but a madhouse designed by many madmen, each with an intense hatred for the previous madman's unique flavour of madness.

WillowLuman

  • Bay Watcher
  • They/Them Life is weird
    • View Profile
Re: DFHack 0.34.11 r1
« Reply #2103 on: July 04, 2012, 04:43:15 pm »

Alright, I've got a quick question:

I just reclaimed a fortress of mine, and all 114 my old dwarves are still alive and wandering around in it. And drinking all my damn booze as soon as I unpaused.

They're listed as 'friendly' under the 'other' section of the unit screen, and as such they're just useless booze-hogs. I embarked under the same civilization as I did when I built this fort. Is there any way, through DFhack, to convince them to actually start acting as proper members of my fortress rather than as parasites? If not, everyone will die of thirst/hunger as the massive horde of useless dwarves consumes food and booze faster than it can be produced.

To make matters worse, they don't appear to be putting the barrels down after drinking from them...
I'm sorry, but that made me rofl
Logged
Dwarf Souls: Prepare to Mine
Keep Me Safe - A Girl and Her Computer (Illustrated Game)
Darkest Garden - Illustrated game. - What mysteries lie in the abandoned dark?

RanDomino

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r1
« Reply #2104 on: July 04, 2012, 09:52:25 pm »

I don't know if I would be able to play DF without digv.
Logged

Cardinal

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r1
« Reply #2105 on: July 04, 2012, 10:04:04 pm »

How do you discover the civ_id of the owner of a site you're looking at?
Logged
Engraved is an image of a Human and a video game. The Human is making a plaintive gesture.

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: DFHack 0.34.11 r1
« Reply #2106 on: July 04, 2012, 10:05:49 pm »

How do you discover the civ_id of the owner of a site you're looking at?
Why would you need the civ_id that owns the site? There's already a variable that tells you the ID of your civilization - ui.civ_id (and ui.group_id, for the local government).
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.

Cardinal

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r1
« Reply #2107 on: July 04, 2012, 10:15:37 pm »

Why would you need the civ_id that owns the site? There's already a variable that tells you the ID of your civilization - ui.civ_id (and ui.group_id, for the local government).

Because I'm testing out functionality of restarting fortresses I've retired, and I want to know why resetting the resident flags on the dwarves at a fortress is not restoring them to active dwarves in fortress mode, which has worked so far except isn't in my most recent test. So, my guess is that the civ_id of the site has changed (maybe as a result of setting the Lair flag), and I need to check it in fortress/adventure mode (and not on the selector map).
Logged
Engraved is an image of a Human and a video game. The Human is making a plaintive gesture.

Cardinal

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r1
« Reply #2108 on: July 04, 2012, 11:30:17 pm »

As a heads-up for anyone else doing the same kind of work, this is what happened, the integer value of the civ_id for the site seems to have changed as a result of the founding of a new fortress.

In lua, what's the syntax to check the attributes of the site object? Or, better yet, is there any documentation of all the attributes of units and sites that can be accessed using lua?
Logged
Engraved is an image of a Human and a video game. The Human is making a plaintive gesture.

Jiri Petru

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r1
« Reply #2109 on: July 05, 2012, 01:29:56 am »

Hi all,

I just wanted to let you know that TildeATH over at Something Awful wrote this amazing tutorial to game mode switching - how to switch from fortress mode to adventurer mode, go adventuring, then come back and play fortress mode again. It's very in-depth and seems easy to follow.
Logged
Yours,
Markus Cz. Clasplashes

expwnent

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r1
« Reply #2110 on: July 05, 2012, 09:12:47 am »

In lua, what's the syntax to check the attributes of the site object? Or, better yet, is there any documentation of all the attributes of units and sites that can be accessed using lua?

You can figure out a lot of it with printall. Otherwise, there's always this: https://github.com/angavrilov/df-structures
Logged

Cardinal

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r1
« Reply #2111 on: July 05, 2012, 11:03:21 am »

You can figure out a lot of it with printall. Otherwise, there's always this: https://github.com/angavrilov/df-structures

Printall would be great if someone could tell me what form the site object takes in Fortress/Adventure mode.
Logged
Engraved is an image of a Human and a video game. The Human is making a plaintive gesture.

expwnent

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r1
« Reply #2112 on: July 05, 2012, 11:59:33 am »

Code: [Select]
printall(df.global); //many things, world looks useful
printall(df.global.world); //world_data looks promising: could be about global map stuff (hint: it is)
printall(df.global.world.world_data); //sites is a variable!
printall(df.global.world.world_data.sites)

Just letting you know how I figured it out so that you can figure out similar things in the future.
Logged

Eric Blank

  • Bay Watcher
  • *Remain calm*
    • View Profile
Re: DFHack 0.34.11 r1
« Reply #2113 on: July 05, 2012, 12:03:36 pm »

Any ideas about forcing these dorfs to become proper members of my fort? Sounds like cardinal is working on something similar...
Logged
I make Spellcrafts!
I have no idea where anything is. I have no idea what anything does. This is not merely a madhouse designed by a madman, but a madhouse designed by many madmen, each with an intense hatred for the previous madman's unique flavour of madness.

ag

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r1
« Reply #2114 on: July 05, 2012, 12:16:22 pm »

This C++ function almost precisely reproduces the conditions used by the game to detect citizens:

https://github.com/peterix/dfhack/blob/master/library/modules/Units.cpp#L692

Check the flags and the values of unit.civ_id vs df.global.ui.civ_id (while in fort mode).
Logged
Pages: 1 ... 139 140 [141] 142 143 ... 373