Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 261 262 [263] 264 265 ... 373

Author Topic: DFHack 0.34.11 r3  (Read 1439480 times)

Hommit

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3930 on: June 06, 2013, 03:10:28 am »

Any chance to someone updating digvx code, so it don't place SO many stairs (sometimes up to like 80% of tiles on one level!)?
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3931 on: June 06, 2013, 03:11:41 am »

It places stairs wherever there's a vein of similar material on an adjacent z-level; I'd say it makes perfect sense to do it that way. It seems more of a personal issue.

Askot Bokbondeler

  • Bay Watcher
  • please line up orderly
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3932 on: June 06, 2013, 07:28:49 am »

i don't use stairs, i'd prefer if it would place ramps. it wouldn't always work, but that's what overseers are for. how would i go about changing it?

Mr S

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3933 on: June 06, 2013, 08:19:03 am »

First step, set up a very efficient hospital for all of the upcoming mining injuries...

 :P
Logged

peterix

  • Bay Watcher
    • View Profile
    • Dethware
Re: DFHack 0.34.11 r3
« Reply #3934 on: June 06, 2013, 10:02:19 am »

i don't use stairs, i'd prefer if it would place ramps. it wouldn't always work, but that's what overseers are for. how would i go about changing it?

The code for that is here:
https://github.com/peterix/dfhack/blob/master/plugins/dig.cpp#L987

Currently, it spreads up and down, setting the designations appropriately. If you wanted to do ramps, you'd have to do channels. A tile where the algorithm would spread down would be designated for channeling, a tile that would make it go up would NOT be designated. Everything else would be designated for normal digging. Nothing would change about the actual algorithm, just a few more conditions and different designations.

cdombroski

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3935 on: June 06, 2013, 11:28:59 am »

I've duplicated the upcoming restrictliquid and restrictice commands as lua scripts (thanks to rampaging-poet for the original code!). I imagine it's not as fast as the original C++ code, but it gets the job done for me.

Here they are for anyone else who's impatient like me:
Code: (restrictliquid.lua) [Select]
-- Restrict visible tiles with liquid
max_x,max_y,max_z = dfhack.maps.getTileSize()
for x=0, max_x-1 do
for y=0, max_y-1 do
for z=0, max_z-1 do
des = dfhack.maps.getTileFlags(x,y,z)
if des ~= nil and des['hidden'] == false and des['flow_size'] ~= 0 then
des['traffic'] = df.tile_traffic['Restricted']
end
end
end
end

Code: (restrictice.lua) [Select]
-- Restrict tiles over visible ice walls
max_x,max_y,max_z = dfhack.maps.getTileSize()
for x=0, max_x-1 do
for y=0, max_y-1 do
for z=1, max_z-1 do
des = dfhack.maps.getTileFlags(x,y,z)
des_below = dfhack.maps.getTileFlags(x,y,z-1)
type_below = dfhack.maps.getTileType(x,y,z-1)
if des_below ~= nil and des_below['hidden'] == false and type_below == df.tiletype['FrozenWall'] then
des['traffic'] = df.tile_traffic['Restricted']
end
end
end
end
Logged

eclipse412

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3936 on: June 06, 2013, 08:04:16 pm »

How can I use this to fill in a hole with clay? I dug a hole to get ride of water then thought I could use this to fill it in. Any Help?
Thanks,
E
Logged

scamtank

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3937 on: June 06, 2013, 08:10:30 pm »

Use tiletypes to transform the clay floor tiles into clay wall tiles.

"filter shape floor" and "paint shape wall" should be enough for settings. It'll transform any floor tile under the loo[k]-cursor into a plain undug wall of the same material.
Logged

Askot Bokbondeler

  • Bay Watcher
  • please line up orderly
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3938 on: June 06, 2013, 08:11:35 pm »

eclipse412

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3939 on: June 06, 2013, 08:51:20 pm »

What about open space?
Logged

Kurik Amudnil

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3940 on: June 06, 2013, 10:53:18 pm »

unit.appearance.unk_4c8  is the effective body appearance modifier (percent), default is 100.  This effective body modifier is the result of combining the body size modifiers in unit.appearance.body_modifiers[] .  I haven't looked at enough creatures that use more than 2 modifiers to see if the integer division happens for each modifier or is applied later.  With body_modifiers 99 and 106, unk_4c8 = 104 = 99 * 106 / 100.

Using unk_4c8, my estimated body size calculation is now spot on for units that spawn full grown.

*edit: found a unit with modifiers 95,104,107, and unk_4c8 = 105

100 * 95/100 * 104/100 = 98.80 => 98 * 107 / 100 = 104.86 => 104 != 105

100 * (95 * 104 * 107) / 100^3 = 105.7160 => 105 == 105 so it looks like the loss of precision happens last rather than for each modifier
« Last Edit: June 07, 2013, 01:58:12 am by Kurik Amudnil »
Logged

Billy Jack

  • Bay Watcher
  • Baywatch Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3941 on: June 07, 2013, 02:00:41 am »

https://github.com/expwnent/dfhack/blob/f92e859f499105abfbb40d008189bc36e88323f5/Readme.rst#mod-interaction

I have (finally) written the documentation for the NEXT version of autoSyndrome/syndromeTrigger. The rules are slightly different from the way they are now, but they make more sense this way and should only require minimal changes. The main changes: boiling temperature is now ignored, you need to have a \AUTO_SYNDROME tag, and instead of \WORKER_ONLY, there's \ALLOW_NONWORKER_TARGETS, which does the opposite of what \WORKER_ONLY did (it makes more sense for worker only to be the default).

The short version: autoSyndrome allows you to instantly attach syndromes to units with custom building reactions. syndromeTrigger lets you trigger commands or do true transformations whenever a unit becomes afflicted with a syndrome, regardless of the cause of the syndrome. It should work whether it's from "natural causes", an interaction, autoSyndrome, and hopefully even for itemsyndrome.

edit: also, both autoSyndrome and syndromeTrigger are disabled by default to help FPS for those who don't need it. It is recommended that if you want to use them you add the following to your dfhack.init file:

Code: [Select]
autoSyndrome enable
syndromeTrigger enable
While I'm not a pro on reading C++ code, it looks to me like the default of affecting the worker only will still result in other creatures possibly being affected.
https://github.com/expwnent/dfhack/blob/master/plugins/autoSyndrome.cpp

At line 382, the Boolean test on workeronly continues on in the For loop.  Shouldn't it exit the loop?  At the end of the For loop, a valid target is attempted to be found, with the worker being ignored.

I was trying to figure out why a baby was being affected when the mother tries to run the reaction.
Logged
Give a dwarf a fish, you feed him for a season.
Give a dwarf a Fishpond, couple of buckets, build a Fishery, and enable Fishfarming labor; you feed him for a lifetime. (And get someone to clean and prep the fish)

expwnent

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3942 on: June 07, 2013, 08:54:18 am »

Each syndrome is treated separately. You can have multiple syndromes per rock, or multiple rocks per reaction.

edit: "continue" means "skip the rest of this iteration of the loop".
« Last Edit: June 07, 2013, 08:58:35 am by expwnent »
Logged

Ranalcus

  • Bay Watcher
  • Adept Model Kit Builder
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3943 on: June 07, 2013, 04:15:23 pm »

Sorry to bother you guys.
But i have used th exportmaps command, and I don't know WHERE it was exported or what is the name of those map files. I Have a working Isoworld (after FEW problems) but I don't know how to use it, it is probably so simple that they even don't write it in readme...

;___;
Help
Logged
Mountainhome Stong!
Remove Tree-Fondling-Hippies!

ORCACommander

  • Bay Watcher
  • [ETHIC:TORTURE_ELVES: PERSONAL_MATTER]
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3944 on: June 07, 2013, 05:17:01 pm »

well wrong place to ask for help with iso world but i have also used that script. it puts it out to where pictures always go, the df home directory.
Logged
Pages: 1 ... 261 262 [263] 264 265 ... 373