Jump to content

Recommended Posts

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

[MENTION=5291]novamouy17[/MENTION], [MENTION=65394]catnanners[/MENTION], download your mod, find your mod directory (dont_starve\mods), double-click the download zip/rar file, DRAG the enclosed mod directory to dont_starve\mods.

That's it. Run the game and go into the Mod loader screen and 'enable' the mod.

More reading if you run into trouble >>

[ATTACH]11275[/ATTACH]

For some reason, the archive does not appear after I upload it.

[MENTION=39960]mitboy[/MENTION], have you read this tutorial >> ?

Your log file won't show anything about uploading a mod.

If you're having these kinds of troubles uploading and downloading, you really need to study the tutorials and forum threads on the site first, to learn how all this works.

Edited by tehMugwump

I'm sorry to ask this question again, but, is there anybody know how to make items (in inventory) give out light? I copied some code from the heat stone but it cannot work. And, where can I find the function "AddLight()"?Thanks!

[MENTION=52919]Ruby~~[/MENTION], I have not seen an inventory item give off light (if that's what you're talking about). I don't think it's even possible.If it's just a regular object/prefab on the ground or in use, use this code in the prefab:
    local light = inst.entity:AddLight()    light:SetIntensity(INTENSITY)    light:SetRadius(2)    light:SetColour(255/255, 255/255, 1/255)    light:Enable(true)
Edited by tehMugwump

[MENTION=39960]mitboy[/MENTION], have you read this tutorial >> ?

Your log file won't show anything about uploading a mod.

If you're having these kinds of troubles uploading and downloading, you really need to study the tutorials and forum threads on the site first, to learn how all this works.

Oh. Does not matter. My mod contains archive (Wod) animation Wendy (build.bin) and Wendy blank (atlas-0.tex). Everything else for now has been to mode "samplecharacter"

[MENTION=52919]Ruby~~[/MENTION], I have not seen an inventory item give off light (if that's what you're talking about). I don't think it's even possible.If it's just a regular object/prefab on the ground or in use, use this code in the prefab:

    local light = inst.entity:AddLight()    light:SetIntensity(INTENSITY)    light:SetRadius(2)    light:SetColour(255/255, 255/255, 1/255)    light:Enable(true)
I remember in the old version the heat stone in inventory may produce light, and I checked the code of heat stone. It's similar to the code you give, but neither works as I hope. Maybe this "bug" is fixed in Power version. Anyway, I'll stop trying to make inventory items give off light until I find the detail of the AddLight function.

[MENTION=55]Ipsquiggle[/MENTION], just brainstorming here. For my thumbnail preview in Test Tools, I can get Objects and Entitys to show using this (when the .lua name matches the Bank and Build names):

sapling.lua:

Asset("ANIM", "data/anim/sapling.zip"),

anim:SetBank("sapling")

anim:SetBuild("sapling")

return Prefab( "forest/objects/sapling", fn, assets, prefabs)

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(500,-75,0)
But not for these types references:

spiderden.lua:

Asset("ANIM", "data/anim/spider_cocoon.zip"),

anim:SetBank("spider_cocoon")

anim:SetBuild("spider_cocoon")

Prefab( "forest/monsters/spiderden", MakeSpiderDenFn(1), assets, prefabs )

..because spawning the Entity or Object (from Test Tools in this case) uses the .lua file name that doesn't aways match the ANIM bank and build names.

Can you (or anyone) think of a way to search the .lua file, and find the Bank and Build names so I could then use that data to show the Bank frame for a preview? Kind of like a 'Get(data):SetBank (data being the lua file).

If it's not possible, I can move on to other things, but if it is, It would be the icing on the cake.

Edited by tehMugwump
  • Developer

Oh. Does not matter. My mod contains archive (Wod) animation Wendy (build.bin) and Wendy blank (atlas-0.tex). Everything else for now has been to mode "samplecharacter"

Want to zip up your mod folder and post that then? I'm not sure at this point what the problem might be.
  • Developer

I remember in the old version the heat stone in inventory may produce light, and I checked the code of heat stone. It's similar to the code you give, but neither works as I hope. Maybe this "bug" is fixed in Power version. Anyway, I'll stop trying to make inventory items give off light until I find the detail of the AddLight function.

I'm not totally sure what happened to this effect but I believe you are right that it got "fixed". If you look at how the Torch works, it actually spawns a second prefab (called 'torchfire') that follows the player around providing light. You could possibly do something like that?

[MENTION=55]Ipsquiggle[/MENTION]The formula that distribute prefabs into the world needs some changes, it works good only on prefabs that are distributed in large numbers. Like flowers for example there is around 300 flowers in default world so current formula 300*0.5 works just fine, but when you try the same with walruses camps, max 4 walruses camps per world it fails. It is like that cause number of walruses camps is random it can be 1 or 4, when you try to set it to less with current formula it can get you number below 1, and no walrus camp will spawn despite they were not disabled, but only set to lower number.Using low numbers like 0.2 or 0.1 is not an option cause of that.

Edited by _Q_
  • Developer

@Ipsquiggle, just brainstorming here. For my thumbnail preview in Test Tools, I can get Objects and Entitys to show using this (when the .lua name matches the Bank and Build names):

<snip>

There's just enough variation in the prefabs that I don't think you're going to find a one-size-fits-all answer, and I'm fairly certain there's no way to "inspect" what anims a prefab has running on it. Sorry. :\

I'd love to be proven wrong though!

There's just enough variation in the prefabs that I don't think you're going to find a one-size-fits-all answer, and I'm fairly certain there's no way to "inspect" what anims a prefab has running on it. Sorry. :\I'd love to be proven wrong though!

Hmm, let's see... if I extract the Bank image out of all 148 ANIM entity and object files, name the extracted .tex files the same as the prefabs and included them with Test Tools, I can show them with the same 5 lines of code... THAT'S THE TICKET!

Hey everyone! For those who don't know me, I've been working on Don't Starve at Klei doing game design, world gen, adventure mode, and lots of other odds and ends, but:

For the next while I'm going to be dedicating myself to everything mods! Basically I'm going to be your advocate to the team at Klei, trying to make the process of modding as clear and clean as possible!

The main thing is, I don't know yet exactly how I'll be the most useful: My goal is to provide you with the tools and knowledge you need to mod unhindered! So expect to see me hanging around here, answering questions where I can and probably asking a bunch too, so we can figure out how I can be the most useful to everyone. :D

Yee-haw!

Yaaaay

I'm not totally sure what happened to this effect but I believe you are right that it got "fixed". If you look at how the Torch works, it actually spawns a second prefab (called 'torchfire') that follows the player around providing light. You could possibly do something like that?

Finally I decided to give my item a new equipslot so it had similar effect, though, I believe having a look at the touch is a good idea.:>And now I have another question: I added a new material as the recipe composition, but the image in recipe tab is not showing. I asked kiopho and he said I should add image to inventoryimages.tex and its definition in inventoryimages.xml, and he suggest me to ask you how to do so. I think maybe some code is needed?

Hmm, let's see... if I extract the Bank image out of all 148 ANIM entity and object files, name the extracted .tex files the same as the prefabs and included them with Test Tools, I can show them with the same 5 lines of code... THAT'S THE TICKET!

The way I would do it would be to create an atlas (maybe using inventoryimages as a lazy base) which has thumbnails of each prefab on it. Reference that image by prefabname.So for instance,
TTThumbs = Set {"sapling","spiderden","spiderden2","spiderden3",} -- etc.--...if TTThumbs["prefabname"] then     element:SetImage("images/TTThumbs.xml", "TTT_"..prefabname..".tex")else    element:SetImage("images/TTThumbs.xml", "TTT_unknown.tex")end
Then you can have a partial list, any thumbnail not defined will show some default unknown texture. Not really a simple process by any means, but not impossible.

Yeah, that might be a way to do, I'll check it out, thanks,

The way I would do it would be to create an atlas (maybe using inventoryimages as a lazy base) which has thumbnails of each prefab on it. Reference that image by prefabname.So for instance,

TTThumbs = Set {"sapling","spiderden","spiderden2","spiderden3",} -- etc.--...if TTThumbs["prefabname"] then     element:SetImage("images/TTThumbs.xml", "TTT_"..prefabname..".tex")else    element:SetImage("images/TTThumbs.xml", "TTT_unknown.tex")end
Then you can have a partial list, any thumbnail not defined will show some default unknown texture. Not really a simple process by any means, but not impossible.
  • Developer

@Ipsquiggle

The formula that distribute prefabs into the world needs some changes, it works good only on prefabs that are distributed in large numbers. Like flowers for example there is around 300 flowers in default world so current formula 300*0.5 works just fine, but when you try the same with walruses camps, max 4 walruses camps per world it fails. It is like that cause number of walruses camps is random it can be 1 or 4, when you try to set it to less with current formula it can get you number below 1, and no walrus camp will spawn despite they were not disabled, but only set to lower number.

Using low numbers like 0.2 or 0.1 is not an option cause of that.

Interesting problem, I'll put that on my list to have a look at. To be clear, you're talking about when using customization modifiers from the "Customize World" screen or the Overrides table in a level definition?
  • Developer

Finally I decided to give my item a new equipslot so it had similar effect, though, I believe having a look at the touch is a good idea.:>And now I have another question: I added a new material as the recipe composition, but the image in recipe tab is not showing. I asked kiopho and he said I should add image to inventoryimages.tex and its definition in inventoryimages.xml, and he suggest me to ask you how to do so. I think maybe some code is needed?

The code looks something like this:
[COLOR=#333333]local myingredient = GLOBAL.Ingredient( "mythingie", 1)[/COLOR]myingredient.atlas = "images/inventoryimages/mythingieatlas.xml" -- has 'mythingie.tex' specified inside it.local myrecipe = GLOBAL.Recipe( "myprefab", { myingredient, Ingredient("slurtleslime", 10) }, RECIPETABS.TOWN, 2)myrecipe.atlas = "images/inventoryimages/myprefabatlas.xml" -- has 'myprefab.tex' specified inside it.
Notice how the ingredient is created separately, has its atlas set, and then is added to the recipe as a variable instead of directly. Does that make sense?

I saw a bit on Klei employees and they generally don't work overtime nor weekends, so us sitting here late Friday through late Sunday trying to figure out mod problems must be patient for their return on Monday.Much like when I get off work on Friday: I don't even think about it until I have to go back in on Monday...

[MENTION=55]Ipsquiggle[/MENTION]Could you tell me please how to detect ground/floor? like find entity around object but this is groundI will try to make multiplayer mod data sync with detect ground and floor ^^

Edited by tehMugwump

I saw a bit on Klei employees and they generally don't work overtime nor weekends, so us sitting here late Friday through late Sunday trying to figure out mod problems must be patient for their return on Monday.Much like when I get off work on Friday: I don't even think about it until I have to go back in on Monday...

Thankyou ^^ I will wait for answer.

The code looks something like this:

[COLOR=#333333]local myingredient = GLOBAL.Ingredient( "mythingie", 1)[/COLOR]myingredient.atlas = "images/inventoryimages/mythingieatlas.xml" -- has 'mythingie.tex' specified inside it.local myrecipe = GLOBAL.Recipe( "myprefab", { myingredient, Ingredient("slurtleslime", 10) }, RECIPETABS.TOWN, 2)myrecipe.atlas = "images/inventoryimages/myprefabatlas.xml" -- has 'myprefab.tex' specified inside it.
Notice how the ingredient is created separately, has its atlas set, and then is added to the recipe as a variable instead of directly. Does that make sense?
I thought adding some code can solve the problem, but I didn't expect to solve it with such a short and clear piece of code. Totally make sense! Thanks!

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