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 - 0x517A5D

Pages: 1 ... 72 73 [74] 75 76 ... 88
1096
DF Modding / Re: Error running Rick's utilities
« on: December 26, 2007, 12:41:00 am »
Okay, we need to know:
* the version of Dwarf Fortress.
* the utility name.
* the utility size in bytes (as a version check).
* the entire contents of the memory.ini you're using.
* what other utilities are working.

Due to a mistake of mine, the wiki's suggested .33g memory.ini was wrong for several hours.  If you are using .33g, deleting memory.ini and recreating it from the wiki page may work.


1097
DF Modding / Re: Pointer Hacking
« on: February 05, 2008, 01:42:00 am »
quote:
Originally posted by Fenrir:
<STRONG>Will reassembling the disassembled dwarfort.exe be more work than disassembling it was?</STRONG>

Oh God yes.  Don't even try it.

The assembler would need to make exactly the same decisions as the original compiler, for each instruction and each item of data.  Layout, alignment, instruction choice, jump distance, jump-table location, more.

It is, essentially, impossible to re-assemble a disassembly unless everything has been correctly figured out.

I did it once on a 10K executable.  10 kilobytes.  And it was hard.

Do not even attempt it.

Hexedits are the way.


1098
DF Modding / Re: What is the token reference to chunks?
« on: December 26, 2007, 04:24:00 pm »
I think it'd be cool if Toady would seperate game from graphics and build an API to communicate between them.  Then other people could build various graphics engines while Toady works on the game.

Although that might be as much work for Toady as redoing the graphics himself.  The game logic is quite, quite intertwined with display logic.  I know this because I looked at how dependent the code is on the 80x25 display.  The answer: very.


1099
DF Modding / Re: What is the token reference to chunks?
« on: December 23, 2007, 04:36:00 pm »
I think you can change the name of a creature's chunks using the [REMAINS:singular:plural] token.  Does that help?

FIGURINE might be the item type of skull totems and/or stone/wood/metal idols.


1100
DF Modding / Re: Mattgloss of glass
« on: January 10, 2008, 04:37:00 pm »
quote:
Originally posted by Quitschi1337:
<STRONG>do i need to create a new world for a new reaction?</STRONG>

It's the other way around, actually.  Once you have added (or removed) reactions, trying to generate a specific world from a seed won't work anymore.

You can work around this by generating the world in an unmodded copy of DF, then moving the region1 folder into the modded DF's save folder.


1101
DF Modding / Re: Modding Tantrum Out?
« on: January 11, 2008, 07:54:00 pm »
quote:
Originally posted by Earthquake Damage:
<STRONG>Check the memory hacking/cheat pages on the wiki.  Somewhere along the line (maybe check the old 2D version archive?) I asked someone for the address of the art defacement malus.

Oh, and be aware that the value is reversed (little Endian, is it?), so the magic number should start as 18 FC FF FF for -1000 (assuming Toady hasn't adjusted the penalty recently -- didn't notice it in the dev log myself but I could've overlooked it).  I haven't done it recently, but back in 33a & 33b I had it set to -50 (CE FF FF FF).  Much more reasonable that way.</STRONG>


Yup.  I find the (memory) address for each new version.  They can be found on the version-specific subpages off the Memory hacking page.  To find the offset in the exe file, subtract 0x400000 from the listed address.  You will, of course, have to be somewhat conversant with the art of hex editing.


1102
DF Modding / Re: Plant Tokens and Growing
« on: December 26, 2007, 04:19:00 pm »
The old wiki has some information.  It is likely still valid.

1103
DF Modding / Re: Reaction... silk?
« on: January 10, 2008, 04:27:00 pm »
quote:
Originally posted by Armok:
<STRONG>I just tried finding this on the wiki and failed, someone should add it.</STRONG>

I intend to, soon.  I have put up a page on specific heat, which baked my mind a little.  BTUs per pound per degree Fahrenheit, molecular weights... oh my half-remembered chemistry 101.


1104
DF Modding / Re: Reaction... silk?
« on: January 03, 2008, 06:15:00 pm »
I do wish that the various temperature tags defaulted to reasonable values instead of defaulting to 60001.  (Or was it -30000?  One of the two.)

60001°DF is much hotter than the surface of the sun; -30000°DF is way below absolute zero.

If I've done the math right, the surface of the sun averages approximately 19950°DF and absolute zero is 9509°DF.


1105
DF Modding / Re: Feature questions
« on: January 12, 2008, 05:43:00 pm »
quote:
Originally posted by bartavelle:
<STRONG>Thanks for reporting this, i wish somebody would report a fell mood!</STRONG>

I haven't experienced a fell mood, as I keep my dwarves too happy... but from the routine at 6F5840 in .33g, we learn this: creature.word_1F8 a.k.a creature.strange_mood can have these values:
-1 normal
0 "Has the aspect of one fey!"
1 "Peculiarly secretive..."
2 "Possessed by unknown forces!"
3 "Brooding darkly..."
4 "Has a horrible fell look!"
5 "Stricken by melancholy..."
6 "Running around babbling!" / "Crawling around babbling!"
7 "In a berserk rage!"
8 ? appears to be treated like -1
9 "Staring off into space..."

Is that helpful?

Edit: in addition, case 4 fell puts a word constant of 3Ch in offset +8 of some variable.  Could that be material?  Case 3 brooding uses a constant 3Bh.  All other moods don't use these two constants.  They use 37h..3Ah and 3Dh..43h.

[ January 12, 2008: Message edited by: 0x517A5D ]


1106
DF Modding / Re: Unarmed Weapons
« on: December 31, 2007, 02:21:00 pm »
quote:
Originally posted by Cajoes:
<STRONG>What's [Magic_nature]?</STRONG>

I expect it has to do with the Druid class, and that it is not (fully?) implemented, along with the rest of the magic system.


1107
DF Modding / Re: Identifying materials
« on: December 13, 2007, 02:44:00 pm »
Here are four search patterns that find this vector.  They are written to use my homebrewed search function.  All four patterns feel a little fragile to me, which is why I found so many.  If you go this route, I suggest doing all of the patterns, throwing out any zero results, and then comparing all of the remaining results to verify that they point to the same location.
code:
   // no good way to find this vector, so here's 4 patterns, run them all,
   // throw out any where d was 0, check that all the results are the same.
   //C7 87 40 02 00 00 04 00+          mov     dword ptr [edi+240h], 4
   //8B 0D 14 1F 46 01                 mov     ecx, metal_tokens_vector.start
   d = hexsearch(4+4,
         DWORD_, 0x00000240, DWORD_, 0x00000004,
         0x8B, ANYBYTE, HERE, ADDRESS);
   metal_tokens_vector_loc = peekd(d) - 4;
   dump(metal_tokens_vector_loc);
   // doesn't work in .32a
   //C7 40 04 E2 00 00 00              mov     dword ptr [eax+4], 0E2h
   //0F 84 5B 2F 00 00                 jz      loc_4EE328
   //8B 0D 14 1F 46 01                 mov     ecx, metal_tokens_vector.start
   d = hexsearch(5+1+4,
         0xC7, ANYBYTE, 0x04, DWORD_, 0x000000E2,
         JZ,
         0x8B, ANYBYTE, HERE, ADDRESS);
   metal_tokens_vector_loc = peekd(d) - 4;
   dump(metal_tokens_vector_loc);
   //8D B7 48 02 00 00                 lea     esi, [edi+248h]
   //E8 74 D1 EF FF                    call    sub_408B20
   //8B 15 14 1F 46 01                 mov     edx, metal_tokens_vector.start
   // there were also variants using 0x1A8, 0x1E8, 0x348
   d = hexsearch(4+1+4,
         0x8D, ANYBYTE, DWORD_, 0x00000248,
         CALL,
         0x8B, ANYBYTE, HERE, ADDRESS);
   metal_tokens_vector_loc = peekd(d) - 4;
   dump(metal_tokens_vector_loc);
   //A1 18 1F 46 01                    mov     eax, metal_tokens_vector.end
   //2B C1                             sub     eax, ecx
   //C1 F8 02                          sar     eax, 2
   //8D 9E 68 03 00 00                 lea     ebx, [esi+368h]
   d = hexsearch(3+2+3+4,
         0xA1, HERE, ADDRESS,
         0x2B, 0xC1,
         0xC1, 0xF8, 0x02,
         0x8D, ANYBYTE, DWORD_, 0x00000368);
   metal_tokens_vector_loc = peekd(d) - 8;
   dump(metal_tokens_vector_loc);

Obviously, this is in C, not in Python or whatnot.  I don't know how to link C to python, sorry.

1108
DF Modding / Re: Identifying materials
« on: December 12, 2007, 09:26:00 pm »
bartavelle, this is in .33d, right?  I see a vector there in .33d but not in b, c, or e.

Has this been put on the wiki yet?


1109
DF Modding / Re: [memory hacking]: detecting binary version (take 2)
« on: December 14, 2007, 05:02:00 pm »
Back on topic, I've been thinking about this for a couple of days, and I see no downside to using the PE header .TimeDateStamp field.

It's at a fixed file location (offset 0xF8), a fixed memory location (address 0x4000F8), has been unique for every build, and is almost guaranteed to continue to be.

I've updated my wiki address lists with the stamps for each released version, and will continue to do so.


out 0x517A5D, 0xF8


1110
DF Modding / Re: [memory hacking]: detecting binary version (take 2)
« on: December 13, 2007, 02:29:00 pm »
It is indeed pricey.  That's because it's for a small vertical market.  They probably sell only one or two thousand a year.

Unless you are targetting a AMD64 program, you don't need the AMD64-capable version; the standard one will run fine in the 32-bit emulation mode.

I will also add that they really don't like to sell to individuals.  Pirates try to scam them like you wouldn't believe, so they're very cautious.

An alternative: a couple of years ago they released an obsolete but non-crippled version for free.  URL=http://www.datarescue.com/idabase/idadown.htm  Version 4.9 doesn't have the latest bells & whistles (such as the very useful integrated debugger) but is still a very capable disassembler.

Getting started can be rough -- there is a very steep initial learning curve.  But you mastered Dwarf Fortress, you can handle it.  I would suggest not trying to work with a 5 MB program like DF at first; find a 5 or 10 KB utility and see what you can understand about it.


Pages: 1 ... 72 73 [74] 75 76 ... 88