This repository was archived by the owner on Nov 3, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
CombinationDef
juanosarg edited this page Feb 3, 2022
·
7 revisions
Since the Item Processor code doesn't use the vanilla bills and recipes system, it needs a file that tells the game what a buildings does with certain inputs. This is the Combination def.
For an example of several CombinationDefs, you can check out our Vanilla Cooking Expanded mod here
//CombinationDefs are used for single and multiple slot buildings. They are the "recipes" of this system.
//They define a list of items as ingredients, and the resulting product, as well as yield
//Product quality increasing attributes are assigned here.
//This is to signal this is a single ingredient (slot) recipe. Unused. Kept here for compatibility with previous versions.
public bool singleIngredientRecipe = true;
//defName of the building accepting this combination of ingredients
public string building;
//A list of combination's ingredient defNames
public List<string> items;
public List<string> secondItems = null;
public List<string> thirdItems = null;
public List<string> fourthItems = null;
//A list of disallowed things (for category buildings)
public List<string> disallowedThingDefs = null;
//defName of the resulting product
public string result = "";
//This is used in cases where you can't easily get an items graphic because there are no unified rules
public bool resultUsesSpecialIcon = false;
public string resultSpecialIcon = "";
//This is used in cases where you want the result to be stuffed
public bool resultUsesStuffed = false;
public string resultStuff = "";
//yield of the resulting product
public int yield = 1;
//If it's a butchery recipe, calculate yield accordingly
public bool isButcheryRecipe = false;
public float efficiency = 1;
//If the recipe is nutritionGetter, amount will be the total nutrition needed. Ignores amount and instead uses nutritionAmount
public bool isNutritionGetterRecipe = false;
public List<float> nutritionAmount;
//Does this recipe accept output stack limit control?
public bool outputLimitControlled = false;
public int maxTotalOutput = 1;
//Amount of the ingredients
public List<int> amount;
//This defines the recipe as a category instead of single item one
public bool isCategoryRecipe = false;
//Does the product's quality increase with time?
public bool useQualityIncreasing = false;
//If not, what is the single time period to process the product?
public float singleTimeIfNotQualityIncreasing = 3;
//If so, what are the periods to advance to the next quality level (these are not cumulative, they are all from 0 to each number)?
public float awfulQualityAgeDaysThreshold = 1f;
public float poorQualityAgeDaysThreshold = 3f;
public float normalQualityAgeDaysThreshold = 8f;
public float goodQualityAgeDaysThreshold = 14f;
public float excellentQualityAgeDaysThreshold = 20f;
public float masterworkQualityAgeDaysThreshold = 50f;
public float legendaryQualityAgeDaysThreshold = 120f;
//Custom message to show when the product finishes being processed
public string finishedProductMessage = "IP_GenericProductFinished";
//Does this combination produce different products in each quality level?
public bool differentProductsByQuality = false;
//A list of products if this combination produces different products by quality level (it must have 7 items)
public List<string> productsByQuality = new List<string>();
New combination defs can be added via patching too. Imagine for example you want to add a new recipe that turns a new type of milk into a new type of cheese to the already existing Cheese Press in Vanilla Cooking Expanded. You can check an example here. NOTE that you'll also need to create an ItemAcceptedDef that allows insertion of that milk in the press! Only adding the recipe wouldn't do much.
- QuestNode_GetFaction
- Expandable projectiles
- Faction Def Extension
- Toggable patches
- Recipes Inheritance
- Adding new backstories
- Spawning things on new generated maps
- CompApparelHediffs
- CompShieldBubble
- CompHediffGiver
- CompLeavesSpawner & CompAutumnLeavesSpawner
- CompProperties_HomingProjectile
- ThoughtExtensions
- ExcludeFromQuestsExtension
- WeatherLetterExtensions
- WeatherOverlayExtension
- WeatherEffectsExtension
- ThingDefExtension
- Stuff commonality extension
- Biome extension
- PipeSystem basics
- Resource
- Resource storage
- Resource processor
- Resource to thing
- Resource to power
- Thing to resource
- Resource trader
- Refill building with pipes
- Pipe valve
- Exporting buildings
- Customizing symbols
- Debug helpers options
- Custom faction settlement
- Custom structure and scenarios
- Custom structure in quests
- Custom structure in WorldObjects
- Biome based structures
- Spawning world object(s) at world generation
- Prevent settlement spawning for nomadic factions
- Animal Behaviours Basics
-
Animal Behaviours Comp Classes
- Acid Attacks and Acid Immunity
- Animal Resources
- Animal Resources On Caravan
- Apply Hediff When Bound
- Asexual Reproduction
- Auto Nutrition
- Blink
- Build Periodically
- Cause Incident
- Change Def if Not Unique
- Change Weather
- Corpse Decayer
- Destroy This Item
- Die After Period
- Die And Change Into Another Def
- Dig Periodically
- Dig When Hungry
- Disease Event Immunity
- Disease Immunity
- Diseases After Period
- Doesn't flee
- Draftability
- Drop on Death
- Eat Weird Food
- Electrified
- Enrage Other Pawns
- Exploding Hatcher
- Extreme Xenophobia
- Fertilizer
- Filth Producer
- Fixed Gender
- Floating
- Gas Producer
- Give Thoughts On Caravan
- Graphic by Style
- Graphic by Terrain
- Hediff Effecter
- Hediff When Fleeing
- Highly Flammable
- Infecter
- Initial Ability
- Initial Hediff
- Initial Mental State
- Last Stand
- Light Sustenance
- Metamorphosis
- Mind Effecter
- Nearby Effecter
- No Taming Decay
- Passive Regenerator
- Pawn Overlay
- Produces no filth
- Refueling
- Regeneration
- State After Health Loss
- Summon On Spawn
- Swallow Whole
- Thought Effecter
- Untameable
- Animal Behaviours Hediff Comp Classes
- Animal Behaviours Damage Workers
- Animal Behaviours Def Extensions
- Animal Behaviours Extra Defs
- Animal Behaviours Misc