Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 141 142 [143] 144 145 ... 360

Author Topic: DFHack 0.43.03-r1  (Read 1082893 times)

Roses

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r2
« Reply #2130 on: February 04, 2015, 04:02:24 am »

1. Hmm, that makes it a little more difficult. I am trying to update my projectile script with the option of using held items instead of creating them from scratch. I suppose I will have to check if the item is in a stack, generate a new item of the same type if it is, and lower the stack count by one. Would have been so much easier if they were all single items.
2. I did have a small issue with moving an item out of a building, but I just set the flag to false manually and it solved the issue. As long as it takes the item out of containers/inventory correctly, thats all I need for now.
Logged

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: DFHack 0.40.24-r2
« Reply #2131 on: February 04, 2015, 04:21:43 am »

1. Hmm, that makes it a little more difficult. I am trying to update my projectile script with the option of using held items instead of creating them from scratch. I suppose I will have to check if the item is in a stack, generate a new item of the same type if it is, and lower the stack count by one. Would have been so much easier if they were all single items.
2. I did have a small issue with moving an item out of a building, but I just set the flag to false manually and it solved the issue. As long as it takes the item out of containers/inventory correctly, thats all I need for now.
1. yeah a lot of my ideas would be easier if it was split items. Maybe somebody should add split/combine functions in the items module now that we can sort-of create items...
2. It's better to remove and move then to mess with flags. Sometimes they are cached in strange places and either it will crash later or just leave parts of it somewhere thus growing each time it's used. For exactly what happens you should see the source code though.

Roses

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r2
« Reply #2132 on: February 04, 2015, 02:02:31 pm »

1. yeah a lot of my ideas would be easier if it was split items. Maybe somebody should add split/combine functions in the items module now that we can sort-of create items...
2. It's better to remove and move then to mess with flags. Sometimes they are cached in strange places and either it will crash later or just leave parts of it somewhere thus growing each time it's used. For exactly what happens you should see the source code though.
1. I'll see what I can put together, but it will probably just start out as a hack for my script that can be expanded to something more robust.
2. So you are saying use dfhack.items.remove(item, no_uncat) and then use dfhack.items.moveToGround()?
New Question!
3. How does dfhack.items.createItem() work? Specifically, does it put the item on the map or does dfhack.items.moveToGround() need to be called after to actually get the item into the game world?
Logged

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: DFHack 0.40.24-r2
« Reply #2133 on: February 04, 2015, 02:07:45 pm »

1. yeah a lot of my ideas would be easier if it was split items. Maybe somebody should add split/combine functions in the items module now that we can sort-of create items...
2. It's better to remove and move then to mess with flags. Sometimes they are cached in strange places and either it will crash later or just leave parts of it somewhere thus growing each time it's used. For exactly what happens you should see the source code though.
1. I'll see what I can put together, but it will probably just start out as a hack for my script that can be expanded to something more robust.
2. So you are saying use dfhack.items.remove(item, no_uncat) and then use dfhack.items.moveToGround()?
New Question!
3. How does dfhack.items.createItem() work? Specifically, does it put the item on the map or does dfhack.items.moveToGround() need to be called after to actually get the item into the game world?
2. i would try using it and if any moveToXXXX() returns false then consider first doing dfhack.items.remove(item,true)
3. put on ground by the feet for target unit.

scamtank

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r2
« Reply #2134 on: February 04, 2015, 03:41:05 pm »

I think I identified what the vector "world_unk_90" does.

It's a big pile of coordinates, each describing a 12x12 square somewhere on the map. Each one is set perfectly over a murky pool. These squares can overlap. I can see at least one square having willows grow outside it, so it's probably not a straight "plants with [WET] can grow in these zones" listing caused by the presence of pools.

Spoiler (click to show/hide)

Here are the first few I plotted out. The coordinates point to the corners only, but I painted out the whole squares for visibility.
Logged

Roses

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r2
« Reply #2135 on: February 04, 2015, 04:23:47 pm »

1. yeah a lot of my ideas would be easier if it was split items. Maybe somebody should add split/combine functions in the items module now that we can sort-of create items...
1. I'll see what I can put together, but it will probably just start out as a hack for my script that can be expanded to something more robust.

It's not really elegant, and certainly not universal, but this seems to do the trick for me.
Code: [Select]
   if item.stack_size == 1 then
    dfhack.items.moveToGround(item,{locSource.x,locSource.y,locSource.z+height})
   else
    item.stack_size = item.stack_size - 1
item = dfhack.items.createItem(itemType,itemSubtype,item.mat_type,item.mat_index,dfhack.items.getHolderUnit(item))
dfhack.items.moveToGround(item,{locSource.x,locSource.y,locSource.z+height})
   end
  end
Logged

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: DFHack 0.40.24-r2
« Reply #2136 on: February 05, 2015, 12:14:34 am »

I think I identified what the vector "world_unk_90" does.

It's a big pile of coordinates, each describing a 12x12 square somewhere on the map. Each one is set perfectly over a murky pool. These squares can overlap. I can see at least one square having willows grow outside it, so it's probably not a straight "plants with [WET] can grow in these zones" listing caused by the presence of pools.
<..>

Wet plants can grow in [WET] biomes, so that is totally different. I think it's regions where water can collect when it rains IF it lands on murky pool.

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: DFHack 0.40.24-r2
« Reply #2137 on: February 05, 2015, 12:07:59 pm »

They also grow next to rivers, ponds, underground ponds and unterwater in underground ponds.
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 :::

scamtank

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r2
« Reply #2138 on: February 05, 2015, 12:23:38 pm »

I figured it was more along the lines of "box where worldgen is allowed to generate an organic-shaped pit with a MURKY_POOL bottom", but at least there's some sort of label now.

I've been looking at "world_unk_3c" too. Its coordinates mark single tiles with contaminants, but it's inconsistent. On one map it's four patches of cave blob fluid in the deepest reaches of the caverns, on the other it's a slew of bloodstains and dustings of mud in corridors and canals. The DFHack tile cleaning tools don't seem to touch the vector.
Logged

ptb_ptb

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r2
« Reply #2139 on: February 05, 2015, 12:59:53 pm »

Hey there, I've got a weird bug that appears to be related to dfhack (although I can't see how).

http://www.bay12games.com/dwarves/mantisbt/view.php?id=8787

Some time into a fortress puppies stopped being born, and surface animals stopped arriving at the fortress. That went on for nine years. Then I disabled dfhack (by renaming SDLreal.dll as SDL.dll) and a short while later I'm getting puppies again. Seems a bit unlikely for a coincidence, any ideas?
Logged
()==[:::::::::::::>

Centigrade

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r2
« Reply #2140 on: February 06, 2015, 05:26:46 am »

How do you change a soil layer with DF hack?

changelayer BLACK_SAND yields: No such material!

I have tried every variation I can think of: SAND, SOIL_SAND, SOIL_BLACK_SAND, SAND_BLACK, and I keep getting the same message.

Related to this, is there actual documentation for DFhack and the various arguments (mostly material IDs) that it can use somewhere? The writeup on github is nice, but does not cover everything.
« Last Edit: February 06, 2015, 05:30:25 am by Centigrade »
Logged

Rose

  • Bay Watcher
  • Resident Elf
    • View Profile
Re: DFHack 0.40.24-r2
« Reply #2141 on: February 06, 2015, 06:03:49 am »

Have you tried INORGANIC:BLACK_SAND?
Logged

se5a

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r2
« Reply #2142 on: February 06, 2015, 02:39:08 pm »

Is tree autochop supposed to be working properly in 40.24?
I've got a burrow set up and designated, but it appears to be chopping the whole map.

actually, never mind. I may have inadvertently hit (d)esignate now before I'd hit enter on the burrow. 
« Last Edit: February 06, 2015, 02:48:02 pm by se5a »
Logged

Centigrade

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r2
« Reply #2143 on: February 06, 2015, 07:08:22 pm »

Have you tried INORGANIC:BLACK_SAND?

Neither that nor INORGANIC:SAND_BLACK yield any result, nor should they given that the examples given in the writeup on GitHub all use the material name without the preface of INORGANIC; e.g., quoting directly from said writeup:

Quote
Examples:

changelayer GRANITE
Convert layer at cursor position into granite.
changelayer SILTY_CLAY force
Convert layer at cursor position into clay even if it's stone.
changelayer MARBLE all_biomes all_layers
Convert all layers of all biomes which are not soil into marble.

So what is the argument for sand?
Logged

scamtank

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r2
« Reply #2144 on: February 06, 2015, 07:15:28 pm »

Hey, I'm dragging myself through Cheat Engine to breathe some life back into the weaponrack-unassign binpatch and I could use some help.

I've been running v34.11 and v40.24 side by side and triggering the bug to see what makes it happen to the squad vectors, and I think I found it. The problem is, I have no idea how to reconcile these opcode glyphs and hex runes with what I'm looking at in angavrilov's original patch .dif.

The hex addresses that the patch file says are the problem (and this thing works when applied, I tried) aren't the ones I'm looking at in the disassembly, the ones that I can disable to make the problem go away in the new version. What am I missing here?
Logged
Pages: 1 ... 141 142 [143] 144 145 ... 360