4Dimensions Forum

General Category => Suggestions & Ideas => Topic started by: erwin on November 23, 2015, 12:35:00 pm

Title: Questjournal v1
Post by: erwin on November 23, 2015, 12:35:00 pm
The first batch of questcards for the quest journal has been released. They're also all quests in the Prehistoric era. Now's the time to test and see if you can find any errors / try to break them and abuse loopholes if any :)

To get the quest journal, go to Bart (in recall, not in SF), and say javert and chauvelin. He will give you the quest journal.

The current questcards that are available are:

Questcard 33
Questcard 35
Questcard 39
Questcard 81
Questcard 118
Questcard 121 

Have fun, and happy questing!

If there are any bugs / typos / suggestions / etc feel free to post them here, unless it involves a quest - in that case send pix a note.

Title: Re: Questjournal v1
Post by: erwin on November 23, 2015, 09:32:59 pm
So - just a heads up.

The questjournal does not wipe out quests, although flags are changed. The main script works as follows to convert flags:

Code: [Select]
If variable newquestvariable does not exist
  create newquestvariable
  for oldquestflags
    replace them in newquestvariable
    delete oldquestflags
   endif
endif

So... Why are there quests missing?

Well, here's an idea. Ask an imm to check your newbie task flags with the helper's whistle. You will find that although when you started MUDding ages ago, and definitely picked up the vouchers / did the tasks, they're reflected as incomplete. That means you never entered the newbie school.

Hold on, you say. I did these quests before the new scripts were put in, old variables deleted, and new variables added. Obviously it's not saved on my pfile because my pfile has the old variables and not the new variables. The whistle can't tell me whether I've completed these quests because no one knows what the old variables are, unless my pfile is manually looked at, and people can guess that some weird variable name "completed" actually means: "I completed the newbie school". Duh.

With this in mind, here's why there are missing quests.

1. The variable has changed. Suppose in the past, you did a quest where the flag to show you have completed the quest was "complete".

Now, that's a pretty crappy flag, because most builders might use the same variable. A better variable could have been "alibabazone_complete" or similar. So Molly would come in, and say: "use a different flag instead of complete, because another zone has the same flag."

So the builder changes the flag in a script - let's call it alibabazone_complete, so when subsequent players have completed the quest, that would be the flag set on them, instead of complete.

Unfortunately, for players who have already completed that quest - their "completed" flag is still called "complete", and not alibabazone_complete. So, since the quest journal looks for the flag alibabazone_complete, it will not detect that flag on your player profile, and thus - will show you have not completed the quest.

Solution: Redo the quest. I don't know what the old variable is called because it's not on the quest script.

2. Give mob an item quest. If the mob always gives the same reward (trading quests), or small item rewards, then usually builders won't set an extra variable on it to show the player has completed it once.

So the variables they set would be of the form: item1 item2 item3

If item1 item2 item3 are collected, then the quest resets. There is no "fourth" variable stored to show that you have completed the quest or not.

In other words, there is no variable that states you have completed that quest on the MUD. So the quest journal similarly won't reflect that you have completed the quest, even though you have.

To extend this, there's also a zoneflag questcard to collect all zoneflags. There are no triggers on any of the zoneflags to add variables to show they have been picked up except the newbie ones. Thus, should a zoneflag script be done, everyone will have 0 zoneflags collected (even if they have collected more than one).


That being said, here are some legit concerns:

Will my equipment poof?

Answer: No, simply because equipment triggers would have that quest variable there. If there was a change of variables, then the equipment trigger would have looked like

Code: [Select]
if %actor.varexists(complete)%% || %actor.varexists(alibabazone_complete)%
  %send% %actor% You wear the equipment

and it's easy to add in complete and alibabazone_complete to the script, because they are there.
Title: Re: Questjournal v1
Post by: erwin on November 23, 2015, 10:14:35 pm
In short: If there was an old variable used, which is not on the current triggers, then there is no way that the old variable can be used to show you have completed a quest.

To make this clearer, suppose builder A wrote the following script:

Code: [Select]
if !%actor.varexists(completed)%
  set completed %actor.id%
  remote %actor.id%
endif

to show that the player has completed a quest. Much later, upon realizing this variable is poorly named, the builder changes it.

Code: [Select]
if !%actor.varexists(this_zone_completed)%
  set this_zone_completed %actor.id%
  remote %actor.id%
endif

Surprisingly, the builder never does
Code: [Select]
* There used to be a variable called completed here. It's been replaced by this_zone_completed
if !%actor.varexists(this_zone_completed)%
  set this_zone_completed %actor.id%
  remote %actor.id%
endif

When anyone looks at the current script, and does a quest_journal type thing to show the quest has been completed, it will always be similar to this form
Code: [Select]
if !%actor.varexists(this_zone_completed)%
  %echo% %actor% has not completed this quest!
else
  %echo% %actor% has completed this quest!
endif

If, unfortunately, you had the variable completed, then the script will say you have not completed the quest. Furthermore, there is no human way of finding out what the "extra" variables you have correspond to. The solution would be to redo the quest.

On the bright side, because the variables have been changed, you can probably do the quest again for the full reward.

What's the point of the Quest Journal then?

1. Change of variables / future knowledge.

Suppose a quest had 5 variables. var1 var2 var3 var4 var5
Halfway through the quest, someone decides to change them to newvar1 newvar2 newvar3 newvar4 newvar5
You get stuck, because future scripts are looking for newvari instead of vari, which you have.

Or, suppose you did something stupid / had future knowledge.

Imagine a quest arc where you talk to Molly, who tells you to talk to Kvetch, who then tells you to talk to Rynald. Rynald asks you to give a bone to Bart's dog.

Suppose to check whether the quest has been complete, the builder write a trigger to check if you have talked to all 3 people, and given the bone.

However, instead of talking to Molly, you decided to give a bone to the dog because you like dogs. Unfortunately, there's a script which prevents you from talking to Molly, Kvetch, and Rynald once you've given the bone.

So to summarize - you've only given the bone, but not talked to the three imms. But since there's a script preventing you from talking to them after having given the bone, and you needed to talk to all three of them to complete the quest, the quest is bugged.

The questjournal allows anyone to reset the questflags. Suppose an imm made a mistake in the flags? Well, he can ask everyone to RESET their flags, and so start again. The quest journal (on the backend at least), allows that flexibility and rebuilding of quest flags in an array to account for this. Suppose you did something out of sequence? Well, you can RESET the flags and start again.

2. Prevent spam

Suppose a quest had 10 variables altogether, and maybe they are called: bone1 bone2 ... bone10

If you vstat a player, you get this:
Code: [Select]

                                        bone1:                     1
                                        bone2:                     1
                                        bone3:                     1
                                        bone4:                     1
                                        bone5:                     1
                                        bone6:                     1
                                        bone7:                     1
                                        bone8:                     1
                                        bone9:                     1
                                      bone10:                     1

Wouldn't it be nicer if you just had:

Code: [Select]
dino_bone: bone1yes bone2yes bone3yes bone4yes bone5yes bone6yes bone7yes bone8yes bone9yes bone10yesor better still
Code: [Select]
dino_bone_list: yes yes yes no no yes yes yes no yesFurthermore, instead of
Code: [Select]
if %actor.varexists(bone5)%
  %send% %actor% You have bone number 5
else
  %send% %actor% You don't have this bone!
  %send% %actor% But I'll give you the variable
  set bone5 1
  remote bone5 %actor.id%
endif
you get
Code: [Select]
set dino_bone_list %actor.dino_bone_list%
if %dino_bone.wordat(5)% == yes
  %send% %actor% You have bone number 5
else
  %send% %actor% You don't have this bone!
  %send% %actor% But I'll give you the variable
  replace_word yes 5 dino_bone_list
  remote dino_bone_list %actor.id%
endif

It's only one line longer (because of set dino_bone %actor.dino_bone%). But think of the spam reduction...
Title: Re: Questjournal v1
Post by: Molly on November 29, 2015, 03:37:22 am
Hmm, I gotta comment on a couple of things here.

About the Zoneflag Quest:
There actually already is a system to check how many different zoneflags that a player has turned in.
They get 3 bronze tokens in return for 10 different flags, but at the same time they also get a personal zoneflag certificate with a list of reported flags, since each flag only counts once. And each time they turn in a new batch of 10 flags, the certificate is checked and updated with the new 10 flags.

Now this is a bit circumstantial, since the imm that gives out the reward, (usually me), also has to check and update the certificate manually, and I suppose there could be glitches. But all in all there hasn't been that many who actually collect and turn in the flags, so it has been manageable so far. I think there are around 60 certificates so far, most of them with inactive players.

If there is an easier way to do this, I'm open to suggestions.

Disappearing Quest Flags
The routine nowadays is definitely to make sure that the questflags set in the scripts are unique for that particular quest. I doubt there are any flags on any quest with a flag named "completed" or "done", (except of course if it is a global flag instead of a remote, (which is set on the mob and not the player, and should still have a check for player identity).

And I don't recall any cases when a questflag has actually been changed later. (That doesn't mean it couldn't have happened, since my memory is faulty). 4D is a very old mud, and some of the oldest quests were made over 15 years back in time...
I do remember something happening in connecetion with the code change, so oldbies returning from before that time, may have had some problems with their flags in the past. Also players who deleted thir char and then got restored, might have lost some questflags in that process, since the pfiles that are saved are usually a bit outdated.

But if a player nowadays claims that some their questflags suddenly have disappeared, so that they cannot use their old equipment, I'd be a bit suspicious. It's a much higher probability that they did the quest with some of their alts and forgot which one.

And, as Erwin already stated, there is a very easy fix; Just redo the quest for the full reward.
A quest is only really hard the first time, which is why the reward gets considerably smaller after that, so having to redo it might be a hassle, but should be worth the extra work.

Anyhow, the main feature with the Quest Journal, is to reset the flags of a quest to 0, if you get completely stuck in  it. (This might happen if you stop in the middle of a quest and then later try to redo it from the start, which might result in a double set of flags that screws things up. Or if you are redoing an already finished quest, and try to skip a step or two in the process to save some time).

The Reset in the Quest journal offers a chance to start the quest from the beginning again, but it only removes the intermediate flags, not the final one that marks the quest as finished.
Title: Re: Questjournal v1
Post by: erwin on November 30, 2015, 03:21:25 am
I was actually thinking of an automated way to tabulate the zoneflags collected, which would start on the day the triggers were created so it'll start from zero - similar to how the helper's vouchers were done. But that will probably be in the future!

I think there's some debate about the joje flags - I've heard that there were flags like joje_completed, joje1, joje2, etc..
Title: Re: Questjournal v1
Post by: erwin on November 30, 2015, 10:44:13 am
Update: 30th November

Two questcards added to the questjournal, Questcard 6 and Questcard 20, plus some fun stuff.

Quest in Questcard 6 had a small "bug" - if you had remorted in between doing the quest, it *may* have become unsolvable. But it's solvable now (don't forget to reset flags, or at least use the questjournal once to update your old flags).

Quest in Questcard 20 was a repeatable quest for the same reward, and thus no flags were checked for this. So even if you've done this quest before, it will still be counted as "undone". A flag has been added to check for completion.
Title: Re: Questjournal v1
Post by: erwin on December 04, 2015, 12:56:45 am
Update: 4th December (or when Molly puts it in)

One questcard added to the questjournal, Questcard 3, plus some fun stuff.

Some key changes:

1) Trading mobs in Greek Archipelago (Cyclades) will now remember what you have given them over reboots and copyovers (yay).

2) The quest Cyrene's Lover did not have any flags at all, so with the quest journal, a flag has been added on to the bracelet in order to show the quest has been completed. This means you should go re-do the quest to get the flag, as removing the bracelet and re-wearing it will not work. However, the item will not poof.


3) There's two major typos / bugs fixed in (some) trading mobs in the Cyclades. Some of you might have spotted the first, the second is what Virisin and Erwin used to exploit. Maybe.
Title: Re: Questjournal v1
Post by: erwin on December 08, 2015, 04:09:10 pm
Added a feature in the Quest Journal, but only for (certain) imms:

If you think a quest in the Quest Journal is bugged, you can also ask an imm to type: questcheck card<num> debug <your player character's name>.

Example: questcheck card3 debug stile

They will then see the respective quest flags that you have, plus (some) commentary about the status / where you are at during the quest. 
Title: Re: Questjournal v1
Post by: erwin on December 09, 2015, 12:55:07 am
Update: 9th December (or when Molly puts it in)

One questcard added to the questjournal, Questcard 55, plus some fun stuff.

Polyphemos works better now.
Title: Re: Questjournal v1
Post by: erwin on December 12, 2015, 10:38:32 pm
Update 12th December (or when Molly puts it in)

Two questcards added to the journal, card 56 and card 57. Some bugs fixed with the Hades quest. If you can't do it before, you can now. If you have an imm char, the annoying message in a lot of rooms
Code: [Select]
[ Room 76xx :: wdamage: bad syntax ]
has been fixed.
Title: Re: Questjournal v1
Post by: erwin on December 18, 2015, 11:37:38 am
Update 18th December (or when Molly puts it in)

Two questcards added to the journal, card 36 and card 38. Logic works better with these two quests.
Title: Re: Questjournal v1
Post by: erwin on December 21, 2015, 12:58:21 pm
Update 21st December (or when Molly puts it in)

Two questcards added to the journal, card 34 and card 37. Logic works better with these two quests. If you don't have the quest journal, it might be a good time to get it, as you can't skip steps anymore. 

There are 15 more questcards to go before the entire Prehistoric dimension is done.
Title: Re: Questjournal v1
Post by: erwin on January 07, 2016, 01:04:25 am
Update 7th January (or when Molly puts it in)

Two questcards added to the journal, card 41 and card 42. 

Under some circumstances (if you tried to do Quest 41 legitly), you would never be able to complete it. Now you can.

Infinite tomb robbers loading in some rooms (under some circumstances) has been fixed

Title: Re: Questjournal v1
Post by: erwin on December 19, 2016, 03:11:41 am
Back!

Here's the new plan - with Vryce, Jubei, and Mott helping.

The idea is to *rigorously* do and complete the quest journal. This also means extensively playtesting old quests.

Cycle will be slow, but this ensures no bugs.
Title: Re: Questjournal v1
Post by: erwin on December 19, 2016, 03:18:40 am
*actually you know what - add me to the 4D Github if there's one. I'll also upload my trigger files for each quest. This makes it easy for everyone to debug.
Title: Re: Questjournal v1
Post by: rynald on December 19, 2016, 01:42:46 pm
That's great news, i'm a fan of the journal. You can join gitlab as far as i'm concerned, but it doesn't track triggers (yet), only code.