Modding Help Custom Race NPCs spwaning without cloths

Discussion in 'Starbound Modding' started by Oatha, Dec 4, 2016.

  1. Oatha

    Oatha Void-Bound Voyager

    I'm working on a custom race mod for myself and a group of friends. I have just about everything else working, but all npcs save the guards are spawning nude.
    Correction: the Guards are spawning with nothing.
     
    Last edited: Dec 4, 2016
  2. Sorane1998

    Sorane1998 Scruffy Nerf-Herder

    i have the same probleme :/
     
  3. Nexus Of Chaos

    Nexus Of Chaos Parsec Taste Tester

    could we get logs? if there's absolutely no errors or warnings in the logs (other than mod_goes_here not known) then we might need the mod itself
     
  4. bk3k

    bk3k Oxygen Tank

    Did you have then inherit from base.npctype?
     
  5. projectmayhem

    projectmayhem Spaceman Spiff

    How do you do that? I'm having this issue also, my tenants are all spawning nude.
     
  6. bk3k

    bk3k Oxygen Tank

    Code:
    "baseType" : "base",
    That tells it to use base.npctype as a prototype.

    You can also see things like crewmemberoutlaw.npctype has this
    Code:
    "baseType" : "crewmember",
    and crewmember.npctype has this
    Code:
    "baseType" : "base",

    Well I suppose being a tenant this is more relevant
    Code:
    "baseType" : "generictenant",
    which leads to
    Code:
    "baseType" : "villager",
    and then
    Code:
    "baseType" : "base",
    Now to be clear, you only need to include the highest level prototype you want to inherit from which is probably "generictenant" as it covers all the previous inheritance.
     
    projectmayhem likes this.
  7. projectmayhem

    projectmayhem Spaceman Spiff

    where do you define the baseType for your species?

    The custom species spawned in when I put a Deed in the house. He gives Quest and stuff like other tenants, just doesn't wear clothes.

    Quest NPC's that I have to go meet or rescue are also nude.

    If i spawn them in with /spawnnpc ithorian guard they come fully outfitted
     
    Last edited: Apr 15, 2017
  8. projectmayhem

    projectmayhem Spaceman Spiff


    Ok got mine working!!! Here is what I did....

    Inside the npcs folder, you need to patch the villager.npctype Zabrak is the name of one of my species, that is where you will put yours.

    Code:
    [
      { "op" : "add",
        "path" : "/items/zabrak",
        "value" : [
          [0, [ {
            "head" : [
                  { "name" : "caphead", "parameters" : { "colorIndex" : [1, 3, 4, 5, 6, 7, 8, 9] } },
                  { "name" : "caphead", "parameters" : { "colorIndex" : [1, 3, 4, 5, 6, 7, 8, 9] } },
                  { "name" : "caphead", "parameters" : { "colorIndex" : [1, 3, 4, 5, 6, 7, 8, 9] } },
                  { "name" : "caphead", "parameters" : { "colorIndex" : [1, 3, 4, 5, 6, 7, 8, 9] } },
                  "",
                  { "name" : "fancaphead", "parameters" : { "colorIndex" : [1, 3, 4, 5, 6, 7, 8, 9] } },
                  { "name" : "fancaphead", "parameters" : { "colorIndex" : [1, 3, 4, 5, 6, 7, 8, 9] } },
                  { "name" : "fancaphead", "parameters" : { "colorIndex" : [1, 3, 4, 5, 6, 7, 8, 9] } },
                  { "name" : "fancaphead", "parameters" : { "colorIndex" : [1, 3, 4, 5, 6, 7, 8, 9] } },
                  { "name" : "glasses1head", "parameters" : { "colorIndex" : [1, 3, 4, 5, 6, 7, 8, 9] } },
                  { "name" : "glasses4head", "parameters" : { "colorIndex" : [1, 3, 4, 5, 6, 7, 8, 9] } },
                  { "name" : "glasses4head", "parameters" : { "colorIndex" : [1, 3, 4, 5, 6, 7, 8, 9] } },
                  { "name" : "glasses5head", "parameters" : { "colorIndex" : [1, 3, 4, 5, 6, 7, 8, 9] } },
                  { "name" : "scientisthead", "parameters" : { "colorIndex" : 0 } },
                  { "name" : "scientisthead", "parameters" : { "colorIndex" : 0 } },
                  { "name" : "winterscarfhead", "parameters" : { "colorIndex" : 4 } },
                  { "name" : "winterscarfhead", "parameters" : { "colorIndex" : 5 } },
                  { "name" : "winterscarfhead", "parameters" : { "colorIndex" : 6 } },
                  { "name" : "winterscarfhead", "parameters" : { "colorIndex" : 7 } },
                  { "name" : "winterscarfhead", "parameters" : { "colorIndex" : 8 } }
                ],
                "chest" : [
                  { "name" : "conceptchest", "parameters" : { "colorIndex" : [1, 3, 4, 5, 6, 7, 8, 9] } },
                  { "name" : "coolchest", "parameters" : { "colorIndex" : [1, 3, 4, 5, 6, 7, 8, 9] } },
                  { "name" : "tshirtchest", "parameters" : { "colorIndex" : [1, 3, 4, 5, 6, 7, 8, 9] } },
                  { "name" : "hoodiechest", "parameters" : { "colorIndex" : [1, 3, 4, 5, 6, 7, 8, 9] } },
                  { "name" : "workoutchest", "parameters" : { "colorIndex" : [1, 3, 4, 5, 6, 7, 8, 9] } }
                ],
                "legs" : [
                  { "name" : "coollegs", "parameters" : { "colorIndex" : [1, 3, 4, 5, 6, 7, 8, 9] } },
                  { "name" : "workoutlegs", "parameters" : { "colorIndex" : 1 } },
                  { "name" : "workoutlegs", "parameters" : { "colorIndex" : 1 } },
                  { "name" : "workoutlegs", "parameters" : { "colorIndex" : 2 } },
                  { "name" : "workoutlegs", "parameters" : { "colorIndex" : 8 } }
            ]
          } ] ]
        ]
      }
    ]
    


    Just add/take away the clothing you want.

    Then go to your tenants folder, and add a tenant file for your species. Mine is villager_zabrak.tenant


    Code:
    {
      "name" : "villager_zabrak",
      "priority" : 7,
     
      "colonyTagCriteria" : {
        "light" : 1,
        "door" : 1,
        "zabrak" : 4
      },
     
      "tenants" : [{
          "spawn" : "npc",
          "species" : "zabrak",
          "type" : "villager",
          "overrides" : {
            "damageTeamType" : "friendly"
          }
        }
      ],
     
      "rent" : {
        "periodRange" : [900.0, 1800.0],
        "pool" : "villagerGift"
      }
    }
    



    I used priority 7 for testing, then I put some zabrak furniture in a house, threw down a deed and a fully clothed zabrak spawned.
     
  9. projectmayhem

    projectmayhem Spaceman Spiff

    For each npc type, you need to patch it if you want them to have armor and stuff, like the guards you need this..

    Code:
    [
      { "op" : "add",
        "path" : "/items/SpeciesName",
        "value" :
        [ [0, [ {
            "head" : [
              { "name" : "HeadArmorHere", "data" : { "colorIndex" : [3] } },
              { "name" : "HeadArmorHere", "data" : { "colorIndex" : [1, 3, 4, 5, 6, 7, 8, 9] } },
              { "name" : "HeadArmorHere", "data" : { "colorIndex" : [3] } }
            ],
    
            "chest": [ { "name": "ChestArmorHere", "data" : { "colorIndex" : [3] } } ],
           
            "legs" : [
              { "name" : "LegArmorHere", "data" : { "colorIndex" :[1, 3, 4, 5, 6, 7, 8, 9] } },
              { "name" : "LegArmorHere", "data" : { "colorIndex" : [3] } },
              { "name" : "LegArmorHere", "data" : { "colorIndex" : [3] } }
            ],
    
            "primary" : [
              { "name" : "WeaponHere", "data" : { "level" : 4 } },
              { "name" : "WeaponHere", "data" : { "level" : 4 } },
              { "name" : "WeaponHere", "data" : { "level" : 4 } },
              { "name" : "WeaponHere", "data" : { "level" : 4 } }
            ],
    
            "sheathedprimary" : [
              { "name" : "WeaponHere" }
            ],
    
            "alt" : [
              { "name" : "AltHandWeaponHere", "data" : { "level" : 4 } },
              { "name" : "AltHandWeaponHere" }
            ]
          } ] ]
        ]
      }
    ]
    
    The color index lets you set which color, or a range of colors. You should be able to look at all the files and patch them up to make sure your NPC's spawn with armor and weapons now
     

Share This Page