Jump to content

Tutorial - DST to DS Version


D4rkh0bb1T
 Share

Recommended Posts

Aye! Modders!

This is a short guide that points out many differences between DST and DS version.
I just decided to create this little tutorial to help some of the modders that would like to translate their DST mod into a DS, which of course can be done inversely. It won't be hard stuff, as I don't know much about coding and started with zero knowledge in Lua. The purpose of these writings is just about sharing and helping. Still, I hope this WILL help.

Let's begin. First your should seek for your mod folder and I assume you already know where it should be. We will set every change in the following section :

*Modinfo
*Modmain
*Character
*Items/prefabs

 

Modinfo :

Spoiler

*api_version = 6
--The Api version must fit the version of the game. 6 is for DS. 10 is for DST.

*dst_compatible = false
*dont_starve_compatible = true
*reign_of_giants_compatible = true
--The DS compatibility must be set to true in ordre to work in DS.
--The DST compatibility must be set to false in ordre to work in DST.

 

Modmain :

Spoiler

Make sure that the script does not load DST assets. There are more assets to load in DST than in DS, so you will want to remove some of them in the modmain codes.

Unnecessary Assets (images&atlas):
*No Avatar
*No Avatar Ghost
*No Avatar Self_inspect
*No Images/name_character
*No Bigportrait/character_none

Remember to remove these images in your bigportrait and images folder, as they are useless in DS version. Also, to add mod character to mod character list, you can change


AddModCharacter("character", "MALE")

to


table.insert(GLOBAL.CHARACTER_GENDERS.MALE, "character")

If you created a custom recipe to your DST character, you surely put the code in modmain. I would recommend to put it into the character prefab instead.

Character :

Spoiler

So yeah, crafting tab and custom recipe might come here. And again, erase the asset that loads the ghost animation since you don't need it anymore; remember to remove the ghost animation in your anim folder too. Here are few things you want to change :

*comon_postinit and master_postinit become local fn = function (inst)
*No local function onbecamehuman(inst)
-- When the character is revived from human
*No local function onload(inst)
-- When loading or spawning the character
*Map entity goes in fn function.


local minimap = inst.entity:AddMiniMapEntity()    
    minimap:SetIcon( "character.tex" )

*The bottom line changes :


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

to


return MakePlayerCharacter("character", prefabs, assets, fn, start_inv)

 

Items/Prefabs :

Spoiler

Remove some of the following line to prevent crashes when you translate your mod :

*No inst.entity:AddNetwork()
*No inst.entity:SetPristine()
*No  if not TheWorld.ismastersim then
        return inst
    end

*No MakeHauntableLaunch(inst)
*No Pristine !!!

Feel free to be constructive and point out what you know about translating DST to DS. I know this short guide is not complete, but everything has a beginning.

D4rkh0bb1T
 

 

  • Like 7
Link to comment
Share on other sites

This is a good start for people who don't understand code well, and it should see all basic mods covered. Maybe you could point out that anything about "replica" and "PRC" is unnecessary/needs to be rewritten entirely.

@D4rkh0bb1T, you should "Follow" this thread using the button at the top right corner.

Edited by Mobbstar
Mentioned
  • Like 1
Link to comment
Share on other sites

I actually managed to do it! basically I took the ESCTEMPLATE mod and transferred over the art only...then all perks have to be redone...but I did essentially get it to work! your tutorial really did help though so thanks for posting this!

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...