Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 13 14 [15] 16 17 ... 24

Author Topic: DFHack plugin embark-assistant  (Read 100620 times)

PatrikLundell

  • Bay Watcher
    • View Profile
Re: DFHack plugin embark-assistant
« Reply #210 on: June 03, 2020, 12:28:46 pm »

I believe everything Embark-Assistant looks for exists at the start of history (it's trickier during the world gen part). Some things may change during history, though. I know Evilness and Savagery can change, and obviously neighbors can as well (if the Kobolds are wiped out they won't be neighbors anymore, and a civ settling or conquering one may come into range).  Obviously, the number of neighboring necro towers will change during history.
Evil effects may change as well, at least 100% tree death seems to be introduced to a whole region at a time (affecting only evil parts, but that's the whole region if it was evil originally), although that's not reported by Embark-Assistant, and effects introduced by spreading evil will obviously only affecting areas while they are covered by that evil.
I can't think of any other changes happening off the top of my head, though. Erosion cycles take place during world gen, not history, so the geography, geo biomes, and regions shouldn't change with respect to biomes. I assume creatures (and possibly plants) can go extinct during history, but, again, Embark-Assistant doesn't cover those.
Logged

RedDwarfStepper

  • Bay Watcher
    • View Profile
Re: DFHack plugin embark-assistant
« Reply #211 on: June 06, 2020, 05:25:22 pm »

Hi there, I'm going through my incursion code from last night (yeah, it was late) cleaning up bugs and I think I found some bug predating my changes, looks like a copy-and-paste error, in fact two of them:
https://github.com/DFHack/dfhack/blob/f20446534bb7f39425e102bd70daec46e328004f/plugins/embark-assistant/survey.cpp#L1604
https://github.com/DFHack/dfhack/blob/f20446534bb7f39425e102bd70daec46e328004f/plugins/embark-assistant/survey.cpp#L1660
Shouldn't it be
Code: [Select]
adjust_coordinates(&effective_x, &effective_y, &effective_i, &effective_k);instead of
Code: [Select]
adjust_coordinates(&effective_x, &effective_y, &effective_i, &effective_i);?
Logged

PatrikLundell

  • Bay Watcher
    • View Profile
Re: DFHack plugin embark-assistant
« Reply #212 on: June 07, 2020, 01:30:07 am »

Yes, using effective_i twice is definitely wrong, and the second instance should be effective_k, as suggested.
Logged

Schmaven

  • Bay Watcher
  • Abiding
    • View Profile
Re: DFHack plugin embark-assistant
« Reply #213 on: June 27, 2020, 11:58:24 am »

I just used the embark assistant for the first time in this new version (my previous fort has been on a good run), and the new search is awesome!  Just wanted to say keep up the great work!
Logged

RedDwarfStepper

  • Bay Watcher
    • View Profile
Re: DFHack plugin embark-assistant
« Reply #214 on: June 29, 2020, 03:30:20 pm »

I might have stumbled over another bug....
Have a look here
https://github.com/DFHack/dfhack/blob/ee56d8157f62e5161f6248d9329d30e0c0ab314e/plugins/embark-assistant/survey.cpp#L1642
Declaring those 4 "*_region_type_level" as uint8_t results in an overflow (to 255/254) if a negative value is being assigned
which happens here
https://github.com/DFHack/dfhack/blob/ee56d8157f62e5161f6248d9329d30e0c0ab314e/plugins/embark-assistant/survey.cpp#L1748
and here
https://github.com/DFHack/dfhack/blob/ee56d8157f62e5161f6248d9329d30e0c0ab314e/plugins/embark-assistant/survey.cpp#L1754
This can lead to faulty _active flags which finally results in a wrong return value from the method.
At least nw_*, n_* and w_* should be int8_t, but for the sake of consistency it's easier have all 4 them be signed. Also the code could get changed later to assign a negative value to home_region_type_level as well, which might never happen, but still.
Logged

PatrikLundell

  • Bay Watcher
    • View Profile
Re: DFHack plugin embark-assistant
« Reply #215 on: June 30, 2020, 02:14:21 am »

Yes, that's clearly faulty. Thanks.
Logged

A_Curious_Cat

  • Bay Watcher
    • View Profile
Re: DFHack plugin embark-assistant
« Reply #216 on: June 30, 2020, 10:22:56 pm »

I've got a question...

I've been using embark-assistant and I think it's really good.

The problem is that I have to gen countless worlds and run embark-assistant manually on each one.  so far I've spent the past week genning world after world, and none have had any acceptable embarks in them.

I know that there is a way to get DF to generate multiple worlds through the command line.

What I am wondering is if there is any way to generate multiple worlds and check them with embark-assistant automatically.  That way I could set it to generate and check fortresses while I sleep and (hopefully) wake up to a world with a suitable embark.

Also, it would be nice if you could expand the functionality for saving and loading search parameters so that sets of parameters could be saved and loaded by name.

Thank you.
Logged
Really hoping somebody puts this in their signature.

PatrikLundell

  • Bay Watcher
    • View Profile
Re: DFHack plugin embark-assistant
« Reply #217 on: July 01, 2020, 04:03:02 am »

The Embark Assistant currently supports a single profile that can be saved and loaded. You can manually switch between multiple saved profiles by shuffling the names of the file containing the profile (i.e. renaming the "old" one, generate a new one, rename the new one to something else, and then rename the old one back to the name used by the plugin-in.

The plugin also has an optional command line parameter that causes it to load the profile, perform a search, and generate a file containing the number of matches. From there is up to you (or someone else) to generate the rest, i.e. a harness that generates worlds, initiates a search, and evaluates the search result file contents. You might try to contact Telear (earlier in the thread) to see if a suitable harness has been developed.
Logged

A_Curious_Cat

  • Bay Watcher
    • View Profile
Re: DFHack plugin embark-assistant
« Reply #218 on: July 01, 2020, 10:07:12 am »

Interesting.

Had to dig into the code to find out where the file it generates is (turns out its in "data/init/embark_assistant_fileresult.txt").

I think this may be enough to get started.

Thank You!
Logged
Really hoping somebody puts this in their signature.

PatrikLundell

  • Bay Watcher
    • View Profile
Re: DFHack plugin embark-assistant
« Reply #219 on: July 01, 2020, 10:11:11 am »

The file location should be documented on the help pages.
Logged

A_Curious_Cat

  • Bay Watcher
    • View Profile
Re: DFHack plugin embark-assistant
« Reply #220 on: July 01, 2020, 10:23:24 am »

Ouch!  I tried using load-save to load the region from the command line but it looks like it only works for worlds that have already been embarked upon.  I did a quick search of the DFHack documentation but I couldn't find anything that would let me load a new world from the command line.  Am I missing something?

Also, the documentation for load-save has an improper example. 
The example says "./dfhack +load-game region1" when it should say "./dfhack +load-save region1".

Edit:

"./dfhack +embark-assistant fileresult" doesn't seem  to work either.

Does anyone know how to get from the linux command line to the "embark site selection phase" automatically?
« Last Edit: July 01, 2020, 10:29:08 am by A_Curious_Cat »
Logged
Really hoping somebody puts this in their signature.

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack plugin embark-assistant
« Reply #221 on: July 01, 2020, 01:04:50 pm »

Ouch!  I tried using load-save to load the region from the command line but it looks like it only works for worlds that have already been embarked upon.  I did a quick search of the DFHack documentation but I couldn't find anything that would let me load a new world from the command line.  Am I missing something?

Edit:

"./dfhack +embark-assistant fileresult" doesn't seem  to work either.

Does anyone know how to get from the linux command line to the "embark site selection phase" automatically?
It's possible, but due to the asynchronous nature of loading a world, it's complicated - probably more complicated than the load-save script. I'm not aware of an existing script that supports this at the moment.


Quote
Also, the documentation for load-save has an improper example. 
The example says "./dfhack +load-game region1" when it should say "./dfhack +load-save region1".

Yikes, that's a 4-year-old typo. Fixed. The DFHack thread would be a better place to report things like that in the future, though, since it's not specific to embark-assistant.
Logged
DFHack - Dwarf Manipulator (Lua) - DF Wiki talk

There was a typo in the siegers' campfire code. When the fires went out, so did the game.

PatrikLundell

  • Bay Watcher
    • View Profile
Re: DFHack plugin embark-assistant
« Reply #222 on: July 01, 2020, 01:35:18 pm »

Thanks lethosor, those this is something I have no knowledge about.
Logged

A_Curious_Cat

  • Bay Watcher
    • View Profile
Re: DFHack plugin embark-assistant
« Reply #223 on: July 01, 2020, 02:46:47 pm »

Btw, if I specify more than one biome (e.g. setting both biome1 and biome2), does it check to make sure the embark has both biomes or does it check that there is at least one?
Logged
Really hoping somebody puts this in their signature.

PatrikLundell

  • Bay Watcher
    • View Profile
Re: DFHack plugin embark-assistant
« Reply #224 on: July 01, 2020, 04:46:06 pm »

It requires both. There's the more general region type covering a number of cases where you want one of a range (e.g. "any type of forest"). Each condition is on top of all the others except where stated specifically (there are some enumerated ones where alternatives specify various combinations, and there's special logic for evilness/savagery). It's mostly a case of me not being able to figure out how to display combinations of AND and OR conditions given the UI constraints.
Logged
Pages: 1 ... 13 14 [15] 16 17 ... 24