Question Color of grass/sapling animations when cutting grass/saplings with scythe or sword.

hyjax

Newcomer
Hello all,

I am trying to find where and how the color of these animations are handled so I can change them to match a recolor I have been working on.
In the TileSheet: animations.xml, there are "greyed" out versions of these animations that I am looking to control. Has anyone came across an issue similar?
 

kdau

Tiller
Hi! In most cases, if you see grayscale sprites in the assets where they are colored in the game, the color is added procedurally by the game code when the sprites are being drawn. The source of that color varies for different kinds of sprite, and in the case of TileSheets/animations it may vary by the particular row as well. Some of these sources can be altered by editing data assets (JSON), but many are hard-coded in the game. Which row(s) of that spritesheet interest you in particular?
 

hyjax

Newcomer
Thank you for the informative response! I was worried it was something to do with that and I don't have any idea how to start to figure it out. For example when I unpack some of the .xnb files, they are JSON assets. I am not very familiar with JSON outside of content packs and manifests. I was particularly interested in rows: 24, 33, and 35 of the animation sprite TileSheet. They are the grass and sapling animations I think. I would like to be able to assign the colors for all the seasons for these animations. Thanks a ton for your help!
 

kdau

Tiller
Okay. I figured out that you were counting based on the visible rows of sprites. For the game's purposes (in case someone needs to refer back to this for lookup), those are rows 28, 47 and 50 (top pixels 1792, 3008 and 3200).

The first (28) is indeed used for cutting of grass, where a series of colors are hardcoded depending on the type of grass.

The second (47) is used:
  • when the Pickaxe breaks stones and nodes without special animations, hardcoded to be gray;
  • when items are added to the Wood Chipper, harcoded to be brown;
  • in the maruBeaker specific temporary sprite, hardcoded to be light blue; and
  • in the dropEgg specific temporary sprite, hardcoded to be white.
The third (50) is used:
  • when Community Center bundles are completed, with the color chosen from a hardcoded list based on the numbers in field 3 of the Data/Bundles asset;
  • when a bush is destroyed by an Axe, with a color hardcoded based on the current season (green, forest green, "Indian red" and cyan); and
  • when a crop is destroyed that is either dead or at the seedling stage, with a different color hardcoded for each.
In sum, unfortunately, all of these would require some very tricky C# patching to the base game code to recolor, with the minor exception of the CC bundles being able to switch colors within a limited palette. (I needed some practice searching for these, thus the long list instead of just that summary.)
 

hyjax

Newcomer
Thanks a ton for digging into this and for your response! I guess I got some learning to do before I can handle patching the game with C#.
 
Top