Modding Help changing NPC weapons

Discussion in 'Starbound Modding' started by Daichi Yamakuro, Apr 14, 2020.

  1. Daichi Yamakuro

    Daichi Yamakuro Void-Bound Voyager

    Hey Everyone,

    Still kinda new to all this but I have some joke weapons (from other mods) and I want to have the npcs be equipped with them as well when they randomly spawn. A cultist, for example, or floran that guard their hunting grounds.

    to try to at least change their weapon, I've made a cultist.patch in a 'npcs/' folder in a .pak that goes like this (copied it from what I saw elsewhere):


    [
    {
    "op": "replace",
    "path": "/items/-",
    "value": [
    [0, [
    {
    "primary" : [
    { "name" : "npchammer"}
    ]
    }
    ] ]
    ]
    }
    ]

    In my mind, this should swap the cultist's normal primary weapon (the npccultistbroadsword) with the npc hammer. However, when I spawn a bunch, it's just pistols and broadswords galore. What am I doing wrong?

    Also second question: all the npc weapons appear to be in a separate folder, can I just dump my joke weapons in there like that or do I have to change something about them first?

    Thanks!
     

Share This Page