I talked to Venalan yesterday and discovered that there are some better ways to do things. Suspected as much.
First, the whole repeatable/unrepeatable thing and the delay in restarting repeatable quests is handled "elsewhere", so we don't need to use timers at all. That's nice, although I spent more time than I care to admit trying to figure that out.
Second, we can leave out the reminder step for each task by using the "Menu:" line of the completion step as the reminder. As in: "I have the two daggers and three small battle axes that you asked for." That line already has the "Player gives" instead of just a "P:" so if the player clicks on it without the items they'll just get an error message. I don't know that it needs to be done this way, but it'll save steps. A standard crafting repeatable would be 3 steps per task the way I was doing it, but only two if done this way.
Third, the quests use variables to block the player from getting more than one assignment at a time if they return to the quest giver during another time range. I was using a stupid number of "Require no completion of QuestName step #", with one of those per possible task. Using a variable is much easier, as you can just check to see if the variable has been set at all. So set the variable to the task or step number when you get a task, and start that same block with a "Require no variable..." requirement. Then, when you complete the task, use the "Unsetvariable" command to erase it.
Let's see if I can write that up. Here's the Intro step where the quest is assigned:
Require completion of Learning Blade Making.
P: Give me a quest. Blades making.
Menu: Veja, do you need help with something?
Veja Pontor: [Vega looks up from her work. Her ears are slanted back and there's some soot in her fur, making her look somewhat harried.] What? Oh, $playername. Yes, I absolutely could use your help! [Veja gestures around herself at the stacks of metal on the ground.] On top of my duties to the Arena I've now got additional orders from the Eagle Fortress, and I could use a hand getting it all done. Do you have time to lend me a paw?
P:nohelp. P: yeshelp.
Menu: No, I just don't have time right now. Menu: Sure, I've got some time.
Veja Pontor: Fine. Don't bother me then unless you have business to do with me, then.
Veja Pontor: [Veja sighs with relief, her ears relaxing somewhat.] Glad to hear it. Can't lose business from either.
Unsetvariable Quest_####_Blades_Making_Started.
Assign Quest
That's not too hard. Checks to make sure the player can actually make basic blades, which is the only such check I'll use in this quest. Used [] to denote activity. Used $playername so the NPC will actually use the player name. Not entirely sure I should, as there's no requirement that the player has met her before.
Then I used Unsetvariable like I mentioned before to completely clear the variable set by each task. That line should be unnecessary as I'm going to include it on every step that completes a task and therefore the quest, right? Well, it's always possible that something goes wrong or the player discards the quest but the variable isn't deleted. In those cases, it would mess things up. So it goes into the Intro step.
Now each task requires a few steps. I used three in each of my examples above, so I'll post the first task in my Blades Making quest here. I'll post the way I initially did it first:
... NoRepeat
#Step 2
Require no completion of Stocking the Armory step 5. Require no completion of Stocking the Armory step 8. Require no completion of Stocking the Armory step 11. Require no completion of Stocking the Armory step 14. Require no completion of Stocking the Armory step 17. Require no completion of Stocking the Armory step 20. Require no completion of Stocking the Armory step 23. Require no completion of Stocking the Armory step 26. Require no completion of Stocking the Armory step 29. Require no completion of Stocking the Armory step 32. Require no completion of Stocking the Armory step 35.
Require no completion of Stocking the Armory step 38. Require no completion of Stocking the Armory step 41. Require no completion of Stocking the Armory step 44. Require no completion of Stocking the Armory step 47. Require no completion of Stocking the Armory step 50. Require no completion of Stocking the Armory step 53. Require no completion of Stocking the Armory step 56. Require no completion of Stocking the Armory step 59. Require no completion of Stocking the Armory step 62. Require no completion of Stocking the Armory step 65. Require no completion of Stocking the Armory step 68. Require no completion of Stocking the Armory step 71.
Require skill Blades Making 0-14.
Require time of day 0-3 | time of day 12-15.
P: Task1. What do you need. About order. About blades.
Menu: So what do you need me to make?
Veja Pontor: Well, you're new to this so I'll keep it simple. Make me a single shortsword and that will be good for now. If you have any trouble, check your book. All of the instructions are in there.
Questnote Veja has asked you to make her a Shortsword.
Complete Stocking the Armory step 2
...
#Step 3
Require completion of Stocking the Armory step 2.
Require no possessed item Shortsword.
P: What you need. Reminder.
Menu: Sorry, but what did you need again?
Veja Pontor: [Throws up her arms in frustration.] A shortsword! One single shortsword! How did you forget that?!
Complete Stocking the Armory step 3
... NoRepeat
#Step 4
Require completion of Stocking the Armory step 2.
Require possessed item Shortsword.
Player gives Veja Pontor 1 Shortsword.
Menu: Here's the Shortsword you asked for.
Veja Pontor: [Veja takes the Shortsword and gives it a quick inspection, including tapping the side of the blade against the anvil.] Yeah, this will do. Here, take some circles for your efforts. I may need more help again in the future, so check back in occasionally. Oh, and let me show you a trick that'll help you in the future. [Veja spends a few minutes showing you some of the tricks of the trade.]
Run script give_quest_exp <<1>>.
Run script give_quest_money <<1>>.
Run script give_quest_skill <<'Blades Making',1>>.
Run script give_quest_timeout <<'Stocking_the_Armory_Lockout',480>>.
Complete Stocking the Armory step 4. Complete Stocking the Armory.
Okay, so there are a few errors there. That big block of "Require no completion of..." at the top of step 2? Total waste of time to copy/paste that in, and I've been adding them to each task assignment step. Variables are much easier. Also, the timer stuff is unneeded as the repeatable and delay stuff is done in the database, so it can go.
Tidy that up a bit and edit out what isn't needed and we get this:
... NoRepeat
#Step 2
Require skill Blades Making 0-14. Require time of day 0-3 | time of day 12-15.
P: Task1. What do you need. About order. About blades.
Menu: So what do you need me to make?
Veja Pontor: Well, you're new to this so I'll keep it simple. Make me a single shortsword and that will be good for now. If you have any trouble, check your book. All of the instructions are in there.
Questnote Veja has asked you to make her a Shortsword.
setvariable Quest_####_Blades_Making_Started 2.
Complete Stocking the Armory step 2
...
#Step 3
Require completion of Stocking the Armory step 2.
Require no possessed item Shortsword.
P: What you need. Reminder.
Menu: Sorry, but what did you need again?
Veja Pontor: [Throws up her arms in frustration.] A shortsword! One single shortsword! How did you forget that?!
Complete Stocking the Armory step 3
... NoRepeat
#Step 4
Require completion of Stocking the Armory step 2.
Require possessed item Shortsword.
Player gives Veja Pontor 1 Shortsword.
Menu: Here's the Shortsword you asked for.
Veja Pontor: [Veja takes the Shortsword and gives it a quick inspection, including tapping the side of the blade against the anvil.] Yeah, this will do. Here, take some circles for your efforts. I may need more help again in the future, so check back in occasionally. Oh, and let me show you a trick that'll help you in the future. [Veja spends a few minutes showing you some of the tricks of the trade.]
Run script give_quest_exp <<1>>.
Run script give_quest_money <<1>>.
Run script give_quest_skill <<'Blades Making',1>>.
Unsetvariable Quest_####_Blades_Making_Started.
Complete Stocking the Armory step 4. Complete Stocking the Armory.
Got rid of the timer and that big block of nonsense in step 2, and things are looking a bit better. Note that the variable is set to 2, which is just the step # where that task is assigned. I could set it to 1 as it's the first task. Heck, the value is never checked again so I could set it to anything. Still, to keep it orderly it's best to set values either by step number or task number.
It's possible to tidy that up even more. Venalan pointed out that the reminder steps aren't really necessary for these repeatable crafting quests if you move that reminder to the task completion step. If you remove the line that prevents the task completion step from appearing if the player doesn't have the items it will show up, but if the player clicks on it without the items they'll get an error message. Turn the Menu: line into the reminder and you get this:
... NoRepeat
#Step 2
Require skill Blades Making 0-14. Require time of day 0-3 | time of day 12-15.
P: Task1. What do you need. About order. About blades.
Menu: So what do you need me to make?
Veja Pontor: Well, you're new to this so I'll keep it simple. Make me a single shortsword and that will be good for now. If you have any trouble, check your book. All of the instructions are in there.
Questnote Veja has asked you to make her a Shortsword.
setvariable Quest_####_Blades_Making_Started 2.
Complete Stocking the Armory step 2
... NoRepeat
#Step 3
Require completion of Stocking the Armory step 2.
Player gives Veja Pontor 1 Shortsword.
Menu: Here's the Shortsword you asked for.
Veja Pontor: [Veja takes the Shortsword and gives it a quick inspection, including tapping the side of the blade against the anvil.] Yeah, this will do. Here, take some circles for your efforts. I may need more help again in the future, so check back in occasionally. Oh, and let me show you a trick that'll help you in the future. [Veja spends a few minutes showing you some of the tricks of the trade.]
Run script give_quest_exp <<1>>.
Run script give_quest_money <<1>>.
Run script give_quest_skill <<'Blades Making',1>>.
Unsetvariable Quest_####_Blades_Making_Started.
Complete Stocking the Armory step 3. Complete Stocking the Armory.
Only two steps per task this way, which is very helpful as we are (I think) limited to 99 steps per quest. That's no more than 32 tasks if you have 3 steps per task, or 44 if you have two steps per task. I'll still have to split Shield Making into two quests though.
Speaking of that, I think I found a good way to do it. When splitting a quest into 2 like that the most obvious way to do it is by skill level. Say, 0-99 levels is the first quest, and 100+ is the second quest. That's easy to do if the quests are from the same NPC, but I want different NPCs in this case and I want the player to only be able to get the quest from the second NPC if they've done the first quest at least once. The Quest1 NPC giving the player a recommendation for the Quest2 NPC.
So, how do I do that? I think I worked it out. By using " | " (meaning OR) we can set it up so that the first quest will trigger if your skill is under 100 AND if it's over 100 but you haven't done Quest 1 yet. Like this:
Require skill Shield Making 0-99 | Require no completion of Quest1
P: Shield Making. Quest1.
Menu: Need any help?
NPC: Yes. Have some time?
P:nohelp. P: yeshelp.
Menu: No, I just don't have time right now. Menu: Sure, I've got some time.
NPC: Fine. Don't bother me then.
NPC: Good.
Unsetvariable Quest_####_Quest1_started.
Assign Quest
Quest2 is easy then. Just require both Quest1 to be complete and a skill of 100 or higher.
Require completion of Quest1. Require no skill Shield Making 0-99
P: Shield Making. Quest2.
Menu: Need any help?
NPC: Yes. Have some time?
P:nohelp. P: yeshelp.
Menu: No, I just don't have time right now. Menu: Sure, I've got some time.
NPC: Fine. Don't bother me then.
NPC: Good.
Unsetvariable Quest_####_Quest2_started.
Assign Quest
The problem is that if a player discards Quest1 they'll no longer be able to do quest 2 until they complete Quest1 again. Might be able to work around that like this:
Require completion of Quest1 | completion of Quest2
I'll have to ask.
Oh, and you may note (if you are for some reason actually reading all of this) that when doing the second quest instead of requiring a skill of 100-200 I required the skill NOT be 0-99. The reason is that if a player has a skill close to 200 and uses items or buffs that give them a boost to over 200 the first way won't work. They won't fit into the 0-99 or 100-200 ranges so they won't be able to do the quest even though their actual skill is under 200. Using the "Require no skill" method instead leaves the upper range infinite, so even with a skill of 5000 I can still do the quests as a GM.
Off to restart the Blades Making quest! Think I'll leave in the reminder steps, as I rather like having an exasperated Veja yell at the player.