Bay 12 Games Forum

Please login or register.

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

Author Topic: DFHack: quickfort | buildingplan | blueprint | blueprints/library  (Read 85118 times)

myk

  • Bay Watcher
    • View Profile
Re: DFHack script: quickfort
« Reply #60 on: August 30, 2020, 07:59:16 pm »

I took a stab at dig priorities: https://github.com/DFHack/scripts/pull/190
Please take a look at the pull request (if you like looking at code : ) and comment if the implementation doesn't match your expectations.

The syntax for dig blueprints is now [letter][number] where if the letter is not specified, 'd' is assumed, and if number is not specified, 4 is assumed.

expansion syntax is the same.

examples:
d = dig this tile at priority 4
d1 = dig this tile at priority 1
1 = dig this tile at priority 1
d7(50x50) = dig this giant block at priority 7

lethosor is currently converting the quickfort user manual from markdown to reStructuredText (the format that the rest of DFHack's documentation is written in), so I don't want to make any changes there right now.  I'll document this feature when he's done.
« Last Edit: August 30, 2020, 08:16:29 pm by myk »
Logged

myk

  • Bay Watcher
    • View Profile
Re: DFHack script: quickfort
« Reply #61 on: August 31, 2020, 12:07:33 am »

I uploaded them separately as well, if you would prefer.

Thanks! I've been looking through them. There are a lot in there, even only considering the bedrooms! Do you have an opinion on which are the most useful? Every file we add makes the library list more confusing. I'd like to be selective about what we add.

I did implement searching for the quickfort list command (and gui), but that only helps if you know what you're looking for. I'd like to keep the library distributed with DFHack small enough that it's not overwhelming for a newbie -- say, 30 files. We can always add links in the documentation to places where people can find more.
Logged

myk

  • Bay Watcher
    • View Profile
Re: DFHack script: quickfort
« Reply #62 on: September 04, 2020, 07:28:14 pm »

Ok, I wrote up a guide for advanced blueprints. It's a little longer than I expected it would be, and the audience is probably smaller than the rest of the user guide, but I'm hoping it will be useful to the "serious blueprinters" out there!

I'm planning on getting it properly reviewed and merged into the user guide once lethosor migrates it to RST format, but here's a first draft:

Spoiler (click to show/hide)

the links got lost when I pasted it in, but this is the important one:
Dreamfort blueprints: https://drive.google.com/drive/folders/1iS90EEVqUkxTeZiiukVj1pLloZqabKuP
Logged

A_Curious_Cat

  • Bay Watcher
    • View Profile
Re: DFHack script: quickfort
« Reply #63 on: September 04, 2020, 11:31:57 pm »

Neither of those files contains any blueprints.  The first one contains what appears to be the start of a Dreamfort walkthrough, and the other one purports to be for a guildhall, but (like the first one) doesn't contain any actual blueprints.
Logged
Really hoping somebody puts this in their signature.

myk

  • Bay Watcher
    • View Profile
Re: DFHack script: quickfort
« Reply #64 on: September 05, 2020, 12:19:11 am »

Sharing settings are hard, apparently. Do all 7 files appear in the folder now? The first sheet in each file, by the way, is just notes and help text. The blueprints are in additional sheets. Use the tabs at the bottom of the page to switch sheets in the spreadsheet. dreamfort_0_help is just the one sheet with mostly text, though. It is actually a blueprint with no content, just metadata. It's the help text that gets displayed in-game for Dreamfort.

Edit: I verified everything in incognito mode. All blueprints should now be accessible.
« Last Edit: September 06, 2020, 02:54:07 pm by myk »
Logged

myk

  • Bay Watcher
    • View Profile
Re: DFHack script: quickfort
« Reply #65 on: September 09, 2020, 04:03:30 pm »

There is one particular feature that python quickfort had that I haven't implemented yet. The old quickfort would accept blueprints that had no modeline and interpret them as #dig blueprints. I didn't implement this for a few reasons:
  • I didn't want .xlsx sheets that didn't contain blueprints to throw errors (like sheets that just contain notes about the blueprints in the other sheets)
  • I was worried that "modeless" blueprints would make having multiple blueprints in the same sheet or .csv file confusing
  • The "fix" is easy: you just add a #dig line to the top
  • I had no data on whether anyone used this feature anyway
But looking through the blueprint library that Zalthor was so kind to upload, I see there are quite a few modeless blueprints in there. This, plus a comment lethosor made when I first implemented dig mode, made me rethink my position. Backwards compatibility is very important, and I don't want to break any blueprints that were working before.

So this is my new plan:
- if the first line of a .csv file or spreadsheet sheet has no modeline, assume #dig. that blueprint will run until the next modeline in the file, just like a regularly-specified blueprint
- introduce a new mode: #notes which can contain any text, will not show up in quickfort list, and will run until the next blueprint modeline is detected. we already have #comment syntax for inline comments. #notes mode will essentially act as a block comment.

Then I'll just convert all the "Notes" sheets in the Dreamfort blueprint set to #notes "blueprints". This has the added benefit that I can stop filtering those sheets out when I convert the .xlsx data to .csv for the DFHack blueprint library dreamfort.csv file. The notes will now be available in the .csv file if anyone goes spelunking in there to look for them.
Logged

myk

  • Bay Watcher
    • View Profile
Re: DFHack script: quickfort
« Reply #66 on: September 13, 2020, 05:01:29 pm »

I'm making progress on all-buildings support in buildingplan. I'm hoping to get it done before quickfort is officially released in -r3 since it will be such a usability improvement, but we'll see.

The one thing this script *really* needs, though, is some playtesting, especially by people who are not me -- since my "style" is already fairly well tested. For the readers out there (and from the view count I know there are a lot of you), would you be willing to download the latest unstable automated build and try running a few of your favorite blueprints? I would really appreciate it! It would help me get the "facepalm" bugs out of the way before the script is exposed to a wider audience.
Logged

PeridexisErrant

  • Bay Watcher
  • Dai stihó, Hrasht.
    • View Profile
Re: DFHack script: quickfort
« Reply #67 on: September 15, 2020, 08:45:31 pm »

Are the bedroom blueprints online somewhere I can check them out? Are they from https://github.com/joelpt/quickfort/tree/master/Blueprints ?
No, they're in the ...\LNP\utilities\Quickfort\blueprints folder from the PeridexisErrant's Starter Pack.

I uploaded them separately as well, if you would prefer.

Also available from https://dffd.bay12games.com/file.php?id=8185, if that would help... though for the last ~three years or so they've been packaged up with the Quickfort implementation I've shipped.

Personally I'm super excited to change over to the plugin implementation, but I'll probably keep shipping the Python version until it breaks since some people prefer to play without DFHack (strange, but true!).
Logged
I maintain the DF Starter Pack - over a million downloads and still counting!
 Donations here.

myk

  • Bay Watcher
    • View Profile
Re: DFHack script: quickfort
« Reply #68 on: September 17, 2020, 04:27:15 am »

Thanks! I'm still looking though all the blueprints, trying to figure out exactly what the role of the DFHack blueprint library should be. Which blueprints should be adopted into the "core" library and which should be add-ons? I definitely want Dreamfort in the DFHack library since it is the main example for all of quickfort's features, and I want the core library to be small enough so that it isn't overwhelming, but the only other requirement I see for the core library blueprints is that they are generally useful. I'd appreciate your thoughts on this.

Quickfort reads user blueprints from the blueprints/ directory and library blueprints from the blueprints/library/ directory. Which do you think LNP should add its blueprints to? The difference is that library blueprints don't show up in the quickfort list output unless the -l or --library parameters are specified, which I think is appropriate for LNP blueprints so they won't crowd out user-created blueprints in the list output, but might make them less discoverable. Maybe install them in blueprints/library/LNP?
Logged

PeridexisErrant

  • Bay Watcher
  • Dai stihó, Hrasht.
    • View Profile
Re: DFHack script: quickfort
« Reply #69 on: September 19, 2020, 03:21:51 am »

I'd default to sticking them in the library directory - to help with discoverability, how about adding a hint line like "[and list NN more with `quickfort list --library`]" as the last line of default output? 
Logged
I maintain the DF Starter Pack - over a million downloads and still counting!
 Donations here.

myk

  • Bay Watcher
    • View Profile
Re: DFHack script: quickfort
« Reply #70 on: September 21, 2020, 06:03:50 pm »

That's a good idea. I have something similar for searches ("45 blueprints did not match filter"), but I hadn't thought about making the library more discoverable that way too. I'll add that to my todo list.

In other news, I've finished generalizing the code in buildingplan plugin so it can handle all building types. It actually runs much faster than the old code - 100 to 1000 times faster - but you're unlikely to notice unless your fort is very large with lots of items. So unless something comes up in code review, that's done. Yay ^_^

edit: actually, not quite done. need to update the buildingplan UI to handle buildings that have multiple input items.
« Last Edit: September 25, 2020, 04:31:45 pm by myk »
Logged

myk

  • Bay Watcher
    • View Profile
Re: DFHack script: quickfort
« Reply #71 on: September 26, 2020, 12:42:47 am »

Ok, getting the ui to handle multiple items took some work, but it's functional now. C++ is finicky about how constness works, and that required some jumping through language hoops. Like, it's very difficult to have a non-mutable container of mutable objects. C++ forces the objects to inherit the constness of their container, which required a custom wrapper, which required a..ok enough ranting.

Anyway, here are the visible changes coming to buildingplan:
  • all buildings that dfhack can build (that is, everything except instruments, offering places, bookcases, and display furniture) that require materials is now supported
  • if there are multiple item types required for a building, you can ctrl-left and ctrl-right among them to set/view filters for each one
  • new labels so you can tell which item you're setting filters for
  • quickfort mode (which isn't needed at all for the dfhack quickfort script, but is still necessary to support users of the old Python quickfort) can now be enabled without manually enabling buildingplan first for some random building type just so the option is visible

And it's also like 100x faster, but buildingplan was already mostly "fast enough" so you probably won't notice it.

The algorithm is generalized so that when new building types become supported by the dfhack library, buildingplan will automatically pick them up.
« Last Edit: September 26, 2020, 01:43:20 am by myk »
Logged

myk

  • Bay Watcher
    • View Profile
Re: DFHack script: quickfort
« Reply #72 on: September 27, 2020, 11:56:54 pm »

I'd default to sticking them in the library directory - to help with discoverability, how about adding a hint line like "[and list NN more with `quickfort list --library`]" as the last line of default output?

done in PR#200
Logged

PeridexisErrant

  • Bay Watcher
  • Dai stihó, Hrasht.
    • View Profile
Re: DFHack script: quickfort
« Reply #73 on: September 28, 2020, 03:45:17 am »

☼pull request☼

(I remain very, very excited for a DFHack release which includes this  :D)
Logged
I maintain the DF Starter Pack - over a million downloads and still counting!
 Donations here.

danaris

  • Bay Watcher
    • View Profile
Re: DFHack script: quickfort
« Reply #74 on: September 28, 2020, 11:34:21 am »

And I'm very excited to see this idea of mine from several years ago (that I was never able to do justice to) finally take form! You've done an amazing job, myk.
Logged
Pages: 1 ... 3 4 [5] 6 7 ... 29