Autonauts Modding
ModFood Class Reference
Inheritance diagram for ModFood:
ModCustom

Public Member Functions

void CreateFood (string UniqueName, string[] NewIngredientsStringArr=null, int[] NewIngredientsAmountArr=null, string ModelName="", bool UsingCustomModel=true)
 
- Public Member Functions inherited from ModCustom
void UpdateModelParameters (string UniqueName, float Scale=1f, float RotX=0f, float RotY=0f, float RotZ=0f, float TransX=0f, float TransY=0f, float TransZ=0f)
 
void UpdateModelScale (string UniqueName, float Scale=1f)
 
void UpdateModelScaleSplit (string UniqueName, float ScaleX=1f, float ScaleY=1f, float ScaleZ=1f)
 
void UpdateModelRotation (string UniqueName, float RotX=0f, float RotY=0f, float RotZ=0f)
 
void UpdateModelTranslation (string UniqueName, float TransX=0f, float TransY=0f, float TransZ=0f)
 
void RegisterForCustomCallback (string UniqueName, string CallbackType, DynValue Callback)
 

Member Function Documentation

◆ CreateFood()

void ModFood.CreateFood ( string  UniqueName,
string[]  NewIngredientsStringArr = null,
int[]  NewIngredientsAmountArr = null,
string  ModelName = "",
bool  UsingCustomModel = true 
)

Create a custom food item, one the player can pickup, move about and use as a food

Version
134.28
Parameters
UniqueName- String - The unique and corresponding name of the food - Required
NewIngredientsStringArr- String array - List of ingredients required to make the food - Defaults to none
NewIngredientsAmountArr- Number (integer) array - The amount of each of the ingredients (Must match size of ingredients array) - Defaults to none
ModelName- String - The name/path of the custom model to use or name/path of the in game model to use - Defaults to in game 'Apple' Model
UsingCustomModel- Boolean - True if using a custom model, false if using in game model/default model - Defaults to true
Returns
None
Example
ModFood.CreateFood("Cupcake") – Default Model
ModFood.CreateFood("Cupcake", {"Folk"}, {1})– Default Model
ModFood.CreateFood("Cupcake", {"Folk"}, {1}, "Models/Food/AppleJam", false) – In Game Model
ModFood.CreateFood("Cupcake", {"Folk"}, {1}, "Cupcake/Cupcake_v1", true) – Custom Model
Note
Can be used in functions: Creation()

The documentation for this class was generated from the following file: