Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 2 [3] 4 5 6

Author Topic: DF Auto Site Locator  (Read 7725 times)

zagibu

  • Bay Watcher
    • View Profile
Re: DF Auto Site Locator
« Reply #30 on: May 27, 2008, 11:22:00 am »

And another update to speed the script up a bit and allow a maximum value for the embark rectangle's side length in addition to it's area (to avoid 1x16 rectangles): http://www.geocities.com/qrphome/df_asl_v0.4.5.zip
Logged
99 barrels of beer in the pile
99 barrels of beer!
If some dwarves know the way to the pile
0 barrels of beer in the pile!

Shamasu

  • Bay Watcher
    • View Profile
    • http://world-of-dungeons.net/?link_eb_51408
Re: DF Auto Site Locator
« Reply #31 on: May 30, 2008, 02:08:00 pm »

Is there no way to extract the whole map from the game? The script so far works great, but it takes forever to scan one map.

EDIT: You should post some links for this script on the DFwiki

[ May 30, 2008: Message edited by: Shamasu ]

Logged

Inquisitor Saturn

  • Bay Watcher
    • View Profile
Re: DF Auto Site Locator
« Reply #32 on: May 30, 2008, 06:21:00 pm »

So how do I tell it which features I want?
Logged

Shamasu

  • Bay Watcher
    • View Profile
    • http://world-of-dungeons.net/?link_eb_51408
Re: DF Auto Site Locator
« Reply #33 on: May 31, 2008, 08:59:00 am »

I think that all you have to do is to edit the script file. Set what you want to yes, and what you don't want to ignore. Plus select the max size of the embark square.

[ May 31, 2008: Message edited by: Shamasu ]

Logged

zagibu

  • Bay Watcher
    • View Profile
Re: DF Auto Site Locator
« Reply #34 on: May 31, 2008, 12:52:00 pm »

@ Shamasu: What do you mean by "extract the whole map from the game"? The tool scans the local maps, not the world map. It would theoretically be possible to extract the data of the local maps and directly analyze it, but this is much more difficult than what the current script is doing, because you have to find out what is what in memory by doing lots of manual comparison operations.
Also, I simply don't have the knowledge to do it. Maybe the writer of the reveal-utility should be contacted with this request.

@ Inquisitor Saturn: Like Shamasu said, rightclick the script and select edit with scribe or whatever it's called (you can also open it in notepad or any other text-editor). There are some variables that need to be adjusted in the header of the script. Should be pretty self-explanatory.

[ May 31, 2008: Message edited by: zagibu ]

Logged
99 barrels of beer in the pile
99 barrels of beer!
If some dwarves know the way to the pile
0 barrels of beer in the pile!

MuonDecay

  • Bay Watcher
  • Say hello to my little μ
    • View Profile
Re: DF Auto Site Locator
« Reply #35 on: June 01, 2008, 10:04:00 am »

You know this is exactly the kind of fundamental program creation that puts you on the right path to churning out macro programs for chinese gold farmers...

you could make millions!!! (of copper coins)

Apologies for content-devoid post. Sleep deprivation.

Logged

Shamasu

  • Bay Watcher
    • View Profile
    • http://world-of-dungeons.net/?link_eb_51408
Re: DF Auto Site Locator
« Reply #36 on: June 03, 2008, 01:25:00 pm »

What I meant is, that the map must be saved someplace somehow right? If it would be possible to extract the map data from that (and I have no idea how feasible that would be), wouldn't that make the whole scanning process a lot faster?
Logged

LeoLeonardoIII

  • Bay Watcher
  • Plump Helmet McWhiskey
    • View Profile
Re: DF Auto Site Locator
« Reply #37 on: June 04, 2008, 11:03:00 am »

You could make the scan faster by doing what I do: scan the world map for mountain tiles, then run along the outside of the mountain scanning each local square. If a volcano appears anywhere on the world map, scan its local square too.

In the local square, have it center on the first desired feature the player marked and check the area 3 squares in all directions. Catalogue what you hit and see what it matches in the list of desired features. If you get all the desired features, export the region folder name and the coordinates to a text file for later perusal. If it doesn't match, move on.

Finally, somehow get it to tell DF to generate a new world with parameters right after it finishes checking the first one. That way you could leave the game running over the weekend and come back to a perfect 3x3 embark.

Logged
The Expedition Map
Basement Stuck
Treebanned
Haunter of Birthday Cakes, Bearded Hamburger, Intensely Off-Topic

zagibu

  • Bay Watcher
    • View Profile
Re: DF Auto Site Locator
« Reply #38 on: June 04, 2008, 12:29:00 pm »

@ Shamasu: Yeah, but the map is saved in human-unreadable format. To find out what is what, you'd have to manually compare different maps tile by tile and document the changes in memory. It's a chore really, and I also don't know how to do it exactly.

@ LeoLeonardoIII: Yup, sounds reasonable. Problem is, an algorithm tracking the sides of mountains and not missing any tile in complex mountain patterns is a non-trivial task. Just the "hole in the mountain" thing, where some kind of valley is completely enclosed by mountains provides quite the algorithmic challenge.
The automatic map-generation and scanning is feasible, though, and will probably be implemented in a later version. The distance-check already works very much like you described it. It's a bit more complex, and I'd say it's also faster and more flexible than your approach.

Logged
99 barrels of beer in the pile
99 barrels of beer!
If some dwarves know the way to the pile
0 barrels of beer in the pile!

Sinergistic

  • Bay Watcher
    • View Profile
Re: DF Auto Site Locator
« Reply #39 on: June 07, 2008, 08:15:00 pm »

Quick question/remark.

I'm just guessing here, but I assume this only works with the default DF install? No graphics packs of any kind? (Or at least, no graphics packs that modify the way the local map looks?).

Go about 10% through my first scan, and went 'oh... you know, I wonder if it's going to work'.

Gonna go download the default install and copy my map over, and run it on that, but I figured I'd ask to make sure.

Logged

Sinergistic

  • Bay Watcher
    • View Profile
Re: DF Auto Site Locator
« Reply #40 on: June 07, 2008, 09:44:00 pm »

Another question, as I've run this several times, and even when only looking for one thing, and ignoring the others, I don't get any locations.

Should 'blackscreen' be set to yes? As in, should I keep the game from stretching itself in fullscreen, or should I let it stretch?

Should the game res be set to anything specific?

Edit: Ok, apparently blackscreen should be set to off, because this time through, I got a crapload of locations. Thanks for the awesome tool, looking forward to using it now ^_^

[ June 07, 2008: Message edited by: Sinergistic ]

Logged

Grek

  • Bay Watcher
    • View Profile
Re: DF Auto Site Locator
« Reply #41 on: June 07, 2008, 11:21:00 pm »

Any chance of getting it to find caves?
Logged

zagibu

  • Bay Watcher
    • View Profile
Re: DF Auto Site Locator
« Reply #42 on: June 08, 2008, 07:34:00 am »

@ Sinergistic: Yeah, since it does and image-compare of the desired tiles and the found tiles, graphic packs that change the tiles in embark screen will render the script defunct.
Also, I have improved the description in the original post a bit. You should indeed not change the DF fullscreen-settings, because that could change the pixel size of the displayed tiles, and the desired tiles would then never match the found ones...

@ Grek: If information about caves is displayed on the embark screen, it is possible to include it in the script, yes.

Logged
99 barrels of beer in the pile
99 barrels of beer!
If some dwarves know the way to the pile
0 barrels of beer in the pile!

Kashyyk

  • Bay Watcher
  • One letter short of a wookie
    • View Profile
Re: DF Auto Site Locator
« Reply #43 on: June 12, 2008, 02:11:00 pm »

I tried it and it came up with this:

Failed to find locations to patch;perhaps the're already patched?

Logged

zagibu

  • Bay Watcher
    • View Profile
Re: DF Auto Site Locator
« Reply #44 on: June 20, 2008, 01:55:01 pm »

This is an error message of regional prospector and has nothing to do with my script. You only have to launch regional prospector once per DF session.
Logged
99 barrels of beer in the pile
99 barrels of beer!
If some dwarves know the way to the pile
0 barrels of beer in the pile!
Pages: 1 2 [3] 4 5 6