#Sudden layer change when creating a part by inheritance.

6 messages · Page 1 of 1 (latest)

silk rivet
#

This may not be a bug, but I haven't found a reason for this behavior or a solution to the problem.
I am creating a new part, a hybrid armor based on a base hybrid armor. I use the same layers as in the base part, but during testing I find that the ion beam goes under the new part instead of over it.
Found out that it is this block that is causing the problem:

            {
                Layer = “external_walls”
                DamageLevels
                [
                    {File = “floor.png”; NormalsFile = “./Data/ships/terran/armor_structure_hybrid_1x2/external_wall_normals.png”; Size = [1, 2]}
                    {File = “floor_33.png”; NormalsFile = “./Data/ships/terran/armor_structure_hybrid_1x2/external_wall_normals_33.png”; Size = [1, 2]}
                    {File = “floor_66.png”; NormalsFile = “./Data/ships/terran/armor_structure_hybrid_1x2/external_wall_normals_66.png”; Size = [1, 2]}
                ]
            }```
By removing it, the base armor is drawn correctly under the beam, but also with its own sprites, which I'm not happy with.
dusty elbow
#

Could you please send the entire part file in question?

silk rivet
dusty elbow
#

Perhaps I'm misunderstanding something, but it seems like the problem is just related to which sprites you're using. Vanilla hybrid parts have 3 layers: a "floor" layer containing both the structure and armor, an "external walls" layer containing just the armor, and a "roof" layer also just containing the armor. Your setup's "external walls" layer has armor and structure, which is why the structure is rendering too high up. Commenting out your Walls{} layer seems to fix the problem, though obviously that causes missing graphics.

silk rivet
dusty elbow
#

I believe the sprites are the issue here. You're correct that the contents of a sprite can't change the layer they're on, but I believe what's happening here is that you've accidentally given the "medium" sprite layer the contents of what should be the "bottom" layer. In vanilla, only the sprites on the "bottom" layer have structure present, but your sprites for both the "bottom" and "medium" layers have structure present. You're ending up with two overlapping sets of structure; one is on the correct layer, while the second is too high up to be shaded the same, and also blocks you from seeing the first layer being shaded correctly.