Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 350 351 [352] 353 354 ... 373

Author Topic: DFHack 0.34.11 r3  (Read 1457099 times)

Roses

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #5265 on: February 20, 2014, 02:46:35 am »

Questions about changing values;

I know if I use DFHack to change a value in the raws it will be overwritten on the next load of the game, but what about changing values in fields like df.global.world.entities.all[0].resources.ethic? Does anyone know if changing these values has an effect on the game, and if that effect is persistent through saving and loading?
Logged

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: DFHack 0.34.11 r3
« Reply #5266 on: February 20, 2014, 12:21:05 pm »

Questions about changing values;

I know if I use DFHack to change a value in the raws it will be overwritten on the next load of the game, but what about changing values in fields like df.global.world.entities.all[0].resources.ethic? Does anyone know if changing these values has an effect on the game, and if that effect is persistent through saving and loading?
The only reason raws do not persist is because they are not saved in world.[dat|sav] but are instead loaded from external files - if you modify an entity's properties in memory and save/load, the changes will absolutely persist through a save/load cycle (unless the properties you are modifying aren't saved to disk).

Now, whether or not changing those values will affect gameplay is a completely different story - in your example, most ethics are used only during worldgen and have no effect during Fortress mode.
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 #5267 on: February 20, 2014, 07:29:25 pm »

Hmmm...
How do I remove a single item from a building or container, and place it on a specific tile as if it was dropped there?  dfhack.items.moveToGround returns false, deleting the general ref doesn't do anything, deleting the entry in buildings.contained_items destroys the item itself and calling the vmethod deconstructItems (which isn't what I want anyway, because it removes all items) followed by moveToGround crashes the game.  I find it hard to believe that this is such a complex task.

EDIT: I figured out a method that works, although it is completely ridiculous.  I set the item's position to the desired location, then turn the item into a projectile with no speed, and finally remove the entry in buildings.contained items.  It...works.  I can't honestly believe that this is the best way of doing it though.

lordkrike

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #5268 on: February 21, 2014, 01:31:22 pm »

I am having irritating issues with building DFHack, and I can't figure out what I'm doing wrong.  I was hoping I could get some assistance.

When I attempt to build the latest version with cmake or ccmake, I get the following error message:

Code: [Select]
CMake Error at depends/protobuf/CMakeLists.txt:60 (MESSAGE):
   Could not find a working hash map implementation.  Please install GCC >=
   4.4, and all necessary 32-bit C++ development libraries.

Which, if the other posts here are correct, suggest that I don't have the correct 32-bit libraries installed.

I'm running 64-bit Debian Testing.  I have multiarch support enabled.  I have practically every GCC and G++ library I can get from the repository without conflicts to include:

Spoiler (click to show/hide)

I also have protobuf-compiler and protobuf-c-compiler, and mingw.  mingw has both 32-bit and 64-bit libraries available, and I'm not sure about protobuf, but there is a separate :i386 library, I just can't have both installed simultaneously.

So I'm at a loss.  I have no idea what package I could be missing to fix this.  Does anyone have any ideas?

Below is my CMakeError.log:

Spoiler (click to show/hide)

There's something about lpthreads in there, but I don't know jack about cmake and so I'm not sure what's going on.
Logged

Roses

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #5269 on: February 22, 2014, 12:36:19 pm »

Hmmm...
How do I remove a single item from a building or container, and place it on a specific tile as if it was dropped there?  dfhack.items.moveToGround returns false, deleting the general ref doesn't do anything, deleting the entry in buildings.contained_items destroys the item itself and calling the vmethod deconstructItems (which isn't what I want anyway, because it removes all items) followed by moveToGround crashes the game.  I find it hard to believe that this is such a complex task.

EDIT: I figured out a method that works, although it is completely ridiculous.  I set the item's position to the desired location, then turn the item into a projectile with no speed, and finally remove the entry in buildings.contained items.  It...works.  I can't honestly believe that this is the best way of doing it though.

I think just setting the position of the item and setting items.flags.on_ground=true (also removing the entry in the building) should work (at least I remember doing something similar for moving things created in a workshop up several z levels, I will see if I can find my old code).
Logged

Sutremaine

  • Bay Watcher
  • [ETHIC:ATROCITY: PERSONAL_MATTER]
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #5270 on: February 22, 2014, 03:06:27 pm »

How do I take a look at a dwarf's infection level? I've been looking at the structures here and it would seem that unit.body.infection_level would be the right thing to use. However, if I try that, I get an error:

Cannot read field unit T_body.infection_level: not found

unit.body.blood_count works fine, and blood_count is immediately above infection_level.
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.

PeridexisErrant

  • Bay Watcher
  • Dai stihó, Hrasht.
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #5271 on: February 22, 2014, 05:07:26 pm »

I got a message on Reddit from Ciphertext008 - it's about dfhack r3,but I thought I'd pass it on.

Quote
http://i.imgur.com/5zXj7Rn.png I have been updating my LNP from r44 to r48 this change might need to go upstream. Line 156 dwarfortress34.11/hack/lua/gui/script.lua is missing a ')'
Logged
I maintain the DF Starter Pack - over a million downloads and still counting!
 Donations here.

ulspa

  • Escaped Lunatic
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #5272 on: February 23, 2014, 11:30:32 am »

I am having irritating issues with building DFHack, and I can't figure out what I'm doing wrong.  I was hoping I could get some assistance.

When I attempt to build the latest version with cmake or ccmake, I get the following error message:

Code: [Select]
CMake Error at depends/protobuf/CMakeLists.txt:60 (MESSAGE):
   Could not find a working hash map implementation.  Please install GCC >=
   4.4, and all necessary 32-bit C++ development libraries.

Which, if the other posts here are correct, suggest that I don't have the correct 32-bit libraries installed.

I'm running 64-bit Debian Testing.  I have multiarch support enabled.  I have practically every GCC and G++ library I can get from the repository without conflicts to include:

Spoiler (click to show/hide)

I also have protobuf-compiler and protobuf-c-compiler, and mingw.  mingw has both 32-bit and 64-bit libraries available, and I'm not sure about protobuf, but there is a separate :i386 library, I just can't have both installed simultaneously.

So I'm at a loss.  I have no idea what package I could be missing to fix this.  Does anyone have any ideas?

Below is my CMakeError.log:

Spoiler (click to show/hide)

There's something about lpthreads in there, but I don't know jack about cmake and so I'm not sure what's going on.


Your problem is, that your compiler can't find the file libpthreads. There is no problem with cmake.
You can check whether you have a file called libpthreads.so in /usr/lib/ or in /lib or anywhere else.
But most probably you don't have this file installed.
libpthreads is part of glibc. You can search for glibc or libpthreads in your package manager. Most probably you will find it there, otherwise you can ask somewhere in a debian related forum how to obtain this library. Hope this helps you to solve your problem.
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #5273 on: February 23, 2014, 07:39:10 pm »

I got a message on Reddit from Ciphertext008 - it's about dfhack r3,but I thought I'd pass it on.

Quote
http://i.imgur.com/5zXj7Rn.png I have been updating my LNP from r44 to r48 this change might need to go upstream. Line 156 dwarfortress34.11/hack/lua/gui/script.lua is missing a ')'

Yeah, that was fixed in r4

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 #5274 on: February 24, 2014, 03:39:42 am »

How do I read the subtype of a given item if I don't know whether or not it has a subtype?  I've tried passing it to a variable and checking if the variable is nil but it seems that just trying to check for a subtype on an item with no subtype crashes the script.

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #5275 on: February 24, 2014, 04:12:49 am »

okay so finally figure out how to bypass the whole every one goes insane and attacks each other when switching to arena mode.
it's mostly due to every one in fort/adventure mode have their Combat_side_id set to 0 which is independent and a giant hostile mess for every one.
with this new script remodel from an old 'companion every civ' script you can swap to and from arena mode with not worrying about dwarves murdering each other though.
script here
 
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

lordkrike

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #5276 on: February 24, 2014, 07:38:30 am »

Your problem is, that your compiler can't find the file libpthreads. There is no problem with cmake.
You can check whether you have a file called libpthreads.so in /usr/lib/ or in /lib or anywhere else.
But most probably you don't have this file installed.
libpthreads is part of glibc. You can search for glibc or libpthreads in your package manager. Most probably you will find it there, otherwise you can ask somewhere in a debian related forum how to obtain this library. Hope this helps you to solve your problem.

Alright, so one problem down.  I had to install libc6:i386 to get a 32-bit libpthreads.so.0.  It seems to be okay with finding pthreads now.

However, I still have the message that it can't find a working hash map.  The full output from cmake follows:

Spoiler (click to show/hide)

And actually, looking at the complete output from cmake (which ccmake doesn't print, oddly enough), it might be suggesting that it can't find a 32-bit version of zlib.  Except I have a 32-bit version of zlib installed (/lib/i386-linux-gnu/libz.so.1 from the zlib1g:i386 package).

Thoughts?
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #5277 on: February 24, 2014, 09:57:54 am »

How do I read the subtype of a given item if I don't know whether or not it has a subtype?  I've tried passing it to a variable and checking if the variable is nil but it seems that just trying to check for a subtype on an item with no subtype crashes the script.

item:getSubtype()

If that returns -1, it has no subtype.

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 #5278 on: February 24, 2014, 12:50:07 pm »

How do I read the subtype of a given item if I don't know whether or not it has a subtype?  I've tried passing it to a variable and checking if the variable is nil but it seems that just trying to check for a subtype on an item with no subtype crashes the script.

item:getSubtype()

If that returns -1, it has no subtype.

Oh, that simple?  I'm pretty sure I tried that... or maybe I used some variation of it, like dfhack.item:getSubtype() or something.

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #5279 on: February 24, 2014, 01:43:07 pm »

It's a method of the item itself, so I can see why you would have problem with that :p
Pages: 1 ... 350 351 [352] 353 354 ... 373