Jump to content

Recommended Posts

  • Developer

Really appreciate it.

If you've got your shovel out, I've come across another issue: if the MiniMap is visible (meaning the MiniMap userdata's IsVisible function returns true; a MiniMap texture doesn't even need to be on the screen) and MiniMap:RebuildLayer is called (like when a tile is terraformed by a pitchfork), it flickers the HUD (the darkened edges go away, everything seems to get brighter, and then it resets).

I've written up a test mod that calls MiniMap:ToggleVisibility() and then calls MiniMap:RebuildLayer every 3 frames, flickering the HUD like crazy (check the comments in modmain.lua for more information):

attachicon.gifTestMiniMapUpdate.zip

Also note that I tried overwriting Terraformer:Terraform to do MiniMap:ToggleVisibility() before and after the terraforming is actually done, but it didn't seem to solve the problem. I've included that code as well.

Sorry, there isn't any way to mask widgets.

Sorry, there isn't any way to mask widgets.

That's what I figured; I guess it was more of a request for an added feature than a question about whether or not the feature exists. :(

But, no matter, can you look at the issue I detailed in the post you quoted? That's much more of a problem as it would effectively render Minimap HUD and a different mod that I'm working on incompatible.

Edited by squeek

Can one check whether a prefab exists before trying to spawn it?

 

I'm currently using a line similar to

if pcall(SpawnPrefab(customfx)) then    local fx = SpawnPrefab(customefx)    fx.Transform:SetPosition(targetlocation)end 

but besides seeming redundant, it turns out this doesn't work. Hard coding a valid customfx value and doing without the conditional & pcall statment works. I'm trying to add some error checking to a component.

 

EDIT: And the reason of course was, I used the wrong syntax. Derp

if pcall(SpawnPrefab,customfx) then    local fx = SpawnPrefab(customefx)    fx.Transform:SetPosition(targetlocation)end

The above works. 

 

Lua. I feel I know you better now. Hello.

Edited by mox

Can one check whether a prefab exists before trying to spawn it?

 

I'm currently using a line similar to

if pcall(SpawnPrefab(customfx)) then    local fx = SpawnPrefab(customefx)    fx.Transform:SetPosition(targetlocation)end 
but besides seeming redundant, it turns out this doesn't work. Hard coding a valid customfx value and doing without the conditional & pcall statment works. I'm trying to add some error checking to a component.

 

EDIT: And the reason of course was, I used the wrong syntax. Derp

if pcall(SpawnPrefab,customfx) then    local fx = SpawnPrefab(customefx)    fx.Transform:SetPosition(targetlocation)end
The above works. 

 

Lua. I feel I know you better now. Hello.

There's one issue with the above code: the SpawnPrefab inside the pcall will create an entity (if the prefab exists), so you'll be slowly filling the game world with unused entities. This is not much of an issue for fx entities because they don't persist across reloading a save, but generally it'd be quite bad.

Instead, you should do either this

local status, fx = pcall(SpawnPrefab,customfx)if status then    fx.Transform:SetPosition(targetlocation)end
or this

if PrefabExists(customfx) then    local fx = SpawnPrefab(customfx)    fx.Transform:SetPosition(targetlocation)end
Edited by simplex
  • Like 1

There's one issue with the above code: the SpawnPrefab inside the pcall will create an entity (if the prefab exists), so you'll be slowly filling the game world with unused entities. This is not much of an issue for fx entities because they don't persist across reloading a save, but generally it'd be quite bad.

Instead, you should do either this

local status, fx = pcall(SpawnPrefab,customfx)if status then    fx.Transform:SetPosition(targetlocation)end
or this

if PrefabExists(customfx) then    local fx = SpawnPrefab(customfx)    fx.Transform:SetPosition(targetlocation)end

You answered my next TWO questions. One of which I hadn't posted yet. Thank you very much.

 

 

BTW, _simplex_testing has been very useful recently. 

@Cheerio

What happened to @tehMugwump's stickied topic explaining how to install mods? I can't seem to find it, and apparently there's no information on installing mods from the forum (except for JoeW's April announcement on the top of the subforum, but that info is highly outdated).

Sorry I don't remember seeing a how-to on installing mods from him. I'd live to add it to the guides though.

There is one on uploading and installing mods but it could be much better.

tehMugwump's had a lot of useful info, such as the standard directory locations in Windows, Mac and Linux (and in the replies that followed a few more variants were discussed/tracked down, such as GOG Mac). It'd be a shame having to gather that information again, but I was unable to find it through the forum search. That thread (along with a few others from him) used to be stickied, I don't know what happened.

Edited by simplex
  • Developer

tehMugwump's had a lot of useful info, such as the standard directory locations in Windows, Mac and Linux (and in the replies that followed a few more variants were discussed/tracked down, such as GOG Mac). It'd be a shame having to gather that information again, but I was unable to find it through the forum search. That thread (along with a few others from him) used to be stickied, I don't know what happened.

His 'troubleshooting' and 'before you begin' guides are part of the main guides post.  I just don't remember seeing a 'how to install mods' post.

His 'troubleshooting' and 'before you begin' guides are part of the main guides post.  I just don't remember seeing a 'how to install mods' post.

Hmm, I'm thinking it never migrated to the new forums, then, since this thread belonged to the "Modding Tutorials" subforum, which no longer exists.

And the tutorial subforum is not accessible even in http://oldforums.kleientertainment.com :/. If I try to access it, I get a 301 Moved Permanently, which redirects me to the new forums.

Edited by simplex

Hmm, I'm thinking it never migrated to the new forums, then, since this thread belonged to the "Modding Tutorials" subforum, which no longer exists.

And the tutorial subforum is not accessible even in http://oldforums.kleientertainment.com :/. If I try to access it, I get a 301 Moved Permanently, which redirects me to the new forums.

@simplex, I seem to recall it making it over, but was gutted of all the screen shots, which made it practically useless.

@simplex, I seem to recall it making it over, but was gutted of all the screen shots, which made it practically useless.

The screenshots sure helped, but the text itself already explains each step of the process. It's certainly much better than what we have at the moment.

http://oldforums.kleientertainment.com/showthread.php?24122-How-to-Install-and-Use-a-Mod

 

Edit: Also, on a side-note, you can apparently still log in and download old mod files. :eek2:

 

I'm glad the direct link still works! Thank you, even if the screenshots are gone it'll certainly be useful.

  • Developer

Hej Cheerio, would you be so kind to tell me what this errors meaning is?

attachicon.gifScreenshot 2013-11-02 00.19.21.png

I'm trying to convert a really simple animation as far as I can see but being the big dummy I am it might be possible I'm missing something obvious.

There's a lot of noise in the error but the important part is where it says 'image fog_1 is larger than the atlas size'.  Do you have a lot of textures or a really huge texture?  If that's not the case I can take a look.

  • Developer

There's a lot of noise in the error but the important part is where it says 'image fog_1 is larger than the atlas size'.  Do you have a lot of textures or a really huge texture?  If that's not the case I can take a look.

We don't currently support image sizes larger than 2048.  Looks like your fog is 4096 in height.

We don't currently support image sizes larger than 2048.  Looks like your fog is 4096 in height.

Any single image must be 2k or below, then?

This is good to know.

 

Having multiple 2k images is fine, though, right?

Like, if it were absolutely necessary to have a 4k image, you could split it into 2k pieces, and jigsaw it back together?

  • Developer

Any single image must be 2k or below, then?

This is good to know.

 

Having multiple 2k images is fine, though, right?

Like, if it were absolutely necessary to have a 4k image, you could split it into 2k pieces, and jigsaw it back together?

Not 100% sure, you'd have to give it a try :).

  • Developer

Not 100% sure, you'd have to give it a try :-).

That being said, you'd have to be making something crazy big to use texture sizes above 256.  Wilson's largest textures are less than 100 pixels per side and things like the water are under 200.

  • Like 1

There's a lot of noise in the error but the important part is where it says 'image fog_1 is larger than the atlas size'. Do you have a lot of textures or a really huge texture? If that's not the case I can take a look.

Seems I did miss something obvious -_- Thanks for clearing that up. I will resize the images and see how it will turn out.

Another question: Do you also know the bug with converted animations that the clickable area is much smaller than the sprite itself? I hear a lot of people complaining about it and apparently noone knows they can use spacebar just as well. Is there a workaround for this?

Edited by Malacath
  • Developer

Seems I did miss something obvious -_- Thanks for clearing that up. I will resize the images and see how it will turn out.

Another question: Do you also know the bug with converted animations that the clickable area is much smaller than the sprite itself? I hear a lot of people complaining about it and apparently noone knows they can use spacebar just as well. Is there a workaround for this?

Not currentlly.  The exporter needs to be fixed to export the appropriate selection bounding box.

@Cheerio

What is the purpose of the radius of the Light engine-level component (i.e., the one added by inst.entity:AddLight())? It doesn't seem to have a clear visual effect, which seems to be determined only by the color, intensity and falloff of the light.

Is its purpose to be used in the LightWatcher detection?

  • Developer

@Cheerio

What is the purpose of the radius of the Light engine-level component (i.e., the one added by inst.entity:AddLight())? It doesn't seem to have a clear visual effect, which seems to be determined only by the color, intensity and falloff of the light.

Is its purpose to be used in the LightWatcher detection?

I'll have to check it out when I get in on Monday :).

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

Yee-haw!

Hi, I'm working on adding some new birds to the game using the spawning ,birds and feather lua all is well except inventory images for both the feather and bird. Images for both have been created. The on ground image doesn't show for the feather either. Your help would be great! I can post mod here for download if you would like to take a look see.

 

I had rather use this method that worldgen if possible. 

Edited by afro1967
  • Developer

Hi, I'm working on adding some new birds to the game using the spawning ,birds and feather lua all is well except inventory images for both the feather and bird. Images for both have been created. The on ground image doesn't show for the feather either. Your help would be great! I can post mod here for download if you would like to take a look see.

I had rather use this method that worldgen if possible.

Posting your mod and log is definitely the easiest way to get help.

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