scripts
scripts copied to clipboard
[combine] reduce aggressiveness, increase feature set
Proposed changes:
- no more dynamic stack sizes; experience has shown that they tend to grow to absurd proportions
- limit containers to their advertised volume
- add handling of items inside built containers
- add handling of thread/cloth
- add handling of partial bars in smelters
- only combine non-plantable seeds
- the cheapest hospital thread will be chosen if possible to absorb the deductions, otherwise use the cheapest thread in the fort
discord discussion: https://discord.com/channels/793331351645323264/807444515194798090/1159933907538559016
proposed new hard limits:
local valid_types_map = {
all = { },
ammo = {[df.item_type.AMMO] ={type_id=df.item_type.AMMO, max_size=25}},
parts = {[df.item_type.CORPSEPIECE] ={type_id=df.item_type.CORPSEPIECE, max_size=1}},
drink = {[df.item_type.DRINK] ={type_id=df.item_type.DRINK, max_size=math.huge}}, -- max size governed by container capacity
fat = {[df.item_type.GLOB] ={type_id=df.item_type.GLOB, max_size=5},
[df.item_type.CHEESE] ={type_id=df.item_type.CHEESE, max_size=5}},
fish = {[df.item_type.FISH] ={type_id=df.item_type.FISH, max_size=5},
[df.item_type.FISH_RAW] ={type_id=df.item_type.FISH_RAW, max_size=5},
[df.item_type.EGG] ={type_id=df.item_type.EGG, max_size=5}},
food = {[df.item_type.FOOD] ={type_id=df.item_type.FOOD, max_size=20}},
meat = {[df.item_type.MEAT] ={type_id=df.item_type.MEAT, max_size=5}},
plant = {[df.item_type.PLANT] ={type_id=df.item_type.PLANT, max_size=5},
[df.item_type.PLANT_GROWTH]={type_id=df.item_type.PLANT_GROWTH, max_size=5}},
powder = {[df.item_type.POWDER_MISC] ={type_id=df.item_type.POWDER_MISC, max_size=10}},
seed = {[df.item_type.SEEDS] ={type_id=df.item_type.SEEDS, max_size=5}},
}
note that the seed
category is now explicitly non-plantable seeds. corpse part stack limit of 1 seems non-useful, so that should either be raised or the category should be removed.
@myk002 do you have a priority for some of these features? Some will take some time to do.
The top two are highest priority - limiting stack and container sizes
@myk002. I've reviewed the ask, and I think the rules for corpse pieces need further discussion. The stack size is 1, but the material amount is changed by combine, which is limited to 30.
for types that use creatures (race, caste): item.stack_size = the quantity of items. for types that use materials (race, caste, mat, mat ind): item.stack_size = 1 and item.material_amount holds the amount of teeth, etc. so size = 1 x material amount.
Examples: before: 1x25, 1x15, 1x5, 1x5, 1x5, 1x5 after: 1x30, 1x30
By doing this, combine is dropping unique attributes/characteristics of the body part; such as name, sex, age, shoe size etc. But these are dropped when the part is butchered or used, so it is minor impact.
What you propose sounds good to me. I think the loss of extended attributes is acceptable for body parts. This prevents them from being used as a target for deathcause
, but players are more likely to use deathcause
at the site of death. combine
will only act on them after the parts have been brought to a stockpile. I think this sounds like a good compromise.
The alternative is to just not combine body parts at all, but since I've never heard anyone complain about combine
's current behavior regarding this, I think we're fine.