[Bugs] Moth Lamp


simplex

Recommended Posts

I keep having a crash when generating a new world. I'll get the log up soon, but from what I can tell it has something to do with the voronoi cells that Simplex implemented.

 

EDIT: Log: http://pastebin.com/YKkq4AXM

 

Voronoi cells are part of Don't Starve's map generation.

 

scripts/worldgen_main.lua(488,1) Applying mod to current level C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/map/forest_map.lua(221,1) Creating story...     C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/map/storygen.lua(414,1) LinkNodesByKeys C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/map/forest_map.lua(259,1) Baking map...  350    C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/map/forest_map.lua(284,1) Map Baked!    C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/map/forest_map.lua(315,1) Encoding...   C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/map/forest_map.lua(319,1) Encoding... DONE      C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/map/forest_map.lua(374,1) Checking Tags C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/map/forest_map.lua(487,1) Populating voronoi... C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/map/object_layout.lua(418,1) Warning! Could not find a spot for tenticle_reeds in node Squeltch:7:Marsh C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/map/object_layout.lua(418,1) Warning! Could not find a spot for TeleportatoCrankLayout in node Squeltch:4:DeepForest    DoLuaFile Error: ...s/common/dont_starve/data/scripts/map/forest_map.lua:35: attempt to perform arithmetic on local 'v' (a table value)LUA ERROR stack traceback:        C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/map/forest_map.lua(35,1) in function 'pickspawnprefab'        C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/map/graphnode.lua(289,1) in function 'PopulateVoronoi'        C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/map/network.lua(670,1) in function 'PopulateVoronoi'        C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/map/network.lua(679,1) in function 'PopulateVoronoi'        C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/map/forest_map.lua(505,1) in function 'Generate'        scripts/worldgen_main.lua(525,1)        =(tail call) ?        =(tail call) ?...s/common/dont_starve/data/scripts/map/forest_map.lua:35: attempt to perform arithmetic on local 'v' (a table value)LUA ERROR stack traceback:        C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/map/forest_map.lua(35,1) in function 'pickspawnprefab'        C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/map/graphnode.lua(289,1) in function 'PopulateVoronoi'        C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/map/network.lua(670,1) in function 'PopulateVoronoi'        C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/map/network.lua(679,1) in function 'PopulateVoronoi'        C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/map/forest_map.lua(505,1) in function 'Generate'        scripts/worldgen_main.lua(525,1)        =(tail call) ?        =(tail call) ?Error loading worldgen_main.luaWorldSim::SimThread::Main() ERRORWorldSim::SimThread::Main() completescripts/gamelogic.lua(976,1) Worldgen had an error, displaying...      scripts/frontend.lua(712,1) SCRIPT ERROR! Showing error screen Force aborting...

 

As far as I can tell, this isn't caused by U&A. And voronoi cells are vanilla, it's how Don't Starve generates the world.

 

Does this happen if other mods are disabled? And does it happen all of the time, or occasionally?

Link to comment
Share on other sites

Voronoi cells are part of Don't Starve's map generation.

scripts/worldgen_main.lua(488,1) Applying mod to current level C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/map/forest_map.lua(221,1) Creating story...     C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/map/storygen.lua(414,1) LinkNodesByKeys C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/map/forest_map.lua(259,1) Baking map...  350    C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/map/forest_map.lua(284,1) Map Baked!    C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/map/forest_map.lua(315,1) Encoding...   C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/map/forest_map.lua(319,1) Encoding... DONE      C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/map/forest_map.lua(374,1) Checking Tags C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/map/forest_map.lua(487,1) Populating voronoi... C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/map/object_layout.lua(418,1) Warning! Could not find a spot for tenticle_reeds in node Squeltch:7:Marsh C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/map/object_layout.lua(418,1) Warning! Could not find a spot for TeleportatoCrankLayout in node Squeltch:4:DeepForest    DoLuaFile Error: ...s/common/dont_starve/data/scripts/map/forest_map.lua:35: attempt to perform arithmetic on local 'v' (a table value)LUA ERROR stack traceback:        C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/map/forest_map.lua(35,1) in function 'pickspawnprefab'        C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/map/graphnode.lua(289,1) in function 'PopulateVoronoi'        C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/map/network.lua(670,1) in function 'PopulateVoronoi'        C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/map/network.lua(679,1) in function 'PopulateVoronoi'        C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/map/forest_map.lua(505,1) in function 'Generate'        scripts/worldgen_main.lua(525,1)        =(tail call) ?        =(tail call) ?...s/common/dont_starve/data/scripts/map/forest_map.lua:35: attempt to perform arithmetic on local 'v' (a table value)LUA ERROR stack traceback:        C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/map/forest_map.lua(35,1) in function 'pickspawnprefab'        C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/map/graphnode.lua(289,1) in function 'PopulateVoronoi'        C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/map/network.lua(670,1) in function 'PopulateVoronoi'        C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/map/network.lua(679,1) in function 'PopulateVoronoi'        C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/map/forest_map.lua(505,1) in function 'Generate'        scripts/worldgen_main.lua(525,1)        =(tail call) ?        =(tail call) ?Error loading worldgen_main.luaWorldSim::SimThread::Main() ERRORWorldSim::SimThread::Main() completescripts/gamelogic.lua(976,1) Worldgen had an error, displaying...      scripts/frontend.lua(712,1) SCRIPT ERROR! Showing error screen Force aborting...

As far as I can tell, this isn't caused by U&A. And voronoi cells are vanilla, it's how Don't Starve generates the world.

Does this happen if other mods are disabled? And does it happen all of the time, or occasionally?I'll check. Would it only be mods that mess with worldgen, or should I disable my testing tools as well?

And yes, all the time.

Link to comment
Share on other sites

Yeah, I tried without the other mods and it seemed to have fixed itself.

 

I have a suspicion it's the weeping willow mod. Does it crash on it's own? Does it consistently crash if both U&A and Weeping willow are loaded at the same time? Lastly, does it crash if you start a game without RoG enabled?

 

Trying to figure out where the source of the crash is coming from and if there is a potential fix.

Link to comment
Share on other sites

I have a suspicion it's the weeping willow mod. Does it crash on it's own? Does it consistently crash if both U&A and Weeping willow are loaded at the same time? Lastly, does it crash if you start a game without RoG enabled?

 

Trying to figure out where the source of the crash is coming from and if there is a potential fix.

I tried one, then both at once. It crashed neither of those times. Mustve been another mod.

Link to comment
Share on other sites

@simplex

The reconverted art assets broke Winnie's selectscreen and saveslot portraits. Just a heads up.

Yeah, they must have power of 2 dimensions (except the silhouette, for some reason), and the automatic generation was not account for that. It is now, generating all TEXes in saveslot_portraits and selectscreen_portraits (except for the silhouette) in powers of 2, and all inventory images in 64x64.

I also found out that ktech had a bug, in which the aspect ratio of the image was always preserved at resizing. This has now been fixed, and I added another option, --extend, which makes the boundaries of the image be extended instead of the image being resized (I hadn't realised this is how saveslot/selectscreen portraits need to be "resized" into powers of 2 dimensions). You'll need to pull the latest ktech repo and recompile it.

Edit: And worldgen is broken, it says that DebugSay is nil. :razz:

 

Edit 2: Somehow, you super ninja'd me. Fixed it just as I posted.

Yeah, I moved some stuff around and forgot to add the TheMod: prefix due to it no longer being in an environment with BindTheMod().

Link to comment
Share on other sites

Yeah, they must have power of 2 dimensions (except the silhouette, for some reason), and the automatic generation was not account for that. It is now, generating all TEXes in saveslot_portraits and selectscreen_portraits (except for the silhouette) in powers of 2, and all inventory images in 64x64.

I also found out that ktech had a bug, in which the aspect ratio of the image was always preserved at resizing. This has now been fixed, and I added another option, --extend, which makes the boundaries of the image be extended instead of the image being resized (I hadn't realised this is how saveslot/selectscreen portraits need to be "resized" into powers of 2 dimensions). You'll need to pull the latest ktech repo and recompile it.

Yeah, I moved some stuff around and forgot to add the TheMod: prefix due to it no longer being in an environment with BindTheMod().

 

Whatever change you made to the saveslot image lowered its resolution. It looks fuzzy now. Loading an earlier version of that .tex file shows a big difference.

 

Edit: Actually, it seems to be every image that isn't an animation.

Link to comment
Share on other sites

Cool, no more invisible things. :razz:

 

Also, I was looking into the buzzard stuff, and it seems that the flying overhead is enabled through a circler component, which is a RoG only component. The manta is more technically advanced than I had anticipated.

 

I was thinking of making it a projectile, having it do it's fly over, then point its projectile target towards the player, and have the projectile onhit callback have the manta fly offscreen and repeat. I'm not sure how to set it up to initially go across the screen, though. Is there a way to get the position of something that is certainly offscreen to the left or right of the player?

 

I don't think a projectile approach would work well. The manta will probably need some 2 or 3 custom components.

But for your last question, yes, you can get the screen size via

w, h = TheSim:GetScreenSize()
and then do this.

 

 

Whatever change you made to the saveslot image lowered its resolution. It looks fuzzy now. Loading an earlier version of that .tex file shows a big difference.

 

Edit: Actually, it seems to be every image that isn't an animation.

I really can't see it. I took the current one, one from 10 commits ago and compared screenshots side by side. I couldn't see any difference. Try again in the latest commit and let me know (and preferably show me the differences). All that's changed is that now I'm using the cubic filter for everything, and that some images didn't have mipmaps before, but do now. The latter may be the culprit of it (especially since the choice of which mipmap is used depends on the resolution of the game screen, so we may very well be seeing different things).

Link to comment
Share on other sites

 

I don't think a projectile approach would work well. The manta will probably need some 2 or 3 custom components.

But for your last question, yes, you can get the screen size via

w, h = TheSim:GetScreenSize()
and then do this.

 

 

I really can't see it. I took the current one, one from 10 commits ago and compared screenshots side by side. I couldn't see any difference. Try again in the latest commit and let me know (and preferably show me the differences). All that's changed is that now I'm using the cubic filter for everything, and that some images didn't have mipmaps before, but do now. The latter may be the culprit of it (especially since the choice of which mipmap is used depends on the resolution of the game screen, so we may very well be seeing different things).

 

 

So here's the difference I'm seeing. :razz:

 

NFYFgX6.png

 

c7MRdKI.png

 

It's like that everywhere.

Link to comment
Share on other sites

I'm certainly not getting this.

This is how the autocompiled saveslot portrait appears to me:

iovDdGi.png

XAzBCXz.png

Try this one:

attachicon.gifwinnie_saveslot_portrait.zip

its only difference to the current autocompiled one is the absence of mipmaps.

 

So here's the previous two and the one you uploaded:

 

Post-Autoconvert

 

NFYFgX6.png

 

Pre-Autoconvert

 

c7MRdKI.png

 

No-Mipmap

 

gkxemyY.png

 

Also, on my mac, there is not a difference that I can see.

Link to comment
Share on other sites

So here's the previous two and the one you uploaded:

 

Post-Autoconvert

 

NFYFgX6.png

 

Pre-Autoconvert

 

c7MRdKI.png

 

No-Mipmap

 

gkxemyY.png

 

Also, on my mac, there is not a difference that I can see.

Wow, the difference is huge. I don't know why a lower mipmap is being used when a higher one is clearly better fit.

In your mac you're not seeing an issue because either your screen has a higher res, your graphic card is better (so it's not dropping a mipmap), or both.

So... I guess now I'll have to hunt for what should have mipmaps and what shouldn't :razz:.

(if you can manage to list the things you're seeing blurry I'd appreciate it, since here there's no difference)

Link to comment
Share on other sites

Wow, the difference is huge. I don't know why a lower mipmap is being used when a higher one is clearly better fit.

In your mac you're not seeing an issue because either your screen has a higher res, your graphic card is better (so it's not dropping a mipmap), or both.

So... I guess now I'll have to hunt for what should have mipmaps and what shouldn't :razz:.

 

My mac's screen is higher res. My PC has a better graphics card, but my display isn't fantastic. Mainly because my friend is borrowing the TV that I normally use for my display.

 

As far as I can tell, it's only static images like inventory icons and things like that that are being affected.

 

Also, the non-mipmapped one seems to contrast against Wilson's saveslot icon. I'm not sure what's going on there.

 

katsGRQ.png

Link to comment
Share on other sites

My mac's screen is higher res. My PC has a better graphics card, but my display isn't fantastic. Mainly because my friend is borrowing the TV that I normally use for my display.

 

As far as I can tell, it's only static images like inventory icons and things like that that are being affected.

 

Also, the non-mipmapped one seems to contrast against Wilson's saveslot icon. I'm not sure what's going on there.

Vanilla's portraits are mipmapped.

$ ktech -i saveslot_portraits.texFile: saveslot_portraits.tex	width: 512	height: 512Header:	platform = 0 (Default)	compression = 2 (DXT5)	texture_type = 1 (2D)	mipmap_count = 10	flags = 3	fill = 4095
(non-mipmapped means a mipmap count of 1)

And so are inventory images

File: inventoryimages.tex	width: 2048	height: 1024Header:	platform = 0 (Default)	compression = 2 (DXT5)	texture_type = 1 (2D)	mipmap_count = 12	flags = 3	fill = 4095
Are U&A's inventory images looking worse than vanilla?

That's why I found this to be so strange.

Link to comment
Share on other sites

Vanilla's portraits are mipmapped. That's why I found this to be so strange.

 

I'm baffled too. What is the difference between the texs from before the autoconversion and after? The middle image matches the other saveslot images (as in, none stand out from the others), at least on my desktop. So figuring out what changed between the first and second images should give us the explanation. I think the old winnie saveslot (the middle image) was converted through the textool on Windows. Are there different arguments for mipmaps when converting an image?

 

@simplex

 

Here's the difference between inventory texs:

 

ZxW7B4x.png

 

2Odp9OJ.png

 

Ignore the mushroom hat, the lower one was before I made the lines more defined.

Link to comment
Share on other sites

I'm baffled too. What is the difference between the texs from before the autoconversion and after? The middle image matches the other saveslot images (as in, none stand out from the others), at least on my desktop. So figuring out what changed between the first and second images should give us the explanation. I think the old winnie saveslot (the middle image) was converted through the textool on Windows. Are there different arguments for mipmaps when converting an image?

 

@simplex

 

Here's the difference between inventory texs:

 

ZxW7B4x.png

 

2Odp9OJ.png

 

Ignore the mushroom hat, the lower one was before I made the lines more defined.

The only thing that may change in mipmap generation is the filter used, which is now bicubic for all U&A assets (though bicubic is the default filter for Matt's tools, so are you sure winnie's TEXes aren't just the ones Klei itself compiled?).

This is the mipmap chain of the old winnie tex (which I grabbed from 10 commits ago):

KYvkKX4.png

This is the current one, using the bicubic filter:

pOlTUMr.png

And I just compiled this one using the Lanczos filter, ktech's previous default until one hour (?) ago or so:

MPvy6KB.png

I told you the reason why I insisted on Lanczos as default is that it keeps images much sharper :razz:. Though the downside is the introduction of artifacts on extreme downscaling.

Link to comment
Share on other sites

The only thing that may change in mipmap generation is the filter used, which is now bicubic for all U&A assets (though bicubic is the default filter for Matt's tools, so are you sure winnie's TEXes aren't just the ones Klei itself compiled?).

This is the mipmap chain of the old winnie tex (which I grabbed from 10 commits ago):

KYvkKX4.png

This is the current one, using the bicubic filter:

pOlTUMr.png

And I just compiled this one using the Lanczos filter, ktech's previous default until one hour (?) ago or so:

MPvy6KB.png

I told you the reason why I insisted on Lanczos as default is that it keeps images much sharper :razz:. Though the downside is the introduction of artifacts on extreme downscaling.

 

It may have been preconverted then. I could've sworn I had to reconvert it, but maybe not.

 

So the Lanczos being changed to bicubic is the reason for it then? Perhaps we should limit bicubic conversions in U&A to animation atlases, since I've never seen the artifacts on anything other than them.

Link to comment
Share on other sites

It may have been preconverted then. I could've sworn I had to reconvert it, but maybe not.

 

So the Lanczos being changed to bicubic is the reason for it then? Perhaps we should limit bicubic conversions in U&A to animation atlases, since I've never seen the artifacts on anything other than them.

I got the artifacts on some inventory images as well.

But... I found out the real issue. ktech's option for the bicubic filter was actually using the cubic filter :razz:.

This is the mipmap chain with the real bicubic filter:

0a05zo9.png

(Lanczos looks a bit better, but not by much)

So yeah, it's entirely plausible you reconverted it using Matt's tools :razz:.

I just pushed a fix to ktech. Now the "-f bicubic" option, as well as the default filter, is actually the bicubic filter ;P.

I'll push all our assets reconverted in proper bicubic shortly.

Link to comment
Share on other sites

I got the artifacts on some inventory images as well.

But... I found out the real issue. ktech's option for the bicubic filter was actually using the cubic filter :razz:.

This is the mipmap chain with the real bicubic filter:

0a05zo9.png

(Lanczos looks a bit better, but not by much)

So yeah, it's entirely plausible you reconverted it using Matt's tools :razz:.

I just pushed a fix to ktech. Now the "-f bicubic" option, as well as the default filter, is actually the bicubic filter ;P.

I'll push all our assets reconverted in proper bicubic shortly.

 

Now I'm getting the white artifacts again. Even after reverting to your latest commit.

 

ZHc16T0.png

 

It's happening on both static images and animations.

Link to comment
Share on other sites

Now I'm getting the white artifacts again. Even after reverting to your latest commit.

 

ZHc16T0.png

 

It's happening on both static images and animations.

What and where is this image? There is no crystal_axe.tex in inventoryimages.

Link to comment
Share on other sites

Wind_Axe is the crystal axe. It's not just it, either, it's everything. The same thing happens on my mac.

Sure, but I needed a concrete example to work on.

The game just blows minor artifacts way out of proportion. This is the actual mipmap chain of the crystal axe, with a black background:

g17miDe.png

You can certainly see the artefacts in the same position the appear in-game, but they're much, much smaller.

EDIT: Actually, they are in the source image (as can be seen by the primary mipmap having them). This is the png of the crystal axe on a black background:

iqP2wEf.png

If you can give me another example, where the source image itself is not compromised, I'd appreciate it.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.