Jump to content

Custom plant sprout isn't covered in dirt as original one


Recommended Posts

On 11/21/2021 at 8:03 PM, IronHunter said:

You need to add the dirt symbols to your spriter file, and animate it in.

Easiest way is to decompile a farm crop with the dirt build then you can copy the frame data like x, y, symbol position manually.

but there is other file for farm_soil only with all animations of soil, and I want to use ingame animation for my plant

Link to comment
Share on other sites

12 hours ago, Aurorus said:

but there is other file for farm_soil only with all animations of soil, and I want to use ingame animation for my plant

I am planning to take a deeper look at this when my day off comes. I haven't had time to look at the code to see how it works thoroughly.

  • Like 1
Link to comment
Share on other sites

On 11/22/2021 at 11:15 AM, Aurorus said:

but there is other file for farm_soil only with all animations of soil, and I want to use ingame animation for my plant

So I had some free time, and took a look at farm_plants.lua

inst.AnimState:SetBank(plant_def.bank)
inst.AnimState:SetBuild(plant_def.build)
inst.AnimState:OverrideSymbol("soil01", "farm_soil", "soil01")

As I originally suspected I am guessing your custom farm_plant bank doesn't have the soil01 symbol animated in any of its animations. If you want to use the original soil textures then you'll need to make sure its included in your spriter file bank.

Edit:
It seems your farm_crop uses designs similar to that of carrots? Why not just use the same animation bank as the carrots?

When creating your plant_def you just use "farm_plant_carrot" instead when assigning its bank in your plant_def file?

Edit2:
Unless you really need a custom animation for your farm_plant recycling the existing banks would save you a lot of time.

Edited by IronHunter
  • Like 1
Link to comment
Share on other sites

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
 Share

×
×
  • Create New...