Modding Help Avali Ship replacement mod

Discussion in 'Starbound Modding' started by bearffalo, Jun 18, 2017.

  1. bearffalo

    bearffalo Subatomic Cosmonaut

    Hello modding community,
    Im currently trying to make an Avali version of this ship mod: http://community.playstarbound.com/resources/advanced-logistics-frigate.3978/ No .json edits merely using the orange version provided. Im new to modding, but I've looked at the structure of similar mods to familiarize myself with it. However for some reason nothing I tried that seemed logical to me worked ending up with the default Avali ship.
    this is what the metadata looks as of now:

    {
    "author" : "Olirim",
    "description" : "Replaces the default Avali race ship to the orange version of the Advanced Logistics Frigate ship mod by Knox.",
    "friendlyName" : "Avali Advanced Logistics Frigate",
    "link" : "steam://url/CommunityFilePage/949235655",
    "name" : "AALF",
    "steamContentId" : "949235655",
    "version" : "0.1",
    "requires" : ["Avali"]
    }

    Other than that I've edited the .structure files from e.g. novakidt0.structure to avalit0.structure and the blockkey.txt to the available avali ship items.
    Would appreciate any help towards a solution.
     
  2. bk3k

    bk3k Oxygen Tank

    Are you trying to make an Avali themed version, or just use the ship as-is?

    Because if the latter, you don't need more than a simple universe_server.config.patch file.
    Just replace the avali path with path leading to the version of the ship you want to use. No editing structure files themselves.

    So that's a 2 file mod. _metadata and universe_server.config.patch

    edit:

    I'll throw you a good example. Lets say you want the version replacing the human ship.
    Code:
    [
      {
        "op" : "replace",
        "path" : "/speciesShips/avali",
        "value" : [
          "/ships/human/humant0.structure",
          "/ships/human/humant1.structure",
          "/ships/human/humant2.structure",
          "/ships/human/humant3.structure",
          "/ships/human/humant4.structure",
          "/ships/human/humant5.structure",
          "/ships/human/humant6.structure",
          "/ships/human/humant7.structure",
          "/ships/human/humant8.structure"
        ]
      }
    ]
    
    That is the path considering the main mod over-rides the vanilla files. They could have made their own path though and it would work all the same.

    Case in point
    Code:
    [
        {
          "op" : "replace",
          "path" : "/speciesShips/avali",
          "value" : [
            "/ships/vepr/vepr_T0.structure",
            "/ships/vepr/vepr_T1.structure",
            "/ships/vepr/vepr_T2.structure",
            "/ships/vepr/vepr_T3.structure",
            "/ships/vepr/vepr_T3.structure",
            "/ships/vepr/vepr_T3.structure",
            "/ships/vepr/vepr_T3.structure",
            "/ships/vepr/vepr_T3.structure",
            "/ships/vepr/vepr_T3.structure",
            "/ships/vepr/vepr_T3.structure",
            "/ships/vepr/vepr_T3.structure"
          ]
        }
    ]
    
    Makes more sense IMO. You don't have to edit the ship for every race. You just have a ship, and point the races to the ship. It makes supporting more races a simple copy\paste affair.
     
    Last edited: Jun 18, 2017
    bearffalo likes this.
  3. bearffalo

    bearffalo Subatomic Cosmonaut

    Wow I can't thank you enough. adding the .patch file actually made the difference, much appreciated bk3k!
     
  4. Ancev Caine

    Ancev Caine Existential Complex

    As I stated on Steam, you might find this useful. I made white and black versions of the Logistics Frigate for the Avali back in the day.

    All credit goes to graycatgrayhat and lazarus78 for getting it working, I just did the recoloring.
     
  5. bearffalo

    bearffalo Subatomic Cosmonaut

    Id love to see them. Can you post or pm a picture ?
     
  6. Ancev Caine

    Ancev Caine Existential Complex

    The zip contains the relevant files, but these are the skins quickly thrown together for comparison:
    [​IMG]
     
    bearffalo likes this.
  7. bearffalo

    bearffalo Subatomic Cosmonaut

    These are great! With your consent I would like to implement and share one or both on the workshop. So graycatgrayhat and lazarus78 made them playable and you did the coloring ?
     
  8. Ancev Caine

    Ancev Caine Existential Complex

    Yes. @graycatgrayhat made the Logistics Frigate Reborn mod that brought the old beta-era Logistics Frigate mod up to 1.0 standards. I recolored it and made some adjustments to the layout (removing that useless tiny room in the "chin", for example), then @lazarus78 fine-tuned things to work better such as figuring out how to implement my idea for tiering the ship.

    And, of course, you are free to share the skins as you want!
     
  9. lazarus78

    lazarus78 The Waste of Time

    My name! It was mentioned...
     
  10. Ancev Caine

    Ancev Caine Existential Complex

    No it wasn't, go back to sleep.
     
  11. bearffalo

    bearffalo Subatomic Cosmonaut

    Cool, lets make it happen. can you send me the files over or are they distributed somewhere already ?
     
  12. Ancev Caine

    Ancev Caine Existential Complex

     
  13. bearffalo

    bearffalo Subatomic Cosmonaut

    Oh totally missed that, cheers.
     
  14. bearffalo

    bearffalo Subatomic Cosmonaut

    The mod is pretty much good to go now, but i'd like to change the position of tech station, ship locker and fuel hatch, all of which I returned to unbreakable status. I assume you need to change the red .png files for that correct? How do you do that exactly ?
     
  15. Ancev Caine

    Ancev Caine Existential Complex

    This is going to be a terrible explanation and I apologize for that in advance, but the short version is that things in the Shipblock files are color-coded to specific objects. For reference we'll use the "frigate8blocks" image from my old 1.3 version:
    frigate8blocks.png

    This is the shipblock file for the tier 8 version of the Avali Logistics Frigate. You can see the layout of the ship's rooms, with the sand-colored pixels being where the wall materials go, the pink/purple open areas being places where there are no back walls at start (leaving the window in the little room off the bridge and the cargo bay open), and the blue area on the bridge where backwalls cannot be placed. The little colored pixels represent stuff like the teleport pad, fuel hatch, cargo storage and tech console. (There's also a little blackish dot in a room above the cargo hold representing a now-removed ship object, the Research Station.)

    In the same folder you'll find a document called "blockkey":

    {
    "blockKey" : [
    {
    "value" : [255, 255, 255, 255],
    "foregroundBlock" : false,
    "backgroundBlock" : false
    },

    {
    "value" : [0, 0, 255, 255],
    "foregroundBlock" : false,
    "backgroundBlock" : true
    },

    {
    "value" : [255, 0, 0, 255],
    "foregroundBlock" : true,
    "backgroundBlock" : true
    },

    {
    "value" : [0, 255, 0, 255],
    "foregroundBlock" : false,
    "backgroundBlock" : true,
    "flags" : [ "shipLockerPosition" ],
    "object" : "avalishiplocker",
    "objectParameters" : {
    "treasurePools" : [ "avaliStarterTreasure" ],
    "level" : 0.5,
    "unbreakable" : false
    },
    "objectResidual" : true
    },

    {
    "value" : [0, 128, 0, 255],
    "foregroundBlock" : false,
    "backgroundBlock" : true,
    "object" : "avalishiplockerTier0",
    "objectParameters" : {
    "unbreakable" : false
    }
    },

    {
    "value" : [142, 255, 142, 255],
    "foregroundBlock" : false,
    "backgroundBlock" : true,
    "object" : "avalitechstation",
    "objectParameters" : {
    "unbreakable" : false
    },
    "objectResidual" : true
    },

    {
    "value" : [0, 21, 128, 255],
    "foregroundBlock" : false,
    "backgroundBlock" : true,
    "object" : "avaliresearchstation",
    "objectParameters" : {
    "unbreakable" : false
    }
    },

    {
    "value" : [255, 87, 81, 255],
    "foregroundBlock" : false,
    "backgroundBlock" : true,
    "object" : "brokenavalifuelhatch",
    "objectParameters" : {
    "unbreakable" : false
    }
    },

    {
    "value" : [128, 44, 41, 255],
    "foregroundBlock" : false,
    "backgroundBlock" : true,
    "object" : "brokenavalifuelhatchTier0",
    "objectParameters" : {
    "unbreakable" : false
    }
    },

    {
    "value" : [255, 90, 90, 255],
    "foregroundBlock" : false,
    "backgroundBlock" : true,
    "object" : "avalifuelhatch",
    "objectParameters" : {
    "unbreakable" : false
    },
    "objectResidual" : true
    },

    {
    "value" : [255, 255, 0, 255],
    "foregroundBlock" : false,
    "backgroundBlock" : true,
    "backgroundMat" : "avalichits",
    "object" : "apexshiplight",
    "objectResidual" : true
    },

    {
    "value" : [191, 191, 0, 255],
    "foregroundBlock" : false,
    "backgroundBlock" : true,
    "backgroundMat" : "avalichits",
    "object" : "apexshiplightBroken",
    "objectParameters" : {
    "unbreakable" : true
    }
    },

    {
    "value" : [128, 128, 0, 255],
    "foregroundBlock" : false,
    "backgroundBlock" : true,
    "backgroundMat" : "avalichits",
    "object" : "apexshiplight",
    "objectParameters" : {
    "unbreakable" : false,
    "defaultLightState" : false
    }
    },

    {
    "value" : [255, 102, 0, 255],
    "foregroundBlock" : false,
    "backgroundBlock" : false,
    "object" : "avalishipdoor",
    "objectResidual" : true
    },

    {
    "value" : [128, 51, 0, 255],
    "foregroundBlock" : false,
    "backgroundBlock" : false,
    "object" : "avalishipdoorBroken",
    "objectParameters" : {
    "unbreakable" : true
    }
    },

    {
    "value" : [156, 0, 255, 255],
    "anchor" : true,
    "foregroundBlock" : false,
    "backgroundBlock" : true,
    "object" : "avaliteleporter",
    "flags" : [ "playerSpawn" ],
    "objectParameters" : {
    "unbreakable" : false
    }
    },

    {
    "value" : [79, 0, 128, 255],
    "anchor" : true,
    "foregroundBlock" : false,
    "backgroundBlock" : true,
    "object" : "avaliteleporterTier0",
    "flags" : [ "playerSpawn" ],
    "objectParameters" : {
    "unbreakable" : false
    }
    },

    {
    "value" : [0, 255, 255, 255],
    "foregroundBlock" : false,
    "backgroundBlock" : true,
    "object" : "avalicaptainschair",
    "objectDirection" : "right",
    "objectParameters" : {
    "unbreakable" : false
    }
    },

    {
    "value" : [255, 255, 144],
    "foregroundBlock" : false,
    "backgroundBlock" : true,
    "backgroundMat" : "avaliplain"
    },

    {
    "value" : [255, 117, 144],
    "foregroundBlock" : false,
    "backgroundBlock" : true,
    "backgroundMat" : "avalichits"
    },

    {
    "value" : [255, 117, 255],
    "foregroundBlock" : false,
    "backgroundBlock" : true,
    "backgroundMat" : "camppole"
    },

    {
    "value" : [188, 188, 188, 255],
    "comment" : "all platforms",
    "foregroundBlock" : true,
    "backgroundBlock" : true,
    "backgroundMat" : "avaliplain",
    "foregroundMat" : "avaliplatform"
    },

    {
    "value" : [77, 71, 21, 255],
    "foregroundBlock" : false,
    "backgroundBlock" : true,
    "object" : "frigatebooster",
    "objectParameters" : {
    "unbreakable" : true
    }
    },

    {
    "value" : [178, 0, 255, 255],
    "foregroundBlock" : true,
    "backgroundBlock" : true,
    "backgroundMat" : "frigatehazard",
    "foregroundMat" : "frigatehazard"
    }
    ]
    }


    Those determine what each color-coded pixel in the shipblock images stand for. Adjusting the appropriate pixels to different locations on the shipblock image will move where that item spawns, and you can define new pixels by editing the blockkey file.

    Edit: Also, I notice you seem to have deleted the Avali Frigate mod you put up on the Workshop earlier - be advised that that can cause issues for people. I recently had to completely reinstall Starbound and redownload the 200+ mod compilation I use because someone deleted one of their mods rather than update it for 1.3. (The mod caused crashes in 1.3, and deleting it from the Workshop left it permanently installed on my computer with no way to uninstall it short of doing a large-scale wipe of all relevant files from my Steam folder.)
     
    Last edited: Jun 20, 2017

Share This Page