Modding Help Creating New NPCs?

Discussion in 'Starbound Modding' started by Santeripe, Dec 30, 2016.

Tags:
  1. Santeripe

    Santeripe Scruffy Nerf-Herder

    Okay so, as a part of a Christmas mod i wanted to do (I am aware that Christmas is over, you don't need to tell me) i wanted to add a Mrs. Claus NPC to go along with Santa.

    Problem is, it doesn't work.
    All i've managed to do so far is remove the Mrs. Claus cosmetic set from Santas merchant pool.

    Heres the code from the santa.npctype and mrsclaus.npctype files:


    {
    "type" : "santa",
    "baseType" : "merchant",

    "identity" : {
    "name" : "Santa Claus",
    "gender" : "male"
    },

    "disableWornArmor" : true,

    "scriptConfig" : {
    "offeredQuests" : [ ],
    "turnInQuests" : [ ],

    "merchant" : {
    "waitTime" : 40,
    "storeRadius" : 8,
    "poolsFile" : "/npcs/merchantpools.config",
    "categories" : {
    "override" : ["santamerchant" ]
    },
    "buyFactorRange" : [ 1.0, 1.0 ],
    "sellFactorRange" : [ 0.2, 0.2 ],
    "numItems" : 50,
    "behaviorConfig" : { "sleep" : false },
    "paneLayoutOverride" : {
    "windowtitle" : {
    "title" : " Holiday Merchant",
    "subtitle" : " 'Tis the season!"
    }
    }
    },

    "dialog" : {
    "merchant" : {
    "start" : {
    "default" : {
    "default" : [
    "Have you been naughty or nice this year, <entityname>?"
    ]
    }
    },
    "end" : {
    "default" : {
    "default" : [
    "And to all, a good night!"
    ]
    }
    },
    "follow" : {
    "default" : {
    "default" : [
    "Come with me, and help spread the festive cheer!"
    ]
    }
    },
    "welcome" : {
    "default" : {
    "default" : [
    "Have you been naughty or nice this year, <entityname>?"
    ]
    }
    },
    "tout" : {
    "default" : {
    "default" : [
    "Ho ho ho!"
    ]
    }
    }
    },
    "tenant" : {
    "grumbles" : {
    "tagCriteria" : "/dialog/merchant.config:tagCriteria",
    "enclosedArea" : "/dialog/merchant.config:enclosedArea",
    "otherDeed" : "/dialog/merchant.config:eek:therDeed",
    "severe" : "/dialog/merchant.config:severe",
    "final" : "/dialog/merchant.config:final"
    },
    "arrivedHome" : {
    "beacon" : "/dialog/merchant.config:beacon",
    "rent" : "/dialog/merchant.config:rent"
    }
    }
    }
    },


    "items" : {
    "override" : [
    [0, [
    {
    "head" : [ { "name" : "mrclaushead" } ],
    "chest" : [ { "name" : "mrclauschest" } ],
    "legs" : [ { "name" : "mrclauspants" } ],
    "back" : [ { "name" : "mrclausback" } ]
    }
    ]]
    ]
    }
    }



    {
    "type" : "mrsclaus",
    "baseType" : "merchant",

    "identity" : {
    "name" : "Mrs. Claus",
    "gender" : "female"
    },

    "disableWornArmor" : true,

    "scriptConfig" : {
    "offeredQuests" : [ ],
    "turnInQuests" : [ ],

    "merchant" : {
    "waitTime" : 40,
    "storeRadius" : 8,
    "poolsFile" : "/npcs/merchantpools.config",
    "categories" : {
    "override" : ["mrsclaus" ]
    },
    "buyFactorRange" : [ 1.0, 1.0 ],
    "sellFactorRange" : [ 0.2, 0.2 ],
    "numItems" : 50,
    "behaviorConfig" : { "sleep" : false },
    "paneLayoutOverride" : {
    "windowtitle" : {
    "title" : " Holiday Merchant",
    "subtitle" : " 'Tis the season!"
    }
    }
    },

    "dialog" : {
    "merchant" : {
    "start" : {
    "default" : {
    "default" : [
    "Have you been naughty or nice this year, <entityname>?"
    ]
    }
    },
    "end" : {
    "default" : {
    "default" : [
    "And to all, a good night!"
    ]
    }
    },
    "follow" : {
    "default" : {
    "default" : [
    "Come with me, and help spread the festive cheer!"
    ]
    }
    },
    "welcome" : {
    "default" : {
    "default" : [
    "Have you been naughty or nice this year, <entityname>?"
    ]
    }
    },
    "tout" : {
    "default" : {
    "default" : [
    "Ho ho ho!"
    ]
    }
    }
    },
    "tenant" : {
    "grumbles" : {
    "tagCriteria" : "/dialog/merchant.config:tagCriteria",
    "enclosedArea" : "/dialog/merchant.config:enclosedArea",
    "otherDeed" : "/dialog/merchant.config:eek:therDeed",
    "severe" : "/dialog/merchant.config:severe",
    "final" : "/dialog/merchant.config:final"
    },
    "arrivedHome" : {
    "beacon" : "/dialog/merchant.config:beacon",
    "rent" : "/dialog/merchant.config:rent"
    }
    }
    }
    },


    "items" : {
    "override" : [
    [0, [
    {
    "head" : [ { "name" : "hotholidayhead" } ],
    "chest" : [ { "name" : "hotholidaychest" } ],
    "legs" : [ { "name" : "hotholidaypants" } ]
    }
    ]]
    ]
    }
    }

    Those faces aren't intended to be there. Just picture ": o" without the space instead.
    I've never messed with NPCs before so im kind of lost.

    EDIT: I have looked around if the "type" : "santa" was specified further anywhere else but i didn't find anything.
     
  2. Dekadrachm

    Dekadrachm Heliosphere

    If I do remember correctly, while you may have an npc, you still need to have it placed in the outpost dungeon file so that it actually appears in-game.
     
  3. Dekadrachm

    Dekadrachm Heliosphere

    Code:
                     "height":8,
                     "id":1641,
                     "name":"",
                     "properties":
                        {
                         "npc":"human",
                         "seed":"14",
                         "typeName":"santa"
                        },
                     "rotation":0,
                     "type":"",
                     "visible":true,
                     "width":8,
                     "x":2512,
                     "y":1112
                    }
    I found that in the outpost dungeon, it is likely that you will need to make a patch in order to add your new santa to the outpost dungeon.
     
  4. Santeripe

    Santeripe Scruffy Nerf-Herder

    I added Mrs. Claus in there, gave her a different id, but now Santa is gone and only she appears.
     
  5. Dekadrachm

    Dekadrachm Heliosphere

    It's a start, did you delete Santa?
     
  6. Dekadrachm

    Dekadrachm Heliosphere

    If not, try changing the X and Y coordinates of the new npc, change x a little, leave y
     
  7. Santeripe

    Santeripe Scruffy Nerf-Herder

    I've tried that, but Santa is still missing (i didn't delete him btw).
     
  8. Dekadrachm

    Dekadrachm Heliosphere

    let me see what you added
     
  9. Santeripe

    Santeripe Scruffy Nerf-Herder

    Sorry for the "timely" response, forgot to check this forum all day :S

    Santa:
    {
    "type" : "santa",
    "baseType" : "merchant",

    "identity" : {
    "name" : "Santa Claus",
    "gender" : "male"
    },

    "disableWornArmor" : true,

    "scriptConfig" : {
    "offeredQuests" : [ ],
    "turnInQuests" : [ ],

    "merchant" : {
    "waitTime" : 40,
    "storeRadius" : 8,
    "poolsFile" : "/npcs/merchantpools.config",
    "categories" : {
    "override" : ["santamerchant" ]
    },
    "buyFactorRange" : [ 1.0, 1.0 ],
    "sellFactorRange" : [ 0.2, 0.2 ],
    "numItems" : 50,
    "behaviorConfig" : { "sleep" : false },
    "paneLayoutOverride" : {
    "windowtitle" : {
    "title" : " Holiday Merchant",
    "subtitle" : " 'Tis the season!"
    }
    }
    },

    "dialog" : {
    "merchant" : {
    "start" : {
    "default" : {
    "default" : [
    "Have you been naughty or nice this year, <entityname>?"
    ]
    }
    },
    "end" : {
    "default" : {
    "default" : [
    "And to all, a good night!"
    ]
    }
    },
    "follow" : {
    "default" : {
    "default" : [
    "Come with me, and help spread the festive cheer!"
    ]
    }
    },
    "welcome" : {
    "default" : {
    "default" : [
    "Have you been naughty or nice this year, <entityname>?"
    ]
    }
    },
    "tout" : {
    "default" : {
    "default" : [
    "Ho ho ho!"
    ]
    }
    }
    },
    "tenant" : {
    "grumbles" : {
    "tagCriteria" : "/dialog/merchant.config:tagCriteria",
    "enclosedArea" : "/dialog/merchant.config:enclosedArea",
    "otherDeed" : "/dialog/merchant.config:eek:therDeed",
    "severe" : "/dialog/merchant.config:severe",
    "final" : "/dialog/merchant.config:final"
    },
    "arrivedHome" : {
    "beacon" : "/dialog/merchant.config:beacon",
    "rent" : "/dialog/merchant.config:rent"
    }
    }
    }
    },


    "items" : {
    "override" : [
    [0, [
    {
    "head" : [ { "name" : "mrclaushead" } ],
    "chest" : [ { "name" : "mrclauschest" } ],
    "legs" : [ { "name" : "mrclauspants" } ],
    "back" : [ { "name" : "mrclausback" } ]
    }
    ]]
    ]
    }
    }

    Mrs. Claus:
    {
    "type" : "mrsclaus",
    "baseType" : "merchant",

    "identity" : {
    "name" : "Mrs. Claus",
    "gender" : "female"
    },

    "disableWornArmor" : true,

    "scriptConfig" : {
    "offeredQuests" : [ ],
    "turnInQuests" : [ ],

    "merchant" : {
    "waitTime" : 40,
    "storeRadius" : 8,
    "poolsFile" : "/npcs/merchantpools.config",
    "categories" : {
    "override" : ["mrsclaus" ]
    },
    "buyFactorRange" : [ 1.0, 1.0 ],
    "sellFactorRange" : [ 0.2, 0.2 ],
    "numItems" : 50,
    "behaviorConfig" : { "sleep" : false },
    "paneLayoutOverride" : {
    "windowtitle" : {
    "title" : " Holiday Merchant",
    "subtitle" : " 'Tis the season!"
    }
    }
    },

    "dialog" : {
    "merchant" : {
    "start" : {
    "default" : {
    "default" : [
    "Have you been naughty or nice this year, <entityname>?"
    ]
    }
    },
    "end" : {
    "default" : {
    "default" : [
    "And to all, a good night!"
    ]
    }
    },
    "follow" : {
    "default" : {
    "default" : [
    "Come with me, and help spread the festive cheer!"
    ]
    }
    },
    "welcome" : {
    "default" : {
    "default" : [
    "Have you been naughty or nice this year, <entityname>?"
    ]
    }
    },
    "tout" : {
    "default" : {
    "default" : [
    "Ho ho ho!"
    ]
    }
    }
    },
    "tenant" : {
    "grumbles" : {
    "tagCriteria" : "/dialog/merchant.config:tagCriteria",
    "enclosedArea" : "/dialog/merchant.config:enclosedArea",
    "otherDeed" : "/dialog/merchant.config:eek:therDeed",
    "severe" : "/dialog/merchant.config:severe",
    "final" : "/dialog/merchant.config:final"
    },
    "arrivedHome" : {
    "beacon" : "/dialog/merchant.config:beacon",
    "rent" : "/dialog/merchant.config:rent"
    }
    }
    }
    },


    "items" : {
    "override" : [
    [0, [
    {
    "head" : [ { "name" : "hotholidayhead" } ],
    "chest" : [ { "name" : "hotholidaychest" } ],
    "legs" : [ { "name" : "hotholidaypants" } ]
    }
    ]]
    ]
    }
    }

    Outpost.json (where Santa and Mrs. Claus are specified):
    {
    "npc":"human",
    "seed":"14",
    "typeName":"santa"
    },
    "rotation":0,
    "type":"",
    "visible":true,
    "width":8,
    "x":2512,
    "y":1112
    },
    {
    "height":8,
    "id":1842,
    "name":"",
    "properties":
    {
    "npc":"human",
    "seed":"14",
    "typeName":"mrsclaus"
    },
    "rotation":0,
    "type":"",
    "visible":true,
    "width":8,
    "x":2512,
    "y":1112
    },
     
  10. Dekadrachm

    Dekadrachm Heliosphere

    try changing the x coordinates and the seed
     
  11. Santeripe

    Santeripe Scruffy Nerf-Herder

    I did, it didn't help.
     
  12. HerrJunky

    HerrJunky Void-Bound Voyager

    You could try recreating Santa a different name of course ("newsanta" for example) and place him in the .json file as well... maybe that helps
     
  13. Santeripe

    Santeripe Scruffy Nerf-Herder

    Thats essentially what i did.
     

Share This Page