Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - kionmaru

Pages: [1] 2
1
Odd. Couple things you could check I guess - 1. There is a newer revision which fixed an issue for OSX/Linux scanning, and 2. The scanner is intended to be run against a freshly generated world with medium history (i.e. starting on year 251)

Yeah, see edit - hg merge failed to handle game_data.ini right, and so I didn't have the expected year set, which probably ended with it defaulting to something either not quite sane or random. My bad >.< ;

2
@DwarfEngineer - Is m_current_year actually referenced or used anywhere right now?
Not in vanilla DwarfTherapist, it's part of preparations to merge in some of these other changes that are floating around. (chrisadams & splinterz changes)

Thanks - I went through your sources and couldn't find anything for it; scan for current year gives me a whole slew of addresses, none of which seem to quite resolve to an integer or word that all appear to be -1. I didn't dig deeper then that.

@kionmaru, thanks. That config works perfectly.

You're more than welcome :) Glad to hear it's behaving itself.
Current year looks like it's always going to be the last address (the address closest to dwarf_race_index) on v34.04 linux its: 0x09571d40
I'm updating the scanner script to report the last (and most likely) address.

On mine it's not reporting the correct offset at all then. 0x09571d40 is indeed an integer which appears to be correct; here's the list I get:

current year = 0x08c8ea8c (uncorrected:0x08c8ea8c)
current year = 0x08c8eaa4 (uncorrected:0x08c8eaa4)
current year = 0x08c8eae8 (uncorrected:0x08c8eae8)
current year = 0x08c8eb28 (uncorrected:0x08c8eb28)
current year = 0x08c8eb64 (uncorrected:0x08c8eb64)
current year = 0x08c8eba4 (uncorrected:0x08c8eba4)
current year = 0x08cab2b2 (uncorrected:0x08cab2b2)
current year = 0x08ceb760 (uncorrected:0x08ceb760)
current year = 0x08dbf16c (uncorrected:0x08dbf16c)
current year = 0x08dbf778 (uncorrected:0x08dbf778)
current year = 0x08dbfc10 (uncorrected:0x08dbfc10)

I can upload the world to dffd, it was genned with 0.34.04.

And just to verify, current_year should be in the [addresses] section if I'm reading your sources correctly, is that right?

** edit
hg failed to merge game_data.ini properly so I ended up with no expected year setting; that's what was causing the bad year search. Apologies, I should have caught that; it was no longer showing up in hg merge as a problem. Probably touched the file and it became more recent than your patch.

3
@DwarfEngineer - Is m_current_year actually referenced or used anywhere right now?
Not in vanilla DwarfTherapist, it's part of preparations to merge in some of these other changes that are floating around. (chrisadams & splinterz changes)

Thanks - I went through your sources and couldn't find anything for it; scan for current year gives me a whole slew of addresses, none of which seem to quite resolve to an integer or word that all appear to be -1. I didn't dig deeper then that.

@kionmaru, thanks. That config works perfectly.

You're more than welcome :) Glad to hear it's behaving itself.

4
Could someone post memory mapping for v0.34.04 for linux?
In kionmaru's version dwarves second names are displayed as Unknownunknown.

And why memory mappings for linux version are updated much less often than for windows? Latest mappings for linux is for 0.31.25!

Thanks in advance.

My current ini for v0.34.04:

Code: [Select]
[info]
checksum=0x6c11a27c
version_name=v0.34.04
complete=true

[addresses]
translation_vector=0x095cdbfc
language_vector=0x095cdbe4
creature_vector=0x0958c8ac
dwarf_race_index=0x09574240
squad_vector=0x095ca7b4

[offsets]
word_table=0x001C

[word_offsets]
base=0x0000
noun_singular=0x0004
noun_plural=0x0008
adjective=0x000C
verb=0x0014
present_simple_verb=0x0018
past_simple_verb=0x001C
past_participle_verb=0x0020
present_participle_verb=0x0024

[dwarf_offsets]
first_name=0x0000
nick_name=0x0004
last_name=0x0008
custom_profession=0x003c
profession=0x0040
race=0x0044
flags1=0x008C
flags2=0x0090
sex=0x00A6
id=0x00A8
recheck_equipment=0x0148
current_job=0x0274
turn_count=0x052b
states=0x0
souls=0x05e8
labors=0x0604
happiness=0x0694
squad_ref_id=0x06f8

[soul_details]
skills=0x01D4
traits=0x01EC

[job_details]
id=0x0008
on_break_flag=0x0011
sub_job_id=0x0040

[squad_offsets]
id=0x0000
name=0x000C
members=0x0044

[valid_flags_1]
size=1
1\name=Not from around these parts
1\value=0x80000000

[valid_flags_2]
size=1
1\name=Dead. Deceased. An Undwarf!
1\value=0x02000000

[invalid_flags_1]
size=7
1\name=a zombie
1\value=0x00001000
2\name=a skeleton
2\value=0x00002000
3\name=a merchant or diplomat
3\value=0x00000040
4\name=outpost liason
4\value=0x00000800
5\name=an invader or hostile
5\value=0x00020000
6\name=an invader or hostile
6\value=0x00080000
7\name=an invader or hostile
7\value=0x000C0000

[invalid_flags_2]
size=2
1\name="dead, Jim."
1\value=0x00000080
2\name=from the Underworld. SPOOKY!
2\value=0x00040000


This should display their last names just fine. When the last name is UnknownUnknown, then complete=false; in my current one complete=true and they should show just fine. I've got enough ini's scattered around here that you may have grabbed an old one, or it might be that your dt isn't referencing the ini you're expecting.

Try

cd dwarftherapist; grep "checksum=0x6c11a27c" * -R

That command should show all ini files within the dwarftherapist base directory that will be matched by DF v0.34.04.

Let me know if it's still behaving strangely. I'm using DE's mercurial repository, and with his current source tree I'm not able to replicate.

@DwarfEngineer - Is m_current_year actually referenced or used anywhere right now?

5
DF Dwarf Mode Discussion / Re: Urist cancels give food: No food available.
« on: February 29, 2012, 06:02:19 pm »
Caz cancels aid forumite: Too insane.

This.

6
DF Modding / Re: Dwarf Therapist (LATEST 0.6.12 2/28/12 see first post)
« on: February 29, 2012, 05:47:57 am »
@Mattias,

Erm, there are only four commits to DE's mercurial since 0.6.12, and I wonder if 518:31cf068fc895 doesn't include an offset I don't have (for ghost flag).

I went ahead and updated to his current hg, see if I can't repliacte.

7
DF Modding / Re: Dwarf Therapist (LATEST 0.6.12 2/28/12 see first post)
« on: February 29, 2012, 04:23:30 am »
@Mattias,

change complete=true to complete=false and try to run it that way. Also, make sure you're running 0.34.04 and not 0.34.03 from this morning. And you're running DT 0.6.12, not one of the modified source trees but DE's version.

Can you make the log directory and get me the run.log from it failing?

8
DF Modding / Re: Dwarf Therapist (LATEST 0.6.12 2/28/12 see first post)
« on: February 29, 2012, 12:21:43 am »
O hai, new DF version out - v0.34.04 due to a crash on save issue.

Here's your fresh 0.6.12 dt ini file (for Linux):

Code: [Select]
[info]
checksum=0x6c11a27c
version_name=v0.34.04
complete=true

[addresses]
translation_vector=0x095cdbfc
language_vector=0x095cdbe4
creature_vector=0x0958c8ac
dwarf_race_index=0x09574240
squad_vector=0x095ca7b4

[offsets]
word_table=0x001C

[word_offsets]
base=0x0000
noun_singular=0x0004
noun_plural=0x0008
adjective=0x000C
verb=0x0014
present_simple_verb=0x0018
past_simple_verb=0x001C
past_participle_verb=0x0020
present_participle_verb=0x0024

[dwarf_offsets]
first_name=0x0000
nick_name=0x0004
last_name=0x0008
custom_profession=0x003c
profession=0x0040
race=0x0044
flags1=0x008C
flags2=0x0090
sex=0x00A6
id=0x00A8
recheck_equipment=0x0148
current_job=0x0274
turn_count=0x052b
states=0x0
souls=0x05e8
labors=0x0604
happiness=0x0694
squad_ref_id=0x06f8

[soul_details]
skills=0x01D4
traits=0x01EC

[job_details]
id=0x0008
on_break_flag=0x0011
sub_job_id=0x0040

[squad_offsets]
id=0x0000
name=0x000C
members=0x0044

[valid_flags_1]
size=1
1\name=Not from around these parts
1\value=0x80000000

[valid_flags_2]
size=1
1\name=Dead. Deceased. An Undwarf!
1\value=0x02000000

[invalid_flags_1]
size=7
1\name=a zombie
1\value=0x00001000
2\name=a skeleton
2\value=0x00002000
3\name=a merchant or diplomat
3\value=0x00000040
4\name=outpost liason
4\value=0x00000800
5\name=an invader or hostile
5\value=0x00020000
6\name=an invader or hostile
6\value=0x00080000
7\name=an invader or hostile
7\value=0x000C0000

[invalid_flags_2]
size=2
1\name="dead, Jim."
1\value=0x00000080
2\name=from the Underworld. SPOOKY!
2\value=0x00040000

Hope this helps ^^

9
DF Modding / Re: Dwarf Therapist (LATEST 0.6.12 2/18/12 see first post)
« on: February 28, 2012, 04:31:12 pm »
*yawns* g'morning folks.

ooooh, new df.. Let me see if I can get linux 0.6.12 working with it.

Here we go; this one is working for me:

Code: [Select]
[info]
checksum=0x5502e97b
version_name=v0.34.03
complete=true

[addresses]
translation_vector=0x095cdbfc
language_vector=0x095cdbe4
creature_vector=0x0958c8ac
dwarf_race_index=0x09574240
squad_vector=0x095ca7b4

[offsets]
word_table=0x001C

[word_offsets]
base=0x0000
noun_singular=0x0004
noun_plural=0x0008
adjective=0x000C
verb=0x0014
present_simple_verb=0x0018
past_simple_verb=0x001C
past_participle_verb=0x0020
present_participle_verb=0x0024

[dwarf_offsets]
first_name=0x0000
nick_name=0x0004
last_name=0x0008
custom_profession=0x003c
profession=0x0040
race=0x0044
flags1=0x008C
flags2=0x0090
sex=0x00A6
id=0x00A8
recheck_equipment=0x0148
current_job=0x0274
turn_count=0x052b
states=0x0
souls=0x05e8
labors=0x0604
happiness=0x0694
squad_ref_id=0x06f8

[soul_details]
skills=0x01D4
traits=0x01EC

[job_details]
id=0x0008
on_break_flag=0x0011
sub_job_id=0x0040

[squad_offsets]
id=0x0000
name=0x000C
members=0x0044

[valid_flags_1]
size=1
1\name=Not from around these parts
1\value=0x80000000

[valid_flags_2]
size=1
1\name=Dead. Deceased. An Undwarf!
1\value=0x02000000

[invalid_flags_1]
size=7
1\name=a zombie
1\value=0x00001000
2\name=a skeleton
2\value=0x00002000
3\name=a merchant or diplomat
3\value=0x00000040
4\name=outpost liason
4\value=0x00000800
5\name=an invader or hostile
5\value=0x00020000
6\name=an invader or hostile
6\value=0x00080000
7\name=an invader or hostile
7\value=0x000C0000

[invalid_flags_2]
size=2
1\name="dead, Jim."
1\value=0x00000080
2\name=from the Underworld. SPOOKY!
2\value=0x00040000

10
Engraved on the wall is a finely-designed image  of "Start Your Day With The Book", the honey-badger bone-bound book by Dakost Zulbannoglesh.

...My dwarves engrave the strangest things.

11
DF Modding / Re: Dwarf Therapist (LATEST 0.6.12 2/18/12 see first post)
« on: February 22, 2012, 11:16:46 am »
Hi everyone... I have trouble installing DT on linux, I run Ubuntu 64bits.
Here is what I did :
Quote
hg clone https://code.google.com/p/dwarftherapist/
It creates a dwarftherapist folder with the source, memory files..;
cd dwarftherapist
qmake
make (it compile without error)
create the v0.34.02.ini in his folder
cd bin/release
./DwarfTherapist to run it
It run and closes instantly, I can see the window for maybe half of a second
How to install it correctly ?
Thanks in advance.

If you run it from a console window, do you get any error output?
Can you make the log directory and give us output of the run.log?

12
If hg isn't a command, then you need to install mercurial, which should be in apt-gettable with the rest of the normal development tools.

Check out build-essential and qt4-dev-tools for the basic build environment, and then mercurial for the hg command to clone the dt source repository.

That should be most or all of what you need; if you run into any errors post 'em and I'll provide pointers. I've been a Slackware guy since the mid 90's, so I'm not too up to date on how Debians install by default; but give me a compiler error and I can probably tell you what you need off the top of my head. :)

13
Nan, dt is pretty easy to get working in linux.
(Where "#" is the number of CPU cores you have, times two. I have four cores, so I run -j8 - The exception of course is if you have an SSD or ramdrive, at which point -j4 is what I'd use. Doubling running thread count mostly gets around mechanical hdd latency for compile speeds. Just in case you were curious.)

hg clone https://code.google.com/p/dwarftherapist/
cd dwarftherapist
qmake && make -j#
bin/release/DwarfTherapist

I usually use taskset to tack df and dt to the same CPU core, but I've got some odd NUMA quirks. Make sure that dt can locate the pidof binary in your $PATH, it uses that to get the PID of df process, then ptraces it for memory reads/writes, etc.

If you need an ini file for df v0.34.0x, let me know, I've got one that seems to work pretty well.

14
DF Modding / Re: Dwarf Therapist (LATEST 0.6.12 2/18/12 see first post)
« on: February 18, 2012, 01:37:20 pm »
DE, I absolutely understand how you feel. Mad crunch time equals exhausted neurons. You are more then welcome. And thank you for an excellent program :)

Also, thanks to Darmarius and Dyn for doing really good work with offsets for 0.34.01 - I'd probably still be trying to figure out how to find the souls offset.



15
DF Modding / Re: Dwarf Therapist (LATEST 0.6.12 2/18/12 see first post)
« on: February 18, 2012, 01:18:49 pm »
Thanks for all the amazing work on this application!

I did run into a little difficulty compiling the latest release (0.6.12 source) in linux however. Last version was fine but now I get the following. Anybody got a clue?

Code: [Select]
src/scanner.cpp: In member function ‘void Scanner::find_null_terminated_string()’:
src/scanner.cpp:283:62: error: no matching function for call to ‘qMin(uint, long unsigned int)’
src/scanner.cpp:283:62: note: candidate is:
/usr/include/QtCore/qglobal.h:1194:18: note: template<class T> const T& qMin(const T&, const T&)
src/scanner.cpp: In member function ‘void Scanner::find_number_or_address()’:
src/scanner.cpp:301:62: error: no matching function for call to ‘qMin(uint, long unsigned int)’
src/scanner.cpp:301:62: note: candidate is:
/usr/include/QtCore/qglobal.h:1194:18: note: template<class T> const T& qMin(const T&, const T&)
make: *** [bin/release/scanner.o] Error 1

Thanks again DE!

Yeah, per comment on issue #380 it should be size_t not uint, and I agree. I GOT NINJA'D BY DWARFENGINEER! He's already checked in a fix. LOL. Here's a diff if you want it, otherwise wait for his next release I suppose :P

Here's a diff patch you can apply:

Code: [Select]
diff -r 2a186e1e26f6 src/scanner.cpp
--- a/src/scanner.cpp   Sat Feb 18 10:14:49 2012 -0600
+++ b/src/scanner.cpp   Sat Feb 18 12:19:10 2012 -0600
@@ -280,7 +280,7 @@
     QByteArray text = ui->le_null_terminated_string->text().toLocal8Bit();
 
     get_brute_force_address_range(params.start_addr, params.end_addr);
-    params.size = qMin((uint)text.size(), sizeof(params.data));
+    params.size = qMin((size_t)text.size(), sizeof(params.data));
     memcpy(params.data, text.data(), params.size);
 
     QByteArray needle((const char *)&params, sizeof(params));
@@ -298,7 +298,7 @@
     QByteArray text = encode(ui->le_find_address->text().
                                toUInt(&ok, ui->rb_hex->isChecked() ? 16 : 10));
     get_brute_force_address_range(params.start_addr, params.end_addr);
-    params.size = qMin((uint)text.size(), sizeof(params.data));
+    params.size = qMin((size_t)text.size(), sizeof(params.data));
     memcpy(params.data, text.data(), params.size);
 
     QByteArray needle((const char *)&params, sizeof(params));

Also, 0.6.12 doesn't include linux memory ini's for 0.34.01 or 0.34.02, so here they are:

0.34.01 ini file:
Code: [Select]
[info]
checksum=0xa42a074a
version_name=v0.34.01
complete=true

[addresses]
translation_vector=0x095c7bf8
language_vector=0x095c7be0
creature_vector=0x095868ac
dwarf_race_index=0x0956e240
squad_vector=0x095c47b4

[offsets]
word_table=0x001C

[word_offsets]
base=0x0000
noun_singular=0x0004
noun_plural=0x0008
adjective=0x000C
verb=0x0014
present_simple_verb=0x0018
past_simple_verb=0x001C
past_participle_verb=0x0020
present_participle_verb=0x0024

[dwarf_offsets]
first_name=0x0000
nick_name=0x0004
last_name=0x0008
custom_profession=0x003c
profession=0x0040
race=0x0044
flags1=0x008C
flags2=0x0090
sex=0x00A6
id=0x00A8
recheck_equipment=0x0148
current_job=0x0274
states=0x0
souls=0x05e8
labors=0x0604
happiness=0x0694
squad_ref_id=0x06f8

[soul_details]
skills=0x01D4
traits=0x01EC

[job_details]
id=0x0008
on_break_flag=0x0011
sub_job_id=0x0040

[squad_offsets]
id=0x0000
name=0x000C
members=0x0044

[valid_flags_1]
size=1
1\name=Not from around these parts
1\value=0x80000000

[valid_flags_2]
size=1
1\name=Dead. Deceased. An Undwarf!
1\value=0x02000000

[invalid_flags_1]
size=7
1\name=a zombie
1\value=0x00001000
2\name=a skeleton
2\value=0x00002000
3\name=a merchant or diplomat
3\value=0x00000040
4\name=outpost liason
4\value=0x00000800
5\name=an invader or hostile
5\value=0x00020000
6\name=an invader or hostile
6\value=0x00080000
7\name=an invader or hostile
7\value=0x000C0000

[invalid_flags_2]
size=2
1\name="dead, Jim."
1\value=0x00000080
2\name=from the Underworld. SPOOKY!
2\value=0x00040000

And the ini file for 0.34.02 version:
Code: [Select]
[info]
checksum=0xf4fc8347
version_name=v0.34.02
complete=true

[addresses]
translation_vector=0x095ca018
language_vector=0x095ca000
creature_vector=0x09588ccc
dwarf_race_index=0x09570660
squad_vector=0x095c6bd4

[offsets]
word_table=0x001C

[word_offsets]
base=0x0000
noun_singular=0x0004
noun_plural=0x0008
adjective=0x000C
verb=0x0014
present_simple_verb=0x0018
past_simple_verb=0x001C
past_participle_verb=0x0020
present_participle_verb=0x0024

[dwarf_offsets]
first_name=0x0000
nick_name=0x0004
last_name=0x0008
custom_profession=0x003c
profession=0x0040
race=0x0044
flags1=0x008C
flags2=0x0090
sex=0x00A6
id=0x00A8
recheck_equipment=0x0148
current_job=0x0274
states=0x0
souls=0x05e8
labors=0x0604
happiness=0x0694
squad_ref_id=0x06f8

[soul_details]
skills=0x01D4
traits=0x01EC

[job_details]
id=0x0008
on_break_flag=0x0011
sub_job_id=0x0040

[squad_offsets]
id=0x0000
name=0x000C
members=0x0044

[valid_flags_1]
size=1
1\name=Not from around these parts
1\value=0x80000000

[valid_flags_2]
size=1
1\name=Dead. Deceased. An Undwarf!
1\value=0x02000000

[invalid_flags_1]
size=7
1\name=a zombie
1\value=0x00001000
2\name=a skeleton
2\value=0x00002000
3\name=a merchant or diplomat
3\value=0x00000040
4\name=outpost liason
4\value=0x00000800
5\name=an invader or hostile
5\value=0x00020000
6\name=an invader or hostile
6\value=0x00080000
7\name=an invader or hostile
7\value=0x000C0000

[invalid_flags_2]
size=2
1\name="dead, Jim."
1\value=0x00000080
2\name=from the Underworld. SPOOKY!
2\value=0x00040000


Save the appropriate ini file (You really should be running df 0.34.02, so I'm going to use that) as /path/to/dwarftherapist/etc/memory_layouts/linux/v0.34.01.ini, apply the diff (or make the indicated edits to scanner.cpp yourself) and finish compiling it, and you should have a linux dt that has the unofficial support for linux DF 0.34.02.

HTH!

Pages: [1] 2