Jump to content

Recommended Posts

  • Developer

Ipsquiggle,Could you add the possibility of specifying a vanilla game texture as the mod icon? I'd like to avoid repackaging textures that are already in the game, especially to not have to make license exceptions to them.

To be clear: You're asking if the icon can from from one of our atlases rather than a specified one? I removed that originally to prevent confusing behavior between mods when they all have 'modicon.tex' in them, but it would definitely be better if you could use standard assets. I'll give it a poke.Regarding assets in mods: We don't mind our assets and scripts getting repackaged, especially if a mod relies on a specific version of a piece of art, as this prevents the mod from breaking if we ever change the art or its atlas.

To be clear: You're asking if the icon can from from one of our atlases rather than a specified one? I removed that originally to prevent confusing behavior between mods when they all have 'modicon.tex' in them, but it would definitely be better if you could use standard assets. I'll give it a poke.Regarding assets in mods: We don't mind our assets and scripts getting repackaged, especially if a mod relies on a specific version of a piece of art, as this prevents the mod from breaking if we ever change the art or its atlas.

Yes, that's what I'm asking. I can see why you set it up the way it is now, ensuring that paths are taken relative to MODROOT to prevent clashes between mods. But being able to specify a standard asset would be really nice. Thank you for taking a look into it!

Ipsquiggle, I don't want to overload you with requests, but I have another one (of secondary nature) for when you have the time: a function that acts just like modimport() but that returns the loaded file as a function instead of running it directly. It could be implemented just like modimport(), changing only its last line from "result()" to "return result".I ask this because being able to pass parameters and above all retrieve return values from files goes a long way in aiding code encapsulation. Being able to setfenv the loaded file is also a big plus (the configuration system I use in my mods relies deeply on that). I call it a secondary request because it's not like this feature is really unavailable. Currently, it can be done by calling GLOBAL.kleiloadlua() directly. The problem with this approach is that it throws code sandboxing out of the window. So while this is by no means "urgent", eventually having a safer alternative would be nice.

Sorry for my bad English. Me need a help. I use this image from the files of the game: post-39960-13764596802627_thumb.pngAnd tried to download to your archive. Then, from the archives of the game "Wendy" I uploaded the file build.binI thought the sample character will be Wendy (I want that view Wendy's, not yours blank) But the sample character was invisible in the game.

You will not be able to use that image with the sample character mod. You'll want to use the template_player_character.png template and edit it. If necessary you can move the pieces from the wendy texture you have there into place there, but you might have difficulty identifying the pieces.

  • Developer

Sorry for my bad English. Me need a help. I use this image from the files of the game: [ATTACH=CONFIG]11165[/ATTACH]And tried to download to your archive. Then, from the archives of the game "Wendy" I uploaded the file build.binI thought the sample character will be Wendy (I want that view Wendy's, not yours blank) But the sample character was invisible in the game.

Every texture and build are paired together, so if you use this Wendy texture, you MUST use the build.bin and anim.bin from wendy.zip as well. If you use the Wod texture or the template texture, then you must use the anim.bin and build.bin from wod.zip.Currently, if you want the character to have a different name (such as something other than Wendy) you have to use the build renamer as well. http://forums.kleientertainment.com/showthread.php?21066-Creating-your-own-character/page2&p=199916#post199916

[MENTION=55]Ipsquiggle[/MENTION], et all, is there a way to pull an image out of an anim .zip and display in a Child(Image... ?Here's what I'm using in Test Tools to show a preview of the inventory items and it works perfect:(first image is a frame image)

function self.itemSpinner:OnChanged(data)this.working.itemPrefab = datathis:UpdateSelectedItem()self.image = self:AddChild(Image("data/images/ui.xml", "portrait_bg.tex"))self.image:SetPosition(115,-250,0)self.image = self:AddChild(Image("data/images/inventoryimages.xml", data.. ".tex"))self.image:SetPosition(115,-250,0)
but how to get a static image out of the anim files to do the same (and of course the naming convention of the files varies all over the place too)?
function self.entitySpinner:OnChanged(data)this.working.entityPrefab = datathis:UpdateSelectedEntity()self.image = self:AddChild(Image("data/images/ui.xml", "portrait_bg.tex"))self.image:SetPosition(115,-325,0)self.image = self:AddChild(Image("data/anim/" ..data.. "_build.zip", data.. ".tex"))self.image:SetPosition(115,-325,0)end
Edited by tehMugwump
  • Developer

You can fix this?

Can you run your game with the invisible character, and then post the logfile at Documents/Klei/DoNotStarve/log.txt so we can see what the error might be? Posting a zipped copy of your mod folder would help as well. Thanks!
  • Developer

@Ipsquiggle, et all, is there a way to pull an image out of an anim .zip and display in a Child(Image... ?

You can't exactly pull an image from an anim, but you can play an anim in the UI:

require("uianim")local my_anim = self:AddChild(UIAnim())my_anim:GetAnimState():SetBank("bank_name")my_anim:GetAnimState():SetBuild("build_name")my_anim:GetAnimState():PlayAnimation("idle")my_anim:SetPosition(xpos, ypos, 0)
As far as naming conventions... I can't think of any clever way to handle all the names 'automatically'. :\ I'd probably end up doing something like this:

imagedata = {  cutgrass = {type="INV_IMAGE"},  pigman = {type="ANIM", bank="pigman", build="pigman_build", anim="idle"},}if imagedata[[COLOR=#333333]data[/COLOR]].type == "INV_IMAGE" then  [COLOR=#333333]self.image = self:AddChild(Image("data/images/[/COLOR][COLOR=#333333]inventoryimages[/COLOR][COLOR=#333333].xml", data..".tex"))[/COLOR]  --etc.elseif imagedata[[COLOR=#333333]data[/COLOR]].type = "ANIM" then  self.image = self:AddChild(UIAnim())  self.image:GetAnimState:SetBank( imagedata[[COLOR=#333333]data[/COLOR]].bank )  --etc.end
Not automatic, but straight-forward at least. :)

Getting closer: The anim files that are actually named consistently (hound, build = hound, bank = hound) work great (see image).

function self.entitySpinner:OnChanged(data)this.working.entityPrefab = datathis:UpdateSelectedEntity()self.image = self:AddChild(Image("data/images/ui.xml", "portrait_bg.tex"))self.image:SetPosition(115,-325,0)require("uianim")local my_anim = self:AddChild(UIAnim(data))my_anim:GetAnimState():SetBank(data)my_anim:GetAnimState():SetBuild(data)my_anim:GetAnimState():PlayAnimation("idle")my_anim:SetPosition(115,-325,0)
others like krampus, manrabbit, monkey (and about 70% of the rest) follow no naming convention that I can predict.If I understand how these entities are placed, their name is their LUA file and from there, the correct info is grabbed. Makes it very hard to place an image from those ANIM files when their names vary from the LUA name...If the ANIM file could be derived from the LUA file for my purposes.... Edited by tehMugwump

how do you download a mod I have a windows 7 laptop. I download mods from the mod section and it goes to my download file and then I open it but after that I have no idea what to do next.....

Standalone version goes in (default) "C:\Program Files (x86)\dont_starve\mods\"; Steam version goes in (default) "C:\Program Files (x86)\Steam\steamapps\common\dont_starve\mods"; Chrome version does not support modding.Just unzip the [ModName] folder to the "[...]\mods" folder and run the game. UuU

:disturbed:Question how do you get mods into the game cause I downloaded them it wont work for me plz help.

What do you mean "get them in game"? Did you put the mod folder in "[...]\dont_starve\mods\"? If so, you need to enable the mod in the "Mod" menu on the main screen right after you load up Don't Starve.

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
×
  • Create New...