I have a quest system and quest hud/screen in my game.
The quest code seems to be working fine, except when I open up the quest log, a name variable E.G. [ml] would show up as [ml] and not as their name/value. Everything else works, but adding variables in the text doesn't seem to work.
Does anyone know why this might be?
Cheers.
Example of quest system
Code: Select all
import renpy.store as store
import renpy.exports as renpy
class Quest (store.object):
def __init__(self, name, desc, available = False, started = False, completed = False):
self.name = name
self.desc = desc
self.available = available
self.started = started
self.completed = completed
class QuestList (store.object):
def __init__(self):
self.quest_list = []
def addQuest(self, quest):
self.quest_list.append(quest)
def removeQuest(self, quest):
self.quest_list.remove(quest)
default quest_whats_up_with_mom = Quest("Talk to mom", "[ml] been upset lately. Maybe we should watch a movie in the evening?", True)
Questlog Screen
Code: Select all
screen questlog:
image "hud/notepad.png"
vbox: #quest text on notepad
xpos .51 ypos .1 xmaximum 550
for quest in my_quest.quest_list:
if not(quest.completed) and quest.available:
text "{color=#212121}[quest.name]{/color}" style "questheadertext"
text "{color=#212121}[quest.desc]{/color}" style "questbodytext"