Rikikaku Posted May 23, 2014 Share Posted May 23, 2014 Created first character mod but it keeps crashing, I ask for help. -----modmain local STRINGS = GLOBAL.STRINGSPrefabFiles = { "will",}Assets = { Asset( "IMAGE", "images/saveslot_portraits/will.tex" ), Asset( "ATLAS", "images/saveslot_portraits/will.xml" ), Asset( "IMAGE", "images/selectscreen_portraits/will.tex" ), Asset( "ATLAS", "images/selectscreen_portraits/will.xml" ), Asset( "IMAGE", "images/selectscreen_portraits/will_silho.tex" ), Asset( "ATLAS", "images/selectscreen_portraits/will_silho.xml" ), Asset( "IMAGE", "bigportraits/will.tex" ), Asset( "ATLAS", "bigportraits/will.xml" ),}table.insert(GLOBAL.CHARACTER_GENDERS.FEMALE, "will")AddModCharacter("will") ----And script 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" ), -- Don't forget to include your character's custom assets!}local prefabs = { "backpack"}local start_inv = { "backpack"}local fn = function(inst) -- choose which sounds this character will play inst.soundsname = "willow" -- a minimap icon must be specified inst.MiniMapEntity:SetIcon( "wendy.png" ) inst.components.locomotor.walkspeed = (TUNING.WILSON_WALK_SPEED * 2) inst.components.locomotor.runspeed = (TUNING.WILSON_RUN_SPEED * 2) inst.components.health.maxhealth = 120 inst.components.hunger.maxhunger = 90 inst.components.sanity.maxsanity = 270 inst.components.sanity.night_drain_mult = TUNING.WENDY_SANITY_MULT inst.components.insulator.insulation = 75endGLOBAL.STRINGS.CHARACTER_TITLES.will = "The Orphan Girl"GLOBAL.STRINGS.CHARACTER_NAMES.will = "Will" GLOBAL.STRINGS.CHARACTER_DESCRIPTIONS.will = "*Has backpack\nHas small stomach but runs fast\nHigh sanity and resist to cold"GLOBAL.STRINGS.CHARACTER_QUOTES.will = "Where am I?""STRINGS.CHARACTERS.WILL = "speech_will"table.insert(GLOBAL.CHARACTER_GENDERS.FEMALE, "will")return MakePlayerCharacter("will", prefabs, assets, fn, start_inv) Link to comment https://forums.kleientertainment.com/forums/topic/36744-first-mod-problem/ Share on other sites More sharing options...
TehSomeLuigi Posted May 23, 2014 Share Posted May 23, 2014 (edited) I've looked at it, but nothing stands out. Please can we have the log.txt? Look in (on Windows) your documents folder > Klei > DoNotStarve and upload for us the log.txt after the game crashes as a result of your mod. Also, in future, when posting code blocks in the forums, highlight (select) the code and use the (Code) button to format it nicely. Edited May 23, 2014 by TehSomeLuigi Link to comment https://forums.kleientertainment.com/forums/topic/36744-first-mod-problem/#findComment-486792 Share on other sites More sharing options...
Rikikaku Posted May 23, 2014 Author Share Posted May 23, 2014 Sorry, Im new to it.log.txt Link to comment https://forums.kleientertainment.com/forums/topic/36744-first-mod-problem/#findComment-486800 Share on other sites More sharing options...
TehSomeLuigi Posted May 23, 2014 Share Posted May 23, 2014 (edited) Here we go, I believe this is of relevance:../mods/workshop-173728136/images/saveslot_portraits/dipper.tex is 120x104 but compressed textures must have power of 2 dimensions.../mods/workshop-173728136/images/selectscreen_portraits/dipper.tex is 188x284 but compressed textures must have power of 2 dimensions.../mods/workshop-173728136/images/selectscreen_portraits/dipper_silho.tex is 188x284 but compressed textures must have power of 2 dimensions.../mods/workshop-180046963/images/saveslot_portraits/norman.tex is 120x104 but compressed textures must have power of 2 dimensions.../mods/workshop-180046963/images/selectscreen_portraits/norman.tex is 188x284 but compressed textures must have power of 2 dimensions.../mods/workshop-180046963/images/selectscreen_portraits/norman_silho.tex is 188x284 but compressed textures must have power of 2 dimensions.../mods/workshop-174902240/images/saveslot_portraits/mabel.tex is 120x104 but compressed textures must have power of 2 dimensions.../mods/workshop-174902240/images/selectscreen_portraits/mabel.tex is 188x284 but compressed textures must have power of 2 dimensions.../mods/workshop-174902240/images/selectscreen_portraits/mabel_silho.tex is 188x284 but compressed textures must have power of 2 dimensions.../mods/workshop-176195384/images/saveslot_portraits/coraline.tex is 120x104 but compressed textures must have power of 2 dimensions.../mods/workshop-176195384/images/selectscreen_portraits/coraline.tex is 188x284 but compressed textures must have power of 2 dimensions.../mods/workshop-176195384/images/selectscreen_portraits/coraline_silho.tex is 188x284 but compressed textures must have power of 2 dimensions.The above textures need dimensions that are powers of 2, e.g. 16x16, 32x32, 64x64, 128x128, 256x256. Edit: However, this doesn't seem to be your mod's problem, so I'm not sure if this is the problem. Try disabling those mods, perhaps? Edited May 23, 2014 by TehSomeLuigi Link to comment https://forums.kleientertainment.com/forums/topic/36744-first-mod-problem/#findComment-486808 Share on other sites More sharing options...
Rikikaku Posted May 23, 2014 Author Share Posted May 23, 2014 (edited) That's odd, they work normal on game, my mod has some problem, I try to enable it and then game crashes. Edit I did it, but it still crashes, quiet unluck I have, maybe I should upload mod to check up. Edited May 23, 2014 by Rikikaku Link to comment https://forums.kleientertainment.com/forums/topic/36744-first-mod-problem/#findComment-486814 Share on other sites More sharing options...
mizukisha Posted May 23, 2014 Share Posted May 23, 2014 When it crashdoes the game tell you that a error is from modmain.lua?Because sometimesit tell you the name of the file who have a crash and the line where the error is. Link to comment https://forums.kleientertainment.com/forums/topic/36744-first-mod-problem/#findComment-486815 Share on other sites More sharing options...
Rikikaku Posted May 23, 2014 Author Share Posted May 23, 2014 It was before and I fixed it, now it crashes and I need to close game up. Link to comment https://forums.kleientertainment.com/forums/topic/36744-first-mod-problem/#findComment-486818 Share on other sites More sharing options...
TehSomeLuigi Posted May 23, 2014 Share Posted May 23, 2014 (edited) -----modmainlocal STRINGS = GLOBAL.STRINGSPrefabFiles = { "will",}Let me just check, are you sure you have a file in your mod folder "scripts/prefabs/will.lua"? If not, I believe it will crash silently, I believe I have made the same mistake. It wasn't specified what you named your lua file, so I thought it was best to check. Edit: Perhaps it's not a bad idea to upload the mod in a .zip so I can poke it. Edited May 23, 2014 by TehSomeLuigi Link to comment https://forums.kleientertainment.com/forums/topic/36744-first-mod-problem/#findComment-486820 Share on other sites More sharing options...
mizukisha Posted May 23, 2014 Share Posted May 23, 2014 It was before and I fixed it, now it crashes and I need to close game up. Check all files again to see if you haven't made an error somewhere .And what tutorial do you use to create your custom char?You should use Better Wod as tutorial,it explain everything very well !http://forums.kleientertainment.com/files/file/520-wod-better/If you are already using it as example so the error is from you.you forgotted something,check all files again. Link to comment https://forums.kleientertainment.com/forums/topic/36744-first-mod-problem/#findComment-486827 Share on other sites More sharing options...
Rikikaku Posted May 23, 2014 Author Share Posted May 23, 2014 I renamed it from whole begininng. Link to comment https://forums.kleientertainment.com/forums/topic/36744-first-mod-problem/#findComment-486836 Share on other sites More sharing options...
Rikikaku Posted May 23, 2014 Author Share Posted May 23, 2014 (edited) It keeps crashing, thought I use Wod Better. It just stops game. Edited May 23, 2014 by Rikikaku Link to comment https://forums.kleientertainment.com/forums/topic/36744-first-mod-problem/#findComment-486866 Share on other sites More sharing options...
Rikikaku Posted May 23, 2014 Author Share Posted May 23, 2014 Thank you all for help, especialy mizukisha for telling me about Wod Better!^^ Link to comment https://forums.kleientertainment.com/forums/topic/36744-first-mod-problem/#findComment-486889 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