Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 81 82 [83] 84 85 ... 108

Author Topic: DFHack 0.5.15 (legacy)  (Read 405338 times)

Rafal99

  • Bay Watcher
    • View Profile
Re: DFHack 0.5.13
« Reply #1230 on: April 12, 2011, 07:16:43 am »

@Rafal99
Good job. It should be possible to work with that.

Thanks!
Just tell me if you would want me to describe the steps to easily find these offsets.
Logged
The spinning Tantrum Spiral strikes The Fortress in the meeting hall!
It explodes in gore!
The Fortress has been struck down.

peterix

  • Bay Watcher
    • View Profile
    • Dethware
Re: DFHack 0.5.13
« Reply #1231 on: April 12, 2011, 07:21:05 am »

@Rafal99
Good job. It should be possible to work with that.

Thanks!
Just tell me if you would want me to describe the steps to easily find these offsets.
That would be perfect.

raoulxq

  • Bay Watcher
    • View Profile
Re: DFHack 0.5.13
« Reply #1232 on: April 12, 2011, 07:56:27 am »

Creatures.current_job.active should work. Actually, I just tested it with 31.25 on linux and it works nicely. I can see the jobs dwarves do. I'll check the windows version too.
current_job.active actually does work under Ubuntu 64bit, but not under Windows 7 for me.
Logged

Rafal99

  • Bay Watcher
    • View Profile
Re: DFHack 0.5.13
« Reply #1233 on: April 12, 2011, 08:40:32 am »

Just tell me if you would want me to describe the steps to easily find these offsets.
That would be perfect.

Ok here are the steps:
1. Edit your init to run DF at 80x25 windowed.
2. Download this save and put it into your save folder. It is made in 0.31.01 so will run in any 0.31.xx version.
3. Run DF and load the save.
4. Press F1 and N (it will move your view to upper right corner of the map and make you see notes).

It should look like that: (look at the corner :D)



5. Open Cheat Engine and connect to DF process.
6. Search for "Array of bytes" 480405014104050158040501 hexagonal.
7. You should get 2 addresses, choose one randomly.
8. Substract 68 hexagonal from that address to get the address of the start of the array. ( 68 hex = 104 dec = (25+1)*4 )
9. Add 1F40 hexagonal to the array start address to get array end address (1F40 hex = 8000 dec = 80*25*4 )
10. Now you have 2 adresses. Search for "4 bytes" values containing them. You will get adresses of screen and screen_limit pointers. Both will be in static memory. You may need to try a few times bacause the pointers swap between 2 tables and may temporarily point to the wrong one.
11. The other addresses are related to screen and screen_limit:
Code: [Select]
clipx[0] = screen + 24 bytes
clipx[1] = screen + 28 bytes
clipy[0] = screen + 32 bytes
clipy[1] = screen + 36 bytes
dimx = screen_limit - 16 bytes
dimy = screen_limit - 12 bytes
mouse_x = screen_limit - 8 bytes
mouse_y = screen_limit - 4 bytes

Ok that is all.

I got the offsets for 0.31.19 Windows SDL when preparing this post:
Code: [Select]
screen: 00B4AD1C
screen_limit: 00B4B08C
The other variables as above.
« Last Edit: April 12, 2011, 08:48:03 am by Rafal99 »
Logged
The spinning Tantrum Spiral strikes The Fortress in the meeting hall!
It explodes in gore!
The Fortress has been struck down.

peterix

  • Bay Watcher
    • View Profile
    • Dethware
Re: DFHack 0.5.13
« Reply #1234 on: April 12, 2011, 08:51:46 am »

Ok that is all.
That is awesome. There's enough detail for automating it. Thank you :)
Creatures.current_job.active should work. Actually, I just tested it with 31.25 on linux and it works nicely. I can see the jobs dwarves do. I'll check the windows version too.
current_job.active actually does work under Ubuntu 64bit, but not under Windows 7 for me.
Ok, I'm sure this can be fixed quickly by looking at the offsets used by DT.

* peterix digs through the xml file
« Last Edit: April 12, 2011, 08:57:59 am by peterix »
Logged

Rafal99

  • Bay Watcher
    • View Profile
Re: DFHack 0.5.13
« Reply #1235 on: April 12, 2011, 10:22:23 am »

I have found some more useful offsets:

Code: [Select]
6814F508: topY
6814F50C: leftX
6814F510: leftX
6814F514: topY
6814F518: rightX
6814F51C: bottomY

These are the screen coordinates of the DF window client area (they make rectangle that contains exactly all the tiles but no window frame).
When DF is switched to fullscreen the last four become FFFF8300 (which seems to be -32000 dec) while the first two stay with their last values.

They seem to be correct for all 0.31.XX Windows SDL versions (checked .12 .18 .19 .25).
But they didn't work for 0.31.01 (which is not SDL so no surprise).

Now finally I have all the offsets I may need. ;)
« Last Edit: April 12, 2011, 10:29:38 am by Rafal99 »
Logged
The spinning Tantrum Spiral strikes The Fortress in the meeting hall!
It explodes in gore!
The Fortress has been struck down.

Eldrick Tobin

  • Bay Watcher
  • [ETHIC: MODDING_UNDWARFY: PERSONAL_MATTER]
    • View Profile
Re: DFHack 0.5.13
« Reply #1236 on: April 12, 2011, 10:39:21 am »

Any chance there will be a 'siege breaker' addition to DFHack to help end sieges if everything else fails?
Use Runesmith, it has an option to kill every creature of a type on the map. You can also select a creature in Runesmith and activate the "dead" flag.

Runesmith is a great way of MAKING the Siege tag stick:
Step One: A Vile force of Darkness has arrived!
Step Two: Kill all Goblins (Say with the nice Nuke Icon)

Result - Siege tag sticks around forever.

Dead tagging is great when you HAVE a Giant Cave Spider, but want the others gone... can't nuke... so individual dead tags for the win. I'd like "Bleeding out in 4 Urist Seconds" personally

Of course dfcleanoffmydwarves.exe is right up there with World Peace some days...

EDIT:

Of course when you misread 83 as 82 you miss others responses... So we shouldn't use "Dead". 'Left Map' is... wonky (works best on merchants who get lost trying to find your depot because they'd rather be at a party)... 'Killed' is sometimes ignored (ignored here being similar to setting happiness on a miserable dwarf)...

I've had magma crash my process... tried to burn out a 'dumb merchant', set fire to the map. Got migrants as the fire spread... boom. Hadn't saved since I'd plotted out the initial digging, so nothing to debug. Perhaps dfdropsyndromestone.exe targetted nearby enough. But that's my Populous itch talking.
« Last Edit: April 12, 2011, 10:56:41 am by Eldrick Tobin »
Logged
--
Eldrick Tobin
Behold the unimpressive Aspectus Lolin mod. || My Little Arachnid Fortress attempt...
I mumble to myself on tumblr... Sometimes about DF Modding.

raoulxq

  • Bay Watcher
    • View Profile
Re: DFHack 0.5.13
« Reply #1237 on: April 12, 2011, 11:53:26 am »

Any chance there will be a 'siege breaker' addition to DFHack to help end sieges if everything else fails?
Use Runesmith, it has an option to kill every creature of a type on the map. You can also select a creature in Runesmith and activate the "dead" flag.

Runesmith is a great way of MAKING the Siege tag stick:
Step One: A Vile force of Darkness has arrived!
Step Two: Kill all Goblins (Say with the nice Nuke Icon)

Result - Siege tag sticks around forever.

Dead tagging is great when you HAVE a Giant Cave Spider, but want the others gone... can't nuke... so individual dead tags for the win. I'd like "Bleeding out in 4 Urist Seconds" personally

Of course dfcleanoffmydwarves.exe is right up there with World Peace some days...

EDIT:

Of course when you misread 83 as 82 you miss others responses... So we shouldn't use "Dead". 'Left Map' is... wonky (works best on merchants who get lost trying to find your depot because they'd rather be at a party)... 'Killed' is sometimes ignored (ignored here being similar to setting happiness on a miserable dwarf)...

I've had magma crash my process... tried to burn out a 'dumb merchant', set fire to the map. Got migrants as the fire spread... boom. Hadn't saved since I'd plotted out the initial digging, so nothing to debug. Perhaps dfdropsyndromestone.exe targetted nearby enough. But that's my Populous itch talking.

Ok, I didn't actually try that myself, never ended a siege with the nuke button yet... How about writing a routine that kills all but one of the goblins on the map? When the last one flees or is killed, the SIEGE tag might be deleted... I think I'm going to try that.

I wonder if the dead flag is enough or if we also need the kill flag ('killed by kill function').
Logged

Eldrick Tobin

  • Bay Watcher
  • [ETHIC: MODDING_UNDWARFY: PERSONAL_MATTER]
    • View Profile
Re: DFHack 0.5.13
« Reply #1238 on: April 12, 2011, 02:54:15 pm »

Any chance there will be a 'siege breaker' addition to DFHack to help end sieges if everything else fails?
Use Runesmith, it has an option to kill every creature of a type on the map. You can also select a creature in Runesmith and activate the "dead" flag.

Runesmith is a great way of MAKING the Siege tag stick:
Step One: A Vile force of Darkness has arrived!
Step Two: Kill all Goblins (Say with the nice Nuke Icon)

Result - Siege tag sticks around forever.

Dead tagging is great when you HAVE a Giant Cave Spider, but want the others gone... can't nuke... so individual dead tags for the win. I'd like "Bleeding out in 4 Urist Seconds" personally

Of course dfcleanoffmydwarves.exe is right up there with World Peace some days...

EDIT:

Of course when you misread 83 as 82 you miss others responses... So we shouldn't use "Dead". 'Left Map' is... wonky (works best on merchants who get lost trying to find your depot because they'd rather be at a party)... 'Killed' is sometimes ignored (ignored here being similar to setting happiness on a miserable dwarf)...

I've had magma crash my process... tried to burn out a 'dumb merchant', set fire to the map. Got migrants as the fire spread... boom. Hadn't saved since I'd plotted out the initial digging, so nothing to debug. Perhaps dfdropsyndromestone.exe targetted nearby enough. But that's my Populous itch talking.

Ok, I didn't actually try that myself, never ended a siege with the nuke button yet... How about writing a routine that kills all but one of the goblins on the map? When the last one flees or is killed, the SIEGE tag might be deleted... I think I'm going to try that.

I wonder if the dead flag is enough or if we also need the kill flag ('killed by kill function').

After extensive testing that just ate itself -.-;

Runesmith does not unset the following:
Active Invader (sets if they are just about the invade, as Currently Invading removes this one)
Hidden Ambusher (Just in Case, however it is still set when an Active Invader)
Hidden in Ambush (Just in Case, however it is still set when an Active Invader, until discovery)
Incoming (Sets if something is here yet... wave X of a siege here)
Invader -Fleeing/Leaving
Currently Invading

When it nukes something it basically just sets them to 'dead'. It does not also set them to 'killed'. Show dead will show everything (short of 'vanished'/'deleted' I'd suspect) so one CAN go through the intensive process to revive a broken siege. These particular flags are not visible at the same exact time so multiple passes -even through a narrow segment- are advised.

Problem I ran into (last thing before I mention something more DFHack related):
I set the Killed Flag (but not dead), and I got mortally wounded siegers that refused to just pift in Magma. Likely missing upper torsoes on examination.


And so... a dfremovesiege.exe might only have to zap a few flags to drop that big nasty SIEGE banner. Sadly any random buttock that has been cut off because someone was fishing next to the siegers and was surprised... will still be left by or in the water.
Logged
--
Eldrick Tobin
Behold the unimpressive Aspectus Lolin mod. || My Little Arachnid Fortress attempt...
I mumble to myself on tumblr... Sometimes about DF Modding.

cousac

  • Bay Watcher
    • View Profile
Re: DFHack 0.5.13
« Reply #1239 on: April 12, 2011, 03:03:06 pm »

Code: [Select]
cousac@linux-zwvc:/> dfattachtest
terminate called after throwing an instance of 'DFHack::Error::MemoryXmlParse'
  what():  error 2: Failed to open file, at row 0 col 0
Aborted

um, where did I go wrong? PS dwarf fortress  31.25 was running already and i am using openSUSE 11.3.

EDIT: whoops, pulled a rookie move. forgot to point the cmake to the memory.xml location...all fixed ignore this post.
« Last Edit: April 12, 2011, 03:24:18 pm by cousac »
Logged

"Ahright, lissen up; you malodorous, malformed, putrescent, 'mok-forsaken lil' mini-orcs! I'm here to drink some tea and kick some asses. Either way, sumptin' gonna get tea-bagged tonight!"

_DivideByZero_

  • Bay Watcher
  • Not to be confused with infinity
    • View Profile
Re: DFHack 0.5.13
« Reply #1240 on: April 12, 2011, 06:28:14 pm »

Oh by the way, it works with wine again. I can continue to play genesis.
Logged
Have I now become your enemy by telling you the truth? (Gal 4:16)

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: DFHack 0.5.13
« Reply #1241 on: April 12, 2011, 06:57:33 pm »

I need to ask about Dflair does the function swap the site function to lair or does it search through all the tiles in the fort then turn on the flag to prevent scattering? hopefully it's the latter. because it doesn't work for me.
Yes, it sets every tile on the map to lair.
then that's what I feared. That sentence is really vague and confusing from the research on site changing using Dfusion. From what I got setting the site to Lair doesn't slap on The Store items flag on the site unless that's is what you mean in setting to lair(due to I guess lairs only have certain tiles allowed for the ability to store items like how you have to be inside the place to store, and that embarking over it kinda wipes that code out). unless you meant Dflair goes and checks off 14-blood on every tile in the site then I don't get why this utility is wonky compared to the other two which could do it.

Oh and in DFmode news coming back to a Multi race fort can lead to some hassles like re-running the friendship (Dfusion) command over again to untame the members of the fort.
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

raoulxq

  • Bay Watcher
    • View Profile
Re: DFHack 0.5.13
« Reply #1242 on: April 13, 2011, 07:41:12 am »

Question:

Does anybody have an idea about how to find out if creatures are "known", i.e. show up when hitting the key u?

Also is there a flag if a creatures belongs to the player? Listing all dwarfs also lists merchants etc. I could explicitly exclude merchants though.

I've looked at Creatures.flags1 and Creatures.flags2, but there is nothing obvious there...
Logged

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: DFHack 0.5.13
« Reply #1243 on: April 13, 2011, 09:05:30 pm »

Oh found out that menu, managing(3,0) is reclaim mode. Though you do not want to swap over to this mode for it doesn't address the title of the site nor allow any old member of the site to be playable via removing the Is resident flag.
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

jaxad0127

  • Bay Watcher
    • View Profile
Re: DFHack 0.5.13
« Reply #1244 on: April 13, 2011, 10:18:06 pm »

Question:

Does anybody have an idea about how to find out if creatures are "known", i.e. show up when hitting the key u?

Also is there a flag if a creatures belongs to the player? Listing all dwarfs also lists merchants etc. I could explicitly exclude merchants though.

I've looked at Creatures.flags1 and Creatures.flags2, but there is nothing obvious there...
"Known": try this: are they in a visible square and do they not have the ambush flag set?
Owned: check civ against Dwarf civ and make sure the merchant and diplomat bits aren't set (to handle your civ's merchants/diplomats)

I may have forgotten some, but this is a start.

Edit: forgot about diplomats
« Last Edit: April 13, 2011, 10:20:18 pm by jaxad0127 »
Logged
Pages: 1 ... 81 82 [83] 84 85 ... 108