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

Put some stuff into boxes #35898

Closed
wants to merge 43 commits into from

Conversation

I-am-Erk
Copy link
Member

@I-am-Erk I-am-Erk commented Dec 6, 2019

Summary

SUMMARY: Content "Causes cardboard boxes to spawn more often along with item groups, rather than as an item *in* the group."

Purpose of change

#35876 closes #35795 but in a way I think is a bit unsatisfactory. The issue is that lists like mischw are distributions, which are zero-sum item spawning lists. If a cardboard box spawns in that list, it means actual useful hardware doesn't, and since those lists are generally used where we want content rather than junk to spawn, I was reluctant to flat bump-up spawning like that.

Describe the solution

distribution is a zero-sum spawn list, but collection is not. What we really want here is for mischw and similar supply lists to have a chance of spawning container items like cardboard, and a chance to spawn useful stuff. This has the side benefit of making it seem like these items are spawning 'in' the cardboard box, at least until such time as we have rational containers.

Describe alternatives you've considered

I briefly considered entirely rebalancing the lists to use a mix of collections and distributions more intelligently, but these lists are too general purpose for such a profound rebalance. What we really need is more Specific Use Storage groups for hardware stores and things.

Testing

Not yet.

Additional context

This is a demonstration currently. I could add more or leave it to others like @arijust to learn how to do this and expand the concept.

I-am-Erk and others added 30 commits November 20, 2019 16:56
…erRaven#35844)

* Remove professions with survivor armor, change Rescuer to fur armor

* Remove obsoleted profs from scenario options

* Obsolete collections, give rescuer utility vest for magazines
CleverRaven#35825)

* Add JSON field to delete flags in recipes
My initial incarnation of flag inheritance included an item flag that
completely disabled flag inheritance when that item was crafted.
In retrospect, that was a poor solution. It is too heavy-handed in
practice. For instance, it doesn't allow recipes to inherit one flag as
normal, while removing another. This solution should be more practical.

* Remove obsolete NO_CRAFT_INHERIT flag
The new "delete_flags" property of recipes does everything it used to do
and more.
Also replaced all uses of NO_CRAFT_INHERIT with delete_flags property.

* Change flags_to_delete from vector to set
As suggested by BevapDin.
* Rope and cordage overhaul

* Add extra comments about weight/length
Make FEMA evacuation pamphlet "looks_like": "newest_newspaper" instead "newspaper"
added Brioche where it makes sense as an ingredient
* Fix typo

* Add experimental product flavor
…aven#35857)

* update bird.json name, weight, volume

* update defense_bot.json name, volume, weight

* update drone.json name, abstract

* update fish.json name, weight, volume
* Fixed sidewalk generation for city buildings
* Add Difficulty to Dark Sight

Was originally zero. Justifying the value chosen by the clairvoyance spell, which gives you instantaneous 1 turn vision on all tiles in the aoe based on level. Clairvoyance has difficulty 4. Whereas Dark Sight gives encumbrance-free light amp vision for the same amount of time as a magical light spell. Compared to the Magical Lamp spell which generates regular light at difficulty 2, for the same amount of time. Comparing the distance you gain in vision from light amp, difficulty 6 seems justified.

* Add max level and 100 mana cost to Dark Sight

Set it at 20, like every other spell. Made the mana cost equivalent to Magical Light.
Kodiologist and others added 13 commits December 6, 2019 09:53
…rRaven#35886)

* add sound/deafness to labels and labels-narrow sidebar layouts

* attempt to appease clang-tidy
* Raise chance to get boxes in supplies_hardware.

* Raise change for medium_box in mischw group.

* Raise chances to get boxes.
…35813)

* JSONize flag taste modifiers
There was only a single flag that affected the "fun" value of
comestibles (BAD_TASTE) but I want to add more for a water sanitation
rework, so rather than hardcoding more, I JSONized the process.

Adds a new member variable to json_flag objects, "taste_mod," which
additively modifies the enjoyability of comestibles.
This is done via a new function, "item::get_comestible_fun". The MUSHY
flag check was moved there from Character::fun_for as well.
"item::get_comestible_fun" is of course called in "Character::fun_for",
so this commit shouldn't have any functional changes.

* Make "islot_comestible::fun" private
Anyone trying to query a comestible's "fun" should be using the new
"item::get_comestible_fun" method. This commit is to enforce that.

Of course, that had to be reconciled with the current usage of "fun".
I added "item" and "Item_factory" as friends of "islot_comestible" so
that "item::get_comestible_fun" and the function that sets "fun" still
have access to it.
All other queries of "fun" were instead changed to the new method.
This has the side-effect of applying BAD_TASTE and MUSHY effects in
places where they didn't before, including but not limited to:
- Interaction with taste blocker bionic.
- NPCs making decisions about faction food stocks.
- NPCs making decisions about whether they personally want food.
- Scavenging monsters deciding whether to eat food off the ground.

* Apply suggestions from code review

Co-Authored-By: BevapDin <[email protected]>

* Subjugate rogue tab (i.e. astyle)

* Fix merge mistake
@I-am-Erk I-am-Erk added Spawn Creatures, items, vehicles, locations appearing on map Items / Item Actions / Item Qualities Items and how they work and interact labels Dec 6, 2019
@I-am-Erk I-am-Erk closed this Dec 6, 2019
@I-am-Erk
Copy link
Member Author

I-am-Erk commented Dec 6, 2019

Grr, looks like my master needs some fixing.

@I-am-Erk I-am-Erk deleted the cardboard-boxes-galore1 branch April 20, 2022 23:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Items / Item Actions / Item Qualities Items and how they work and interact Spawn Creatures, items, vehicles, locations appearing on map
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Normal" cardboard boxes are absurdly rare