Modding Help Custom radio messgages and story mode characters?

Discussion in 'Starbound Modding' started by Dekadrachm, Mar 20, 2017.

  1. Dekadrachm

    Dekadrachm Giant Laser Beams

    Hello, I usually don't ask for help, but I am now. This has been an annoying experience for me and I believe I have tracked down at least half of the files that relate to radio messages and their activations.

    Basically what I'm planning is:
    A new NPC at the outpost(which I already have there) using radio messages like when the player runs into Nuru.
    I have sprited a portrait for such scenarios.
    My issues is I can't seem to get the portrait to be used. I've tried radio messages on picking up an object but they didn't work.

    My main goal is to use portraits for this NPC to introduce them as a character of importance while avoiding the need to add dungeon triggers.

    Here is the code for my custom radio message
    Code:
    {
    
    
    // on picking up misc objects/items
    
      "pickupBMvendingmachine" : {
        "unique" : false,
        "senderName" : "Anon",
        "portraitImage" : "/interface/chatbubbles/deka.png:<frame>",
        "text" : "That will come in handy, don't tell anyone where you got it from."
      }
    }
    
    Here is the objects code, the one I want to use for the radio message.
    Code:
    {
      "objectName" : "BMvendingmachine",
      "colonyTags" : ["human","humanbunker","commerce"],
      "rarity" : "Legendary",
      "description" : "Shady items for shady diamonds?",
      "shortdescription" : "Black Market Vendor",
      "race" : "human",
      "category" : "^pink;Black Market",
      "price" : 2000,
      "lightColor" : [204, 255, 255],
      "printable" : false,
    
      "apexDescription" : "A Black Market vending machine. It's probably best to be careful when buying from here.",
      "avianDescription" : "This vending machine gives off a shady vibe.",
      "floranDescription" : "Clever machine gives Floran fun goodiessss.",
      "glitchDescription" : "Indecisive. I can't decide what to buy.",
      "humanDescription" : "Oh boy, a vending machine with a camera! Maybe they sell pictures?",
      "hylotlDescription" : "A vending machine for some Black Market business. It may be worth checking out.",
      "novakidDescription" : "A shady vendin' machine, looks to be my type of store.",
    
      "interactAction" : "OpenMerchantInterface",
      "interactData" : {
        "config" : "/interface/windowconfig/vendingmachine.config",
        "paneLayoutOverride" : {
          "windowtitle" : {
            "title" : " ^pink;The Black Market",
            "subtitle" : " 100% legal-ish goods!"
          }
        },
        "buyFactor" : 2.5,
        "sellFactor" : 0.5,
        "items" : [
          { "item" : "diamond" },
          { "item" : { "name" : "steamshotgun" }, "prerequisiteQuest" : "avian_mission2" },
          { "item" : { "name" : "steamrifle" }, "prerequisiteQuest" : "avian_mission2" },
          { "item" : { "name" : "steampistol" }, "prerequisiteQuest" : "avian_mission2" },
          { "item" : { "name" : "railbomb" }, "prerequisiteQuest" : "hylotl_mission2" },
          { "item" : { "name" : "chimera" }, "prerequisiteQuest" : "apex_mission2" }
    
        ]
      },
    
      "inventoryIcon" : "vendingmachineicon.png",
    
      "orientations" : [
     
        {
          "image" : "blackmarketvendingmachineleft.png:<color>.<frame>",
          "imagePosition" : [-8, 0],
          "direction" : "left",
          "flipImages" : false,
          "frames" : 6,
          "animationCycle" : 1,
    
          "spaceScan" : 0.1,
          "anchors" : [ "bottom" ],
          "collision" : "platform"
        },
        {
          "image" : "blackmarketvendingmachineright.png:<color>.<frame>",
          "imagePosition" : [-8, 0],
          "direction" : "right",
          "frames" : 6,
          "animationCycle" : 1,
    
          "spaceScan" : 0.1,
          "anchors" : [ "bottom" ],
          "collision" : "platform"
        }
      ],
    
      "scripts" : [
        "/scripts/npcToyObject.lua"
      ],
      "scriptDelta" : 60,
    
      "soundEffect" : "/sfx/objects/fluorescent_light_loud.ogg",
      "soundEffectRangeMultiplier" : 0.5,
    
      "npcToy" : {
        "influence" : [
          "vendingmachineActivate",
          "vendingmachineCollect",
          "vendingmachineComplete"
        ],
        "defaultReactions" : {
          "vendingmachineActivate" : [
            [1.0, "pressbutton"]
          ],
          "vendingmachineCollect" : [
            [1.0, "crouchcollect"]
          ],
          "vendingmachineComplete" : [
            [1.0, "smile"]
          ]
        },
        "radioMessagesOnPickup" : [ "pickupBMvendingmachine" ],
        "preciseStandPositionLeft" : [-0.5, 0.0],
        "preciseStandPositionRight" : [2.0, 0.0],
        "maxNpcs" : 1
      }
    }
    
    
    Here is my quest template, I wanted to use Esther's scanning missions as a base for the radio message appearances.
    Can I track the amount of diamonds as a progress towards a main goal and based on the quantity of diamonds the player has, broadcast radio messages much like what is done in these scanning missions?
    Code:
    {
      "id" : "blackmarket1",
      "title" : "^pink;Shady items for shady diamonds!",
      "text" : "Psssst... Psst... Hey you, yeah you. You look like the type that might be interested in some ^green;legit^white; wares. I'll give you acess to them if you bring me ^blue; 5 diamonds^white; as collateral.",
      "completionText" : "I knew you couldn't resist, I am a man of my word, something that is rare these days. I've told the penguin merchants that you're allowed to browse our ^green;legit^white; wares. Watch yourself.",
      "moneyRange" : [0, 0],
      "rewards" : [],
    
      "updateDelta" : 10,
      "script" : "/quests/scripts/main.lua",
      "scriptConfig" : {
        "portraits" : {
          "questStarted" : "questGiver",
          "questComplete" : "questReceiver"
        },
        "requireTurnIn" : true,
        "turnInDescription" : "Give ^blue;Diamonds^reset; to ^orange;The Shady Man^reset; at the ^orange;outpost^reset;.",
       
        "conditions" : [
          {
            "type" : "gatherItem",
            "itemName" : "diamond",
            "count" : 5,
            "consume" : true,
            "description" : "Find ^orange;<itemName>^reset;: ^green;<current> / <required>^reset;"
          }
        ],
            "radioMessages" : {
          "startWithProgress" : {
            "messageId" : "blackmarket_mission1_swp",
            "type" : "quest",
            "unique" : false,
            "senderName" : "Anon",
            "text" : "So you have some ^blue;diamonds on you? ^reset;That's not enough, bring me the rest.",
            "portraitImage" : "/interface/chatbubbles/deka.png:<frame>"
          },
          "startAlreadyComplete" : {
            "messageId" : "blackmarket_mission1_sac",
            "type" : "quest",
            "unique" : false,
            "senderName" : "Anon",
            "text" : "You're a fool to be walking around with such valuables in a place like this, lucky for you, you saved yourself a journy. Hand them over.",
            "portraitImage" : "/interface/chatbubbles/deka.png:<frame>"
          },
          "complete" : {
            "messageId" : "blackmarket_mission1_c",
            "type" : "quest",
            "unique" : false,
            "senderName" : "Anon",
            "text" : "That is all I need, come talk to me when your ready.",
            "portraitImage" : "/interface/chatbubbles/deka.png:<frame>"
          }
        }
      }
    }
    
    Here is my outpost npc, he is added their with a patch file.
    Code:
    {
      "type" : "outpostblackmarketrep",
      "baseType" : "outpostcivilian",
     
      "npcname" : "Deka",
      "identity" : {
        "gender" : "male"
      },
    
      "scriptConfig" : {
        "offeredQuests" : [ "blackmarket1"],
        "turnInQuests" : [ "blackmarket1"],
            "personalities" : [
            [1.0, { "personality" : "normal", "reactions" : {} }]
        ],
       
          "behaviorConfig" : {
          "greetingChance" : 0,
          "play" : false,
          "chat" : false
        },
       
        "chatPortrait" : "/interface/chatbubbles/deka.png:<frame>",
       
            "chatSounds" : {
          "avian" : {
            "male" : [
              "/sfx/humanoid/deka_chatter_1.ogg"
            ],
            "female" : [
              "/sfx/humanoid/deka_chatter_1.ogg"
            ]
          },
          "apex" : {
            "male" : [
              "/sfx/humanoid/deka_chatter_1.ogg"
            ],
            "female" : [
              "/sfx/humanoid/deka_chatter_1.ogg"
            ]
          },
          "floran" : {
            "male" : [
              "/sfx/humanoid/deka_chatter_1.ogg"
            ],
            "female" : [
              "/sfx/humanoid/deka_chatter_1.ogg"
            ]
          },
          "glitch" : {
            "male" : [
              "/sfx/humanoid/deka_chatter_1.ogg"
            ],
            "female" : [
              "/sfx/humanoid/deka_chatter_1.ogg"
            ]
          },
          "human" : {
            "male" : [
              "/sfx/humanoid/deka_chatter_1.ogg"
            ],
            "female" : [
              "/sfx/humanoid/deka_chatter_1.ogg"
            ]
          },
          "hylotl" : {
            "male" : [
              "/sfx/humanoid/deka_chatter_1.ogg"
            ],
            "female" : [
              "/sfx/humanoid/deka_chatter_1.ogg"
            ]
          },
          "default" : {
            "male" : [
              "/sfx/humanoid/deka_chatter_1.ogg"
            ],
            "female" : [
              "/sfx/humanoid/deka_chatter_1.ogg"
            ]
          }
        },
    
        "dialog" : {
          "converse" : {
            "default" : {
              "default" : [
                "Comeback later, I might have something for you."
              ]
            }
          }
        }
      },
    
      "items" : {
        "override" : [
          [0, [
              {
                "head" : [ { "name" : "shadytophat", "parameters" : { "colorIndex" : 0 } } ],
                "chest" : [ { "name" : "cultistchest", "parameters" : { "colorIndex" : 1 } } ],
                "legs" : [ { "name" : "cultistlegs", "parameters" : { "colorIndex" : 1 } } ],
                "back" : [ { "name" : "simplecapeback", "parameters" : { "colorIndex" : 1 } } ]
              }
            ] ]
        ]
      }
    }
    
    I think that's all the information I have, any help will be appreciated!

    here is the portrait
    [​IMG]

    It may also be worth noting no errors are being thrown in the log.
     
  2. IHart

    IHart Scruffy Nerf-Herder

    frames file?
     
  3. Dekadrachm

    Dekadrachm Giant Laser Beams

    Lol, that doesn't seem relevant, but if you must see...

    Code:
    {
      "frameGrid" : {
        "size" : [66, 68],
        "dimensions" : [2, 1],
    
        "names" : [
          [ "0", "1" ]
        ]
      },
      "aliases" : {
        "default" : "0"
      }
    }
    
     
  4. Dekadrachm

    Dekadrachm Giant Laser Beams

    It may be worth noting that I got the portrait to appear just now with a radio message using the specific ID.
    I got it working for when an object is picked up, now I just need it for quests.
     
    Last edited: Mar 20, 2017
  5. IHart

    IHart Scruffy Nerf-Herder

    what did you change for this to work?
    clarify, the quest messages are showing up without the portrait?
     

Share This Page