Modding Help Ship Structure Problems

Discussion in 'Starbound Modding' started by XenoMind, May 23, 2017.

  1. XenoMind

    XenoMind Phantasmal Quasar

    Usually I like figuring things out on my own without asking for much help. But this problem is a major set back to my mod and I can't seem to find any threads of anyone encountering this problem. Without this resolved I cannot properly create tiered ships.
    What happens is this.
    [​IMG]
    My problem is that my universe_server.config.patch will not detect my structure files at all. I even went so far as to copy and paste different Patch codes to try to get it to recognize my Structure files and nothing.

    Code:
    [
       { "op" : "add",
         "path" : "/speciesShips/irken",
         "value" : [
          "/ships/irken/irkent0.structure",
           "/ships/irken/irkent1.structure",
           "/ships/irken/irkent2.structure",
           "/ships/irken/irkent3.structure",
           "/ships/irken/irkent4.structure",
           "/ships/irken/irkent5.structure",
           "/ships/irken/irkent6.structure",
           "/ships/irken/irkent7.structure",
           "/ships/irken/irkent8.structure"
         ]
       }
    ]
    

    [​IMG]

    The png images appear, and the Structure files are named correctly. I even went back to change it into uppercase and tried a test path to see if it'll work but nothing. Tried moving the block image around too in frustration to see if that worked, still nothing. I can even make syntax errors on purpose in the structure files and the game doesn't crash or recognize anything done in them.

    All I need to do is reposition the ship image to fit the blocks. If anyone has any idea what might be wrong, it'll be much appreciated!
    I swear I must be doing something wrong and I'm too blind to notice D:
     
  2. bk3k

    bk3k Oxygen Tank

    Are you sure it isn't finding your structure files? You shouldn't get that far otherwise. Should get "ship client has errored" (or something like that) and booted to the main menu.

    What does your starbound.log have to say about this? Put it in spoiler and code tags please.

    From your image, I think you just have your image coordinates off. I think the 'y' is 4 tiles too low. I refer to your .structure files, the part that looks sort of like this

    Code:
      "backgroundOverlays" : [
        {
          "image": "vepr_mediumship_BG.png",
          "position": [-10.875, -3.625]
        }
      ],
    
      "foregroundOverlays" : [
        {
          "image": "vepr_mediumship_FG.png",
          "position": [-10.875, -3.625]
        },
        {
          "image": "decal.png",
          "position": [-1.0, -2.0]
        }
      ],
    
    That position is [x, y] coordinates. 1.0 = 1 tile. And tiles are 8x8 pixels. So if you wanted to move one pixel, that's 0.125 (1/8th). But from just eyeballing this, you need to move 4 tiles down. Since I don't know your .structure files, I'll again use this example.
    Code:
    "position": [-1.0, -2.0]
    Moved down 4 would be
    Code:
    "position": [-1.0, -6.0]
    And after making that adjustment, see if it is still a pixel or two off, just make further adjustment.

    Unfortunately you won't see the results of your adjustments without a new ship. Well you can upgrade, but that can't tell you if you fixed the CURRENT tier. So the best way is making new characters, trying them out, deleting them, and again making new. Of course spawning upgrade items.
    /spawnitem shipT2
    /spawnitem shipT3
    etc - so I just made a treasurepool to speed up that process.
    Code:
      "bk3k_shipUpgrades" : [
        [0, {
          "fill" : [
              {"item" : ["shipT2", 1]},
              {"item" : ["shipT3", 1]},
              {"item" : ["shipT4", 1]},
              {"item" : ["shipT5", 1]},
              {"item" : ["shipT6", 1]},
              {"item" : ["shipT7", 1]},
              {"item" : ["shipT8", 1]},
              {"item" : ["shipT9", 1]}
            ]
          }
        ]
      ],
    
    Thus I can do
    /spawntreasure bk3k_shipUpgrades

    Just copy that treasurepool (renamed with your own handle) to make it easier.

    edit:
    I should note that you likely don't have both "backgroundOverlays" and "foregroundOverlays". Probably just "backgroundOverlays" as any image in "foregroundOverlays" will draw over your player, tiles, etc. So use that sparingly for certain effect.

    Also note there isn't a particular limit to how many images you are drawing, but there is a limit on how large they can be(which is why the novakid's top tier is 2 images instead of one.
     
    Last edited: May 23, 2017
  3. XenoMind

    XenoMind Phantasmal Quasar

    So I went and did what you said and apparently it was that I didn't restart my character. No wonder it seemed like my structure files weren't working. Still pretty odd that I got no errors in my logs when I even removed my structure files completely, and still got the same skewed image. Thanks man!
    It's always the small things that seem to get me :'D
     
  4. lazarus78

    lazarus78 The Waste of Time

    Ships don't reflect changes without a clean start. Save for graphical changes, but structural changes require you to either delete the shipworld or start a fresh character.
     

Share This Page