Leaves and trunk have to have the same amount of levels

This subforum contains all the issues which we already resolved.
Post Reply
User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2903
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Leaves and trunk have to have the same amount of levels

Post by darkfrei »

How to reproduce:
Change both frame_count to 1:

Code: Select all

for i, tree in pairs (data.raw.tree) do
  if tree.variations then
    tree.variations = {tree.variations[1]}
    tree.variations[1].trunk.hr_version = nil
    tree.variations[1].leaves.hr_version = nil
    tree.variations[1].trunk.frame_count = 1 -- here must be more than leaves.frame_count
    tree.variations[1].leaves.frame_count = 1
  end
end
But this code has no problem:

Code: Select all

for i, tree in pairs (data.raw.tree) do
  if tree.variations then
    tree.variations = {tree.variations[1]}
    tree.variations[1].trunk.hr_version = nil
    tree.variations[1].leaves.hr_version = nil
    tree.variations[1].trunk.frame_count = 2
    tree.variations[1].leaves.frame_count = 1
  end
end
Attachments
2018-11-11 15_34_33-Factorio 0.16.51.png
2018-11-11 15_34_33-Factorio 0.16.51.png (5.11 KiB) Viewed 1536 times

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2903
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: Leaves and trunk have to have the same amount of levels

Post by darkfrei »

Also, now leaf_generation and branch_generation cannot be nil, there is another error.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13204
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Leaves and trunk have to have the same amount of levels

Post by Rseding91 »

Thanks for the report. I've improved the error for 0.17. It's actually checking that:

If you have shadows defined: shadow frame count must be == leaves frame count + 1

If you don't have shadows defined: trunk frame count must be == leaves frame count + 1
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Resolved Problems and Bugs”