Jump to content

[Tutorial] Using Extended Sample Character Template


Dragon Wolf Leo
 Share

Recommended Posts

I have another stupid issue I hope someone can help me with. I have modified the tail to just a singular curvy tail and when I view the model in spriter his tail is in place where it's supposed to be but when I load him in the game, the position is off. So, I thought well perhaps I need to add his tail to his torso instead and make it one piece and just adjust the size of the file and see what happens. Once again I positioned the torso correctly in spriter and when loaded into the game it gets completely reset.

 

Untitled-1.jpg

 

For example, in the above picture, the bottom picture shows what happens to the above pose in spriter once it's imported into the game. Help! lol

Edit: I realized the bottom left picture is supposed to go with the top right picture, woops.

 

Did you change any positions in the .scml file in Spriter? If you did, never save. Things would be messed up in-game. Also changing the positions in Spriter do not change the positions in-game. My method is changing the .png file of each part until I get what I want. What does your .png files for your tail look like? Make sure you don't change any canvas sizes either.

Link to comment
Share on other sites

I'm having another problem where the autocompiler refuses to compile my files. The animations are fine with me since I can do that manually through the command prompt, but the problem is the images/big portraits. They refuse to be compiled );

I finally got his tail straightened out, I had to find the first section of the tail that was included and pasted it onto it.

I'm assuming you replaced the original template file with the one you created so the dimensions and pivot are different. Glad you figured it out.
Link to comment
Share on other sites

@Lileean,

 

Remove all other mods from your mods folder before attempting to open the game.  (alternatively remove them one at a time to troubleshoot which is messing up the process)

Thanks for the tip! I was modding for DST so I kinda just moved my folder to don't_starve and it worked.

 

-Also I'm trying to make my own custom item but I keep getting this crash :

 

 [string "scripts/components/inventory.lua"]:592: attempt to index local 'inst' (a nil value)
LUA ERROR stack traceback:
scripts/components/inventory.lua:592 in (method) GiveItem (Lua) <589-724>
   self =
      dropondeath = false
      ignoreoverflow = false
      ignoresound = true
      isvisible = false
      opencontainers = table: 2CDE7818
      ignorefull = false
      inst = 107661 - wynne (valid:true)
      equipslots = table: 2CDE77F0
      itemslots = table: 2CDE77A0
      isopen = false
      _ = table: 2CDE72F0
      silentfull = false
   inst = nil
   slot = nil
   src_pos = nil
scripts/prefabs/player_common.lua:1515 in (method) OnNewSpawn (Lua) <1511-1523>
   i = 1
   v = wynnesumbrella
scripts/networking.lua:106 in () ? (Lua) <99-112>
   player_guid = 107661
   skin_name = nil
   player = 107661 - wynne (valid:true)
=[C]:-1 in (method) SendSpawnRequestToServer © <-1--1>
scripts/mainfunctions.lua:1169 in (local) cb (Lua) <1167-1170>
scripts/frontend.lua:453 in (method) DoFadingUpdate (Lua) <417-457>
   self =
      topblackoverlay = Image - images/global.xml:square.tex
      fade_title_out = false
      overlayroot = overlayroot
      save_indicator_time_left = 0
      fade_title_time = 0
      helptextbg = Image - images/global.xml:square.tex
      helptext = HelpText
      subtitle = Text - 
      updating_widgets_alt = table: 0BCC4AE0
      spinner_repeat_time = -1
      title = Text - 
      scroll_repeat_time = -1
      topFadeHidden = false
      gameinterface = 100012 -  (valid:true)
      updating_widgets = table: 0C3D5F38
      lastx = 931
      total_fade_time = 1
      lasty = 422
      autosave_enabled = true
      fade_time = 1.0270724316438
      blackoverlay = Image - images/global.xml:square.tex
      screenstack = table: 107E3860
      num_pending_saves = 0
      save_indicator_fade_time = 0
      saving_indicator = UIAnim
      consoletext = Text - CONSOLE TEXT
      alpha = 1.0000198418333
      tracking_mouse = true
      focus_locked = false
      fade_title_in = false
      forceProcessText = false
      screenroot = screenroot
      repeat_time = 0
      displayingerror = false
      helptexttext = Text - 
   dt = 0.033202346414328
   alpha = 1.0000198418333
   cb = function - scripts/mainfunctions.lua:1167
scripts/frontend.lua:505 in (method) Update (Lua) <465-614>
   self =
      topblackoverlay = Image - images/global.xml:square.tex
      fade_title_out = false
      overlayroot = overlayroot
      save_indicator_time_left = 0
      fade_title_time = 0
      helptextbg = Image - images/global.xml:square.tex
      helptext = HelpText
      subtitle = Text - 
      updating_widgets_alt = table: 0BCC4AE0
      spinner_repeat_time = -1
      title = Text - 
      scroll_repeat_time = -1
      topFadeHidden = false
      gameinterface = 100012 -  (valid:true)
      updating_widgets = table: 0C3D5F38
      lastx = 931
      total_fade_time = 1
      lasty = 422
      autosave_enabled = true
      fade_time = 1.0270724316438
      blackoverlay = Image - images/global.xml:square.tex
      screenstack = table: 107E3860
      num_pending_saves = 0
      save_indicator_fade_time = 0
      saving_indicator = UIAnim
      consoletext = Text - CONSOLE TEXT
      alpha = 1.0000198418333
      tracking_mouse = true
      focus_locked = false
      fade_title_in = false
      forceProcessText = false
      screenroot = screenroot
      repeat_time = 0
      displayingerror = false
      helptexttext = Text - 
   dt = 0.033202346414328
scripts/update.lua:93 in () ? (Lua) <39-123>
   dt = 0.033202346414328
 
-
I tried to check it out but no luck. My custom item does have the "inventoryitem" component so I'm not sure what's going on. ): I compared my item to another mod's custom item with similar aspects (characterspecific/keepondeath) and I don't see much difference to pinpoint what I'm doing wrong. Maybe it's more complicated than I thought?
Link to comment
Share on other sites

@Lileean,

 

If you post the content of the wynnesumbrella prefab file (inside a spoiler tag) I'm happy to take a look.

Thanks a bunch!! TT

 

local assets =

{
Asset("ANIM", "anim/umbrella.zip"),
Asset("ANIM", "anim/swap_umbrella.zip"),
 
Asset("ATLAS", "images/inventoryimages/umbrella.xml"),
Asset("IMAGE", "images/inventoryimages/umbrella.tex")
}
 
 local prefabs = 
{
}
    
local function fn()
 
local function UpdateSound(inst)
local soundShouldPlay = GetSeasonManager():IsRaining() and inst.components.equippable:IsEquipped()
if soundShouldPlay ~= inst.SoundEmitter:PlayingSound("umbrellarainsound") then
if soundShouldPlay then
inst.SoundEmitter:PlaySound("dontstarve/rain/rain_on_umbrella", "umbrellarainsound") 
else
inst.SoundEmitter:KillSound("umbrellarainsound")
end
end
end  
    
local function OnEquip(inst, owner) 
owner.AnimState:OverrideSymbol("swap_object", "swap_umbrella", "swap_umbrella")
owner.AnimState:Show("ARM_carry")
owner.AnimState:Hide("ARM_normal")
UpdateSound(inst)
    
owner.DynamicShadow:SetSize(2.2, 1.4)
 
end
 
local function OnUnequip(inst, owner) 
owner.AnimState:Hide("ARM_carry") 
owner.AnimState:Show("ARM_normal") 
UpdateSound(inst)
 
owner.DynamicShadow:SetSize(1.3, 0.6)
end 
 
local inst = CreateEntity()
local trans = inst.entity:AddTransform()
local anim = inst.entity:AddAnimState()
    local sound = inst.entity:AddSoundEmitter()    
    MakeInventoryPhysics(inst)
inst.entity:AddNetwork()
 
inst.AnimState:SetBank("umbrella")
    inst.AnimState:SetBuild("umbrella")
    inst.AnimState:PlayAnimation("idle")
 
    inst:AddTag("nopunch")
    inst:AddTag("umbrella")
 
if not TheWorld.ismastersim then
return inst
end
 
    inst:AddComponent("waterproofer")
inst.components.waterproofer:SetEffectiveness(TUNING.WATERPROOFNESS_HIGH)
 
    inst:AddComponent("inspectable")
 
    inst:AddComponent("inventoryitem")
inst.components.inventoryitem.keepondeath = true
inst.components.inventoryitem.imagename = "wynnesumbrella"
inst.components.inventoryitem.atlasname = "images/inventoryimages/umbrella.xml"
    
inst:AddComponent("equippable")
    inst.components.equippable:SetOnEquip( OnEquip )
    inst.components.equippable:SetOnUnequip( OnUnequip )
 
    inst:AddComponent("insulator")
    inst.components.insulator:SetSummer()
    inst.components.insulator:SetInsulation(TUNING.INSULATION_HIGH)
 
if not inst.components.characterspecific then
inst:AddComponent("characterspecific")
end
 
inst.components.characterspecific:SetOwner("wynne")
inst.components.characterspecific:SetStorable(true)
 
    inst:ListenForEvent("rainstop", function() UpdateSound(inst) end, GetWorld()) 
inst:ListenForEvent("rainstart", function() UpdateSound(inst) end, GetWorld()) 
        
    return inst
end
 
return Prefab( "common/inventory/umbrella", fn, assets, prefabs)
 
Link to comment
Share on other sites

So, I'm wondering how to change the voice to a different one than the options you said. I want my character's voice to be Webbers (Yes, ear-hurting as it sounds, I want webber's voice), yet naming the voice thing in Notepad++ to webber didn't work.

Link to comment
Share on other sites

Hey sean - go to scripts/prefabs/[character_name].lua

 

in there you can add items to 

local start_inv = {}

make sure you add a comma to the end of each line, eg:

local start_inv = {	-- Custom starting items	"item1",	"item2",	"item3",}
Link to comment
Share on other sites

Does anyone know if there's a key to all the different body parts within the 'exported' folder? i.e. arm_lower, arm_upper, cheeks, face, etc. Especially looking for "face" for all the expressions, so many are similar it would be really helpful to know what they are.

Link to comment
Share on other sites

Hi, I'm trying to make a mod for DST. I started changing the art and it all shows up in the spriter correctly, but when I decided to see how it looked in game, nothing of the character showed up. The mod enabled correctly and didn't crash, but in the game there's just a shadow.

Do you know what could be the cause of this or how to fix this?

Thank you.

Link to comment
Share on other sites

Hi, I'm trying to make a mod for DST. I started changing the art and it all shows up in the spriter correctly, but when I decided to see how it looked in game, nothing of the character showed up. The mod enabled correctly and didn't crash, but in the game there's just a shadow.

Do you know what could be the cause of this or how to fix this?

Thank you.

Sorry for quoting but everytime I start up the game this same error as in the picture shows up no matter what I do. Is this related to the character not showing up? And how do I fix this? Thank you post-651075-0-39725000-1432598248_thumb.

Link to comment
Share on other sites

@tah,

 

Very likely.  Is your mod the tf classic medic mod, or is that from elsewhere?  If it's yours, there is a problem with one or more images that are preventing it from being converted.  This is often incorrect bit-depth or something similar.

 

If it's not your mod, then move that mod out of the mods folder so the compiler doesn't break before it gets to yours.

Link to comment
Share on other sites

So, I'm wondering how to change the voice to a different one than the options you said. I want my character's voice to be Webbers (Yes, ear-hurting as it sounds, I want webber's voice), yet naming the voice thing in Notepad++ to webber didn't work.

 

Are you using the file redirect thing the document says to use? With Webber included in DST itself, you shouldn't have to. I haven't actually tried, but his sound seems to be in the same file as everyone else's, so it ought to work just like theirs. If not...odd.

 

 

Minor strange thing I noticed about the template, the scml for this places the (front-facing) head 3 pixels to the left, compared to the face. I haven't counted how far off it is from the center of the body, but it's far enough left for someone with a pointy chin to look weird.

Edited by Pyr0mrcow
Link to comment
Share on other sites

I have an issue I could use help with too. I was working through this guide to add my own character, and I carefully tested it every step of the way. Worked fine until I finished replacing 80% of the art assets.

 

Now I can enable the mod, but the moment I do it crashes. I feel pretty sure I just made one stupid beginner mistake, but I'm not sure how to isolate it...  I think I might have saved a body part on the wrong format or something, would it help if I published my log after the crash?

 

 

 

[00:00:10]: ModIndex:GetModsToLoad inserting moddir, workshop-361202313

[00:00:10]: Could not load mod_config_data/modconfiguration_workshop-361202313
[00:00:10]: Loading mod: workshop-361202313 (Knight Lauctrec) Version:1.1.4
[00:00:10]: Mod: workshop-361202313 (Knight Lauctrec) Loading modworldgenmain.lua
[00:00:10]: Mod: workshop-361202313 (Knight Lauctrec)  Mod had no modworldgenmain.lua. Skipping.
[00:00:10]: Mod: workshop-361202313 (Knight Lauctrec) Loading modmain.lua
[00:00:12]: LOADING LUA SUCCESS
[00:00:12]: PlayerDeaths loaded morgue 142
[00:00:12]: loaded profile
[00:00:12]: bloom_enabled false
[00:00:12]: loaded saveindex
[00:00:12]: OnFilesLoaded()
[00:00:12]: OnUpdatePurchaseStateComplete
[00:00:13]: [string "scripts/util.lua"]:384: Could not find an asset matching bigportraits/lautrec.xml in any of the search paths.
LUA ERROR stack traceback:
=[C]:-1 in (global) assert © <-1--1>
scripts/util.lua:384 in (global) resolvefilepath (Lua) <379-387>
   filepath = bigportraits/lautrec.xml
   resolved = nil
scripts/mainfunctions.lua:73 in (global) RegisterPrefabs (Lua) <68-83>
   arg = nil
   i = 1
   prefab = Prefab frontend - 
   i = 49
   asset = table: 0AB68A18
scripts/mainfunctions.lua:100 in (global) LoadPrefabFile (Lua) <87-107>
   filename = prefabs/frontend
   fn = function - scripts/prefabs/frontend.lua:0
   r = nil
   ret = table: 0AB67ED8
   i = 1
   val = Prefab frontend - 
scripts/gamelogic.lua:165 in (upvalue) LoadAssets (Lua) <121-216>
   asset_set = FRONTEND
   load_frontend = true
   in_backend = false
   in_frontend = true
   i = 145
   file = frontend
scripts/gamelogic.lua:901 in (upvalue) DoResetAction (Lua) <823-908>
scripts/gamelogic.lua:919 in (local) complete_callback (Lua) <911-920>
scripts/upsell.lua:27 in (global) UpdateGamePurchasedState (Lua) <11-30>
   complete_callback = function - scripts/gamelogic.lua:911
scripts/gamelogic.lua:934 in (upvalue) callback (Lua) <922-935>
scripts/saveindex.lua:110 in () ? (Lua) <72-111>
   load_success = true
   str = return {
  last_used_slot=1,
  slots={
    {
      server={
        description="",
        friends_only=true,
        game_mode="survival",
        maxplayers=3,
        name="Finitevus's World",
        online_mode=true,
        password="heh",
        pvp=false 
      },
      session_id="005000CC3C882E7A",
      world={ day=3 } 
    },
    { server={  }, world={  } },
    { server={  }, world={  } },
    { server={  }, world={  } },
    { server={  }, world={  } } 
  } 
}
   success = true
   savedata = table: 0B9B7D48
=[C]:-1 in (method) GetPersistentString © <-1--1>
scripts/saveindex.lua:71 in (method) Load (Lua) <68-112>
   self =
      data = table: 0B9B5D18
      current_slot = 1
   callback = function - scripts/gamelogic.lua:922
   filename = saveindex
scripts/gamelogic.lua:950 in (local) callback (Lua) <949-951>
scripts/playerprofile.lua:564 in (method) Set (Lua) <460-567>
   self =
      persistdata = table: 0B9B6BF0
      dirty = true
   str = {"controls":[{"enabled":true,"data":"BwAAAAUAAAAAAAAAAAAAAAEAAAANAAAAAAAAAAEAAAAbAAAAAAAAAAEAAABRAAAAAAAAAAAAAAAAAAAAAQAAAEUAAAAAAAAAAAAAAAAAAAABAAAAJgAAAAAAAAABAAAAKAAAAAAAAAABAAAAJQAAAAAAAAABAAAAJwAAAAAAAAABAAAATQAAAAAAAAABAAAAGwAAAAAAAAABAAAAMQAAAAAAAAABAAAAMgAAAAAAAAABAAAAMwAAAAAAAAABAAAANAAAAAAAAAABAAAANQAAAAAAAAABAAAANgAAAAAAAAABAAAANwAAAAAAAAABAAAAOAAAAAAAAAABAAAAOQAAAAAAAAABAAAAMAAAAAAAAAABAAAALQAAAAAAAAABAAAAPQAAAAAAAAABAAAA6AMAAAAAAAABAAAA6QMAAAAAAAAAAAAAAAAAAAEAAACkAAAAAAAAAAEAAACiAAAAAAAAAAEAAACgAAAAAAAAAAEAAACiAAAAAAAAAAEAAABGAAAAAAAAAAEAAAAgAAAAAAAAAAEAAADAAAAAAAAAAAEAAABMAAAABAAAAAEAAAAIAAAAAAAAAAEAAADsAwAAAAAAAAEAAADrAwAAAAAAAAAAAAABAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAA6wMAAAAAAAABAAAA7AMAAAAAAAABAAAA2wAAAAAAAAABAAAA3QAAAAAAAAABAAAA6wMAAAAAAAABAAAA7AMAAAAAAAAAAAAAAQAAAFQAAAAAAAAAAQAAAFUAAAAAAAAAAQAAAAkAAAAAAAAAAQAAAL8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAQQAAAAAAAAABAAAARAAAAAAAAAABAAAAUwAAAAAAAAABAAAAVwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA [**truncated**]
   callback = function - scripts/gamelogic.lua:949
   amb = 10
   sfx = 10
   music = 10
scripts/playerprofile.lua:447 in () ? (Lua) <446-448>
   load_success = true
   str = {"controls":[{"enabled":true,"data":"BwAAAAUAAAAAAAAAAAAAAAEAAAANAAAAAAAAAAEAAAAbAAAAAAAAAAEAAABRAAAAAAAAAAAAAAAAAAAAAQAAAEUAAAAAAAAAAAAAAAAAAAABAAAAJgAAAAAAAAABAAAAKAAAAAAAAAABAAAAJQAAAAAAAAABAAAAJwAAAAAAAAABAAAATQAAAAAAAAABAAAAGwAAAAAAAAABAAAAMQAAAAAAAAABAAAAMgAAAAAAAAABAAAAMwAAAAAAAAABAAAANAAAAAAAAAABAAAANQAAAAAAAAABAAAANgAAAAAAAAABAAAANwAAAAAAAAABAAAAOAAAAAAAAAABAAAAOQAAAAAAAAABAAAAMAAAAAAAAAABAAAALQAAAAAAAAABAAAAPQAAAAAAAAABAAAA6AMAAAAAAAABAAAA6QMAAAAAAAAAAAAAAAAAAAEAAACkAAAAAAAAAAEAAACiAAAAAAAAAAEAAACgAAAAAAAAAAEAAACiAAAAAAAAAAEAAABGAAAAAAAAAAEAAAAgAAAAAAAAAAEAAADAAAAAAAAAAAEAAABMA
[00:00:13]: SCRIPT ERROR! Showing error screen
[00:00:13]: ModIndex: Load sequence finished successfully.
[00:00:13]: Reset() returning
[00:00:17]: QueryServerComplete no callback
[00:00:17]: QueryServerComplete no callback
[00:00:32]: Force aborting...

 

 

My mod is named Lautrec, if that helps any.

 

Link to comment
Share on other sites

i Would like to add my fursona to the game, and I am curious. If i cannot do it on my own would you take a commission given a large variety of ref images. I am not sure how to Code in what i need. My fursona is a winter dragoness so i was wondering. How do i code in immune to cold and higher susceptibility to heat.

Link to comment
Share on other sites

I have a question - that's probably the most common thing to say in here. But I need to acknowledge the fact that I am new to modding and I need your help. I have created a character, art and everything is in place. Now I wanted to add some perks. I would need somebody to help me get the perks working or at least say to me where to put them (in which folder etc).

First perk would be rising sanity from collecting manure, the same way flowers do. I have found this in the flower code:

local function onpickedfn(inst, picker)    if picker and picker.components.sanity then        picker.components.sanity:DoDelta(TUNING.SANITY_TINY)    end    inst:Remove()end 

I don't know if this is going to help me as I want only my character to be able to get benefits from picking up poop.

 

Second perk is lower insulation and by that I mean faster freezing. I have no clue how to add it whatsoever. The only thing I know is that should be added to 'mycharactername'.lua, and that's basically it. I know it must be a really basic code but I need somebody to hold my hand as I have no idea what to do with it.

 

Third thing is a lamp, working the same way Willow's lighter is, but emitting more light and not giving temperature. My question for this perk is if I can use the lighter code or would it be better to create a new item from scratch?

 

Thanks in advance. I need this help as soon as possible. Me and my fiance love to play this game, so I've created a characters of me and her for this game but I wanted to give it to her on our anniversary which is in two days. 

 

Link to comment
Share on other sites

This is the wrong place to request help for that-- for questions not pertaining to the extended sample character, you should start a new thread.

 

Pretty much everything you want to do though have been asked multiple times over,  a forum search should guide you in the right direction.

 

but I wanted to give it to her on our anniversary which is in two days.

 

Hoo boy, good luck...

Link to comment
Share on other sites

It's not compiling the anim folder, even when I use the mod tools. I am assuming this is also the cause of why when I upload my artwork the template character disappears, and I am left with a character of nothing. I don't know how to fix this, any instructions?

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
  • Create New...