Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 25 26 [27] 28 29

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

myk

  • Bay Watcher
    • View Profile
Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
« Reply #390 on: April 01, 2022, 11:28:23 pm »

Ok, building rotation and query blueprint cursor rotation are merged. I was worried that I would have to require blueprint authors to use different keywords for map cursor movements, like "MapCursorUp" and "MapCursorLeft" instead of the usual "Up", "Left", etc. Luckily, I could just do a simple check for whether the map is visible before sending each key to the UI (thank you, lethosor, for the suggestion!). For the viewscreens where the map is visible, I rotate the cursor keys according to any rotation applied to the parent blueprint. Easy peasy : )

Now I can finally get back to the two larger projects I've been planning: the blueprint overhaul and the interactive quickfort interface.

The blueprint plugin still needs a bit of work before I'm happy with it. I want it to capture a lot more map information than it is now.

And the quickfort interactive interface, that will just be really nice to be able to visually adjust the position of a blueprint before applying it. It will take a lot of the guesswork out of figuring out where to apply a blueprint.
Logged

myk

  • Bay Watcher
    • View Profile
Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
« Reply #391 on: April 08, 2022, 10:39:46 am »

Work on the UI is progressing nicely. You can load a blueprint and see a shadow on the map where the blueprint will do something, and any tiles that will not accept the changes the blueprint wants to make will flash in red. You can move the cursor around and the shadow will move with you, dynamically updating which tiles would accept the changes and which would not. Locking the position works too, allowing you to move the cursor around without moving the blueprint so you can inspect how the blueprint will be applied on different z-levels (for multi-level blueprints) or off to the sides of the current visible viewport (for very wide/tall blueprints).

I might stop here to clean up the code and get things merged. The UI is perfectly useful and usable at this point, and there were a number of bugs I fixed and behavior changes I made in the core DFHack Lua libraries that I'd like to get discussed, reviewed, and merged.

After that, the next steps for the UI are:
  • interactive blueprint transformations and repetitions
  • asynchronous preview refreshes

I wasn't sure if that last one would be necessary, but it looks like recalculating the shadow for large blueprints (like Dreamfort's /dig_all blueprint that designates digging for the entire fort) does noticeably slow the cursor down.
« Last Edit: April 08, 2022, 10:45:13 am by myk »
Logged

myk

  • Bay Watcher
    • View Profile
Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
« Reply #392 on: May 09, 2022, 06:47:36 pm »

So the new UI is in the latest release (DFHack 0.47.05-r5), but I totally forgot to add it to the release notes :! Oh well, there's more improvements to make anyway. I'll make a grand announcement for the next release ; )
Logged

ldog

  • Bay Watcher
    • View Profile
Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
« Reply #393 on: May 10, 2022, 10:08:09 pm »

So the new UI is in the latest release (DFHack 0.47.05-r5), but I totally forgot to add it to the release notes :! Oh well, there's more improvements to make anyway. I'll make a grand announcement for the next release ; )

Very cool! I love it.

Couple tweaks from playing:
Strand extraction should be done in Stonecrafter since the raw adamantine is going there and we don't want it carried halfway across the workshop by hand.
Metal thread needs to go to the bar/military feeder so that it can be used to make wafers (if locking down smelter input, see below). Will also keep it from being dyed.
I'm finding it essential to issue give orders for certain stockpiles to workshops-
Smelters, which are a pain because the list is long but metalworker quantum, ore/clay feeder, flux, coal, both melt piles to all smelters. Otherwise they haul from all over with no wheelbarrow.
Dyer from cloth/bones quantum & feeder. Also remove all refuse>hair/wool>except sheep, llama, alpaca, troll from the feeder. Add them to the trash feeder. While there seems to be no way to prevent useless hair from being woven in the farmers shop (unless you turn off all hair and forego wool) but you can at least keep it from being dyed. A bit of hair thread to get hospital started is good, after that it is a nuisance.
I've also had issues with the dye items condition being too high, 3 seems to work better since it counts bags instead of amount of dye. My issue is partially from using combine-plants, which means my dye bags have 12 units. I am starting to only use combine-drinks because of this.
Useful to put a storage pile under the dump on services level; since I have not found a way to prevent soldiers flinging their clothes all over and letting them rot, at least the stripowned will dump them here and they can be sent to trade depot and/or pulled back into feeders on industry level.

Might be others, I'm having some wierd issues again. Junk accumulating in wheel barrows. Also the cookable food pile will not use barrels. I have even deleted and recreated the pile. If I set the plants pile to take say meat, they will grab it all and put it in barrels there. 3 steel minecarts constantly being tasked but having no jobs. I've had them sitting in melt pile for some time now even since I got fed up trying to cart magma with them.

So it was exactly the wheelbarrow fuckup that was messing up the food pile, some assigned barrels were stuck in the mess. It was a huge amount of items being carted around for some reason.

Justice system is getting to be annoying as fuck. I am constantly prosecuting artifact thefts. I think it's time to add more jail cells, 2 more would fit easily on top at least.
Getting really sick of this bullshit. Lately I feel like every new feature is total crap.
I am debating the age old wisdom of the weak featherweight xbow wielding justice squad and thinking of going full hardass melee because I want these people dead. Just have to be careful watching the mandates so honest hard working dwarves don't get damaged.
On a side note, it was a lot of fun loading up one of your saves where shortly after unpausing the captain of the guard goes and rams his fist through someones head.

I'm also rethinking the overly comfy jail and other people going there to hangout, eat and drink. Mostly it's foreign scum doing long sentences; I could give a fuck less about their well-being and in fact since they don't hand over the artifacts when caught, if they end up dead then bonus. 1 room,mass chains and cages.

Guard captain's office should probably be on services level too since it is used for "interviews" , saves walking to/from noble level.
« Last Edit: May 15, 2022, 08:57:21 am by ldog »
Logged
Quote from: Dirst
For example, if you wanted to check if a unit was eligible to be a politician or a car salesman, you'd first want to verify that there is no soul present...

Quote from: gchristopher
The more appropriate question becomes, are they awesome and dwarven enough.

myk

  • Bay Watcher
    • View Profile
Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
« Reply #394 on: May 19, 2022, 07:58:44 pm »

Sorry for the slow reply. I've been getting more involved in the other areas of DFHack development and trying to prepare what we can for the Steam release.

Very cool! I love it.
Thanks! Once I get blueprint transformations in, gui/quickfort will be feature complete, and then I can work on performance issues for larger blueprints.

Quote
Strand extraction should be done in Stonecrafter since the raw adamantine is going there and we don't want it carried halfway across the workshop by hand.
done.

Quote
Metal thread needs to go to the bar/military feeder so that it can be used to make wafers (if locking down smelter input, see below). Will also keep it from being dyed.
done. this required an update to the common aliases file, so be sure to update that if pulling the new dreamfort.csv!

Quote
I'm finding it essential to issue give orders for certain stockpiles to workshops-
Smelters, which are a pain because the list is long but metalworker quantum, ore/clay feeder, flux, coal, both melt piles to all smelters. Otherwise they haul from all over with no wheelbarrow.
I feel your pain, but I'm going to hold off on this change for two reasons:
1) this can confuse players with cancellation spam
2) all those workshops will likely get replaced with magma versions at some point

Quote
Dyer from cloth/bones quantum & feeder.
Done. Also moved the dye from the goods quantum to the cloth quantum. Food won't rot in a refuse stockpile, just clothes and armor (according to the wiki)

Quote
Also remove all refuse>hair/wool>except sheep, llama, alpaca, troll from the feeder. Add them to the trash feeder.
I updated the "craftrefuse" alias to include this restriction for hair/wool. Thanks!

I'll address the rest in a bit. Changes are not yet checked in. I'll need to test a bit before merging.
« Last Edit: May 20, 2022, 01:46:47 pm by myk »
Logged

myk

  • Bay Watcher
    • View Profile
Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
« Reply #395 on: May 20, 2022, 11:34:41 am »

I've also had issues with the dye items condition being too high, 3 seems to work better since it counts bags instead of amount of dye.
done

Quote
Useful to put a storage pile under the dump on services level
done. I kept it unconfigured, though, so the simple workflow of unforbid all and haulers will grab things still works as expected.

Quote
On a side note, it was a lot of fun loading up one of your saves where shortly after unpausing the captain of the guard goes and rams his fist through someones head.
Ha! Is this the save on dffd right now? I didn't even notice that!

Quote
I think it's time to add more jail cells, 2 more would fit easily on top at least.

1 room,mass chains and cages.

Guard captain's office should probably be on services level too since it is used for "interviews" , saves walking to/from noble level.
How about combining these ideas into a room off the side of the barracks, above the hospital:
Code: [Select]
j ` ` ` j
` ` c ` `
v ` t ` v
` ` c ` `
j ` ` ` j

While I was there, I automated the creation of a tavern (residents only by default) in the grand hall and attached the rooms at the top as rented rooms. This will reduce some toil for those who want their tavern to attract visitors (they only have the restriction to change instead of having to set everything up from scratch) and will keep visitors from showing up by default so they don't overwhelm newer players.

I similarly automated the creation of a library and temple on the guildhall level, also both residents-only.
« Last Edit: May 21, 2022, 03:23:06 pm by myk »
Logged

myk

  • Bay Watcher
    • View Profile
Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
« Reply #396 on: May 22, 2022, 10:38:16 pm »

Two new scripts coming in the next release: gui/quantum, which creates quantum stockpiles for you, and assign-minecarts, which assigns minecarts to routes that don't have one already assigned. I wrote assign-minecarts to cut down on the manual steps required for Dreamfort -- for every quantum stockpile Dreamfort creates, you have to go assign a minecart manually. The new script can do that for you. Now newbies who don't know or care about hauling don't have to enter that confusing section of the menus.

gui/quantum came about because I saw someone on reddit who was complaining that quantum stockpiles were too hard to set up and I thought "this is a solved problem. there should be a gui for this." Both scripts use the quickfort API under the hood. The API is turning out to be much more useful than I thought it would be!
Logged

myk

  • Bay Watcher
    • View Profile
Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
« Reply #397 on: May 23, 2022, 07:04:34 pm »

Ok, PR is up for the Dreamfort improvements. Not sure if anyone wants to review, but I'll let it sit there for a few days just in case. Full list of improvements in the PR description.

Time to get some of my other PRs cleaned up and merged. I've got just a few too many open at the moment!
Logged

ldog

  • Bay Watcher
    • View Profile
Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
« Reply #398 on: May 23, 2022, 07:57:49 pm »

Ok, PR is up for the Dreamfort improvements. Not sure if anyone wants to review, but I'll let it sit there for a few days just in case. Full list of improvements in the PR description.

Time to get some of my other PRs cleaned up and merged. I've got just a few too many open at the moment!

All looks good. Took a break again from frustration with bugs, worst of which was a full on loyalty cascade out of nowhere.
So setting everything to no visitors would reduce the constant irritation they cause (not to mention strain on justice system)
Then the cushy jails ok I guess, although it seems like beatings are more common than incarceration for violating mandates.
Logged
Quote from: Dirst
For example, if you wanted to check if a unit was eligible to be a politician or a car salesman, you'd first want to verify that there is no soul present...

Quote from: gchristopher
The more appropriate question becomes, are they awesome and dwarven enough.

myk

  • Bay Watcher
    • View Profile
Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
« Reply #399 on: May 29, 2022, 12:11:57 am »

The PR is up for the last few missing elements of gui/quickfort: repetitions and transformations. It was tricky since there are no other scripts that do things like this, so I had to come up with new "UI concepts", which is always dangerous. You want a UI to behave in "expected" ways, and anything new risks confusing users.

For repetitions, you can toggle them on or off. If they're on, you can hit hotkeys to increment or decrement by 1 or 10 (with +-*/). Alternately, you can hit a different hotkey (R) to edit the number of repetitions directly. You might want to edit it directly if you're building a pump stack across 125 z-levels and it's much easier to hit R125{Enter} than it is to hit * 12 times and + 5 times.

However, this combination of 5 hotkeys and an edit field is unique, and I'm seeing if I can get some feedback from other devs to see if it's understandable.

Transformations, too, needed some UI innovation. You can toggle them on and off as well, and when they're on, you can hit ctrl+arrow keys to rotate and flip the blueprint around. As you apply transformations, the blueprint preview changes accordingly so you can see how it will look when applied.

Ctrl+Left rotates counterclockwise ("ccw"), Ctrl+Right rotates clockwise ("cw"), Ctrl+Up flips vertically ("flipv"), and Ctrl+Down flips horizontally ("fliph"). As you apply transformations, the list of what you've done appears on the screen next to the hotkey label, e.g. "cw, flipv"

An interesting thing about those transformations is that no matter how many you apply, an equivalent set of no more than two transformations can be found that does the same thing. For example, rotating clockwise twice and flipping horizontally (three operations) is the same as just flipping vertically (one operation).

Since there is very limited space on the UI to display the list of transformations that the user has applied, I do a quick search every time a new transformation is added to see if there is a shorter list of transformations that does the same thing. This prevents the UI from getting cluttered with 25 copies of "cw" strings and pushing the rest of the UI off the bottom of the screen. However, I'm worried that it will be confusing to users to see their transformation list being suddenly replaced with something that looks different. For example, hitting Ctrl+Right three times will show "cw", then "cw, cw", then just "ccw" (since rotating clockwise three times is the same as rotating counterclockwise once). Will people be confused? I don't know. Is there a better way? I'm open to ideas.

I considered just not putting the list on the screen at all, and letting the blueprint preview speak for itself, but I realized that users will need to know whether a transformation is being applied and what it is in case they have to apply several related blueprints with the same transformation.

I realize this whole diatribe could really use a screenshot. I'll get one up once I get back to the computer that can run the in-development script.
« Last Edit: May 29, 2022, 12:15:08 am by myk »
Logged

myk

  • Bay Watcher
    • View Profile
Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
« Reply #400 on: May 29, 2022, 06:38:40 pm »

Screenshot for the new gui/quickfort (preview is of the pump stack library blueprint repeated up 60 times (=120 levels)):



And while I'm at it, here's a screenshot for the new gui/quantum script creating a quantum stockpile that pulls from the highlighted feeder stockpile:

« Last Edit: May 29, 2022, 06:50:49 pm by myk »
Logged

A_Curious_Cat

  • Bay Watcher
    • View Profile
Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
« Reply #401 on: September 26, 2022, 03:18:36 pm »

Just set up a blueprint for a block of ten 3x3 bedrooms using gui/blueprint and gui/quickfort.  Looking good, so far!  However, it would be nice if there was a way to apply dig blueprints made using gui/blueprint in marker only mode.  Would that be possible to add?
Logged
Really hoping somebody puts this in their signature.

myk

  • Bay Watcher
    • View Profile
Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
« Reply #402 on: September 27, 2022, 01:13:17 am »

It would be better if it were a commandline parameter that you could use on the "quickfort run" commandline, but the current way to do this is to run

Code: [Select]
quickfort set force_marker_mode true
Then apply the dig blueprints you want in marker mode. Just remember to set the config value back to false when you want a non-marker mode designation again!
Logged

A_Curious_Cat

  • Bay Watcher
    • View Profile
Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
« Reply #403 on: September 27, 2022, 09:28:35 pm »

Another quick question: if I dig out an m x n area, smooth the walls, and then channel out 1 (or more) additional levels (removing ramps, dumping stones, and smoothing walls as I go), would blueprint and quickfort be able to handle that?
Logged
Really hoping somebody puts this in their signature.

myk

  • Bay Watcher
    • View Profile
Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
« Reply #404 on: September 27, 2022, 10:49:28 pm »

For the most part, yes, though since smoothing the walls will require everything to be done in a very specific order, blueprint won't help you much. Blueprint is just not designed for such nuance. You'd be better off writing the blueprint file manually. For example, you could put the following text in a file called vault.csv (m x n here is 5 x 3):

Code: [Select]
#dig step 1: dig the top level

,d(5x3)
#dig step 2: smooth the walls
s,s,s,s,s,s,s
s, , , , , ,s
s, , , , , ,s
s, , , , , ,s
s,s,s,s,s,s,s
#dig step 3: channel the floor

,h(5x3)
#dig bottom level: remove ramps

,z(5x3)
#dig bottom level: smooth walls and floor
s(7x5)

And just repeat steps 2 and 3 for each level of height that you want. Use gui/quickfort to apply the blueprints so you can more easily select the one you want from the list (the last blueprint you ran will still be selected so it's easy to choose the next one)
« Last Edit: September 27, 2022, 10:53:26 pm by myk »
Logged
Pages: 1 ... 25 26 [27] 28 29