User:Allen Kerensky/Myriad Lite Preview 5/BAM Sim Builder Notes
From OpenSimulator
Contents |
Myriad Lite BAM Sim Builder Notes
The Myriad Lite meter includes the Baroun's Adventure Machine (BAM) v1 HUD code.
This allows you to create an NPC that gives out quests, goal items that move the character through the quest, and hand out prizes for completing the tasks.
Creating The Quest Outline
- NPC Name That Starts and Ends Each Adventure - Who is going to set the player on the quest?
- Adventure Name - What is a shorthand name for the quest itself?
- Adventure Description - What is the goal of the quest once all tasks are complete?
Planning Tasks in the Adventure
Adventure: Find the Red Salt
- Go to mine.
- Find the barrel of processed salt.
- Return to baker.
Adventure Numbers and Task Numbers
Start each new adventure's tasks on a number which a multiple of 100 * the adventure number.
Task numbers for adventure 1 would fall into the range of 100-199.
The base task number (100, 200, etc) is the task number assigned to the Adventure Giver NPC itself.
Each step of the adventure that PC starts you on is then numbered sequentially (101, 102, 103...) from that NPC's number.
Keep a spreadsheet of Adventure Tasks
Task Number, Task Description, Task Hint, Goal Object, Goal Type (location, touch, collide), Prize for Task, Sound for Task, Next Task
Example - Managing Adventures
I keep track of adventures sequentually - for example, the Baker in Kasra is the first one, so that adventure is #1
Inside an adventure, there's various tasks.
I number them as the Adventure number, then the step in the adventure. The Baker tasks are 101, 102, 103, etc
If you're planning an Adventure, then it's easiest for me to list the Tasks, and how they connect.
The goals check for what task you're in before they interact with the player, so I need to know that.
The checking keeps people from just teleporting to the last step and getting the prize.
The "Done Sound UUID" you can get from right-clicking on a sound in your SL inventory.
The sound needs to be "copy" so it'll copy to other people.
Note that it doesn't have to be music - the Professor in the Green Caste Quest uses this to talk out loud.
The Done Text is displayed when the player finishes a task
The Todo Text and Hint are displayed when they get a new task
They also display if they touch the BAM HUD
Any object or goal can give a Prize.
The prize needs to be copy/transfer perms.
Here's a list of tasks for "The Baker" as an example:
000 -- Player isn't in an adventure, meets the Baker, gets adventure 100 -- Adventure Giver Baker : "Go to the salt mines" is given by the Baker ToDo text="Find the source of the Red Salt"; Hint text ="It's probably in the mines of Kasra near the Tahari"; 101 -- Location Goal, Red Salt Mine. Active task is 100. "Find the salt in the mine" Done text: "You've found the mines!" Done Sound UUID: "f78027c9-e8bb-38f2-9b11-1d4e89ac10a4" ToDo text "Find some processed salt inside the mine"; Hint text="Checking casks might be a good idea" 102 -- Touch goal, cask of Red Salt. Active task is 101. Gives task 103 Done Text="You've found the salt!"; Done sound UUID="f78027c9-e8bb-38f2-9b11-1d4e89ac10a4"; ToDo text "Return the salt to the baker"; Hint text "He's where you first met him" 103 -- Adventure Giver Baker: checks for 103. Requires 101,102 completed. On adventure complete, gives prize. Done Text: Great - Now I can finish my baking!" Done Sound UUID: "f78027c9-e8bb-38f2-9b11-1d4e89ac10a4" Prize: "Sweet Roll"
Creating The NPC and Goals
Once you have laid out the adventure outline and have an idea of the data, you're ready to load the quest NPC and goals.
Quest NPC
All quests start and end with an NPC. The first quest NPC would be fictional task 100, and each step of the quest would be 101, 102, etc, and when done, the player returns to the quest NPC to claim the prize.
There are a number steps and configurable items for a BAM Adventure Giver NPC:
- Create your quest NPC item.
- Drop in the BAM Adventure Giver NPC script.
- Edit the "Adventure Specific Configuration" section at the top of the script. The variables are explained next.
- Set MSG_NPCNAME to the NPC's game name
- Choose a hovertext color for the NPC - http://wiki.secondlife.com/wiki/Category:LSL_Color
- Choose an alpha/transparency - 0.0 is totally clear, 1.0 is totally visible.
- ADVNAME: Adventure Name - set a short name for this adventure. Example: "Red Salt Quest"
- ADVTEXT: Adventure Description - set a short one-line description for this adventure. Example: "Find the rest salt for the baker"
- ADV_ATTRACT: Attract Message - Set a message for the NPC to attract player help. Example: " can you help me find some red salt?"
- MSG_OWNER_STARTADV: Message to owner that player started adventure. Example: " has started Red Salt Quest"
- ADV_ALL_TASKS: list of all task numbers that MUST be completed to get the prize. Example: "101, 102" NOTE: This list is a comma-separated values list, so there should be a SPACE after each comma. If the adventure does not finish when the player has performed all tasks, check this first!
- MSG_ADV_INCOMPLETE: what NPC should say if player comes back with not all tasks complete. Example: " Not done yet?"
- MSG_OWNER_DONEADV: message to quest owner when player finishes a quest. Example: "has completed Red Salt Quest"
- ADVDONETEXT: message from NPC to player that the quest is done. Example: "Thanks for finding red salt for me!"
- ADVDONEUUID: uuid key of a sound to play when player is successful on the quest, like a fanfare. Example: a "TA-DA" horn sound Can be the name of a sound effect file in the NPC object inventory too.
- PRIZENAME: name of a prize object in NPC object inventory to give to the player when they finish the quest. Example: Sweet roll or NONE. Put the Prize object in the NPC's object inventory. The key value NONE means do not give a prize at the end of the quest.
- ADVTASKTDNUM: the task to-do number of the NEXT TASK. Example: 101
- ADTASKTODO: a text description of the NEXT TASK the player should do. Example: "Find the Red Salt Mine."
- ADVTASKTODOHINT: a hint for the player on how to complete the NEXT TASK they are being given. Example: "You think the Red Salt Mine is northeast."
- TRIGGERWAIT: how long in seconds before a player can re-trigger this NPC or goal. Example: 60
- PRIZEWAIT: how long in seconds between when player can re-do quest and get the prize again. Example: 3600 (= 1 hour, or 86400 = 1 day)
- EVENTTIMER: how long between timer events, the smaller the number, the more lag. Example: 15.0 The timer processes the trigger and prize given lists to expire old entries - too long a wait between timers means longer before players can retry the quests.
- Save the script and let the NPC restart.
- Move one to creating the quest goals for this NPC's quest.
Quest Goals
Each step/task of the quest or adventure is represented by a goal object.
There are two basic parts to configuring a Goal object:
- Configure the current task that the player must be working on, in order to have "successfully" found this goal.
- Configure a NEXT task to hand out when the player finishes this current task, to send the player on to the next goal.
There are currently 3 starter goal objects, with many more possible, to help nudge players through your quest.
Collision Goal
There is a collision goal, which the player must physically collide with to activate.
This is useful as a transparent/phantom "detector" that a player has entered a general area, to hand them the next task that is more specifically what to do in that area.
Location Goal
There is a location goal, which uses a sensor to detect when the player is nearby within its range.
This is also useful as a detector to tell when a player is getting near a specific goal, to hand out a more specific clue.
Touch Goal
There is a touch goal which must be clicked with the mouse.
This could represent opening the treasure chest, opening the door to the final clue area, pressing the correct button on the bomb to defuse it, etc.
The touch goal checks the distance to the player to make sure the goal "is in arm's reach" of the player when activated.
By combining these three goals, and clever task descriptions and hints, you can build an infinite number of scavenger-hunt style quests for players in your regions.
Configuring all three goals is a similar process:
- Create the goal object - such as a door, box, control panel button, etc.
- Drop in the goal script
- Edit the goal script ADVENTURE-SPECIFIC CONFIGURATION settings at the top.
- MSG_SETTEXT: the hovertext message over the quest goal. Example: "Processed Red Salt Cask";
- MSG_SETTEXT_COLOR: color of the hovertext. Examples: http://wiki.secondlife.com/wiki/Category:LSL_Color
- MSG_SETTEXT_ALPHA: alpha/transparency of the hovertext. Examples: 0.0 = invisible, 1.0 = fully visible.
- ADVNAME: short name of this adventure: Example "Red Salt Quest"
- ADVGOAL: the current task number that finding this goal will complete. Example: 101 Note: You can have multiple goal objects with the same goal number. That gives players multiple avenues to complete the same step of the quest.
- TASKDONETEXT: message to player they they found the goal to complete this task. Example: "You've found the salt mine! You'll need a lantern."
- TASKDONEUUID: uuid of a sound to play for player when they complete this step. Example: "step101done" Note: if you put a sound file in the goal object inventory, then this variable can be the name of the sound file.
- PRIZENAME: A prize to give player for completing this task step in the overrall quest. Example: "Cave Lantern" Note: Not every goal needs to give out a prize, but this lets you equip player with necessary bits to complete later tasks in the quest.
- ADVTASKTDNUM: the NEXT task number "to-do" now that player has completed THIS task. Example: 102 NOTE: You can have multiple goals with the same task number that give the same OR DIFFERENT Next Task numbers. This can channel players into different parts of your quests based on which goal items they activated at that step.
- ADVTASKTODO: a description of the NEXT task in the quest. Example: "Explore the mine for processed red salt."
- ADVTASKTODOHINT: a hint to help player complete the next task. Example: "Processed red salt is usually stored and shipped in casks or barrels"
- TRIGGERWAIT: how long must player wait before being able to re-trigger this goal, in seconds. Example: 60
- PRIZEWAIT: how long must player wait between getting the prize from this goal again, in seconds: Example 3600 (=1 hour, 86400 = 1 day)
- EVENTTIMER: time between processing the recent and prizegiven lists, in seconds. Example 15.0 Note: Smaller numbers mean more accuracy but more lag. Larger numbers mean less lag but less precise list processing and cleanup.
- Save and close the script.
- Place the next goal using steps 1-4 above...
- Set the last goal in the quest to give the player a TASK and HINT to go back to the quest NPC for the main quest prize.
TESTING THE QUEST
- Wear your Myriad Lite meter.
- Click the Adventure Giver NPC.
- Follow the quest instructions step by step.
- Verify you can complete it in the designed order and that you see the text, hear the sounds, and get the prizes as intended.
- Reset the meter.
- Start the quest again, but try quest goals out of order to verify the sequences work as intended.