Recluse420 Posted November 28, 2016 Share Posted November 28, 2016 (edited) Just looking for a mod vet. to help me fix my problem. I've been searching all over trying to fix this but I can't seem to get my custom character to show up on screen anymore; it's like there isn't even an image for him. My modded toon was working just fine, until I added maxwell's shadowminion code, I can't see in the code where it changes the characters anim directory or anything. Why did he disappear? Below is the characters code; I don't receive an error report either, just loads the mod without visible image. Quote 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_silk.zip"), -- Don't forget to include your character's custom assets! Asset( "ANIM", "anim/starvini.zip" ), Asset( "ANIM", "anim/ghost_starvini_build.zip" ), } local prefabs = { "shadow_despawn", "statue_transition_2", } local start_inv = { "tophat", "rabbit", "rabbit", "rabbit", "rabbit", "bluegem", "bluegem", "spear", "boards", "boards", "boards", "boards", "boards", "boards", "boards", "goldnugget", "waxwelljournal", "nightmarefuel", "nightmarefuel", "nightmarefuel", "nightmarefuel", "nightmarefuel", "nightmarefuel", "log", "log", "log", "log", "rocks", "rocks", "rocks", "rocks", "rocks", } local function DoEffects(pet) local x, y, z = pet.Transform:GetWorldPosition() SpawnPrefab("shadow_despawn").Transform:SetPosition(x, y, z) SpawnPrefab("statue_transition_2").Transform:SetPosition(x, y, z) end local function KillPet(pet) pet.components.health:Kill() end local function OnSpawnPet(inst, pet) if pet:HasTag("shadowminion") then --Delayed in case we need to relocate for migration spawning pet:DoTaskInTime(0, DoEffects) if not (inst.components.health:IsDead() or inst:HasTag("playerghost")) then inst.components.sanity:AddSanityPenalty(pet, TUNING.SHADOWWAXWELL_SANITY_PENALTY[string.upper(pet.prefab)]) inst:ListenForEvent("onremove", inst._onpetlost, pet) elseif pet._killtask == nil then pet._killtask = pet:DoTaskInTime(math.random(), KillPet) end elseif inst._OnSpawnPet ~= nil then inst:_OnSpawnPet(pet) end end local function OnDespawnPet(inst, pet) if pet:HasTag("shadowminion") then DoEffects(pet) pet:Remove() elseif inst._OnDespawnPet ~= nil then inst:_OnDespawnPet(pet) end end local function OnDeath(inst) for k, v in pairs(inst.components.petleash:GetPets()) do if v:HasTag("shadowminion") and v._killtask == nil then v._killtask = v:DoTaskInTime(math.random(), KillPet) end end end local function common_postinit(inst) inst.MiniMapEntity:SetIcon( "starvini.tex" ) inst:AddTag("spiderwhisperer") inst:AddTag("shadowmagic") --reader (from reader component) added to pristine state for optimization inst:AddTag("reader") inst:AddTag("bearded") end --tune the beard economy... local BEARD_DAYS = { 1, 2, 3 } local BEARD_BITS = { 2, 6, 12 } local function OnResetBeard(inst) inst.AnimState:ClearOverrideSymbol("beard") end local function OnGrowShortBeard(inst) inst.AnimState:OverrideSymbol("beard", "beard_silk", "beardsilk_short") inst.components.beard.bits = BEARD_BITS[1] end local function OnGrowMediumBeard(inst) inst.AnimState:OverrideSymbol("beard", "beard_silk", "beardsilk_medium") inst.components.beard.bits = BEARD_BITS[2] end local function OnGrowLongBeard(inst) inst.AnimState:OverrideSymbol("beard", "beard_silk", "beardsilk_long") inst.components.beard.bits = BEARD_BITS[3] end local function master_postinit(inst) inst:AddComponent("reader") if inst.components.petleash ~= nil then inst._OnSpawnPet = inst.components.petleash.onspawnfn inst._OnDespawnPet = inst.components.petleash.ondespawnfn inst.components.petleash:SetMaxPets(inst.components.petleash:GetMaxPets() + 8) else inst:AddComponent("petleash") inst.components.petleash:SetMaxPets(8) end inst.components.petleash:SetOnSpawnFn(OnSpawnPet) inst.components.petleash:SetOnDespawnFn(OnDespawnPet) inst.components.sanity.dapperness = TUNING.DAPPERNESS_LARGE inst.components.health:SetMaxHealth(TUNING.WILSON_HEALTH * .5) inst.soundsname = "maxwell" inst._onpetlost = function(pet) inst.components.sanity:RemoveSanityPenalty(pet) end inst:ListenForEvent("death", OnDeath) inst:ListenForEvent("ms_becomeghost", OnDeath) -- choose which sounds this character will play inst.soundsname = "maxwell" inst.components.sanity.dapperness = TUNING.DAPPERNESS_HUGE * 1 -- Stats inst.components.health:SetMaxHealth(100) inst.components.hunger:SetMax(150) inst.components.sanity:SetMax(350) inst.components.locomotor.walkspeed = 6 inst.components.locomotor.runspeed = 7 inst:AddComponent("beard") inst.components.beard.insulation_factor = TUNING.WEBBER_BEARD_INSULATION_FACTOR inst.components.beard.onreset = OnResetBeard inst.components.beard.prize = "silk" inst.components.beard:AddCallback(BEARD_DAYS[1], OnGrowShortBeard) inst.components.beard:AddCallback(BEARD_DAYS[2], OnGrowMediumBeard) inst.components.beard:AddCallback(BEARD_DAYS[3], OnGrowLongBeard) end return MakePlayerCharacter("starvini", prefabs, assets, common_postinit, master_postinit, start_inv) Edited November 28, 2016 by Recluse420 Link to comment Share on other sites More sharing options...
halfrose Posted November 28, 2016 Share Posted November 28, 2016 Did you look into maxwell's prefab? I see you have the pet component there, recently it was updated on Maxwell's prefab (waxwell.lua), perhaps you need to do some updating, also, you no longer need to asset all those animations by the way, you need this Asset("SCRIPT", "scripts/prefabs/player_common.lua"), I infact recommend you to maybe if it doesn't work, redo your prefab. Link to comment Share on other sites More sharing options...
Recluse420 Posted November 29, 2016 Author Share Posted November 29, 2016 cool, thank you so much. Is there a certain post I should check out, that might help me in the future? I mean that you personally would recommend. Link to comment Share on other sites More sharing options...
halfrose Posted November 30, 2016 Share Posted November 30, 2016 3 hours ago, Recluse420 said: cool, thank you so much. Is there a certain post I should check out, that might help me in the future? I mean that you personally would recommend. To be honest, I am not sure, because whenever I feel I need some sort of help, I tend to search on the forums, I never truly picked a post that could be the super essential, but I guess that the best recommendation is to always double check things, and if you have issues search in multiple places or stuff related, it tends to solve the problem, at least to me. Link to comment 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