Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Camp crafting uses the normal crafting GUI #77715

Conversation

RenechCDDA
Copy link
Member

@RenechCDDA RenechCDDA commented Nov 10, 2024

Summary

Interface "Camp crafting uses the normal crafting GUI"

Purpose of change

Camp crafting is problematic in many ways. Accessing the recipes, manipulating them, seeing if they're available, etc.

image

We have a perfectly good crafting GUI already, why not use it?

Describe the solution

Use the existing crafting GUI.

We shove all the recipes and proficiencies from our camp's NPCs into a dummy, give them access to the camp inventory, and put them into the crafting window. We wait for the return value and instead of doing a normal crafting activity we craft like camps always used to, by off-mapping a chosen NPC.

Essentially we are borrowing the crafting GUI, with a few little changes to make it work for us.

Describe alternatives you've considered

Making the mission window searchable/filterable :^)

Testing

DRAFT

2024-11-09.19-46-39.mp4

The draft as posted does not work (inventory is not properly tallied, somehow) and it does not do anything with the recipe selected in the crafting window.

Additional context

Known issues:
The flow of recipe selection --> crafter selection is maybe not ideal

Can't see kcal display until after you select a recipe

Descriptions for camp-provided recipes are still loaded and sent for translation, but we don't use them

@github-actions github-actions bot added Info / User Interface Game - player communication, menus, etc. Crafting / Construction / Recipes Includes: Uncrafting / Disassembling [C++] Changes (can be) made in C++. Previously named `Code` Player Faction Base / Camp All about the player faction base/camp/site json-styled JSON lint passed, label assigned by github actions astyled astyled PR, label is assigned by github actions labels Nov 10, 2024
@RenechCDDA RenechCDDA force-pushed the npc_crafting_with_blackjack_and_hookers_and_especially_liquids branch 2 times, most recently from e2a4fbd to 27b298c Compare November 10, 2024 02:32
@RenechCDDA RenechCDDA force-pushed the npc_crafting_with_blackjack_and_hookers_and_especially_liquids branch from 27b298c to 8ee5bd0 Compare November 10, 2024 02:34
@github-actions github-actions bot added the [JSON] Changes (can be) made in JSON label Nov 10, 2024
@PatrikLundell
Copy link
Contributor

PatrikLundell commented Nov 10, 2024

Looks like a very intriguing idea, and I really hope it's successful. It would be a major improvement to base camp crafting.

And now comes the downer section with issues that will have to be dealt with at the tail end (view this as a reminder, rather than mistrust of the OP's abilities):

  • There's a small number of recipes available to companions only for base camps. As far as I know they all use the drop hammer built in some base camps and in the workshop expansions, but there may be additional ones. They'd need to be dealt with in some way, with the easiest one probably being to make them available to everyone (i.e. not companion only), and make them available through either skill levels or a book.
  • Make all functionality for the base camp (including expansions) available, not only regular tools and material. I think that would involve pseudo tools only, but I may be wrong, and it may already have been dealt with.
  • Get rid of all the recipe couplings of base camps and expansions as they're no longer used. That's just a cleanup thing, but there may be a need to review construction mission texts and possibly base camp setup as well, to get rid of obsolete references, so it might be a bit more work than it seems initially.

Edit:
I believe the drop hammer only exists as a pseudo tool currently, so it may have to be made into e.g. an appliance to work as a regular tool as well. It might be a good idea to deal with this special case as a separate PR (and not necessarily by the same author).

@RenechCDDA
Copy link
Member Author

My overall plan at this time was to move basecamp-specific recipes to their own crafting category, since otherwise they'll be very difficult to find.

I don't see a need to make (e.g.) drop hammer recipes generally available, they can still be provided by the basecamp expansions. If anything I wanted to expand on that - the expansions being able to provide access to recipes is a good thing.

One thing currently missing is the calorie cost display for crafting, I don't know how to deal with that. Maybe as a final query before you the mission starts.

@PatrikLundell
Copy link
Contributor

I disagree with you regarding expansion specific recipes, as my preference is to make bases and expansions optional, but I don't disagree violently with it.

If you've got trouble with calories you've probably also go problems with time, as the time given for normal crafting is work time, while the base camp craft time is given in calendar time, and if you've figured out how to intervene in the display of things to show one you've probably done most of the work for the other, as calendar time is derived from work time and calories from calendar time and exercise level.
Also note that both of these are modified by the number of people involved (as the number of time off periods can change a by up to one for each additional person assigned).

@RenechCDDA
Copy link
Member Author

RenechCDDA commented Nov 10, 2024

This is mostly working now, except batch selection is broken. I think I just missed a call to availability so that should be easy to squash. Batch was fixed, just as simple as I thought.

Translations I think will be dealt with by simply removing them.

Not aware of any other huge issues, but there may be problems found once it gets some general testing.

-Popups to inform about kcal costs/query to exit if you balked at the cost
-Remove some now-unused arguments
-Cleanup comments
-Clang BE SILENCED
-Fix batch crafting
@RenechCDDA
Copy link
Member Author

Ehhh translations look like it won't be so simple because we want to keep translations for the expansions, but discard them only for recipes. Both are loaded as recipe_group, so it's not simple.

I guess I can kick that can down the road (to maybe someone else) and mark this ready for review, huh? Let's see if it blows up.

@RenechCDDA RenechCDDA marked this pull request as ready for review November 10, 2024 19:01
@github-actions github-actions bot added the Missions Quests and missions label Nov 10, 2024
@RenechCDDA RenechCDDA force-pushed the npc_crafting_with_blackjack_and_hookers_and_especially_liquids branch from 8cb940d to 6c6a6ae Compare November 10, 2024 22:52
@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Nov 10, 2024
@RenechCDDA RenechCDDA force-pushed the npc_crafting_with_blackjack_and_hookers_and_especially_liquids branch from 6c6a6ae to aeefddb Compare November 11, 2024 05:22
@Maleclypse Maleclypse merged commit c7c024a into CleverRaven:master Nov 13, 2024
21 of 27 checks passed
@RenechCDDA RenechCDDA deleted the npc_crafting_with_blackjack_and_hookers_and_especially_liquids branch November 13, 2024 00:18
@Zireael07
Copy link
Contributor

Finally!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions [C++] Changes (can be) made in C++. Previously named `Code` Crafting / Construction / Recipes Includes: Uncrafting / Disassembling Info / User Interface Game - player communication, menus, etc. [JSON] Changes (can be) made in JSON json-styled JSON lint passed, label assigned by github actions Missions Quests and missions Player Faction Base / Camp All about the player faction base/camp/site
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants