Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 353 354 [355] 356 357 ... 373

Author Topic: DFHack 0.34.11 r3  (Read 1404998 times)

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #5310 on: March 07, 2014, 02:19:41 am »

The way it's usually done is recursive timeouts in a lua script:

Code: [Select]
function repeatScriptEvery100Ticks()
    dfhack.run_script('script','arg1','arg2',...)
    dfhack.timeout(100,'ticks',repeatScriptEvery100Ticks)
end

Though this should be possible:

Code: [Select]
local script=require('gui.script')

script.start(function()
while true do
    dfhack.run_script('script','arg1','arg2',...)
    script.sleep(100,'ticks')
end

Hmm. I think it'd be better to replace "true" with some global variable that can be toggled, though.

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: DFHack 0.34.11 r3
« Reply #5311 on: March 07, 2014, 09:05:33 am »

Anyone know how to read data on an attack?  All I see is a bunch of 'userdata'.
If something is labeled as "userdata", it means the structure layout hasn't been determined - someone will have to analyze the game code and/or memory layout in order to figure out its overall size as well as the size and location (and ideally meaning) of each field within it and add that data to the df-structures XML files, and then you'll be able to view it in the next DFHack release (or rebuild DFHack yourself).

What exactly do you mean by "an attack"? Where is the structure actually stored? Because if you're talking about creature attacks (i.e. from the raws), then it's already been done and will be available in r5.
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.

IndigoFenix

  • Bay Watcher
  • All things die, but nothing dies forever.
    • View Profile
    • Boundworlds: A Browser-Based Multiverse Creation and Exploration Game
Re: DFHack 0.34.11 r3
« Reply #5312 on: March 07, 2014, 09:43:32 am »

What exactly do you mean by "an attack"? Where is the structure actually stored? Because if you're talking about creature attacks (i.e. from the raws), then it's already been done and will be available in r5.

Yes, this is what I was talking about.  Okay then.

Bo-Rufus CMVII

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #5313 on: March 07, 2014, 05:52:49 pm »

Edit:

D'oh!  I was posting about successfully building Dwarf Therapist.  Wrong thread.

But since I'm here... The current DT has to be run as root on Linux, or else as a child process of DF.  Has anyone tried to find a way to launch it from within the dfhack terminal?

Has there been any discussion of converting it to a dhfack plugin, a la stonesense?
« Last Edit: March 07, 2014, 05:56:17 pm by Bo-Rufus CMVII »
Logged

Doktoro Reichard

  • Bay Watcher
  • Lunatic formerly known as Escaped
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #5314 on: March 07, 2014, 10:35:08 pm »

Has there been any discussion of converting it to a dhfack plugin, a la stonesense?

I'm on Windows, if it matters, but the r3 version has a sort of Dwarf Therapist, aptly named Dwarf Manipulator. It does what DT does in a DF kinda way... It is accessed through the 'u'nits menu by pressing 'l'.
Logged
I have to write something... well here goes:
"A dwarf isn't a dwarf unless he dies the most !!FUN!! of ways", Quote unknown, possibly Armok.

Doktoro Reichard is quite pleased with making a Great Carbonite Trap

Why shouldn't you write with a broken pencil? Because it's pointless!

Sutremaine

  • Bay Watcher
  • [ETHIC:ATROCITY: PERSONAL_MATTER]
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #5315 on: March 08, 2014, 05:05:40 pm »

r4 has been unofficially released quite a while back now, and there won't be an official release of it because things have changed since then. Instead, there may be an r5 eventually.
Got r4 now. Found a data point for something I noted during a previous medical test -- the dwarf was getting infections here and there, but I was never really convinced that the shoulder was getting infected, or remaining infected. I currently have a dwarf wandering around with a health screen claiming an infected left shoulder, but an infection level of 0.
Logged
I am trying to make chickens lay bees as eggs. So far it only produces a single "Tame Small Creature" when a hen lays bees.
Honestly at the time, I didn't see what could go wrong with crowding 80 military Dwarves into a small room with a necromancer for the purpose of making bacon.

IndigoFenix

  • Bay Watcher
  • All things die, but nothing dies forever.
    • View Profile
    • Boundworlds: A Browser-Based Multiverse Creation and Exploration Game
Re: DFHack 0.34.11 r3
« Reply #5316 on: March 09, 2014, 03:52:08 am »

How do you read/change the size of an article of clothing?  Related: how do you calculate the size of clothing a given creature can wear?

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #5317 on: March 09, 2014, 04:12:18 am »

How do you read/change the size of an article of clothing?  Related: how do you calculate the size of clothing a given creature can wear?
Items have not size, but maker race and it compares to your race.

IndigoFenix

  • Bay Watcher
  • All things die, but nothing dies forever.
    • View Profile
    • Boundworlds: A Browser-Based Multiverse Creation and Exploration Game
Re: DFHack 0.34.11 r3
« Reply #5318 on: March 09, 2014, 04:19:08 am »

How do you read/change the size of an article of clothing?  Related: how do you calculate the size of clothing a given creature can wear?
Items have not size, but maker race and it compares to your race.

Ah, so if I wanted to make, for example, elephant sized armor, I would set the maker race to elephant's race id?
How much leeway is there for comparing sizes?  They don't have to be the exact same size, do they?

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #5319 on: March 09, 2014, 12:15:18 pm »

How do you read/change the size of an article of clothing?  Related: how do you calculate the size of clothing a given creature can wear?
Items have not size, but maker race and it compares to your race.

Ah, so if I wanted to make, for example, elephant sized armor, I would set the maker race to elephant's race id?
How much leeway is there for comparing sizes?  They don't have to be the exact same size, do they?
pretty much the size bit is tied to the race size, so if you have anyone as large as an elephant would be able to normally wear elephant clothes even if the elephant made them for their own.
that doesn't stop someone from force equipping the clothes on any one they want.
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

Roses

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #5320 on: March 09, 2014, 05:56:01 pm »

I'm looking at messing with the temperatures of map tiles and saw that there is a temperature_1 and temperature_2 designation for each map tile. Does anyone know what the difference is? (Is it a max/min, or maybe a current/max, or something else?)
Logged

Andux

  • Bay Watcher
  • [PREFSTRING:semicolons]
    • View Profile
    • Andux's DFWiki page
Re: DFHack 0.34.11 r3
« Reply #5321 on: March 09, 2014, 11:33:55 pm »

IIRC, temperature_1 is the current temperature, and temperature_2 is the tile's normal temperature (which it will generally return to over the course of several frames).
Logged
(Do not sign anything.) -- Fell, Planescape: Torment

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

Sutremaine

  • Bay Watcher
  • [ETHIC:ATROCITY: PERSONAL_MATTER]
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #5322 on: March 09, 2014, 11:35:10 pm »

Is there a way of determining how friendly you are with another civ?
Logged
I am trying to make chickens lay bees as eggs. So far it only produces a single "Tame Small Creature" when a hen lays bees.
Honestly at the time, I didn't see what could go wrong with crowding 80 military Dwarves into a small room with a necromancer for the purpose of making bacon.

Urist Da Vinci

  • Bay Watcher
  • [NATURAL_SKILL: ENGINEER:4]
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #5323 on: March 10, 2014, 01:01:10 am »

How do you read/change the size of an article of clothing?...

The getVolume() item vmethod helps to read the volume of an item.

breadman

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #5324 on: March 11, 2014, 11:42:42 am »

But since I'm here... The current DT has to be run as root on Linux, or else as a child process of DF.  Has anyone tried to find a way to launch it from within the dfhack terminal?

I had managed to convince a slightly older version of Linux to exec DF after launching DT, but an upgrade broke that script.  Thereafter, I started re-opening the ptrace loophole (echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope) until I started using autolabor to the point that I simply stopped using DT.

A potentially better solution is to grant DT permission to ptrace at will: sudo apt-get install libcap2-bin && sudo setcap cap_sys_ptrace=eip ./bin/release/DwarfTherapist
Logged
Quote from: Kevin Wayne, in r.g.r.n
Is a "diety" the being pictured by one of those extremely skinny aboriginal statues?
Pages: 1 ... 353 354 [355] 356 357 ... 373