Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 344 345 [346] 347 348 ... 373

Author Topic: DFHack 0.34.11 r3  (Read 1388573 times)

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #5175 on: January 25, 2014, 07:21:11 pm »

l-->(unit) also allows that.

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 #5176 on: January 26, 2014, 02:45:11 am »

Thanks Putnam and Roses for the info on persistant variables.  Those will be very useful.

Allright, three new questions:

1. How to create a new building/workshop on a given map location?
2. How to read the material composition of a given undug tile?
3. When turning a tile clear by changing the tile type, how to run the call that makes caveins and liquid flow work properly?

(My next project is an extendable and retractable drilling rig for making vertical holes and bringing liquids to the surface more easily than a pump stack.)

Sutremaine

  • Bay Watcher
  • [ETHIC:ATROCITY: PERSONAL_MATTER]
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #5177 on: January 26, 2014, 09:08:08 am »

Is there a compiled version of cleanconst anywhere?
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 #5178 on: January 26, 2014, 04:01:03 pm »

Okay, another question:

Is there a way to get the structure type of a variable?

For example, here I'm trying to get a list of inorganic materials found in an area.
Code: [Select]
local block = dfhack.maps.getTileBlock(pos.x,pos.y,pos.z)
if #block.block_events > 0 then

for e=0,#block.block_events-1,1 do
inorganic = df.inorganic_raw.find(block.block_events[e].inorganic_mat)
print(inorganic)
end
end

Only problem is, if there's water or grass in the area, those particular items don't have an inorganic_mat, and I can't get dfhack to simply skip over them, it always crashes.  So I need to put them in an if statement that only allows it to look if the particular item is block_square_event_mineralst, but not grassst or spatterst.  How do I do that?

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #5179 on: January 26, 2014, 04:23:53 pm »

The easy way:
Code: [Select]
for id,ev in ipairs(block.block_events) do
  if ev:getType()==df.block_square_event_type.mineral then
  -- do something here
  end
end
Harder way:
Code: [Select]
for id,ev in ipairs(block.block_events) do
  if df.block_square_event_mineralst:is_instance(ev) then
  -- do something here
  end
end

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 #5180 on: January 26, 2014, 06:17:35 pm »

Ah, that works.

Any idea about the earlier questions?

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: DFHack 0.34.11 r3
« Reply #5181 on: January 26, 2014, 06:26:14 pm »

Maybe use a creature instead of a workshop? I would assume that making it a creature that is teleported and uses interactions for mining would be easier than a workshop.
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

Roses

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #5182 on: January 26, 2014, 06:43:38 pm »

I've never tried to construct a building with DFHack, but supposidly this can be used to create buildings.
Logged

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 #5183 on: January 26, 2014, 07:19:40 pm »

I've never tried to construct a building with DFHack, but supposidly this can be used to create buildings.

Well, it's a start...but it can't actually construct the buildings by itself, only designate them to be constructed.  It also doesn't seem to construct my custom drill section "workshop", even when I put in the correct type.  I can turn an existing building into one, though.

Boltgun

  • Bay Watcher
  • [UTTERANCES]
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #5184 on: January 27, 2014, 02:17:51 am »

Has the syntax for truetransform changed? Interactions that used to properly set the creature's race/caste in r3 does not seem to trigger in r4 at all. This seems to happen in Meph's walrock mod too.

First I have reaction triggering autosyndrome. It temp transform the worker into an immobile creature and give it an interaction.

The interaction has several syndromes acting as cases depending of the target. They change into 'summoned souls' as they should but afterward it revert to their original form.

I tried removing autosyndrome tags from the reaction's boiling rock, to be sure that there is not issues but the result is the same (well, with more randomness due to no autosyndrome).

Trying with \COMMAND,

Any clue ?

Here's the interaction :
Spoiler (click to show/hide)
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: DFHack 0.34.11 r3
« Reply #5185 on: January 27, 2014, 03:30:20 am »

TrueTransform is exactly the same and still works without a problem. I just got a report that said that these newly converted civ members are treated like enemies, even if they are a new creature. I havent tested it myself yet.

Here is an example of a working truetransform interaction. But I am sure that your syntax is correct, its literally the same.

Code: [Select]
[INTERACTION:TRANSFORM_OVERLORD] 
[I_TARGET:A:CREATURE]
[IT_LOCATION:CONTEXT_CREATURE]
[IT_AFFECTED_CREATURE:WARLOCK_CIV:WARLOCK_M]
[IT_AFFECTED_CREATURE:WARLOCK_CIV:WARLOCK_V_M]
[IT_MANUAL_INPUT:self]
[IT_CANNOT_HAVE_SYNDROME_CLASS:BLOCK_OVERLORD]
[I_EFFECT:ADD_SYNDROME]
[IE_TARGET:A]
[IE_IMMEDIATE]
[SYNDROME]
[SYN_AFFECTED_CREATURE:WARLOCK_CIV:WARLOCK_M]
[SYN_AFFECTED_CREATURE:WARLOCK_CIV:WARLOCK_V_M]
[CE_BODY_TRANSFORMATION:PROB:100:START:0:END:10]
[CE:CREATURE:WARLOCK_MIST:MALE]
[SYN_CLASS:\PERMANENT][SYN_CLASS:WARLOCK_CIV][SYN_CLASS:WARLOCK_OVERLORD]   
« Last Edit: January 27, 2014, 03:32:14 am by Meph »
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

Boltgun

  • Bay Watcher
  • [UTTERANCES]
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #5186 on: January 27, 2014, 04:31:31 am »

For converted prisoners being beaten up it seems that using makeown from master fixes that. At least on my tests it worked :
https://github.com/DFHack/dfhack/blob/master/library/lua/makeown.lua
Logged

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: DFHack 0.34.11 r3
« Reply #5187 on: January 27, 2014, 09:17:46 am »

Is there a compiled version of cleanconst anywhere?
Sure, right here.
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.

Boltgun

  • Bay Watcher
  • [UTTERANCES]
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #5188 on: January 27, 2014, 01:09:26 pm »

For converted prisoners being beaten up it seems that using makeown from master fixes that. At least on my tests it worked :
https://github.com/DFHack/dfhack/blob/master/library/lua/makeown.lua

Herp derp, I needed to add 'syndromeTrigger enable' to dfhack.init. Now trueTransform is working.
Logged

Roses

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #5189 on: January 27, 2014, 05:56:18 pm »

Is it possible to trigger an event every time a particular map square is crossed by a creature (without checking the occupancy of the square every tick)? Something like an eventful plugin?
Logged
Pages: 1 ... 344 345 [346] 347 348 ... 373