Crestonia Posted January 28, 2015 Share Posted January 28, 2015 My character's prefab is fighting with me. I thought I did everything right, but it still crashes. I'm trying to make her have the knowledge like Wickerbottom, and level up with veggies, but it doesn't work.local MakePlayerCharacter = require "prefabs/player_common" local assets = { Asset( "ANIM", "anim/player_basic.zip" ), Asset( "ANIM", "anim/player_idles_shiver.zip" ), Asset( "ANIM", "anim/player_actions.zip" ), Asset( "ANIM", "anim/player_actions_axe.zip" ), Asset( "ANIM", "anim/player_actions_pickaxe.zip" ), Asset( "ANIM", "anim/player_actions_shovel.zip" ), Asset( "ANIM", "anim/player_actions_blowdart.zip" ), Asset( "ANIM", "anim/player_actions_eat.zip" ), Asset( "ANIM", "anim/player_actions_item.zip" ), Asset( "ANIM", "anim/player_actions_uniqueitem.zip" ), Asset( "ANIM", "anim/player_actions_bugnet.zip" ), Asset( "ANIM", "anim/player_actions_fishing.zip" ), Asset( "ANIM", "anim/player_actions_boomerang.zip" ), Asset( "ANIM", "anim/player_bush_hat.zip" ), Asset( "ANIM", "anim/player_attacks.zip" ), Asset( "ANIM", "anim/player_idles.zip" ), Asset( "ANIM", "anim/player_rebirth.zip" ), Asset( "ANIM", "anim/player_jump.zip" ), Asset( "ANIM", "anim/player_amulet_resurrect.zip" ), Asset( "ANIM", "anim/player_teleport.zip" ), Asset( "ANIM", "anim/wilson_fx.zip" ), Asset( "ANIM", "anim/player_one_man_band.zip" ), Asset( "ANIM", "anim/shadow_hands.zip" ), Asset( "SOUND", "sound/sfx.fsb" ), Asset( "SOUND", "sound/wilson.fsb" ), Asset( "ANIM", "anim/beard.zip" ), Asset( "ANIM", "anim/rosaleana.zip" ), Asset( "ANIM", "anim/ghost_rosaleana_build.zip" ),}local prefabs = {}local start_inv = {-- Custom starting items} local function applyupgrades(inst) local max_upgrades = 30local upgrades = math.min(inst.level, max_upgrades) local hunger_percent = inst.components.hunger:GetPercent()local health_percent = inst.components.health:GetPercent()local sanity_percent = inst.components.sanity:GetPercent() inst.components.hunger.max = math.ceil (150 + upgrades * 5) --300inst.components.health.maxhealth = math.ceil (100 + upgrades * 4) --220inst.components.sanity.max = math.ceil (90 + upgrades * 2) --150 inst.components.health:StartRegen(1, 11 - upgrades / 5) --1-5 inst.components.talker:Say("Level : ".. (inst.level)) if inst.level >29 theninst.components.talker:Say("Level : Max!")end inst.components.hunger:SetPercent(hunger_percent)inst.components.health:SetPercent(health_percent)inst.components.sanity:SetPercent(sanity_percent) end local function oneat(inst, food) --if food and food.components.edible and food.components.edible.foodtype == "HELLO" thenif food and food.components.edible and food.components.edible.foodtype=="VEGGIE" then --give an upgrade!inst.level = inst.level + 1applyupgrades(inst) inst.SoundEmitter:PlaySound("dontstarve/characters/wx78/levelup")--inst.HUD.controls.status.heart:PulseGreen()--inst.HUD.controls.status.stomach:PulseGreen()--inst.HUD.controls.status.brain:PulseGreen() --inst.HUD.controls.status.brain:ScaleTo(1.3,1,.7)--inst.HUD.controls.status.heart:ScaleTo(1.3,1,.7)--inst.HUD.controls.status.stomach:ScaleTo(1.3,1,.7)endendlocal function onpreload(inst, data)if data thenif data.level theninst.level = data.levelapplyupgrades(inst)--re-set these from the save data, because of load-order clipping issuesif data.health and data.health.health then inst.components.health.currenthealth = data.health.health endif data.hunger and data.hunger.hunger then inst.components.hunger.current = data.hunger.hunger endif data.sanity and data.sanity.current then inst.components.sanity.current = data.sanity.current endinst.components.health:DoDelta(0)inst.components.hunger:DoDelta(0)inst.components.sanity:DoDelta(0)endend end-- This initializes for both clients and the hostlocal common_postinit = function(inst) -- Minimap iconinst.MiniMapEntity:SetIcon( "rosaleana.tex" )end -- This initializes for the host onlylocal master_postinit = function(inst)inst.level = 0inst.components.eater:SetOnEatFn(oneat)applyupgrades(inst)inst.components.builder.science_bonus = 1-- choose which sounds this character will playinst.soundsname = "willow"-- Stats inst.components.health:SetMaxHealth(150)inst.components.hunger:SetMax(150)inst.components.sanity:SetMax(200)end return MakePlayerCharacter("rosaleana", prefabs, assets, common_postinit, master_postinit, start_inv) Link to comment https://forums.kleientertainment.com/forums/topic/49886-game-crash/ Share on other sites More sharing options...
Jjmarco Posted January 28, 2015 Share Posted January 28, 2015 @Crestonia, could you post your log.txt (Documents/Klei/DoNotStarveTogether)? Preferrably just after the crash occurs. Link to comment https://forums.kleientertainment.com/forums/topic/49886-game-crash/#findComment-607031 Share on other sites More sharing options...
Crestonia Posted January 29, 2015 Author Share Posted January 29, 2015 @Jjmarco I think this is what the issue is [00:03:05]: loaded modindex [00:03:05]: ModIndex: Beginning normal load sequence. [00:03:05]: ModIndex:GetModsToLoad inserting moddir, Rosaleana [00:03:05]: Could not load mod_config_data/modconfiguration_Rosaleana [00:03:05]: Loading mod: Rosaleana [00:03:05]: Mod: Rosaleana Loading modworldgenmain.lua [00:03:05]: Mod: Rosaleana Mod had no modworldgenmain.lua. Skipping. [00:03:05]: Mod: Rosaleana Loading modmain.lua [00:03:05]: Warning: Mod Character rosaleana does not currently specify a gender. Please update the call to AddModCharacter to include a gender. "FEMALE", "MALE", "ROBOT", or "NEUTRAL", or "PLURAL" [00:03:05]: LOADING LUA SUCCESS[00:03:05]: PlayerDeaths loaded morgue 4177 [00:03:05]: loaded profile [00:03:05]: bloom_enabled false [00:03:05]: loaded saveindex [00:03:05]: OnFilesLoaded() [00:03:05]: OnUpdatePurchaseStateComplete [00:03:05]: Unload BE [00:03:05]: Unload BE done [00:03:07]: Mod: Rosaleana Registering prefabs [00:03:07]: Mod: Rosaleana Registering prefab file: prefabs/rosaleana [00:03:07]: error calling LoadPrefabFile in mod Rosaleana: [string "scripts/util.lua"]:292: Could not find an asset matching anim/ghost_rosaleana_build.zip in any of the search paths.LUA ERROR stack traceback: =[C] in function 'assert' scripts/util.lua(292,1) in function 'resolvefilepath' scripts/mainfunctions.lua(72,1) in function 'RegisterPrefabs' scripts/mainfunctions.lua(99,1) =(tail call) ? =[C] in function 'xpcall' scripts/mods.lua(165,1) scripts/mods.lua(460,1) in function 'RegisterPrefabs' scripts/gamelogic.lua(158,1) in function 'LoadAssets' scripts/gamelogic.lua(943,1) in function 'DoResetAction' scripts/gamelogic.lua(961,1) in function 'complete_callback'... =[C] in function 'GetPersistentString' scripts/saveindex.lua(90,1) in function 'Load' scripts/gamelogic.lua(982,1) in function 'callback' scripts/playerprofile.lua(671,1) in function 'Set' scripts/playerprofile.lua(553,1) =[C] in function 'GetPersistentString' scripts/playerprofile.lua(551,1) in function 'Load' scripts/gamelogic.lua(981,1) in main chunk =[C] in function 'require' scripts/mainfunctions.lua(681,1) [00:03:07]: Disabling Rosaleana because it had an error. [00:03:07]: [string "scripts/util.lua"]:292: Could not find an asset matching anim/ghost_rosaleana_build.zip in any of the search paths.LUA ERROR stack traceback: =[C] in function 'assert' scripts/util.lua(292,1) in function 'resolvefilepath' scripts/mainfunctions.lua(72,1) in function 'RegisterPrefabs' scripts/mainfunctions.lua(99,1) =(tail call) ? =[C] in function 'xpcall' scripts/mods.lua(165,1) scripts/mods.lua(460,1) in function 'RegisterPrefabs' scripts/gamelogic.lua(158,1) in function 'LoadAssets' scripts/gamelogic.lua(943,1) in function 'DoResetAction' scripts/gamelogic.lua(961,1) in function 'complete_callback'... =[C] in function 'GetPersistentString' scripts/saveindex.lua(90,1) in function 'Load' scripts/gamelogic.lua(982,1) in function 'callback' scripts/playerprofile.lua(671,1) in function 'Set' scripts/playerprofile.lua(553,1) =[C] in function 'GetPersistentString' scripts/playerprofile.lua(551,1) in function 'Load' scripts/gamelogic.lua(981,1) in main chunk =[C] in function 'require' scripts/mainfunctions.lua(681,1)[00:03:07]: SCRIPT ERROR! Showing error screen [00:03:07]: Mod: Rosaleana Registering default mod prefab [00:03:07]: Load FE [00:03:08]: Load FE: done [00:03:08]: platform_motd table: 120DDAC0 [00:03:08]: SimLuaProxy::QueryServer()[00:03:08]: update_date table: 120DE830 [00:03:08]: SimLuaProxy::QueryServer()[00:03:08]: ModIndex: Load sequence finished successfully. [00:03:08]: Reset() returning[00:03:08]: QueryServerComplete no callback[00:03:08]: QueryServerComplete no callback[00:03:08]: platform_motd table: 132BB438 [00:03:08]: update_date table: 132BC400 [00:03:18]: unloading prefabs for mod MOD_Rosaleana [00:03:18]: Collecting garbage...[00:03:18]: lua_gc took 0.02 seconds[00:03:18]: ~NetworkLuaProxy()[00:03:18]: ~SimLuaProxy()[00:03:18]: lua_close took 0.03 seconds[00:03:18]: HttpClient::ClientThread::Main() complete[00:03:18]: HttpClient::ClientThread::Main() complete[00:03:18]: HttpClient::ClientThread::Main() complete[00:03:18]: Orphaned unnamed resource. This resource must have used Add( resource ) to insert itself into the manager. [00:03:18]: Orphaned unnamed resource. This resource must have used Add( resource ) to insert itself into the manager. [00:03:18]: Orphaned unnamed resource. This resource must have used Add( resource ) to insert itself into the manager. [00:03:18]: Orphaned unnamed resource. This resource must have used Add( resource ) to insert itself into the manager. [00:03:18]: Orphaned unnamed resource. This resource must have used Add( resource ) to insert itself into the manager. [00:03:18]: Orphaned unnamed resource. This resource must have used Add( resource ) to insert itself into the manager. [00:03:18]: Orphaned unnamed resource. This resource must have used Add( resource ) to insert itself into the manager. [00:03:18]: Orphaned unnamed resource. This resource must have used Add( resource ) to insert itself into the manager. [00:03:18]: Orphaned unnamed resource. This resource must have used Add( resource ) to insert itself into the manager. [00:03:18]: Orphaned unnamed resource. This resource must have used Add( resource ) to insert itself into the manager. [00:03:18]: Orphaned unnamed resource. This resource must have used Add( resource ) to insert itself into the manager. [00:03:18]: Orphaned unnamed resource. This resource must have used Add( resource ) to insert itself into the manager. [00:03:18]: Orphaned unnamed resource. This resource must have used Add( resource ) to insert itself into the manager. [00:03:18]: Orphaned unnamed resource. This resource must have used Add( resource ) to insert itself into the manager. [00:03:18]: Orphaned unnamed resource. This resource must have used Add( resource ) to insert itself into the manager. [00:03:18]: Orphaned unnamed resource. This resource must have used Add( resource ) to insert itself into the manager. [00:03:18]: Orphaned unnamed resource. This resource must have used Add( resource ) to insert itself into the manager. [00:03:18]: Orphaned unnamed resource. This resource must have used Add( resource ) to insert itself into the manager. [00:03:18]: HttpClient::ClientThread::Main() complete[00:03:18]: Shutting down Link to comment https://forums.kleientertainment.com/forums/topic/49886-game-crash/#findComment-607256 Share on other sites More sharing options...
rezecib Posted January 29, 2015 Share Posted January 29, 2015 @Crestonia, According to that, you don't have a ghost_rosaleana_build.zip in your anim folder. 1 Link to comment https://forums.kleientertainment.com/forums/topic/49886-game-crash/#findComment-607264 Share on other sites More sharing options...
Crestonia Posted January 29, 2015 Author Share Posted January 29, 2015 (edited) thanks! I'll have to try to make the autocompiler work. Edited January 29, 2015 by Crestonia Link to comment https://forums.kleientertainment.com/forums/topic/49886-game-crash/#findComment-607418 Share on other sites More sharing options...
Crestonia Posted January 29, 2015 Author Share Posted January 29, 2015 It solved the issue. I forgot to rename some folders. XD 1 Link to comment https://forums.kleientertainment.com/forums/topic/49886-game-crash/#findComment-607422 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now