Bay 12 Games Forum

Please login or register.

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

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

Logical2u

  • Bay Watcher
    • View Profile
Re: DF Auto Site Locator
« Reply #60 on: July 02, 2008, 04:28:44 pm »

So far it's giving me "region is not embarkable" as a common theme here... even on an embarkable coastline. I'll edit once it hits adamantine.

Edit: It's saying every tile is not embarkable. Every grassy plains. No custom tilesets.
« Last Edit: July 02, 2008, 04:33:24 pm by Logical2u »
Logged
This account is defunct - please contact me through other means.

zagibu

  • Bay Watcher
    • View Profile
Re: DF Auto Site Locator
« Reply #61 on: July 02, 2008, 05:27:02 pm »

Okay, what happens if you comment out the embarkability check at the start of the scanMap() function (the comments are already prepared, just remove the ; in front of them)?
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!

Logical2u

  • Bay Watcher
    • View Profile
Re: DF Auto Site Locator
« Reply #62 on: July 02, 2008, 05:41:34 pm »

Repeated popups of "Entered in adamantium check branch".

Oh, and that's over mountain tiles too.
Logged
This account is defunct - please contact me through other means.

zagibu

  • Bay Watcher
    • View Profile
Re: DF Auto Site Locator
« Reply #63 on: July 02, 2008, 06:03:12 pm »

I just had an idea: what kind of desktop-resolution do you have? 16, 24 or 32 bit?
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!

Logical2u

  • Bay Watcher
    • View Profile
Re: DF Auto Site Locator
« Reply #64 on: July 02, 2008, 08:14:42 pm »

32bit colour, on 1280x1024 resolution.
Logged
This account is defunct - please contact me through other means.

zagibu

  • Bay Watcher
    • View Profile
Re: DF Auto Site Locator
« Reply #65 on: July 03, 2008, 04:42:46 am »

Could you please download this script: http://www.geocities.com/qrphome/asl_snapshot.zip , unpack it into the ASL folder, then navigate in DF to a tile with adamantium and run ths script? It should create a "snapshot" file in the ASL folder, please send this to me. User: zagibu, maildomain: gmx.ch.
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!

Logical2u

  • Bay Watcher
    • View Profile
Re: DF Auto Site Locator
« Reply #66 on: July 04, 2008, 04:36:29 pm »

Alright, the snapshot should be on the way.

Thanks for the help so far.
Logged
This account is defunct - please contact me through other means.

zagibu

  • Bay Watcher
    • View Profile
Re: DF Auto Site Locator
« Reply #67 on: July 04, 2008, 06:08:01 pm »

Drat, I can't find a hex editor that can display more than 512 bytes per line. Can you please check in which half of the region the adamantium is located? Then modify line 114 of the snapshot script and use "snapShot(10, 10, 48, 90, 432)" for the left half or "snapShot(10, 90, 48, 170, 432)" for the right half. And please resend me this new snapshot (which should be half the size of the previous).
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!

Logical2u

  • Bay Watcher
    • View Profile
Re: DF Auto Site Locator
« Reply #68 on: July 04, 2008, 09:06:59 pm »

Well, I forgot what square I captured... so I picked one where the adamantine is clearly on the right of the local square... attached in the next email.
Logged
This account is defunct - please contact me through other means.

zagibu

  • Bay Watcher
    • View Profile
Re: DF Auto Site Locator
« Reply #69 on: July 05, 2008, 04:07:22 am »

I see the problem. In your screenshot, a pixel has the format 0RGB, while in my patterns, it has 255RGB. Seems to be a problem with the alpha channel. I'll include a second set of patterns, and an option to switch the set in the script. Thanks for your help finding this problem.
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!

Logical2u

  • Bay Watcher
    • View Profile
Re: DF Auto Site Locator
« Reply #70 on: July 05, 2008, 09:14:29 am »

Hm, if there is a way to automate the process of selecting the RGB values, that might be for the best.

The explanation for this is probably due to a little program that came with my monitor known as LCD Gamma (or the colour correction systems on videocard drivers)...
Logged
This account is defunct - please contact me through other means.

zagibu

  • Bay Watcher
    • View Profile
Re: DF Auto Site Locator
« Reply #71 on: July 05, 2008, 01:59:43 pm »

Unfortunately, I don't really understand the screenshot part of the script. A kind user of the AutoIt forum has worked out for me the magic of taking a screenshot and returning it in a usable format.
BUT, we can still do this the hard way and create pattern sets for all possible combinations.
I've updated the script to include a pattern set that should work for you. Let me know if the script finds anything, when you set the pattern_set at 2.

http://www.geocities.com/qrphome/df_asl_v0.4.8.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!

Logical2u

  • Bay Watcher
    • View Profile
Re: DF Auto Site Locator
« Reply #72 on: July 05, 2008, 04:10:08 pm »

Alright! I'm finally getting outputs.

I re-enabled the screenshot part of the code, disabled embarkability test, set to 25 delay. Got the proper locations.

Now to re-enable embarkability and test that...

Edit: Embarkability still isn't working on my end, but it seems like adamantine testing is.
Logged
This account is defunct - please contact me through other means.

zagibu

  • Bay Watcher
    • View Profile
Re: DF Auto Site Locator
« Reply #73 on: July 07, 2008, 12:58:53 am »

That's because in the current version, embarkability is only checked before scanning the region at all. If you visit a new tile on the world map, the game automatically places the embark rectangle in a position that is embarkable by the player IF such a position exists. I use this fact as a quick way to determine whether it makes sense to do the scan at all. You can observe this on mountains and oceans, where the script passes almost 4 times as fast over tiles as it does in the plains. However, the script does NOT yet check if the found features can be fitted in an embark rectangle that is actually embarkable.

Yesterday, I have coded the beginning of the second-level scan, which will include stone layers. It interactively forms an embark rectangle according to the settings in the header of the script (max_area and max_sidelength) and positions it over all found features. And in this routine, I am doing the REAL embarkability test. It already works and it's quite funny to look at. There's also a lot of optimization potential there, I kinda took the quickest-to-code route, because I wanted to proof the concept.

I wasn't able to tidy everything up, though, so this is why you don't get the download yet. Maybe I have a chance to visit my apartment tomorrow noon, or perhaps I can use my father's computer again.
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!

Logical2u

  • Bay Watcher
    • View Profile
Re: DF Auto Site Locator
« Reply #74 on: July 07, 2008, 03:43:19 pm »

When I say embarkability still isn't working...

I mean that it's going to a tile that I can actually embark on and telling me I can't.

For example, grassy plains and the edges of mountain tiles.
Logged
This account is defunct - please contact me through other means.
Pages: 1 ... 3 4 [5] 6