Modding Help Why doesn't "zlevel" work???

Discussion in 'Starbound Modding' started by MardanosTT, Feb 18, 2023.

  1. MardanosTT

    MardanosTT Master Chief

    Why the doesn't "zlevel" work???
    I'm trying to create a ".activeitem" that has only one function: to create an animated visual effect of a cape. I already did it in another mod like techs, but when I change it to a ".activeitem" or ".consumable" the ".animation" file just doesn't read the "zlevel". Everything works perfectly, but the crappy cape animation that should be behind the character is still in front!! Even changing EVERYTHING THAT IS WAY this zLevel. It also doesn't work with any other variations like "layer" and "renderlayer"(player-1, background, etc...). Why the hell "zlevel" doesn't work when the file that pulls the ".animation" is an ".activeitem", and a ".tech" file perfectly reads the animation without changing anything at all??

    Detail: when it is "particleEmitters" the "layer" works, but when it is an "animatedParts" the zLevel nor any other variant works! The animation continues in front of the character. This is killing me. Does anybody know how to solve this?



    "parts" : {
    "cloaktechback" : {
    "partStates" : {
    "cloaktechback" : {

    "idleoffcapeback" : {
    "properties" : {
    "image" : "/animations/mardcloak/idle/idleoffcapeback.png:<frame>",
    "zLevel" : -1
    }
    },
     
  2. Iris Blanche

    Iris Blanche Pudding Paradox Forum Moderator

    Moved to Starbound Modding. Please mind where you're posting next time.
     
  3. Your Buddy Bill

    Your Buddy Bill Existential Complex

    seeing as the ranged guns all use zLayer in the .animation files for their muzzle flashes and they call those from .activeitem files, i'm guessing that, for an active item, the zLayer is limited to the minimum and maximum layers of the activeItem itself somehow. iirc you can see this with really small one-handed guns: when held in the front hand, the muzzle flash (and the rest of the gun) will be in front of the player sprite, but when held in the back hand the muzzle flash (and the rest of the gun) will be behind most of the player sprite. the muzzle flash zLayer -1 seems to only move it behind the rest of the activeitem, not behind the player. Techs, on the other hand, are not constrained to "held in one hand or the other or both and thus must be able to draw in front of or behind most of the player sprite" and so can apply their zLayer relative to the entire player body. at least, that's my educated guess.

    that said, yeah, animated apparel in general is prettymuch impossible right now unless you pull some really crazy shenanigans (like an active item for a cape, or a custom tech)... unless there's something buried and undocumented. i wonder if there's any hints in the mannequin or in the entitymarker lua.
     

Share This Page