Modding Help Custom Quest Help

Discussion in 'Starbound Modding' started by Mioure, Aug 27, 2016.

  1. Mioure

    Mioure Scruffy Nerf-Herder

    I am stumped.
    Background:
    I am trying to create a quest from an item that is craftable in the player-hands menu [C].
    My intentions were to allow the player to receive the item and initiate a quest where they had to then go to Elliott and complete the quest, to then unlock the second quest in the chain, which rewards them with a Codex.
    Craft "Scientist's Plea" > Go to Elliott > Complete Quest (Plea not consumed) > Accept New Quest > Complete Quest (Plea Consumed) > Receive Codex
    Simple enough?
    I have unpacked Frackin'Universe and have been using it as a reference, but I have no Idea why none of this is working as intended.

    The Issue:
    After crafting Scientist's Plea, The quest prompt shows up like expected, but after Accepting the quest, it is immediately completed.
    I figured it was a bug with the first questtemplate, So after checking the outpost, No NPCs had any question marks or exclamation marks (Couldn't find the second quest).

    What I've Tried:
    I've Tried rearranging the code, Adding new lines, taking some out, but nothing seems to work regardless of whether I use the entirety of the Science Brochure from Frackin, or just copy a normal questtemplate from the main Assests folder.
    The Starbound.log doesn't come up with any errors before, during, or even after the quest has been accepted and completed.
    At this point, I am just clueless on what I'm suppose to do, or missing. Can anyone help?

    Files:
    beginnersdistress.item

    Code:
    {
      "itemName" : "beginnersdistress",
      "price" : 4,
      "rarity" : "Common",
      "category" : "quest",
      "inventoryIcon" : "beginnersdistress.png",
      "description" : "I have found it! I need someone willing to carry on this research!",
      "shortdescription" : "Scientist's  Plea",
      "pickupQuestTemplates" : [ "outpostalchemy.gearup" ]
    }
    
    

    outpostalchemy.questtemplate

    Code:
    {
      "id" : "outpostalchemy.gearup",
      "mainQuest" : true,
      "prerequisites" : [ ],
      "title" : "^orange;Meeting the Scientist",
      "text" : "A Scientist at the outpost wants to meet with you; It could be very important.",
      "completionText" : " You have accepted to pursue archaic science of ^green;Alchemy^white;. It seems the Scientist wants to give you a parting gift.",
      "moneyRange" : [314, 314],
      "canBeAbandoned" : false,
      "requireTurnIn" : true,
     
      "updateDelta" : 10,
      "script" : "/quests/scripts/main.lua",
      "scriptConfig" : {
      "portraits" : {
      "questStarted" : {
      "portrait" : [ {"image" : "/objects/outpost/techlab/techlabscientistportrait.png"} ],
      "title" : "Elliott"
      },
      "questComplete" : {
      "portrait" : [ {"image" : "/objects/outpost/techlab/techlabscientistportrait.png"} ],
      "title" : "Elliott"
      }
      },
       "turnInDescription" : "Bring the ^orange;Paper^reset; to the ^green;Scientist^reset; at the ^orange;Outpost^reset;",
    
      "conditions" : [
      {
      "type" : "gatherItem",
      "itemName" : "beginnersdistress",
      "count" : 1,
      "consume" : false
      }
      ]
      }
    }
    

    outpostalchemy2.questtemplate

    Code:
    {
      "id" : "outpostalchemy2.gearup",
      "mainQuest" : true,
      "prerequisites" : [ "outpostalchemy" ],
      "title" : "^orange;Accepting the Journal",
      "text" : "I won't let you go without a proper direction to head in! As you can see, I no hope in trying to understand ^green;Alchemy^white; and I don't have the time to dedicate to reaseaching it. Thank you for accepting this task for me, and here is the ^orange;Journal^white; I found earlier.",
      "completionText" : " You have accepted the Journal. It looks torn, and dusty. It is hard to the touch and yet, it opens gracefully. You wonder what it contains.",
      "moneyRange" : [159, 159],
      "rewards" : [ [ [ "beginnersjournal", 1 ] ] ],
      "canBeAbandoned" : false,
      "planetMode" : "none",
      "requireTurnIn" : true,
    
      "updateDelta" : 10,
      "script" : "/quests/scripts/main.lua",
      "scriptConfig" : {
      "portraits" : {
      "questStarted" : {
      "portrait" : [ {"image" : "/objects/outpost/techlab/techlabscientistportrait.png"} ],
      "title" : "Elliott"
      },
      "questComplete" : {
      "portrait" : [ {"image" : "/objects/outpost/techlab/techlabscientistportrait.png"} ],
      "title" : "Elliott"
      }
      },  
       "turnInDescription" : "Recieve the ^orange;Journal^reset; from the ^green;Scientist^reset;",
    
      "conditions" : [
      {
      "type" : "gatherItem",
      "itemName" : "beginnersdistress",
      "count" : 1,
      "consume" : true
      }
      ]
      }
    }
    

    outpostapexscientist.npctype.patch

    Code:
    [
     {"op" : "add", "path" : "/scriptConfig/offeredQuests/-", "value" : "outpostalchemy2.gearup"},
     {"op" : "add", "path" : "/scriptConfig/offeredQuests/-", "value" : "outpostalchemy.gearup"},
     {"op" : "add", "path" : "/scriptConfig/turnInQuests/-", "value" : "outpostalchemy2.gearup"},
     {"op" : "add", "path" : "/scriptConfig/turnInQuests/-", "value" : "outpostalchemy.gearup"}
    ]
    

    And just incase you need it, Here is the beginnersjournal.codex file

    Code:
    {
      "id" : "beginnersjournal",
      "title" : "Beginner's Alchemy",
      "description" : "A booklet on the ancient art of Alchemy",
      "icon" : "beginnersjournal.png",
      "contentPages" : [
      " Alchemy is a form of archaic medicine that allows one to control essence in unnatural ways.
     
      -  Written by Julieanne.",
      "Table of Contents:
      1-- History
      5-- Starting Out
      7-- Materials
      12- Essence
      17- Advanced Tactics
      2//
      ...The rest of the page illegible...",
      "...Multiple Pages have been torn beyond recognition...",
      " 6: Starting Out
      - You want to create an Alchemy Table using Wood, Fibres, and Glass for vials.
      - This is where you will be conducting most of your projects.",
      " 7: Materials
      - Most, If not everything dealing with Alchemy uses powders.
      - These powders can be obtained through residue, crushing refined ores, or even within the material itself.
      - Common powders include most valuable ore, coal, and items from mobs such as Ven//////// and Le///////
      ...The rest of the page is illegible..."
      ],
      "itemConfig" : {
      "rarity" : "rare",
      "price" : 31
      },
      "learnBlueprintsOnPickup" : [
      "lightalchemytable"
      ]
    }
    
     
  2. Inf_Wolf14

    Inf_Wolf14 Parsec Taste Tester

    The problem is that the quest the item grants is also fulfilled by collecting the same item. It's not a function error, it's a logic error.
    (Player has item, item gives quest, quest requires player to collect said item, player already has said item; therefore, quest is complete.)

    I can recommend possibly the first quest be turned in to Elliot, then the reward gives you an item which fulfills the second quest.
    I'm not exactly sure what your goal is but I hope I've helped. :)
     
  3. Mioure

    Mioure Scruffy Nerf-Herder

    I could try it your way, making the player gain some sort of item or something before being able to complete the quest, but that still doesn't solve the issue of the quest being completed immediately, without talking to the NPC. It also doesn't solve the issue of the second quest not appearing, yet meeting the same requirements as the first.

    If my understanding is correct, this code should make it to where it MUST be turned in to an NPC, and can't be completed remotely, which is exactly opposite of what is happening.
    Code:
    "requireTurnIn" : true,
    I appreciate your input though, thanks!
     

Share This Page