Create a free account to remove all ad content.

Author Topic:  Lets build a Quest  (Read 3052 times)

0 Members and 1 Guest are viewing this topic.

Craig

  • Developer
  • Extreme Member
  • *
  • Posts: 6655
  • Dig Deep
    • View Profile
    • Twitter
  • Steam: tota1miner
Re: Lets build a Quest
« Reply #30 on: August 02, 2014, 02:52:10 AM »
Just a thought.

When you go up to the dungeon after talking to bob, you should make a choice between a normal difficulty dungeon or a legendary one. This would mean that on legendary you have a better chance at getting the drop you need and/or maybe the zombies have a chance at dropping other tools/food/money. Also in legendary obviously the zombies would be stronger and be connected to a different set of scripts if that's what's needed. I'm not sure what the extent of scripts are yet.

Edit:1
For convenience it would be the same dungeon to avoid clutter but two buttons so you can chose between difficulties. Or two separate depending in which ever one is easier. But making it one dungeon would be better
Yes the original idea by Conmaan was multiple lairs of increasing difficulty. I didn't include scripts for multiple lairs for the sake of brevity and not to over complicate the core example, but you will notice my scripts are called Quests\MOAG\DungeonLair1xxx, so to create a 2nd and 3rd lair just duplicate those scripts and rename them to Lair2, Lair3 etc, and the script that spawns the mobs would change the number of zombies spawned (more for higher difficulty) and the chance of the drops (less chance of getting the battle axe drop for higher difficulty). Each lair would be entered via a different door, that charged a progressively higher toll (to the higher difficulty lairs).
« Last Edit: August 02, 2014, 02:54:13 AM by Craig »

Gary

  • Tester
  • Supreme Member
  • *
  • Posts: 2942
  • Steam: Conmaan ... ... Discord: Conmaan #9586
    • View Profile
Re: Lets build a Quest
« Reply #31 on: August 02, 2014, 02:57:32 AM »
No, its the name of the script to run when the mob is killed.

I must be blind, but I cant seem to find what that script does?

Edit: Nevermind. I figured out that it just tests to see if the player has the item. Makes sense! Thanks.


               

Link to my youtube channel:
https://www.youtube.com/channel/UCo4rmelSOUB9YMM0Is-zWyQ

Clumpyscotyman1

  • Member
  • *
  • Posts: 159
  • No, I'm not Scottish.
    • View Profile
Re: Lets build a Quest
« Reply #32 on: August 02, 2014, 03:12:32 AM »
Yes the original idea by Conmaan was multiple lairs of increasing difficulty. I didn't include scripts for multiple lairs for the sake of brevity and not to over complicate the core example, but you will notice my scripts are called Quests\MOAG\DungeonLair1xxx, so to create a 2nd and 3rd lair just duplicate those scripts and rename them to Lair2, Lair3 etc, and the script that spawns the mobs would change the number of zombies spawned (more for higher difficulty) and the chance of the drops (less chance of getting the battle axe drop for higher difficulty). Each lair would be entered via a different door, that charged a progressively higher toll (to the higher difficulty lairs).

So if I'm understanding correctly, if a player is not having any luck getting the drop, then the player may pay to advance to a stage where the player has a better chance at getting the drop, but it is also harder?

Gary

  • Tester
  • Supreme Member
  • *
  • Posts: 2942
  • Steam: Conmaan ... ... Discord: Conmaan #9586
    • View Profile
Re: Lets build a Quest
« Reply #33 on: August 02, 2014, 03:14:49 AM »
So if I'm understanding correctly, if a player is not having any luck getting the drop, then the player may pay to advance to a stage where the player has a better chance at getting the drop, but it is also harder?

Somewhat. That wasnt the example shown, but if you wanted to you could script it that way.


               

Link to my youtube channel:
https://www.youtube.com/channel/UCo4rmelSOUB9YMM0Is-zWyQ

Fudge

  • Sr. Member
  • *
  • Posts: 401
  • Mr. Buzzkill ready for business
    • View Profile
  • Xbox: albinoASIAN303
  • Steam: carterpc4
Re: Lets build a Quest
« Reply #34 on: August 06, 2014, 04:27:04 PM »
   Is it possibru to name mobs? Like if a quest has you kill 20 goblins, one I'd named Joe. If you kill Joe, a boss in the next level will say "You killed my brother? Time for you to die!" Making him more power, angered you killed his brother. Or if you didn't kill Joe, just left him, the boss would say "Barely made it out? I knew you were weak." And he'd deal less damage.

    Possible?
(_)- look away m9

Craig

  • Developer
  • Extreme Member
  • *
  • Posts: 6655
  • Dig Deep
    • View Profile
    • Twitter
  • Steam: tota1miner
Re: Lets build a Quest
« Reply #35 on: October 27, 2014, 07:16:12 AM »
Here is a general template for setting NPC text based on Quest progress.

The NPC can act as the quest log.

This script would be assigned as the Talk script for the NPC who is going to initiate the quest.

Princess Quest:

This quest has the following template:

1. Talk to the Princess to start the quest.
2. Complete objective 1 (Go to a location)
3. Complete objective 2 (Kill a mob)
4. Complete objective 3 (Collect the quest item that the mob drops)
5. Complete objective 4 (Return the quest item to the Princess)

We need 3 scripts.

One for talking to the Princess
One for spawning a mob when the location is found
One for killing the mob


Script: Quests\Princess\Talk

This script will query through the history (objectives) in reverse, from last to first, including if the quest has already been completed. This is the easiest way to build the logic without errors, because we can assume if the player has history for a later objective, then it must also have history for all previous objectives. This means we only generally need one HasHistory command to test for each objective. If we went from first to last, we'd have to test the player doesn't have history for the later objectives aswell.

Spoiler for Hidden Content:
if
  HasHistory [Quests\Princess\Complete] [player]
then
  // this is the NPC text when you talk to them after you have completed the quest.
  SetText [x,y,z] [Thanks again for your heroism [gamertag].]

elseif
  HasHistory [Quests\Princess\MobKilled] [player]
  HasInventory [player] [GoldNecklace]
then
  // this block of commands is for when you talk to the NPC after completing the last objective
  // flag the quest as complete
  History [Quests\Princess\Complete] [player]
  // Congrats speech
  SetText [x,y,z] [Oh thank you so much for finding my gold necklace [gamertag], you have saved the day, you are my hero! Please take this old axe thingy I found in the attic as a reward.]
  // Take quest item
  Inventory [player] [take] [GoldNecklace] [1] 
  // Give reward
  Inventory [player] [add] [TitaniumBattleAxe] [1] 
  // It can sometimes be useful to use a notify to let the player know they have officially completed the quest.
  Notify [Congratulations [gamertag], you have completed the Princess quest] [local]

elseif
  HasHistory [Quests\Princess\MobKilled] [player]
then
  // this will be the text if the player has killed the Orc but not returned the necklace
  SetText [x,y,z] [You have not found my necklace?]
  // clear the MobKilled history so that when you return to the lake another Orc will spawn and drop a necklace
  History [Quests\Princess\MobKilled] [player] [clear]

elseif
  HasHistory [Quests\Princess\LocationFound] [player]
then
  // text if the player has been to the correct location but not killed the Orc. A simple hint is given.
  SetText [x,y,z] [You have not found my necklace? You may have to kill something..]

elseif
  HasHistory [Quests\Princess\Started] [player]
then
  // this text will appear if you have started the quest but have not yet been to the location of the first objective
  SetText [x,y,z] [You have not found my necklace? It should be somewhere by the lake to the west. I suggest you look over there.]

else
  // this is the text you will see when you first talk to the Princess and start the quest
  SetText [x,y,z] [Hello [gamertag]. Could you please be a kind peasant and find my lost gold necklace for me. I lost it somewhere by the lake to the west.]
  // flag the quest as started
  History [Quests\Princess\Started] [player]

I think its a good idea to try and match the history names to the script names as much as possible. This is why history supports folders. It makes organization of complex quests easier.

Now over by the lake you will need either a proximity detector that powers a script block that executes the following script, or a zone that executes the following script on entry


Script: Quests\Princess\LocationFound
Spoiler for Hidden Content:
if
// this first HasHistory check is not strictly necessary in this script as the check for MobKilled history will suffice, but I think its a good habit to get into to always check for quest completion in quest scripts so that that are not executed if the quest has already been completed
  HasHistory [Quests\Princess\Complete] [player] [false]
  // only spawn the orc if the player has started the quest and NOT previously killed the orc
  HasHistory [Quests\Princess\Started] [player]
  HasHistory [Quests\Princess\MobKilled] [player] [false]
then
    // this Orc's loot table is defined as a gold necklace
  SpawnMob [x,y,z] [Orc] [loot=[goldnecklace,1]] [kill=Quests\Princess\MobKilled]
  // flag objective as complete
  History [Quests\Princess\LocationFound] [player]

Script: Quests\Princess\MobKilled
Spoiler for Hidden Content:
if
 // same as above, not strictly necessary in this example, but good practice
  HasHistory [Quests\Princess\Complete] [player] [false]
then
  // flag the mob as killed
  // this script is necessary to ensure the player does not cheat the quest by obtaining the quest item by some other means.

  History [Quests\Princess\MobKilled] [player]
 

« Last Edit: October 27, 2014, 08:00:49 AM by Craig »

Not Actually Atlas

  • Extreme Member
  • *
  • Posts: 5777
  • Atlas Telamon
    • View Profile
  • Xbox: atlh3
  • Steam: The_Green_Condom
Re: Lets build a Quest
« Reply #36 on: April 20, 2015, 04:37:05 PM »
Lets say I wanted to have a book that was updated as you advanced through a quest. Would that be possible?


Miner of the Month for January 2014
But you can call me the salaminizer!
#BanAtlas

Zoidberg

  • Legendary Member
  • *
  • Posts: 1445
    • View Profile
  • Xbox: v Zoidberg v
  • Steam: v_Zoidberg_v
Re: Lets build a Quest
« Reply #37 on: April 20, 2015, 06:13:06 PM »
Lets say I wanted to have a book that was updated as you advanced through a quest. Would that be possible?

Yes, you could use a similar method to what is shown in this video:

Spoiler for Hidden Content:

Here's the topic: http://totalminerforums.net/index.php?topic=10398.msg120806#msg120806