Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PrefabFiles = {
- "esctemplate",
- "esctemplate_none",
- }
- Assets = {
- Asset( "IMAGE", "images/saveslot_portraits/esctemplate.tex" ),
- Asset( "ATLAS", "images/saveslot_portraits/esctemplate.xml" ),
- Asset( "IMAGE", "images/selectscreen_portraits/esctemplate.tex" ),
- Asset( "ATLAS", "images/selectscreen_portraits/esctemplate.xml" ),
- Asset( "IMAGE", "images/selectscreen_portraits/esctemplate_silho.tex" ),
- Asset( "ATLAS", "images/selectscreen_portraits/esctemplate_silho.xml" ),
- Asset( "IMAGE", "bigportraits/esctemplate.tex" ),
- Asset( "ATLAS", "bigportraits/esctemplate.xml" ),
- Asset( "IMAGE", "images/map_icons/esctemplate.tex" ),
- Asset( "ATLAS", "images/map_icons/esctemplate.xml" ),
- Asset( "IMAGE", "images/avatars/avatar_esctemplate.tex" ),
- Asset( "ATLAS", "images/avatars/avatar_esctemplate.xml" ),
- Asset( "IMAGE", "images/avatars/avatar_ghost_esctemplate.tex" ),
- Asset( "ATLAS", "images/avatars/avatar_ghost_esctemplate.xml" ),
- Asset( "IMAGE", "images/avatars/self_inspect_esctemplate.tex" ),
- Asset( "ATLAS", "images/avatars/self_inspect_esctemplate.xml" ),
- Asset( "IMAGE", "images/names_esctemplate.tex" ),
- Asset( "ATLAS", "images/names_esctemplate.xml" ),
- Asset( "IMAGE", "images/names_gold_esctemplate.tex" ),
- Asset( "ATLAS", "images/names_gold_esctemplate.xml" ),
- }
- AddMinimapAtlas("images/map_icons/esctemplate.xml")
- local require = GLOBAL.require
- local STRINGS = GLOBAL.STRINGS
- -- The character select screen lines
- STRINGS.CHARACTER_TITLES.esctemplate = "The Sample Character"
- STRINGS.CHARACTER_NAMES.esctemplate = "Esc"
- STRINGS.CHARACTER_DESCRIPTIONS.esctemplate = "*Perk 1\n*Perk 2\n*Perk 3"
- STRINGS.CHARACTER_QUOTES.esctemplate = "\"Quote\""
- STRINGS.CHARACTER_SURVIVABILITY.esctemplate = "Slim"
- -- Custom speech strings
- STRINGS.CHARACTERS.ESCTEMPLATE = require "speech_esctemplate"
- -- The character's name as appears in-game
- STRINGS.NAMES.ESCTEMPLATE = "Esc"
- STRINGS.SKIN_NAMES.esctemplate_none = "Esc"
- -- The skins shown in the cycle view window on the character select screen.
- -- A good place to see what you can put in here is in skinutils.lua, in the function GetSkinModes
- local skin_modes = {
- {
- type = "ghost_skin",
- anim_bank = "ghost",
- idle_anim = "idle",
- scale = 0.75,
- offset = { 0, -25 }
- },
- }
- -- Add mod character to mod character list. Also specify a gender. Possible genders are MALE, FEMALE, ROBOT, NEUTRAL, and PLURAL.
- AddModCharacter("esctemplate", "FEMALE", skin_modes)
- local food_stat_dict = {
- twigs = { sanity = 10 },
- monsterlasagna = { health = 25, sanity = -10, hunger = -10 },
- fishsticks = { health = 20, sanity = 20, hunger = 20 },
- --[[flint = { health = 1, sanity = 0, hunger = 15 },
- rocks = { health = 0, hunger = 5 },
- goldnugget = { hunger = 0 },
- nitre = { health = 5, hunger = 5 },
- moonrocknugget = { health = 0, sanity = 10, hunger = 5 },
- redgem = { health = 50, sanity = 0, hunger = 0 },
- orangegem = { health = 25, sanity = 0, hunger = 25 },
- yellowgem = { health = 0, sanity = 0, hunger = 50 },
- greengem = { health = 0, sanity = 25, hunger = 25 },
- bluegem = { health = 0, sanity = 50, hunger = 0 },
- purplegem = { health = 25, sanity = 25, hunger = 0 },
- opalgem = { health = 50, sanity = 50, hunger = 50 },
- thulecite = { health = 300, sanity = 50, hunger = 100 },]]--
- }
- for food_prefab, food_stats in pairs(food_stat_dict) do
- AddPrefabPostInit(food_prefab, function(inst)
- print(inst.components)
- print("test debug")
- inst.components.edible.healthvalue = food_stats["health"] or 0
- inst.components.edible.hungervalue = food_stats["hunger"] or 0
- inst.components.edible.sanityvalue = food_stats["sanity"] or 0
- end)
- end
Add Comment
Please, Sign In to add comment