I am using this code as questlog:
viewtopic.php?t=25245#p310193
The way I understand it, the code has the option to hide parts (goals) of the quest. That works fine for me by using the following code:
Code: Select all
##Quest1
goals = [ ]
stages = [ ]
goals.append(Goal("find_cookie", "Find the cookie"))
# This quest-part is hidden, the last True sets it to hidden
goals.append(Goal("eat_cookie", "Eat the cookie",0,0,True,True))
stages.append(Stage("find_cookie,eat_cookie", "atlast"))
quests.append(Quest("More cookies!", "This is a dummy quest-descript-text.", "QuestTab1", goals, stages))
Code: Select all
$ log.markdone("find_cookie")
Edit:
I finally found a way to do it. Apparently the questlog does not have a function to unhide a goal ... so I had to figure out how to add my own.
The parameter must be a valid goal-name that was defined when creating the quests. This function must be added to the Questlog-class.
Code: Select all
def unhide_goal(self, goal):
# find quest from goal
q = self._findquest(goal)
if not q:
return None
q.goal(goal).hidden(False)
Code: Select all
$ log.markdone("find_cookie")
$ log.unhide_goal("eat_cookie")