- Found in:
- Workshop Framework
Description
Documentation Comment
Registers a Resource type ActorValue to produce a certain resource each day based on how much of that resource exists in a settlement. Similar to how Food and Water values cause settlements to create extra crops and water in the Workbench each day
Parameters:
LeveledItem aProduceMe - The leveleditem to produce. Note that 1 will be produced for each point of the resource found.
ActorValue aResourceAV - The ActorValue to check the settlement for. If you want workshop objects to be able to provide this resource, ensure the ActorValue you use/create is of the Resource type (it's a drop down menu on the Actor Value edit window in the CK), then on the workshop object add that actor value and the amount you want it to produce. You also need to add the ActorValue WorkshopResourceObject with a value of 1, which is how the game knows to grab that item when calculating total resources for the settlement.
Keyword aTargetContainerKeyword - [Optional] If you want to flag your produced items as a particular type, for example as food, set the matching container keyword (see the documentation regarding the Workshop Container system). You can also use this to force your items to be sorted into a particular container type in the Workshop Container system, assuming players are using said containers.
Parameters
LeveledItemaProduceMe
ActorValueaResourceAV
KeywordaTargetContainerKeyword=NONE
Examples
Auto-Generated Example
LeveledItem myLeveledItem__aProduceMe
ActorValue myActorValue__aResourceAV
Keyword myKeyword__aTargetContainerKeyword
WorkshopFramework:WSFW_API.RegisterResourceProductionType(myLeveledItem__aProduceMe, myActorValue__aResourceAV, myKeyword__aTargetContainerKeyword)