Jump to content

[Tutorial] Using Extended Sample Character Template


Dragon Wolf Leo
 Share

Recommended Posts

I made a post on this, and thanks to Kunomori, I was able to advance further in my process of making a character. My only problem right now is the auto compiler not creating a zip file for the characters main anim folder. I edited the name in every single file, so I doubt it's a name problem. I changed all the files in the exported folder, edited the scml file in spriter(just to fix the misplacement of my character's face), and ran the compiler. It ended up only creating a "ghost_[character]_build.zip" file, even though I edited the ghost file just as much. I could just edit the atlas files manually, but the first time I did that, it took a few days. I only recently learned what the exported folder is for(again, thanks to Kunomori), but I changed every single esctemplate to my character's name. Does anyone here know how to force the auto compiler to make a [character].zip file for the anim folder?

Link to comment
Share on other sites

Hello, thank you for this template. İt helped me out on my work. However i got some problems. İ realy don't know how to make this a version for Don't Starve Together. İf you know (or anyone knows) pls help me out. İ would appreciate it. 

Thank you all and Have A Nice Breakfast.

Link to comment
Share on other sites

Love the tutorial, and I've successfully made a character that works. However, I'm having an issue with the big portrait. It seems to be a clipping error. It's cut off in game so that only the top left half is there. Any suggestions on how I would fix this? I checked the tex file using a tex viewer, and the image seems fine. I've attached what I'm seeing below.

 

Capture.PNG

Link to comment
Share on other sites

Im trying to make the character look like this (image), so how do i re-make the head to look like this image up-front? When i did it myself,the whole character was invisible (no,i did not edit the esctemplate_cleared folder) What i did:
Ereased the head
Drew my own head
Ereased the faces
Drew my own faces
Put whole folder in mods
Loaded game
The character icon,character name(on the icon),and the character itself was invisible. While you reply,i will do it again following the exact same steps as the tutorial did,percicely. If i dont send a character photo of it working,then please reply with help

^7507FE4429E4D29E17FCD6CF3C20211344E9A1B0FC047C4308^pimgpsh_fullsize_distr.png

Link to comment
Share on other sites

On 6/29/2016 at 1:32 PM, DaleighChronicle said:

Love the tutorial, and I've successfully made a character that works. However, I'm having an issue with the big portrait. It seems to be a clipping error. It's cut off in game so that only the top left half is there. Any suggestions on how I would fix this? I checked the tex file using a tex viewer, and the image seems fine. I've attached what I'm seeing below.

 

Capture.PNG

Update. The whole mod crashes. It'll show up fine, generate the world fine, but if I select my character, it crashes.

Link to comment
Share on other sites

Hello! This guide was very helpful, and I followed all of it, yet I am having difficulties starting it up. 

I am currently trying to test drive the mod I made (I made some of the character I am designing so far) and when I click "I understand", the game crashes and it says "Don't Starve has stopped working" 

So I did some research and even re-watched the video. This is when I noticed something...

The compiler is not compiling the two .zip folders you told us to delete towards the end of the video. So I scrolled through the comments and noticed someone is as well suffering from the same issue. You told the person that if the compiler does not work, to use the scml.exe and manually type in the code to compile the files and all. So, I went to the folder to where it is located and clicked scml.exe. A white window opened for a semi-second then closed. I don't know why or how to fix that. So if both of those fail, how can I insert my mod I worked very hard on and still am working on (artwise) into the game?

Link to comment
Share on other sites

On 6/29/2016 at 1:32 PM, DaleighChronicle said:

Love the tutorial, and I've successfully made a character that works. However, I'm having an issue with the big portrait. It seems to be a clipping error. It's cut off in game so that only the top left half is there. Any suggestions on how I would fix this? I checked the tex file using a tex viewer, and the image seems fine. I've attached what I'm seeing below.

 

Capture.PNG

 

On 7/1/2016 at 9:44 AM, DaleighChronicle said:

Update. The whole mod crashes. It'll show up fine, generate the world fine, but if I select my character, it crashes.

 

Update: My mod is now not crashing, but the bigportrait that is popping up is not the one I created. It's "borrowing" from the portrait next to it, first showing up as Wilson, then showing up as the random character portrait. The mod is functioning and running and not crashing, there's just the issue of the portrait not working properly.

 

Link to comment
Share on other sites

On 7/14/2016 at 10:52 PM, DaleighChronicle said:

 

 

just so you know if you have a photoshop or any program with "Layers" you can just put the Don't starve image on the background and "THEN" squeeze youre artwork into the "portrait" and then save

 

Also this tutorial is outdated! Unless you have knowledge on coding most new comers who come and use this tutorial isn't going to have a good time! So IF ANYONE KNOW HOW TO UPDATE THIS TUTORIAL LET ME KNOW! I'll make a new tutorial step by step.

Link to comment
Share on other sites

Great tutorial and really helpful for beginners such as myself but I have a problem, I've done pretty much everything this tutorial has explained to do like renaming the folders, and deleting a few files etc. My character that I've created when it is applied in DS, the game doesn't crash or anything but it won't show up in the character select screen and i'm baffled as to why, any help would be really appreciated.

Link to comment
Share on other sites

Hi, thank you for the tutorial, very usefull.

I'm having an issue when i'm trying to create and give a custom item to my new character, I keep having the same bug.

Quote

[string "scripts/components/inventory.lua"]:623: attempt to index local 'inst' (a nil value)
LUA ERROR stack traceback:
    scripts/components/inventory.lua:623 in (method) GiveItem (Lua) <622-755>
    scripts/prefabs/player_common.lua:1827 in (method) OnNewSpawn (Lua) <1823-1835>
    scripts/networking.lua:250 in () ? (Lua) <238-256>
    =[C]:-1 in (method) SendSpawnRequestToServer (C) <-1--1>
    scripts/mainfunctions.lua:1269 in (local) cb (Lua) <1267-1270>
    scripts/frontend.lua:531 in (method) DoFadingUpdate (Lua) <495-535>
    scripts/frontend.lua:583 in (method) Update (Lua) <543-695>
    scripts/update.lua:94 in () ? (Lua) <39-127>

I don't understand, i've look a lot of mod's custom weapon and my code look very similar.


local MakePlayerCharacter = require "prefabs/player_common"


local assets = {
    Asset("SCRIPT", "scripts/prefabs/player_common.lua"),
}
local prefabs = {
	"scythe",
}

-- Custom starting items
local start_inv = {
	"scythe",
}

local function becomefurious(inst)
	-- Hunger rate multiplier 
	inst.components.hunger:SetRate(TUNING.WILSON_HUNGER_RATE * 1.5)

	-- Attack multiplier
    inst.components.combat.damagemultiplier = 3
	inst.components.combat.min_attack_period = 1

	-- Speed multiplier
	inst.components.locomotor.walkspeed = (TUNING.WILSON_WALK_SPEED * 1.5)
	inst.components.locomotor.runspeed = (TUNING.WILSON_RUN_SPEED * 1.6)
end

local function becomelazy(inst)
	-- Hunger rate multiplier 
	inst.components.hunger:SetRate(TUNING.WILSON_HUNGER_RATE * 1)

	-- Attack multiplier
    inst.components.combat.damagemultiplier = 1.5
	inst.components.combat.min_attack_period = 0.5

	-- Speed multiplier
	inst.components.locomotor.walkspeed = (TUNING.WILSON_WALK_SPEED * 0.8)
	inst.components.locomotor.runspeed = (TUNING.WILSON_RUN_SPEED * 0.9)
end

local function onnewstate(inst)
	if  inst:HasTag("playerghost") or
        inst.components.health:IsDead() then
        return
    end
	if inst.components.hunger.current > 249 then
		becomelazy(inst)
	else if  inst.components.hunger.current < 101 then
			becomefurious(inst)
		end
	end
end

-- When the character is revived from human
local function onbecamehuman(inst)
	-- Set speed when reviving from ghost (optional)
	inst.components.locomotor:SetExternalSpeedMultiplier(inst, "viktoriia_speed_mod", 1)
	inst:ListenForEvent("newstate", onnewstate)
end

local function onbecameghost(inst)
	-- Remove speed modifier when becoming a ghost
   inst.components.locomotor:RemoveExternalSpeedMultiplier(inst, "viktoriia_speed_mod")
   inst:RemoveEventCallback("newstate", onnewstate)
end

-- When loading or spawning the character
local function onload(inst)
    inst:ListenForEvent("ms_respawnedfromghost", onbecamehuman)
    inst:ListenForEvent("ms_becameghost", onbecameghost)

    if inst:HasTag("playerghost") then
        onbecameghost(inst)
    else
        onbecamehuman(inst)
    end
end



-- This initializes for both the server and client. Tags can be added here.
local common_postinit = function(inst) 
	-- Minimap icon
	inst.MiniMapEntity:SetIcon( "viktoriia.tex" )
	inst:AddTag("viktoriia")
end

-- This initializes for the server only. Components are added here.
local master_postinit = function(inst)
	-- choose which sounds this character will play
	inst.soundsname = "willow"
	
	-- Uncomment if "wathgrithr"(Wigfrid) or "webber" voice is used
    inst.talker_path_override = "dontstarve_DLC001/characters/"
	
	-- Stats	
	inst.components.temperature.maxtemp = 85
	inst.components.temperature.mintemp = -10
	inst.components.temperature.overheattemp = 70

	inst.components.health:SetMaxHealth(200)
	inst.components.hunger:SetMax(300)
	inst.components.sanity:SetMax(100)
	
	-- Hunger rate multiplier 
	inst.components.hunger:SetRate(TUNING.WILSON_HUNGER_RATE * 1)

	-- Attack multiplier
    inst.components.combat.damagemultiplier = 1.5
	inst.components.combat.min_attack_period = 0.5

	-- Speed multiplier
	inst.components.locomotor.walkspeed = (TUNING.WILSON_WALK_SPEED * 1.1)
	inst.components.locomotor.runspeed = (TUNING.WILSON_RUN_SPEED * 1.2)

	-- Sanity drain multiplier
	inst.components.sanity.night_drain_mult = 2
	inst.components.sanity.ghost_drain_mult = 0.5

	inst.OnLoad = onload
    inst.OnNewSpawn = onload
	
end

return MakePlayerCharacter("viktoriia", prefabs, assets, common_postinit, master_postinit, start_inv)

Thank you, if you can provide any help!

Link to comment
Share on other sites

local assets=
{
	Asset("ANIM", "anim/special_fork.zip"),
    Asset("ANIM", "anim/swap_special_fork.zip"), 

    Asset("ATLAS", "images/inventoryimages/special_fork.xml"),
    Asset("IMAGE", "images/inventoryimages/special_fork.tex"),
}

local function onfinished(inst)
    inst:Remove()
end

    local function OnEquip(inst, owner)
        owner.AnimState:OverrideSymbol("swap_object", "swap_special_fork", "special_fork")
        owner.AnimState:Show("ARM_carry") 
        owner.AnimState:Hide("ARM_normal") 
end

    local function OnUnequip(inst, owner) 
        owner.AnimState:Hide("ARM_carry") 
        owner.AnimState:Show("ARM_normal") 
    end

local function fn()
	local inst = CreateEntity()

	inst.entity:AddTransform()
	inst.entity:AddAnimState()
    inst.entity:AddLight()
    inst.entity:AddNetwork()

    MakeInventoryPhysics(inst)


    inst.AnimState:SetBank("special_fork")
    inst.AnimState:SetBuild("special_fork")
    inst.AnimState:PlayAnimation("idle")
	
	    

    if not TheWorld.ismastersim then
        return inst
    end

    inst.entity:SetPristine()

    inst:AddComponent("inspectable")

    inst:AddComponent("weapon")
	
    inst.components.weapon:SetDamage(100)
	
	inst:AddTag("sharp")
	
	inst:AddComponent("finiteuses")
    inst.components.finiteuses:SetMaxUses(100)
    inst.components.finiteuses:SetUses(100)
    inst.components.finiteuses:SetOnFinished(inst.Remove)

    inst:AddComponent("inventoryitem")
    inst.components.inventoryitem.imagename = "special_fork"
    inst.components.inventoryitem.atlasname = "images/inventoryimages/special_fork.xml"

	inst:AddComponent("equippable")
    inst.components.equippable:SetOnEquip( OnEquip )
    inst.components.equippable:SetOnUnequip( OnUnequip )
	

	
	inst:AddComponent("characterspecific")
    inst.components.characterspecific:SetOwner("viktoriia")
	
    MakeHauntableLaunch(inst)

	return inst
end
	

return Prefab( "common/inventory/special_fork", fn, assets, prefabs) 

I just noticed i hadn't put the code of the custom weapon and put instead the code of another mod (if a moderateur can remove my post, sorry again).

So, I repost my error.

Quote

[string "scripts/components/inventory.lua"]:623: attempt to index local 'inst' (a nil value)
LUA ERROR stack traceback:
    scripts/components/inventory.lua:623 in (method) GiveItem (Lua) <622-755>
    scripts/prefabs/player_common.lua:1827 in (method) OnNewSpawn (Lua) <1823-1835>
    scripts/networking.lua:250 in () ? (Lua) <238-256>
    =[C]:-1 in (method) SendSpawnRequestToServer (C) <-1--1>
    scripts/mainfunctions.lua:1269 in (local) cb (Lua) <1267-1270>
    scripts/frontend.lua:531 in (method) DoFadingUpdate (Lua) <495-535>
    scripts/frontend.lua:583 in (method) Update (Lua) <543-695>
    scripts/update.lua:94 in () ? (Lua) <39-127>

Sorry for the double post

Edited by DKlan
Link to comment
Share on other sites

Thx for the tutorial :) my near final 2 custom characters look awesome and all for u :P.

I have a little question, i want in back vision the long hair over the torso, and i dont really know how exactli can y put the z order of this... (isent be really important because i make the characters to see nice whit the torso over back head)

Pjs.png

Link to comment
Share on other sites

On 9/9/2016 at 6:34 PM, LenaleeMKII said:

Hi, so has anyone found the issue with why our characters spawn invisible?

And the same FOR Wendy989898

Its maybe a fail in copilation of the exportet files (parts of the character) one of my customs hace 2 form and autocopiler dont compile the second export folder and when change form it goes invi, look in ur anim folder if here be any zip if not its for sure a failing compilling it, if autocompile dont work u can try to force it using CMD like this

Spoiler

"C:\Program Files (x86)\Steam\SteamApps\common\Don't Starve Mod Tools\mod_tools\scml.exe" "C:\Program Files (x86)\Steam\SteamApps\common\Don't Starve Together Beta\mods\Leprucio\exported\leprucio\leprucio.scml" "C:\Program Files (x86)\Steam\SteamApps\common\Don't Starve Together Beta\mods\Leprucio" Where first its the location of scml.exe(compiller) the secont the location of ur scml (its is found in export folder where all PNGs of ur character be) and the thirth is te location of the Mod Folder, u only need to rewrite the locations and copy paste in CMD (windos, run, write CMD and paste it whit mouse click and enter) it start to compile like in the first page of this post (one black image)

 

Edited by leprucio
2 have same problem(maybe)
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...