Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 207 208 [209] 210 211 ... 373

Author Topic: DFHack 0.34.11 r3  (Read 1404350 times)

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #3120 on: March 03, 2013, 05:33:25 pm »

The process is literally changing a single instance of BUILDING_FURNACE to BUILDING_WORKSHOP >_>

Fungus

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #3121 on: March 03, 2013, 05:40:48 pm »

Well... I kept moving it to a different file. The mistakes I made there were !!fun!! as I'm sure you can imagine.

EDIT: This is why I don't listen to music while working. Curse you Joni Mitchell, even my dwarves aren't safe.
« Last Edit: March 03, 2013, 05:47:12 pm by Fungus »
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #3122 on: March 03, 2013, 05:49:03 pm »

Well... I kept moving it to a different file. The mistakes I made there were !!fun!! as I'm sure you can imagine.

Can't imagine how moving something to a different file would cause that >_>

Fungus

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #3123 on: March 03, 2013, 05:54:31 pm »

Well. Not deleting the old entry, not changing FURNACE, copying it into the wrong part of the file (i.e. into another workshop), deleting the colon, misspelling WORKSHOP, different combinations of the above and more. I guess I just can't copy and sing effectively.
Logged

Telgin

  • Bay Watcher
  • Professional Programmer
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #3124 on: March 04, 2013, 05:29:31 pm »

Is there any way to fling units into the air with DFHack's Lua interface?  I've tried just setting the z coordinate of the unit to be a few z-levels above the ground, but they just stand there in the air.  I thought perhaps it was a flag that had to be set, but the projectile flag only makes it impossible to select them with the 'v' or 'k' keys.

Any other ideas?

For what it's worth, I'm just trying to find a simple way to injure something.  If there's an easier way I'm all ears.  There is the wounds vector under the body structure, but it seems to be almost completely unknown and probably not remotely simple to manipulate.

Edit: Alright, this worked the next time I tried it (on a different unit).  That's strange...
Edit2: Ok, apparently it works if you set their z coordinate up by 2, but more than that causes them to just stand around in the air.  Most strange.
« Last Edit: March 04, 2013, 05:40:59 pm by Telgin »
Logged
Through pain, I find wisdom.

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: DFHack 0.34.11 r2
« Reply #3125 on: March 04, 2013, 05:40:38 pm »

Why is my first instict to think of dwarves on catapults ? ^^
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 :::

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: DFHack 0.34.11 r2
« Reply #3126 on: March 04, 2013, 08:05:18 pm »

Edit2: Ok, apparently it works if you set their z coordinate up by 2, but more than that causes them to just stand around in the air.  Most strange.
You probably moved the unit into an unallocated map block.

By the way, manually changing a unit's coordinates is a dangerous thing to do because it will result in the map's "unit occupancy" flags getting out of sync, leading to this bug.
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.

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #3127 on: March 04, 2013, 08:09:19 pm »

Any way around that, Quietust?

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: DFHack 0.34.11 r2
« Reply #3128 on: March 04, 2013, 08:17:17 pm »

Any way around that, Quietust?
Yes - manually clear the occupancy flag at the source tile depending on whether the unit is prone, then set the appropriate flag in the destination tile. Take a look at the sources for the "fastdwarf" plugin for an example.
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.

Telgin

  • Bay Watcher
  • Professional Programmer
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #3129 on: March 04, 2013, 09:48:22 pm »

Edit2: Ok, apparently it works if you set their z coordinate up by 2, but more than that causes them to just stand around in the air.  Most strange.
You probably moved the unit into an unallocated map block.

By the way, manually changing a unit's coordinates is a dangerous thing to do because it will result in the map's "unit occupancy" flags getting out of sync, leading to this bug.

That definitely sounds like it had something to do with it.  The problem seemed to manifest at specific z-levels above 0, not just above the ground.  I tried it again over a hole and it worked fine at 3 z-levels.

Hopefully I didn't break anything in my map data.  If it's just a matter of the occupancy flags I can probably fix those manually if it ever comes up as a problem.  I'll have to note to be more careful about moving things around this way in the future though.
Logged
Through pain, I find wisdom.

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #3130 on: March 04, 2013, 09:52:13 pm »

also you're better off shoving your men into minecarts and pumping the carts with enough G to send them flying.
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

Telgin

  • Bay Watcher
  • Professional Programmer
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #3131 on: March 04, 2013, 10:01:00 pm »

Yeah, if I wanted to go through the trouble of engineering a way to injure dwarves that would be fantastic.  I was just looking for a quick way to injure them from the interactive interface since I have no such thing set up.
Logged
Through pain, I find wisdom.

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #3132 on: March 04, 2013, 10:01:23 pm »

Hopefully I didn't break anything in my map data.  If it's just a matter of the occupancy flags I can probably fix those manually if it ever comes up as a problem.  I'll have to note to be more careful about moving things around this way in the future though.

Always test your scripts in the arena.

You could always include a check to see if the z-level you want them to teleport to is invalid:

Code: [Select]
function tileIsValid(pos)
local tileSize = {dfhack.maps.getTileSize()}
for k,v in ipairs(tileSize) do
if pos[k]>=v then return false
end
return true
end

(Note: wrote this up as a quickie, not sure if it's right)
« Last Edit: March 04, 2013, 10:04:42 pm by Putnam »
Logged

tahujdt

  • Bay Watcher
  • The token conservative
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #3133 on: March 04, 2013, 10:49:42 pm »

I know there is a script for make legendary, but how would I make a script to make a skill set to 0? I don't want my military to have civvie skills, because then they don't look as neat all lined up in a row. Also, would setting that skill to zero make them a peasant? Or would you have to make a separate script to change their profession type?
Logged
DFBT the Dwarf: The only community podcast for Dwarf Fortress!
Tahu-R-TOA-1, Troubleshooter
Quote
I suggest that we add a clause permitting the keelhauling of anyone who suggests a plan involving "zombify the crew".
Quote from: MNII
Friend Computer, can you repair the known universe, please?

Dragoon209

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #3134 on: March 04, 2013, 10:55:01 pm »

Evening gentlemen,

   I was doing some more testing, and realized that the new leather types I have been experimenting with are showing up in the workflow GUI, but sadly nested under each creature. Is there a way to use workflow to pick materials with reaction classes?

My original info and questions are here for reference: http://www.bay12forums.com/smf/index.php?topic=91166.msg4064736#msg4064736

Thanks!
Logged
Check out my mini-mods:
Upgradable Leather Tiers
Block Crafting Workshop

Have you played Webfort yet?  It's a way to play Dwarf Fortress in a web browser with your friends!  Come check it out at:
Community Web Fortress
Pages: 1 ... 207 208 [209] 210 211 ... 373