Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 178 179 [180] 181 182 ... 373

Author Topic: DFHack 0.34.11 r3  (Read 1396194 times)

tahujdt

  • Bay Watcher
  • The token conservative
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2685 on: December 24, 2012, 05:09:44 pm »

How do I use the dfusion Embark plugin to choose specific castes of whichever race I want? Example: I play the Fallout:Equestria mod, wherein the author used hundreds of castes to get the right cutie marks. How would I pick which ponies I want?
Two ways from what I can see. You can do "raceID:CasteId" or "raceID:Caste#" in the embark.txt to get a specific caste. The numbers are the first 'CASTE:ID' entry order with the very first being number '0' and then going up.
Neither of those work. Does Dfusion only recognize the first number of the Caste#? If so, how would I go about changing the program to make it recognize up to the three digits?
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?

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2686 on: December 24, 2012, 05:24:59 pm »

How do I use the dfusion Embark plugin to choose specific castes of whichever race I want? Example: I play the Fallout:Equestria mod, wherein the author used hundreds of castes to get the right cutie marks. How would I pick which ponies I want?
Two ways from what I can see. You can do "raceID:CasteId" or "raceID:Caste#" in the embark.txt to get a specific caste. The numbers are the first 'CASTE:ID' entry order with the very first being number '0' and then going up.
Neither of those work. Does Dfusion only recognize the first number of the Caste#? If so, how would I go about changing the program to make it recognize up to the three digits?

It should be e.g. "DWARF:0" for first dwarf caste. And i'm sure it does recognize up more than 1 digit (although i wonder what are you doing that would require 3 digits for castes)

ArKFallen

  • Bay Watcher
  • Bohandean Desserter
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2687 on: December 24, 2012, 05:52:39 pm »

Alright, when I tried earlier with the CasteID thing I foolishly chose the first caste entry and it defaulted to itself :(


What's the ''saves run current world's init.lua" in DFusion do/mean exactly? Where would I find this init.lua to edit it or does the script create one to use? It sounds really useful for in-game init customization.
Logged
Hm, have you considered murder?  It's either that or letting it go.
SigText
I logged back on ;_;

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2688 on: December 24, 2012, 05:59:37 pm »

Alright, when I tried earlier with the CasteID thing I foolishly chose the first caste entry and it defaulted to itself :(


What's the ''saves run current world's init.lua" in DFusion do/mean exactly? Where would I find this init.lua to edit it or does the script create one to use? It sounds really useful for in-game init customization.
Unfortunately it can only access dfusion stuff (so not much can be done). It reads "data/save/<region>/dfusion/init.lua" file if it exists. Useful for setting up friendship for multiple runs (although that's what i remember, that was ages ago and i have changed everything at least two times  :-\ )
Next release will have dfusion integrated better into dfhack (although that required a lot of changes)

Kyphis

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2689 on: December 24, 2012, 07:00:52 pm »

I'm trying to rename a Civilisation, but can't figure out what I need to do to get its reference in the lua. Could anyone help me out?
Logged

arclance

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2690 on: December 24, 2012, 10:12:11 pm »

I have been trying to get stonesense to work on my 64bit main computer again and have had some success getting stonesense to start by building with allegro 5.0.8.
I am unable to run debuggers on it in my 32bit build VM though because they fail with this error.
Code: [Select]
setarch: symbol lookup error: ./hack/libdfhack.so: undefined symbol: _ZTV8renderer
Anyone know why that would be?
Logged
I think that might be one of the most dwarfen contraptions I've ever seen the blueprints of.
The Bloodwinery v1.3.1 | Dwarven Lamination v1.5 | Tileset Resizer v2.5 - Mac Beta Tester Needed
Sigtext

ag

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2691 on: December 25, 2012, 12:58:07 am »

It needs to link to libgraphics.so from DF itself for some ui stuff, and cannot find it or whatever. Also, the "setarch:" bit suggests that itis coming from the wrong program anyway, so you can probably ignore it if other stuff works.
« Last Edit: December 25, 2012, 12:59:39 am by ag »
Logged

CarloTheCurious

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2692 on: December 25, 2012, 02:25:22 am »

In the workflow and job commands, is there any way to specify NON_PRESSED as part of the constraint spec or job material?

(for rock nut paste/cake, which are both GLOB//BUSH_QUARRY:SEED as far as I can tell)

cheers.
Logged

arclance

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2693 on: December 25, 2012, 09:58:17 am »

It needs to link to libgraphics.so from DF itself for some ui stuff, and cannot find it or whatever. Also, the "setarch:" bit suggests that itis coming from the wrong program anyway, so you can probably ignore it if other stuff works.
gdb stops because of it with
Code: [Select]
/bin/bash: symbol lookup error: ./hack/libdfhack.so: undefined symbol: _ZTV8renderer
During startup program exited with code 127.
vagrind also stops with or without the setarch part of the line.
Code: [Select]
/bin/sh: symbol lookup error: ./hack/libdfhack.so: undefined symbol: _ZTV8renderer
Logged
I think that might be one of the most dwarfen contraptions I've ever seen the blueprints of.
The Bloodwinery v1.3.1 | Dwarven Lamination v1.5 | Tileset Resizer v2.5 - Mac Beta Tester Needed
Sigtext

Andux

  • Bay Watcher
  • [PREFSTRING:semicolons]
    • View Profile
    • Andux's DFWiki page
Re: DFHack 0.34.11 r2
« Reply #2694 on: December 25, 2012, 10:50:47 am »

I'm trying to rename a Civilisation, but can't figure out what I need to do to get its reference in the lua. Could anyone help me out?
If you can select a unit belonging to that civ, you could get at the civ name like so:
Code: [Select]
local u=dfhack.gui.getSelectedUnit()
if u then
print("Selected unit has civ_id of "..u.civ_id.."...")
if u.civ_id == -1 then
print('How uncivilized!')
else
local civ = df.global.world.entities.all[u.civ_id]
print('Entity #'..u.civ_id..' is '..dfhack.TranslateName(civ.name)..', "'..dfhack.TranslateName(civ.name,1)..'", '..civ.type)
end
end
Otherwise, you'll need to use pairs to go through df.global.world.entities.all until you find the one you want.
Logged
(Do not sign anything.) -- Fell, Planescape: Torment

MADMAN · Save Tools · WTF Tools · Generated Raws Extractor · Tweak for 0.31–34.xx

Cobbler89

  • Bay Watcher
  • Cobbler cancels celebrate Caesar: mending soles
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2695 on: December 25, 2012, 01:32:55 pm »

I am unable to run debuggers on it in my 32bit build VM though because they fail with this error.
Code: [Select]
setarch: symbol lookup error: ./hack/libdfhack.so: undefined symbol: _ZTV8renderer
Anyone know why that would be?
Obviously you need to upgrade your Zed Television to the 8th Edition. The 7th Edition isn't good enough for the ASCII this game uses!!

...In all seriousness, it sounds (at a glance, to an amateur debuggist who has not yet tried to program on Linux, though it's on the todolist for some of his projects) as though dfhack referenced another library that is there for it to use normally, but isn't available to the debugger? If you could get that other library into the debugger's hands, so to speak, might that solve the issue? Could that be done by giving the debugger whatever program contains the other library? Maybe you should only pay attention to my jokes and not my actual advice; I don't seem to know as much as most others here. ;^)
Logged
Quote from: Mr S
You've struck embedded links. Praise the data miners!
Quote from: Strong Bad
The magma is seeping under the door.

Quote from: offspring
Quote from: Cobbler89
I have an idea. Let's play a game where you win by being as quiet as possible.
I get it, it's one of those games where losing is fun!
I spend most of your dimension's time outside of your dimension. I can't guarantee followup or followthrough on any comments, ideas, or plans.

Kyphis

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2696 on: December 25, 2012, 05:20:40 pm »

I'm trying to rename a Civilisation, but can't figure out what I need to do to get its reference in the lua. Could anyone help me out?
If you can select a unit belonging to that civ, you could get at the civ name like so:
Code: [Select]
local u=dfhack.gui.getSelectedUnit()
if u then
print("Selected unit has civ_id of "..u.civ_id.."...")
if u.civ_id == -1 then
print('How uncivilized!')
else
local civ = df.global.world.entities.all[u.civ_id]
print('Entity #'..u.civ_id..' is '..dfhack.TranslateName(civ.name)..', "'..dfhack.TranslateName(civ.name,1)..'", '..civ.type)
end
end
Otherwise, you'll need to use pairs to go through df.global.world.entities.all until you find the one you want.
Managed to find it, thanks! The first ID (civ_id=) was not the same as its reference in global.world.entities, but the global.world.entities where all listed numerically so it was just a case of finding the linear offset.

After that, the actual words used are taken from the Dwarven Language file, with each incriment of 1 being by line. A lot of non-culled words didn't turn up due to word case, so I just had to switch between the different language modes to get the one I wanted (very easy, it ranges between like 0 and 3) and the word turned up. When the word wasn't turning up, it was only in the translation, the name would still have change even though the translation didnt, allowing me to make sure I had the right word. Language settings of 0 and 1 are the most likely to show the word.
Logged

arclance

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2697 on: December 25, 2012, 07:51:26 pm »

I am unable to run debuggers on it in my 32bit build VM though because they fail with this error.
Code: [Select]
setarch: symbol lookup error: ./hack/libdfhack.so: undefined symbol: _ZTV8renderer
Anyone know why that would be?
Obviously you need to upgrade your Zed Television to the 8th Edition. The 7th Edition isn't good enough for the ASCII this game uses!!

...In all seriousness, it sounds (at a glance, to an amateur debuggist who has not yet tried to program on Linux, though it's on the todolist for some of his projects) as though dfhack referenced another library that is there for it to use normally, but isn't available to the debugger? If you could get that other library into the debugger's hands, so to speak, might that solve the issue? Could that be done by giving the debugger whatever program contains the other library? Maybe you should only pay attention to my jokes and not my actual advice; I don't seem to know as much as most others here. ;^)
I found the solution here, it lead me to the documentation on "set exec-wrapper" in gdb.
Code: [Select]
When `exec-wrapper' is set, the specified wrapper is used to launch programs for debugging. GDB starts your program with a shell command of the form exec wrapper program. Quoting is added to program and its arguments, but not to wrapper, so you should add quotes if appropriate for your shell. The wrapper runs until it executes your program, and then GDB takes control.

You can use any program that eventually calls execve with its arguments as a wrapper. Several standard Unix utilities do this, e.g. env and nohup. Any Unix shell script ending with exec "$@" will also work.

For example, you can use env to pass an environment variable to the debugged program, without setting the variable in your shell's environment:
I turned out that the "dfhack" launcher script was incorrectly setting up gdb to for use with the "LD_PRELOAD" environment variable in this line.
Code: [Select]
echo "set environment LD_PRELOAD=./hack/libdfhack.so" > gdbcmd.tmp
The problem is that this applies the LD_PRELOAD to both bash and DwarfFortress.

This line will only apply the LD_PRELOAD to DwarfFortress and gdb will work.
Code: [Select]
echo "set exec-wrapper env 'LD_PRELOAD=./hack/libdfhack.so'" > gdbcmd.tmp

Now I can get a more data about this wonderful crash.
Code: [Select]
                                            *** glibc detected *** /home/arclance/build/Dwarf_Fortress/0_Utils/dfhack/Petrix_Branch/dfhack_2012-12-24/build/0_Output/df_34_11_linux-copy2/df_linux/libs/Dwarf_Fortress: corrupted double-linked list: 0x872fbb18 ***

I assume that this is the same problem with valgrind but I have not checked if there is a equivalent solution there.
« Last Edit: December 25, 2012, 07:58:27 pm by arclance »
Logged
I think that might be one of the most dwarfen contraptions I've ever seen the blueprints of.
The Bloodwinery v1.3.1 | Dwarven Lamination v1.5 | Tileset Resizer v2.5 - Mac Beta Tester Needed
Sigtext

WillowLuman

  • Bay Watcher
  • They/Them Life is weird
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2698 on: December 26, 2012, 02:06:09 am »

Sorry to be repetetive, but...
Any way to hack my adventure mode party so adventurer and companions are just standing around in the area upon embark, listed as either "Friendly" or "Hostile"?
Logged
Dwarf Souls: Prepare to Mine
Keep Me Safe - A Girl and Her Computer (Illustrated Game)
Darkest Garden - Illustrated game. - What mysteries lie in the abandoned dark?

CarloTheCurious

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2699 on: December 26, 2012, 03:31:45 am »

In the workflow and job commands, is there any way to specify NON_PRESSED as part of the constraint spec or job material?

(for rock nut paste/cake, which are both GLOB//BUSH_QUARRY:SEED as far as I can tell)
Also, is it possible to get workflow to include the 'in use' items as meeting the constraint? Mainly for armour and weapons - I may want 20 masterful steel sets, but that includes what my militia is already wearing.
Logged
Pages: 1 ... 178 179 [180] 181 182 ... 373