Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 235 236 [237] 238 239 ... 360

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

Halnoth

  • Bay Watcher
  • Plan for the Worst. Hope for the Best. Have Fun!
    • View Profile
Re: DFHack 0.40.24-r5
« Reply #3540 on: January 02, 2016, 08:42:34 pm »

Stonsesense keeps crashing when switching between z levels. I'm using 42.04. This bug didn't happen for 42.03.
Logged
One of the dwarfs walked in front of Thor to get a better view of the prye, and Thor kicked him irritably into the middle of the flames, which made Thor feel slightly better and made all the dwarfs feel much worse.

Cloth Armor Mod http://www.bay12forums.com/smf/index.php?topic=158967.msg7063531#msg7063531

HellishINC

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r5
« Reply #3541 on: January 03, 2016, 04:22:04 pm »

Stonsesense keeps crashing when switching between z levels. I'm using 42.04. This bug didn't happen for 42.03.

It's working fine for me with 42.04. Perhaps try "re-installing"?
Logged

Uzu Bash

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r5
« Reply #3542 on: January 03, 2016, 09:22:10 pm »

Why would all unit and nemesis records be listed as 'bad', and what can I do about that to fix my save? What exactly does it mean when it's listed as bad? I know some of them are corrupted, but it couldn't possibly be all of them.
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r5
« Reply #3543 on: January 03, 2016, 09:35:02 pm »

Why would all unit and nemesis records be listed as 'bad', and what can I do about that to fix my save? What exactly does it mean when it's listed as bad? I know some of them are corrupted, but it couldn't possibly be all of them.
Where are they listed as "bad"?
Logged
DFHack - Dwarf Manipulator (Lua) - DF Wiki talk

There was a typo in the siegers' campfire code. When the fires went out, so did the game.

Uzu Bash

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r5
« Reply #3544 on: January 03, 2016, 09:48:31 pm »

Why would all unit and nemesis records be listed as 'bad', and what can I do about that to fix my save? What exactly does it mean when it's listed as bad? I know some of them are corrupted, but it couldn't possibly be all of them.
Where are they listed as "bad"?
gui/gm-editor df.global.world.units and df.global.world.nemesis
Every record listed in 'all' is also listed in 'bad'. I'm at a point where any save I attempt after offloading current site data will crash the game. Without exception.
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r5
« Reply #3545 on: January 03, 2016, 10:21:27 pm »

gui/gm-editor df.global.world.units and df.global.world.nemesis
Every record listed in 'all' is also listed in 'bad'. I'm at a point where any save I attempt after offloading current site data will crash the game. Without exception.
Your crash is due to something else. units.bad and nemesis.bad are named that because they can contain bad pointers - for example, pointers to unit structures that have been deleted, freed, overwritten, etc.. It's possible that "all" is a subset of "bad" - I've never noticed a save where "all" is larger than "bad", or one where units in "all" aren't in "bad" as well.

There are vanilla DF bugs related to offloading sites, or some aspect of site travel at least, in adventure mode. Does the issue occur without DFHack?
Logged
DFHack - Dwarf Manipulator (Lua) - DF Wiki talk

There was a typo in the siegers' campfire code. When the fires went out, so did the game.

Uzu Bash

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r5
« Reply #3546 on: January 03, 2016, 10:42:05 pm »

gui/gm-editor df.global.world.units and df.global.world.nemesis
Every record listed in 'all' is also listed in 'bad'. I'm at a point where any save I attempt after offloading current site data will crash the game. Without exception.
Your crash is due to something else. units.bad and nemesis.bad are named that because they can contain bad pointers - for example, pointers to unit structures that have been deleted, freed, overwritten, etc.. It's possible that "all" is a subset of "bad" - I've never noticed a save where "all" is larger than "bad", or one where units in "all" aren't in "bad" as well.

There are vanilla DF bugs related to offloading sites, or some aspect of site travel at least, in adventure mode. Does the issue occur without DFHack?
Yes, the issues were all before installing dfhack to see if they could be fixed. Save crashes occur on unit saving, so that's where I expected to find problems. So dfhack isn't responsible, I'm just trying to use it to repair if possible.

I have seen saves prior to this in which there were far fewer bad entries than all of them. I saw a similar corruption beginning in 42.03 in which 5 bad entries turned into the entire list after site offloading. If I reactivate my last legends spin-off, there's only 1 bad entry.
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack 0.40.24-r5
« Reply #3547 on: January 05, 2016, 11:24:42 pm »

Hmm. What do y'all think would be the best way to access a twitch API? I wanna make an OpenRCT2-style "name dwarves after subscribers/followers/chat members" doohickey.

Rose

  • Bay Watcher
  • Resident Elf
    • View Profile
Re: DFHack 0.40.24-r5
« Reply #3548 on: January 06, 2016, 12:45:24 am »

I think warmist made an in-game IRC client.
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack 0.40.24-r5
« Reply #3549 on: January 06, 2016, 02:06:39 am »

Ruby seems a bust; ruby's version in DFHack is 1.8 and Kappa (the API) runs on 1.9.3 and later only.

Also, $LOAD_PATH is funny. I needed to make DF/lib/ruby/1.8 to use require. I made Kappa a module, but the module is made up of a bunch of requires.

EDIT: wait, it's just an HTTP api, duh, and it returns JSON too, I think that shouldn't be too hard to work with in Lua or C++; heck, OpenRCT2 is entirely in C++, that might make it way easier, especially since its functionality is nearly identical to what I want
« Last Edit: January 06, 2016, 02:11:22 am by Putnam »
Logged

gchristopher

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r5
« Reply #3550 on: January 06, 2016, 02:50:07 am »

Not sure how significant it is, but I managed to use dfhack to resolve a bug where a dwarf carrying an item erroneously claimed ownership of it.

In this case, the dwarf was carrying an iron minecart to a distant stockpile, and I suspect he turned around to get a drink, and decided he owned the minecart somehow in the process. (That's only a suspicion.)

What worked to resolve it was:

erase the item from unit.owned_items
erase the item from unit.inventory
erase the owned and inventory records from item.general_refs
set item.flags.owned to false
set item.flags.in_inventory to false

This appeared to get it out of ownership and inventory, and sitting invisibly on the ground, probably because the tile wasn't updated to record the item in it. Designating the item for dumping via the stockpile screen appeared to update its visibility, much like resolving the now quashed bug where items moved by water flow became invisible.

Probably someone has already written this up, but it was an impressive test of the current version of dfhack working.

edit: Hmm, that dwarf was found dead a couple months later. Might be related? Let's reload and try again!
« Last Edit: January 06, 2016, 03:49:29 am by gchristopher »
Logged

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: DFHack 0.40.24-r5
« Reply #3551 on: January 06, 2016, 04:02:11 am »

<... stuff ...>
Most importantly check if the item has in_job flag (if so remove from job and unset flag) and don't forget to call dfhack.items.moveToGround so everything is correctly set (e.g. tile flags that it contains item, item list in map chunk etc...)

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: DFHack 0.40.24-r5
« Reply #3552 on: January 06, 2016, 06:14:06 am »

edit: Hmm, that dwarf was found dead a couple months later. Might be related? Let's reload and try again!
"You can have this here minecart when you pry it from my cold, dead fingers.  Oh, wait..."
Logged
Just got back, updating:
(0.42 & 0.43) The Earth Strikes Back! v2.15 - Pay attention...  It's a mine!  It's-a not yours!
(0.42 & 0.43) Appearance Tweaks v1.03 - Tease those hippies about their pointy ears.
(0.42 & 0.43) Accessibility Utility v1.04 - Console tools to navigate the map

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: DFHack 0.40.24-r5
« Reply #3553 on: January 06, 2016, 11:20:33 am »

My real life has been getting in the way of serious DF-ing lately, but will soon be trying to update my mod for 0.42 using the DFHack alpha.

From a Lua script, is it possible to determine if a tile is in a "location" and interrogate some of its characteristics?  The current use case is:

Right now, the mod includes these bulky 3x3 workshops called Tributes that give access to some of the mod's more useful reactions.  I already have a script that allows the player to build a generic Tribute and switch it to the appropriate specific one based on the material used (that is, a generic Tribute made from granite will complete as a Tribute To Granite).  I intend to keep this option, but want to add another.

It makes sense that a smaller 1x1 Altar should be able to perform the same reactions, but only if the Altar is built in an "appropriate" place.  Appropriate means: the tile's base material is the same as the block used to make the Altar, and it is in a Temple dedicated to a deity/entity with at least one Sphere in common with the mod's canon for stone-to-Sphere matching (e.g., metamorphic stones match the EARTH and MOUNTAINS Spheres while igneous intrusive match MOUNTAINS and CAVERNS).

So, a player building a Altar with a granite block in a granite layer in a Temple dedicated to a deity associated with MOUNTAINS or CAVERNS should end up with a functional Altar To Granite.  A constructed floor or paving would not be sufficiently "granite" to allow a functional Altar.

If the player gets something wrong, they should end up with a nonfunctional Altar or better yet a deconstructed block.

Do we know enough about a tile to find its location(s), enough about the location to find the deity, and then enough about the deity to find the Spheres?
Logged
Just got back, updating:
(0.42 & 0.43) The Earth Strikes Back! v2.15 - Pay attention...  It's a mine!  It's-a not yours!
(0.42 & 0.43) Appearance Tweaks v1.03 - Tease those hippies about their pointy ears.
(0.42 & 0.43) Accessibility Utility v1.04 - Console tools to navigate the map

Max™

  • Bay Watcher
  • [CULL:SQUARE]
    • View Profile
Re: DFHack 0.40.24-r5
« Reply #3554 on: January 06, 2016, 08:17:26 pm »

Hmmm.
Code: [Select]
/home/thefunk/.df/hack/scripts/names.lua:42: Cannot write field viewscreen_setupadventurest.subscreen: not found.
stack traceback:
        [C]: in function '__newindex'
        /home/thefunk/.df/hack/scripts/names.lua:42: in function 'f'
        ./hack/lua/dfhack.lua:554: in function <./hack/lua/dfhack.lua:495>
        (...tail calls...)

I notice there are pages now in the adventurer setup screens, but none specifically seem to point to the custom name screen.
Logged
Pages: 1 ... 235 236 [237] 238 239 ... 360