Modding Help [SOLVED]Custom Crew Members not wearing proper clothes

Discussion in 'Starbound Modding' started by projectmayhem, May 25, 2017.

  1. projectmayhem

    projectmayhem Spaceman Spiff

    Here is my crew member file

    crewmemberjedi.npctype

    Code:
    {
      "type" : "crewmemberjedi",
      "baseType" : "crewmember",
    
      "scriptConfig" : {
        "behaviorConfig" : {
          "emptyHands" : false
        },
    
        "crew" : {
          "role" : {
             "type" : "soldier",
            "name" : "Soldier",
            "field" : "Security",
            "uniformColorIndex" : 1
          }
        },
    
        "dialog" : {
          "crewmember" : {
            "offer" : {
              "default" : {
                "default" : [
                  "Do you need the help of a Jedi?",
                  "I feel the Force inside you, very strongly. May I travel with you?",
                  "As a Jedi Knight, I am sworn to protect the galaxy. Will you let me travel with you?"
                ]
              }
             },
            "roleDescription" : {
              "default" : {
                "default" : [
                  "Thanks for letting me travel with you. I feel the Force has great plans for you.",
                  "The galaxy is a much safer place with you helping protect it."
                ]
              }
            }
          }
        }
      },
    
      "items" : {
        "default" : [
          [0, [
              {
                "chest" : [ { "name" : "SWMjedi3chest" } ],
                "legs" : [ { "name" : "SWMjedi3pants" } ],
                "primary" : [ "SWMknightsaber" ],
                "sheathedprimary" : [ "SWMforceheal"]
              }
            ] ]
        ]
      }
    }
    



    Whenever I spawn one, It has the protectorate legs and chest. I tried using the chestCosmetic and legsCosmetic to at least visually add the jedi look, but that didn't work either.
     
  2. ThreeTen22

    ThreeTen22 Astral Cartographer

    that is because crewmembers strangely get clothes after they spawn, via lua, rather than utilizing the items table. Take a look at the crew table inside one of the crewmembers config files. That should be where your items go. It would be a pair of arrays, one contains an array of armorslot names, the other will be the "items" themselves.
     
    Last edited: May 25, 2017
  3. bk3k

    bk3k Oxygen Tank

    For one thing, are you sure you even ended up with a "crewmemberjedi" instead of something else? I see you haven't changed the
    "crew" section, so how would you know the difference? At least start there to be sure you're dealing the the right crew.
     
  4. projectmayhem

    projectmayhem Spaceman Spiff

    It is spawning with a lightsaber, so I assumed its the jedi. I was using /spawnnpc human crewmemberjedi because someone on the steam page said it was spawning with the right clothing. I wasn't sure exactly what values could go into the "crew" section, if those values determined how they act,so I left them with the Soldier and Security defaults.

    I used one of the crewmember files as a template, copy & paste, then changed the values. So it's set up exactly like the vanilla crewmember files



    ***EDIT***

    So what I did was, copy the entire crew member base file and changed this part....
    "items" : {
    "default" : [
    [0, [
    {
    "chest" : [ { "name" : "protectoratechest" } ],
    "legs" : [ { "name" : "protectoratepants" } ],
    "primary" : [ "npcassaultrifle" ],
    "sheathedprimary" : [ "npcbroadsword" ]
    },
    {
    "chest" : [ { "name" : "protectoratechest" } ],
    "legs" : [ { "name" : "protectoratepants" } ],
    "primary" : [ "npcbroadsword" ],
    "sheathedprimary" : [ "npcassaultrifle" ]
    }
    ] ]
    ]
    },


    That resulted in the same thing, wrong clothing. Changing those values still causes them to spawn wearing protectorate clothing. So after that I changed this part...
    "defaultUniform" : {
    "chest" : "protectoratechest",
    "legs" : "protectoratepants"
    },
    "uniformSlots" : ["chest", "chestCosmetic", "legs", "legsCosmetic", "back", "backCosmetic"]
    },

    Changing that caused them to spawn with Jedi Robes like they are suppose to.
     
    Last edited: May 25, 2017

Share This Page