Robot Quests

So you want to make a Lunos™ robot quest? This doc will set ya on the right path.

Let’s make a Robot Quest!

So you want to make a LunosTM robot quest? This doc will set ya on the right path.

  1. Place a bot in the level where you want them.

    1. They have the prefix “Robot_TypeOfBot” and live under Lunos/Robot. We could probably throw them in a collection
    2. You can think of this actor as the body of the bot - bodies are swappable and can be customized later.
  2. Create a new RQ (Robot Quest)

    1. RQs live under Lunos/Robot/RobotQuests and have the prefix “RQ_WorldName_BotNameOrQuestName”.
    2. Right click in the content browser and “Create new Blueprint Class”
      {{0xc0008e19a0 0xc0008e19a0 image.png  alt text alt text 0xc0008222a0} 0 false}
    3. RQs rely on inheritance IE one can be based on another. For example, there is an RQ named “RQ_NeedItem” that bots like Mido are based off. If you are designing a quest that is based off something that already exists, be sure to select the appropriate parent in the “Pick Parent Class” dialog
      {{0xc0008e19a0 0xc0008e19a0 image-1.png  alt text alt text 0xc000822660} 1 false}
    4. Don’t worry if your quest idea isn’t listed / implemented - we can set up / reparent later (IE parent off of the RQ_RobotQuest directly)
    5. You can think of the RQ as the brain / function of the bot. The RQ holds a bunch of data and works as the central processor for the quest system
  3. Place the RQ you made into the level

    1. Placement doesn’t matter, but try to keep it close to the bot
    2. Make sure it lives in the same sublevel as the bot!
  4. Lnk the RQ you placed in level with the bot

    1. Select the RQ (orb thing) and use the eyedropper or dropdown to assign “Robot pawn”
      {{0xc0008e19a0 0xc0008e19a0 image-2.png  alt text alt text 0xc000822960} 2 false}
  5. Create a new BT (Behavior Tree) in the same folder as the new RQ by duplicating any existing BT

    1. No inheritance here, just good old fashioned copying a template
    2. You can alt drag from the content browser to make a copy and rename after
    3. BT_NameOfQuestOrBot
  6. Assign values in RQ class

    1. Double click the RQ you made to open the BP editor
    2. Edit the default values on the right:
      1. Tag should be a simplified id for the character, either their name if it has stuck (like Mido) or a quest description (SummerStuckBot)
      2. Be sure to fill out Friendly name and subtitle
      3. Set the BT you made into the Behavior Tree slot
    3. This BP is also where any quest logic lives (IE how do we know when the quest is satisfied?)
      {{0xc0008e19a0 0xc0008e19a0 image-3.png  alt text alt text 0xc000822c60} 3 false}
    4. “TryReportQuestSatisfied” is the actual End point. This code fires off when the bot is hit and checks if it has a specified item tag. If it does, it reports “quest satisfied”.
    5. Don’t worry if you don’t wanna actually code the quest in yet - the bots will work with no code added
  7. Fill out the BT with your dialogue / dialogue logic

    1. You’ll probably want to start with “first chat”
      {{0xc0008e19a0 0xc0008e19a0 image-4.png  alt text alt text 0xc00069a480} 4 false}
    2. Select the existing “BTT_DisplayDialogue” nodes and fill out Line, player line, and emote
    3. You can copy these around / delete
    4. Make sure they are in left to right order - this determines the order, not height
    5. “Post Intro” is after you have chatted with them before
      1. I have not yet implemented variations, but you can make unconnected nodes for me to attach once I do
    6. Quest satisfied has 2 trees - one for if you have never chatted with them before one one for if you have. No variations needed here
      1. Be sure to put a “BTT_GiveItem” node somewhere in here so the bot gives up the goodies! By default, these will give level specific data, you should have to change anything
      2. Additionally, make sure there is a “BTT_ReportQuestComplete” node as well!
    7. Post Quest is chatting with them after the quest has been turned in.
    8. We can add additional logic as needed - for example, retrieving data like how many of something you collected, or saying a different line after a flag has been set.
    9. You can set a global flag with “BTT_SetGlobalFlag” - for example this one sets a flag that calls down the ship in summer.
      {{0xc0008e19a0 0xc0008e19a0 image-5.png  alt text alt text 0xc00069a960} 5 false}
    10. BTs auto close their dialog, so no need to add anything to finish a convo.
  8. Try it out!

    1. Your bot should now talk!
    2. Getting the quest to work will be dependent on what you want them to do. Item fetch quests are as easy as inheriting “RQ_NeedItem” and setting an appropriate item tag, but others may be much more complicated