Group quest

For builders to discuss and ask building questions.
Post Reply
User avatar
Eltsac
Webmaster
Webmaster
Posts: 479
Joined: Tue Jun 20, 2006 3:40 am
Location: Belgium
Contact:

Group quest

Post by Eltsac » Sat Apr 23, 2011 10:03 am

I think making group questing / adventuring would be a great addition to the game... so playing with a group would be more adventure than "go to the square and chat" and the square could be a place to group for quest.

Problem is that, for now, if you want to quest as a group, all members will all have to make the quest separately, waiting for respawn to get X heads of the same NPC and the like...

Would it be possible to add some command to help coding real group quests?

An idea I have... not sure if it's good or it can be implemented easily, would be to be ablle to add
"applygroup"
"endapplygroup"
commands in code so you can apply a part of your program to all members of the group.

I think the members it would apply to would be all the members of the group in the same area (not the same room as it would mess on entry prog, as only the first group member would be in when it progs), and to all members in the realms of the dead (so if one die just before killing the balor, he could have his quest bits updated too ;))



Here is an exemple of the lessons and the changes :

Code: Select all

>speech_prog ondil ondils ondil's~
if quest(14, 4, $n) == 1
  mpecho The lich throws back his head and laughs insanely.
  sayto $n So you seek Ondil's Book of Spells?  You will have
  sayto $n to battle me for that information, and if you win
  sayto $n I may tell you.
  mpmset $n quest 14 4 2
  mpkill $n
endif
~
|

Code: Select all

>speech_prog ondil ondils ondil's~
if quest(14, 4, $n) == 1
  mpecho The lich throws back his head and laughs insanely.
  sayto $n So you seek Ondil's Book of Spells?  You will have
  sayto $n to battle me for that information, and if you win
  sayto $n I may tell you.

  applygroup
    if quest(14, 4, $n) == 1
      mpmset $n quest 14 4 2
    endif
  endapplygroup

  mpkill $n
endif
~
|
So only one with the right quest bit can initiate the quest.
The NPC make his speech (the speech can change depending on if the PC is grouped or not if you want)
The quest bit is updated for anyone in the group with the right quest bit
The NPC attack...

Something that could be tricky is the fact to give a reward as you can't give reward to someone not in the room, so you could add a step in the quest. When you end the quest, the mob check for each group member if he is in the room. If he is, the NPC gives the reward and questbit is advanced to end of quest. if not, the quest bit is advanced to an intermediate step "in qlog : you can go see XXX to get your reward" and there is a simple greet prog to give the reward.



I think that would add some big fun in game :)


I hope I am clear.


El & co
Eltsac, Loren Wildsoul, Gaymor, Heleyn Featherhand, Aminiel Emeraldeyes, Derissa Silvershield, Hova, Cal Nimblefinger, Cylistria Baenre
User avatar
Harroghty
Staff
Staff
Posts: 9695
Joined: Tue Jul 27, 2004 5:38 pm

Re: Group quest

Post by Harroghty » Sat Apr 23, 2011 2:53 pm

Eltsac: This already exists, but I do not think that it is in the lessons. Todd used it pretty well in his Tangled Trees area.
mpgroupaction is the command.
e.g. mpgroupaction $n mpmset @n questr 12300 1 2 1
The thing that I do not like about this command, or maybe just how his quest is set up, is that allows people to repeat the quest indefinitely. The quest targets $W (group leader), but applies its QBIT changes to the group. Therefore you may repeat this quest as many times as you are able to find a new group leader and receive a glory reward as a group member.
"A man may die yet still endure if his work enters the greater work, for time is carried upon a current of forgotten deeds, and events of great moment are but the culmination of a single carefully placed thought." - Chime of Eons
User avatar
Eltsac
Webmaster
Webmaster
Posts: 479
Joined: Tue Jun 20, 2006 3:40 am
Location: Belgium
Contact:

Re: Group quest

Post by Eltsac » Sat Apr 23, 2011 5:27 pm

Hidden code ressources :)

But yes, I agree with your point of view..., I had thought about that problem when trying to find a good solution.
With my system, you do not only apply a command to all group members but a piece of code, you can add an if check and thus check quest bits of everyone separately to update quest...

Not sure if that is possible with the existing system... I would like to know though :) Maybe another hidden code trick :)

El
Eltsac, Loren Wildsoul, Gaymor, Heleyn Featherhand, Aminiel Emeraldeyes, Derissa Silvershield, Hova, Cal Nimblefinger, Cylistria Baenre
User avatar
Harroghty
Staff
Staff
Posts: 9695
Joined: Tue Jul 27, 2004 5:38 pm

Re: Group quest

Post by Harroghty » Sat Apr 23, 2011 5:48 pm

I am not sure what is simple or not when it comes to changing hard code, but we could accomplish that by just adding a new target and using the current command. It's something you could bring up with Mask maybe.
"A man may die yet still endure if his work enters the greater work, for time is carried upon a current of forgotten deeds, and events of great moment are but the culmination of a single carefully placed thought." - Chime of Eons
Mask
Staff
Staff
Posts: 2649
Joined: Tue Jul 15, 2003 9:21 pm

Re: Group quest

Post by Mask » Mon Apr 25, 2011 1:18 pm

mpgroupaction doesn't really work in and of itself, you need to do a bit more 'stuff' to make it work properly. I've updated a few quests so that they are proper group quests, and the 'death_prog' triggers for all group members grouped with the killer etc.

For example, I have a mob with these stats:

Code: Select all

#101265
acolyte drow half halfdrow male~
{70}a half-drow acolyte~
{70}A half-drow acolyte practices here.~
{70}This obvious half-drow male walks confidently upon the cold stone
floor of the second level of Haroloth-Magthere. Having vanquished his
rivals beneath, he has advanced to the next stage of his training and
now gets the chance to prove himself against more deadly rivals. Not
only better trained, but better equipped, Haroloth-Magthere makes no
exceptions for individual wealth or resourcefulness, that the strong
will have more than the weak is obvious to those who follow the
philosophy taught here.
~
S 12 CLASS_WARRIOR RACE_HALFELFDROW SEX_MALE POS_STANDING DEITY_NONE
ACT_SENTINEL
LANG_COMMON
LANG_COMMON
>in_file_prog acolyte_death_prog~
>in_file_prog call_acolyte_death_prog~
|
Then, the in_file_progs are in the #PROGRAM section of the area file as follows:

Code: Select all

#PROGRAMS
#PROGRAM acolyte_death_prog~
>death_prog 100~
mpmset $i questr 101250 0 2 1
mpgroupaction $n mpforce @n call_acolyte_death_prog
mpmset $i questr 101250 0 2 0
~
|
#PROGRAM call_acolyte_death_prog~
>intercept_prog call_acolyte_death_prog~
if questr(101250,0,2,$i) == 1
  if questr(101250,16,5,$n) > 17
  and questr(101250,16,5,$n) < 23
    mpechoat $n {90}One of the instructors here proclaims you ready for the next level.
  endif
  if questr(101250,16,5,$n) > 9
    if questr(101250,16,5,$n) < 18
      mpmadd $n questr 101250 16 5 1
      mpechoat $n {90}One of the acolytes succumbs to your blows and expires!
    endif
  endif
else
  mpunintercept
endif
~
|
#END
As you can see, the death prog sets a temporary quest bit on the mob triggering the program ($i), then forces each person in the room grouped with the person who triggered the program to trigger the secondary program.

The fact that it is in the #PROGRAMS section is just because there are multiple acolytes with the same progs, it is not necessary for this kind of program to work.
User avatar
Eltsac
Webmaster
Webmaster
Posts: 479
Joined: Tue Jun 20, 2006 3:40 am
Location: Belgium
Contact:

Re: Group quest

Post by Eltsac » Mon Apr 25, 2011 6:45 pm

That's really good to know, thank you :)

Stupid question... just to be sure... the quest bit change on the mob itself is to prevent PC to activate call_acolyte_death_prog manually without having killed the mob?

El
Eltsac, Loren Wildsoul, Gaymor, Heleyn Featherhand, Aminiel Emeraldeyes, Derissa Silvershield, Hova, Cal Nimblefinger, Cylistria Baenre
Post Reply