Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 252 253 [254] 255 256 ... 373

Author Topic: DFHack 0.34.11 r3  (Read 1456618 times)

leafar

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3795 on: May 21, 2013, 03:22:50 pm »

well i ran it with -g option:
Spoiler (click to show/hide)
not quite sure what this tells me, though

Quote
Out of curiosity, what hex editor do you use?
i normally use GHex, but for this i did write a python script
Logged
Quote from: LookingForGroup
I bet you would've laughed more if you were on fire.

ag

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3796 on: May 21, 2013, 03:44:17 pm »

Code: [Select]
0xf7bfa3bd in DFHack::Core::doUpdate(DFHack::color_ostream&, bool) () from ./hack/libdfhack.so
not quite sure what this tells me, though

Well, it says that it crashes somewhere here:

https://github.com/peterix/dfhack/blob/master/library/Core.cpp#L1149

Which is rather hard to explain unless perhaps you added that md5 tag to the data for the wrong version of df - there are several in symbols.xml.
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3797 on: May 21, 2013, 03:54:52 pm »

I tried editing it again and didn't get a crash... weird.
Those errors definitely seem to be a dfhack problem, like ag pointed out, rather than a problem with the executable. Maybe reinstalling dfhack would help, but I can't be certain :(

On a related note, have you tried running this specific dfhack installation with the vanilla executable? If that fails as well, it's likely a dfhack-related problem and not a problem with your patch.
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.

leafar

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3798 on: May 22, 2013, 01:40:05 am »

Quote
Which is rather hard to explain unless perhaps you added that md5 tag to the data for the wrong version of df - there are several in symbols.xml.
:o

that was it! thank you!
i didn't notice there were different entries...
Logged
Quote from: LookingForGroup
I bet you would've laughed more if you were on fire.

ORCACommander

  • Bay Watcher
  • [ETHIC:TORTURE_ELVES: PERSONAL_MATTER]
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3799 on: May 22, 2013, 12:09:30 pm »

does anyone have a problem with revflood crashing dwarf fortress? i tried to use it to reveal the complete lay out of my caverns on a 5x5 embark using ironhand graphics. Only thing i can think of is it is somehow triggering the ram limit.
Logged

Hommit

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3800 on: May 22, 2013, 02:07:47 pm »

hmm... is plugin for sorting gem list by material value possible?

Look at the gem stockpile list. Then open up inorganic_stone_gem.txt. What you should notice is that the list is arranged in the exact same order that they are in the file. Just shuffle them around to your liking and voilà.

so, i did just that
but for whatever reason it completely wrecked worldgen.
no ores and aquifers at all in whole world, and when test embark, some tiles is flashing. on mouse hover, they show very fast cycling of all gems
file: http://rghost.ru/private/46189159/5c61bfde8908d607643faadc228b5270
any idea wtf?
(probably belongs to modding, but...)
up: hm, if backup file was in the same folder, will it conflict with original one?
« Last Edit: May 22, 2013, 02:15:45 pm by Hommit »
Logged

drayath

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3801 on: May 22, 2013, 02:28:50 pm »

Yes, duplicate raws (file duplicates or single entry duplicates) are the modders version of !FUN!  ;)
Logged
Drayath's Gem Splitting Workshop - Split large gems and gem trinkets into numbers of small gems.
Drayath's Seed Brewery - Convert bags of spare seeds into useful booze.

ash88

  • Escaped Lunatic
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3802 on: May 22, 2013, 03:04:02 pm »

tl;dr problem: Queen isn't a dwarf - anything I can do?

Hey guys - I'm bummed out because I made my best fortress ever, and the queen showed up, and it is a drow elf.  I'm using masterworkDF.  Anyways, as you know I can't assign them rooms if they aren't dwarves (bug #4611 - in vanilla it's the same thing with Goblins ), and they don't show up in Dwarf Therapist... etc.  They are just running around outside... fortunately the siege-ers haven't found them yet...

Is there some way to change the race of a unit?  If I did this would my noble become room-assignable and DwarfTherapist viewable?  I'm willing to try something messy and extreme.

I'm hoping I don't have to abandon for such a un-satisfying reason.  This fortress really is my best ever.  Might have to start randomly digging down and find a FUN-NER conclusion to Mountainhome Gloombitch...

Cheers.
Logged

ORCACommander

  • Bay Watcher
  • [ETHIC:TORTURE_ELVES: PERSONAL_MATTER]
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3803 on: May 22, 2013, 03:38:12 pm »

there is an lua script that can designate monarchs:

hack\scripts\make-monarch.lua

I think to work it just hit k select a dorf and run the script
Logged

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3804 on: May 23, 2013, 06:54:44 am »

tl;dr problem: Queen isn't a dwarf - anything I can do?

Hey guys - I'm bummed out because I made my best fortress ever, and the queen showed up, and it is a drow elf.  I'm using masterworkDF.  Anyways, as you know I can't assign them rooms if they aren't dwarves (bug #4611 - in vanilla it's the same thing with Goblins ), and they don't show up in Dwarf Therapist... etc.  They are just running around outside... fortunately the siege-ers haven't found them yet...

Is there some way to change the race of a unit?  If I did this would my noble become room-assignable and DwarfTherapist viewable?  I'm willing to try something messy and extreme.

I'm hoping I don't have to abandon for such a un-satisfying reason.  This fortress really is my best ever.  Might have to start randomly digging down and find a FUN-NER conclusion to Mountainhome Gloombitch...

Cheers.
you got yourself a DROW Cacame.
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

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: DFHack 0.34.11 r3
« Reply #3805 on: May 23, 2013, 08:48:21 am »

Reading all this about adding caravan guards to your fort, and changing the race of nobles got me thinking:

Animal men can learn.
Animal men can be bought in caravans.
Animal men can't do labor... could this be fixed?

It would be nice if races could buy other minor races (goblin buy trolls for example, or undeads buy skeletons) that can do labor in the fort. Any sort of automated script possible, to make them civ-members?
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 :::

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3806 on: May 23, 2013, 09:55:57 am »

Reading all this about adding caravan guards to your fort, and changing the race of nobles got me thinking:

Animal men can learn.
Animal men can be bought in caravans.
Animal men can't do labor... could this be fixed?

It would be nice if races could buy other minor races (goblin buy trolls for example, or undeads buy skeletons) that can do labor in the fort. Any sort of automated script possible, to make them civ-members?
There are two ways to "fix" them not doing labors: 1) -not recommended- dfusion friendship. This hacks the code to fool df into thinking that your main race is multiple races and thus citizens can be anything. 2) start a script that assigns jobs (or replaces dwarf jos) to animal men. Example here: https://gist.github.com/warmist/5636653 Best used with onReactionComplete + custom reaction (e.g. immigration office?). Note: script is not perfect. It does not check burrows and general reachability, but the general idea is simple.

Tierre

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3807 on: May 23, 2013, 01:32:01 pm »

what is the essential list of commands you always start then playing? In init and manually? I add
binpatch armorstand-capacity
binpatch custom-reagent-size
binpatch deconstruct-heapfall
binpatch deconstruct-teleport
binpatch hospital-overstocking
binpatch training-ammo
binpatch weaponrack-unassign

keybinding add Alt-V digv
keybinding add Alt-O "liquids-here"
keybinding add Alt-Q "changeitem q 5"
keybinding add Alt-C "clean all"
keybinding add Alt-S "sort-units"
to Init file and use

fixmerchants
fixdiplomats

on embark.

I was thinking of making a script to turn on after loading a game with all the tweak fixes and all but i wanted input on those commands as i am afraid i don;t know them all.
Logged

peterix

  • Bay Watcher
    • View Profile
    • Dethware
Re: DFHack 0.34.11 r3
« Reply #3808 on: May 23, 2013, 02:12:03 pm »

I've got a dfhack-internals question for peterix or anyone else who knows.

The sample plugin skeleton.cpp has a comment that dfhack console commands are called from a different thread than the main DF thread.

Is this only true of the console commands?  Or do plugin_* run in a different thread?

I assume that vtable hooks must run in DF's main thread, at least.


(I know, I know, I should write test code and figure it out myself.  DFHack is dauntingly complex, and I'm trying to get a handle on how it all fits together.)

I guess you already found out yourself, but I'll reply anyway, just in case :)

There are several threads in DF with DFHack installed. The main simulation thread, the graphics thread, DFHack console thread and DFHack hotkey thread (just waits for hotkey events). A plugin can potentially have code that runs in any and all of them.

Commands need to acquire a lock to work with the game data, which is unlocked every time the game updates (see CoreSuspender and Core::Suspend). The lock has a queue/stack of condition variables that keeps track of all the plugins/threads which requested a suspend. Those are woken up as soon as the simulation thread is in a safe spot (onUpdate()).

Plugins can have callback functions that get called when a particular event happens/is detected. This is called from onUpdate and in turn, from the simulation thread.

So, you could easily have any number of threads and synchronize with the game by using Core::Suspend or the much nicer, CoreSuspender object :)

ag

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3809 on: May 23, 2013, 02:49:08 pm »

Plugins can have callback functions that get called when a particular event happens/is detected. This is called from onUpdate and in turn, from the simulation thread.

So, you could easily have any number of threads and synchronize with the game by using Core::Suspend or the much nicer, CoreSuspender object :)

One additional detail related to vmethod hooks: Normally the CoreSuspender lock is recursive, i.e. suspending again from a nested function call is safe. This applies to methods like plugin_onupdate, etc. However, since vmethod hooks are usually called directly by DF code, they implicitly have full right to access game data because of that, but the bookkeeping for the lock isn't properly updated, and CoreSuspender would deadlock. Therefore, if a vmethod hook needs to call something that uses CoreSuspender, it should use a special CoreSuspendClaimer object, which updates the bookkeeping info to officially declare that implicit lock ownership.
Logged
Pages: 1 ... 252 253 [254] 255 256 ... 373