Modding Help New Crew Types

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

  1. projectmayhem

    projectmayhem Industrial Terraformer

    Browsing through the Crew files, I'm not seeing a file to let you add new crew member types. Am I blind? I see where to put the new types once I make them, just not the array that choose which one to spawn.


    *Edit*

    Or is just having baseType "crewmember" enough?
     
  2. bk3k

    bk3k Spaceman Spiff

    The "baseType" is for inheritance aka prototyping. That is it pulls all the baseType's JSON attributes into itself, adding to or replacing that which it is also defining. And you can see the "crewmember" inherits from "base". In both cases, they're referring to .npctype file of the same name.

    You'll notice that "crewmember" is a larger file than the actual specific/utilized crew types, but "base" is a MUCH bigger file than both. "base" has all the things NPCs need to be functional NPCs. Thus you can see how much work that's saving you in making new types. You could even make your new types off the current types available, although that's hardly going to save you much hassle. Inheriting from "crewmember" is probably sufficient enough.

    edit:
    To add information about how to get a new type, you can find this in some .npctype files like villager, villageguard, etc.

    Code:
          "graduation" : {
            "nextNpcType" : [
              [1, "crewmember"],
              [0.25, "crewmemberchemistblue"],
              [0.25, "crewmemberchemistgreen"],
              [0.25, "crewmemberchemistyellow"],
              [0.25, "crewmemberchemistorange"],
              [1, "crewmemberengineer"],
              [1, "crewmembermechanic"],
              [1, "crewmembermedic"],
              [1, "crewmemberjanitor"],
              [1, "crewmembertailor"]
            ]
          }
    
    That's within their "/scriptConfig/questGenerator" path. So you could inject
    Code:
    [ 1.25, "your_newCrew" ]
    
    into the "nextNpcType" array, or replace the whole array itself if your making more sweeping changes(at the risk of messing up other crew mods).
     
    Last edited: May 16, 2017
    projectmayhem likes this.
  3. projectmayhem

    projectmayhem Industrial Terraformer

    Are tenants considered villagers?
     
  4. bk3k

    bk3k Spaceman Spiff

    Well...
    Code:
    {
      "type" : "generictenant",
      "baseType" : "villager",
     
      "dropPools" : [],
    
      "scriptConfig" : {
        "behaviorConfig" : {
          "greetingChance" : 0
        },
        "questGenerator" : {
          "pools" : ["common", "tenant", "hats"],
          "enableParticipation" : true,
    
          "timeLimit" : 30,
          "nearbyQuestLimit" : 2,
          "nearbyQuestRange" : 50,
          "chance" : 0.02
        }
      }
    }
    
    That's the whole generictenant.npctype file right there. Very few over-rides over "villager" aka villager.npctype
     
    projectmayhem likes this.
  5. projectmayhem

    projectmayhem Industrial Terraformer

    Wow thank you. I was all in the NPC and Tenant Folders. I don't know why I didn't see tenants folder inside the NPC folder. Guess cause I was mainly looking at the NPCTYPE files. Thank you tons!
     

Share This Page