Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 121 122 [123] 124

Author Topic: Dwarf Therapist (LATEST 0.5.7 7/13/10 see first post)  (Read 625188 times)

Valathil

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (LATEST 0.5.7 7/13/10 see first post)
« Reply #1830 on: September 18, 2010, 12:35:34 pm »

Getting the Strings to work was a pain in the ass. Hope you guys enjoy it.
Going off topic here, could you explain the new String structure layout and any odd "gotchas" for me?  Even hints would help.  Also, I think I read that Vector layout has changed, got anything about that?

The 4 Bytes at the beginning are gone. Thats all there is to it. But walk into this without any knowledge about the internal workings of df and try to figure that out by yourself. Was quite challenging ^^. Vector format doesn't seem to be changed. At least the old code seems to work. As an aside note. Peterix is already aware of the changes and implemented a fix in dfhack. Don't know when he will release an update.
Logged

magistrate101

  • Bay Watcher
  • That one kid.
    • View Profile
Re: Dwarf Therapist (LATEST 0.5.7 7/13/10 see first post)
« Reply #1831 on: September 18, 2010, 12:48:37 pm »

Peterix is already aware of the changes and implemented a fix in dfhack.

When did this happen? as I REALLY NEED an update for DFhack and RuneSmith  :'(

alexxeno

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (LATEST 0.5.7 7/13/10 see first post)
« Reply #1832 on: September 18, 2010, 02:52:12 pm »

In the worlds of.. Well I'm sure no one has ever said this before. Than'ka ya dude.
Logged

magistrate101

  • Bay Watcher
  • That one kid.
    • View Profile
Re: Dwarf Therapist (LATEST 0.5.7 7/13/10 see first post)
« Reply #1833 on: September 18, 2010, 03:13:17 pm »

i need DFhack to work, or else my life shall shrivel, because since DFhack wont work, runesmith wont either :'(

Gearheart

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (LATEST 0.5.7 7/13/10 see first post)
« Reply #1834 on: September 18, 2010, 03:15:16 pm »

dfhack is nice, it saves several seasons of bucket-brigading when embarking on a dry area with no brook.

And prospector is one of my mandatory tests upon embark.
Logged

magistrate101

  • Bay Watcher
  • That one kid.
    • View Profile
Re: Dwarf Therapist (LATEST 0.5.7 7/13/10 see first post)
« Reply #1835 on: September 18, 2010, 04:49:48 pm »

prospector is one of my mandatory tests upon embark.

and i've never used the DFliquid thingy yet :P

0x517A5D

  • Bay Watcher
  • Hex Editor‬‬
    • View Profile
Re: Dwarf Therapist (LATEST 0.5.7 7/13/10 see first post)
« Reply #1836 on: September 18, 2010, 05:37:17 pm »

The 4 Bytes at the beginning are gone. Thats all there is to it. But walk into this without any knowledge about the internal workings of df and try to figure that out by yourself. Was quite challenging ^^. Vector format doesn't seem to be changed. At least the old code seems to work. As an aside note. Peterix is already aware of the changes and implemented a fix in dfhack. Don't know when he will release an update.
Okay, great.

More offtopic, I have never liked the MSVC implementation of String.  The idea with the builtin 16 character buffer is good, 'cause so many strings are small, but they did it wrong.

It should be something like:
Code: [Select]
TCHAR [16] smallbuffer;
TCHAR * bufferptr;
unsigned int allocated;
unsigned int used;
otherstuff;

bufferptr points to smallbuffer, to malloc'ed memory, or is NULL.  There are no comparisons with sizeof(smallbuffer) to figure out whether to use smallbuffer or bufferptr's external memory, you just:
Code: [Select]
mov EAX, address of string structure
mov EAX, [EAX+offset bufferptr]
Only one register used, no branching, no mispredictions, no unnecessary cache-misses, easy prefetch if you feel the need.

And to destruct it, you just
Code: [Select]
mov EAX, address of string structure
cmp EAX, [EAX+offset bufferptr]
je @@skipfree
push [EAX+offset bufferptr]
call free()
@@skipfree:
{deallocate String structure if necessary}
(Note that this potentially calls free() with a NULL; technically an error but benign.)

So maybe they changed to this system?
Logged

mLegion

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (LATEST 0.5.7 7/13/10 see first post)
« Reply #1837 on: September 18, 2010, 05:52:27 pm »

When did this happen? as I REALLY NEED an update for DFhack and RuneSmith  :'(

It's been in the git repository a while now, haven't tried building it yet though.
Logged

devek

  • Bay Watcher
  • [KILL_EVERYTHING]
    • View Profile
Re: Dwarf Therapist (LATEST 0.5.7 7/13/10 see first post)
« Reply #1838 on: September 18, 2010, 06:37:24 pm »

bufferptr points to smallbuffer, to malloc'ed memory, or is NULL.  There are no comparisons with sizeof(smallbuffer) to figure out whether to use smallbuffer or bufferptr's external memory, you just:

To be fair, it doesn't compare with the size of the buffer to figure out what do do. The last 4 bytes at the end of the string define the mode(F=local 1F=external), so you can use external memory and a 4 byte string.

I know because when I write strings to a process I always use 1f mode and a string table I manage myself in the process' memory.
Logged
"Why do people rebuild things that they know are going to be destroyed? Why do people cling to life when they know they can't live forever?"

magistrate101

  • Bay Watcher
  • That one kid.
    • View Profile
Re: Dwarf Therapist (LATEST 0.5.7 7/13/10 see first post)
« Reply #1839 on: September 18, 2010, 08:41:24 pm »

When did this happen? as I REALLY NEED an update for DFhack and RuneSmith  :'(

It's been in the git repository a while now, haven't tried building it yet though.

i'm afraid i do not know how to get it to work '-' if i try to build it it pops up with 50+ errors :| and when i resolve all of the errors for the "missing files" it spits out shit like "cannot identify operating system" or something like that ._.

edit: if you compile it for me, and send it to me, i will put your name in my sig :D

James.Denholm

  • Bay Watcher
  • [HAS_NO_HUMOURS]
    • View Profile
Re: Dwarf Therapist (LATEST 0.5.7 7/13/10 see first post)
« Reply #1840 on: September 19, 2010, 06:03:21 am »

Applause. Not scattered, but roaring, rises from the gallery, flows over the stage. On this day, you, and those who aided you during this perilous task, have become legends, gods.

Fantastic.
Logged
Imagine a combination of power goals 44 and 45: The ruler convenes a council of the nobles to appoint you the high priest of the nearby towns. Instead of waiting for them to finish their drinking session, you walk in and crush a goblet while berating their disgusting behaviour and general incompetence.

magistrate101

  • Bay Watcher
  • That one kid.
    • View Profile
Re: Dwarf Therapist (LATEST 0.5.7 7/13/10 see first post)
« Reply #1841 on: September 19, 2010, 07:10:22 am »

Applause. Not scattered, but roaring, rises from the gallery, flows over the stage. On this day, you, and those who aided you during this perilous task, have become legends, gods.

Fantastic.

i would take that, and multiply it by the amount of win in this topic ^.^

kelewan

  • Bay Watcher
    • View Profile
Unknown Skill = Military Tactics
« Reply #1842 on: September 19, 2010, 12:23:39 pm »

Hi,

thanks for the great work. 

In my new fortress some Migrands came with a skill unknown to DT ("Novice UNKOWN").
In DF this skill is known as "Military Tactics". It seams to be new in 31.13 as it is not listed in the wiki jet.
Logged

Gearheart

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (LATEST 0.5.7 7/13/10 see first post)
« Reply #1843 on: September 19, 2010, 02:46:28 pm »

It currently has no use, so it's best to just ignore it for now.
Logged

Maulrus

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (LATEST 0.5.7 7/13/10 see first post)
« Reply #1844 on: September 19, 2010, 06:03:41 pm »

Thank you so much, dev team. I can finally start a new .13 fortress! :DDD

One suggestion: perhaps the new developers might fork this into its own topic? This one is very long, and a new topic could keep its title updated, unlike this one. It could link to this topic of course, to give chmod all the credit he deserves, and if he ever decides to resume development, it could just move back to this one.
Logged
puppywhirrrrrrl
Pages: 1 ... 121 122 [123] 124