Jump to content

character coding help?


Recommended Posts

hello! before i start asking anything, i do want to state one thing:
I am very new to this forum page, to if this topic is posted in the wrong place, please forgive me. i am also new to modding, so im sorry if i sound like a noob.

 

Okay! so first all, i am trying to get familiar with coding and such, as im trying to make a character for myself and my friends on DST. but i have ran into questions and problems.

1) how can i make my character immune to cold?
2) How can i make my character considered a monster (like webber i believe?)
3) is there a way to add custom voices (like bass instruments)
4) can i make my character gain sanity at night, and picking flowers lowers it?
5) how to i make my character start out with items at spawn?
6) I have played the tecolin mod, and how do i make hounds and clockworks friendly to my character?
7) On the character menu, if i hover over a character (ex: wes) then switch t my character the name doesnt change, but the stats and such do?

Im REALLY sorry for so many questions!!! :? also, could anyone possibly link screenshots if they have an answer? sorry.

 

edit: forgot to mention i have also followed dleowolf's tutorial for making dst characters.

Edited by Seven Static
Link to comment
Share on other sites

Welcome to the forums

1) A common solution I've seen for this is to set the min temperature to above freezing

inst.components.temperature.mintemp = 20
--in master_postinit

2) Webber has the tag in common_postinit

inst:AddTag("monster")
-- in common_postinit

3) There should be a tutorial on the forums

4) Good example on how to do this, other examples above this post too.

John Watson has a good example on how to overide the flowers

Spoiler

AddPrefabPostInit("flower", function(inst)
	local ic = inst.components
	
	local _OnPickedFn = ic.pickable.onpickedfn
	ic.pickable.onpickedfn = function(self, picker)
        if picker and picker.components.sanity and picker.prefab=="esctemplate" then
            picker.components.sanity:DoDelta(-TUNING.SANITY_TINY*2)
        end
		return _OnPickedFn(self, picker)
	end
end)

This works for your needs without getting too busy.

5) If you followed the esctemplate, there is a:

local start_inv = {
	"cutgrass",
	"twigs",
}

--Just make sure at the bottom of the file start_inv is there
return MakePlayerCharacter("esctemplate", prefabs, assets, common_postinit, master_postinit, start_inv)

6) Looking at the tecolin mod, its code to befriend can be pretty much copy pasted from the modmain.lua, you can make a variant of it to apply for clockworks.

7) Excerpt from notes.txt from the esctemplate, the dst names require a specific naming scheme to appear properly in game.

Quote

After compiling names_[character].png, open names_[character].xml in a text editor.
Change the Element name to "[character].tex". (Do not change the Texture filename)

Hope this helps,

Cheers

Iron_Hunter

Edited by IronHunter
typos
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...