Sketchy502 / SDV-Summary

An application to display a summary of the player from a Stardew Valley save file.
206 stars 21 forks source link

Not ready for merge: Add script to copy assets and render tiles #5

Open klusark opened 8 years ago

klusark commented 8 years ago

There's a few issues still remaining, but I wanted to get feedback to make sure you like the idea before putting more time into it.

There's two main parts to this

  1. copyAssets.sh copies assets extracted from stardew valley to the correct files for this application to find. Right now it only copes stuff needed for map generation, not portraits.
  2. imagegeneration/renderTiles.py takes a .tbin file extracted from stardew valley and outputs the layers as png files. farm.py then takes these layers and composes them in order to render everything with the correct depth.

To extract the files from the game I used https://github.com/Draivin/XNBNode

There are a few issues:

  1. Transparency isn't rendered correctly. Look at the shadows of fences and the water. It looks like it's a bit hard to fix in PIL, but PILLOW has an alpha_composite function which should help.
  2. Buildings are rendered incorrectly and the lid to the shipping box is missing. I'll see if I can find the tile information from the game so we can correctly render everything without file modification.
  3. The totem thing in the top beside the house is rendered on top of the tree. I don't get why it's on the layer that it's on.

The main advantage with this is that you don't need to manually extract maps, especially if they change in the future, and furthermore, this should make it a lot easier to implement rendering of the player's house.

Here's how the current version of the website renders my farm:

1awesrm

Here's the same farm with my changes: map

Laukei commented 8 years ago

Hey klusark, this is very impressive, and I like it. It might be kinder to merge it into a branch than into master, so we can keep the currently-functional map generation system until your version surpasses it for when we update upload.farm with some other features we're working on though.

I think it's a good idea worth pursuing.

Sketchy502 commented 8 years ago

This is a significantly better way to render the farm base than currently have, definitely continue with it.

I have just pushed a fix for the hoe dirt not connecting correctly when using the unedited game assets. I'll get your code working locally and see if I can give you a hand with some of the other errors.