A strange interger bug

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
User avatar
sculpteur
Veteran
Posts: 221
Joined: Fri Nov 17, 2017 6:40 pm
Completed: Apocalypse Lovers
Projects: Apocalypse Lovers
Organization: Awake_Production
Location: France
Discord: https://discord.gg/apocalypse-lovers
Contact:

A strange interger bug

#1 Post by sculpteur » Sun Apr 03, 2022 11:35 am

Hello guys,

One of the tester of my game point out an error that I never had myself. Could it be related to his computer or plateform or something ?
I'ves tested myself my game a million time and this error never pop up, it's strange. What do you think ?
I see this is related to my quest system and an integer but since this system is coming from an incorporation of free code that I had found, I do not yet master it on the fingertips.

Code: Select all

an uncaught exception occurred.

While running game code:
File "game/scene_StoryProg1_D_1_Quest_Shampoo.rpy", line 661, in script
$ log.markdone("quest_bath_shampoo")
File "game/scene_StoryProg1_D_1_Quest_Shampoo.rpy", line 661, in <module>
$ log.markdone("quest_bath_shampoo")
File "game/screen_7_objectives.rpy", line 971, in markdone
self._nextstage(q)
File "game/screen_7_objectives.rpy", line 928, in _nextstage
self.movequest(quest, self._completiontab)
File "game/screen_7_objectives.rpy", line 1093, in movequest
self.removequest(quest, quest.tab())
File "game/screen_7_objectives.rpy", line 1089, in removequest
del self._quests[tab][k]
TypeError: list indices must be integers, not NoneType

-- Full Traceback ------------------------------------------------------------

Full traceback:
File "game/scene_StoryProg1_D_1_Quest_Shampoo.rpy", line 661, in script
$ log.markdone("quest_bath_shampoo")
File "renpy/ast.py", line 928, in execute
renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
File "renpy/python.py", line 2245, in py_exec_bytecode
exec(bytecode, globals, locals)
File "game/scene_StoryProg1_D_1_Quest_Shampoo.rpy", line 661, in <module>
$ log.markdone("quest_bath_shampoo")
File "game/screen_7_objectives.rpy", line 971, in markdone
self._nextstage(q)
File "game/screen_7_objectives.rpy", line 928, in _nextstage
self.movequest(quest, self._completiontab)
File "game/screen_7_objectives.rpy", line 1093, in movequest
self.removequest(quest, quest.tab())
File "game/screen_7_objectives.rpy", line 1089, in removequest
del self._quests[tab][k]
File "renpy/python.py", line 875, in do_mutation
return method(self, *args, **kwargs)
TypeError: list indices must be integers, not NoneType

Windows-10-10.0.22581
Ren'Py 7.4.11.2266
Apocalypse' lovers 1.1
Sat Apr 2 01:44:25 2022
Any idea ?
Image

“He asked me to calm down, close my eyes and be quiet. He explained to me that if I was afraid, the shadow that ran barefoot in the street would feel it. I got scared seeing Jumanji on TV, so let me tell you, we didn't stay hidden for long and had to start running again.”
Jessica's Diary.

User avatar
Ocelot
Eileen-Class Veteran
Posts: 1882
Joined: Tue Aug 23, 2016 10:35 am
Github: MiiNiPaa
Discord: MiiNiPaa#4384
Contact:

Re: A strange interger bug

#2 Post by Ocelot » Sun Apr 03, 2022 12:01 pm

It seems that on removequest execution, either tab or k was None insted of proper value. You should get either a savegeme before the bug, or steps to reproduce it and check internal state of that object.
< < insert Rick Cook quote here > >

User avatar
sculpteur
Veteran
Posts: 221
Joined: Fri Nov 17, 2017 6:40 pm
Completed: Apocalypse Lovers
Projects: Apocalypse Lovers
Organization: Awake_Production
Location: France
Discord: https://discord.gg/apocalypse-lovers
Contact:

Re: A strange interger bug

#3 Post by sculpteur » Sat Apr 09, 2022 10:46 pm

No i've identified the problem. It seem to be related to the way I define the quest themeselves. I define them in english AND in french, so it seem this is creating two different variables. So when the player is changing the langage during the course of the game with this :

Code: Select all

                vbox:
                    style_prefix "radio"
                    label _("Langage")
                    textbutton _("English") action SetVariable("english", True)
                    textbutton _("French") action SetVariable("english", False)
Then, when a quest is updated, competed or discovered, it will try to adresse the variable in the langage where it was define at the very begining of the game :

Code: Select all

label createlog:

    python:

        quests = [ ]

####### Quest - Lewis'House ####################################################

        goals = [ ]
        stages = [ ]
        # EN #
        if (english == True):
            goals.append(Goal("quest_lewishouse_explore", "Explore the house"))
            goals.append(Goal("quest_lewishouse_key", "Find the key"))
            goals.append(Goal("quest_lewishouse_door", "Open the locked door."))
            goals.append(Goal("quest_lewishouse_basement", "Explore the basement."))
            goals.append(Goal("quest_lewishouse_jessica", "Speak with [jess_name]."))
            goals.append(Goal("quest_lewishouse_putligth", "Restore power in the basement."))
            goals.append(Goal("quest_lewishouse_end", "Completed"))

            stages.append(Stage("quest_lewishouse_explore"))
            stages.append(Stage("quest_lewishouse_key"))
            stages.append(Stage("quest_lewishouse_door"))
            stages.append(Stage("quest_lewishouse_basement"))
            stages.append(Stage("quest_lewishouse_jessica",
                "quest_null_label",
                "You have found a way to kill boredom and fight loneliness: another living human being! And it's [jess_name]! But you still need to succeed in starting a discussion with her because for the moment she doesn't seem in her normal state."))
            stages.append(Stage("quest_lewishouse_putligth",
                "quest_null_label",
                "You have to find a way to put the light back on in order to be able to interacte with [jess_name]."))
            stages.append(Stage("quest_lewishouse_end",
                "quest_null_label",
                "You found [jess_name] completely scared in the basement of Lewis's house. You turned on the power to speak with her and comfort her."))

            quests.append(Quest("Lewis's House",
                "In order to avoid thinking about suicide, you decided to go to a known place: Lewis's house. When Lewis and Anna separated, Lewis left her the house and moved to a nearby town on his own. You strongly believe that going to this house may allow you to find a way to kill boredom and fight loneliness.",
                "In progress",
                goals,
                stages,
                image="gui/objective_image_lewishouse.jpg"))

        # FR #
        if (english == False):
            goals.append(Goal("quest_lewishouse_explore", "Explorer la maison"))
            goals.append(Goal("quest_lewishouse_key", "Trouver la clé"))
            goals.append(Goal("quest_lewishouse_door", "Ouvrir la porte verrouillée."))
            goals.append(Goal("quest_lewishouse_basement", "Explorer la cave."))
            goals.append(Goal("quest_lewishouse_jessica", "Parler avec [jess_name]."))
            goals.append(Goal("quest_lewishouse_putligth", "Rétablir le courant."))
            goals.append(Goal("quest_lewishouse_end", "Completed"))

            stages.append(Stage("quest_lewishouse_explore"))
            stages.append(Stage("quest_lewishouse_key"))
            stages.append(Stage("quest_lewishouse_door"))
            stages.append(Stage("quest_lewishouse_basement"))
            stages.append(Stage("quest_lewishouse_jessica",
                "quest_null_label",
                "Vous avez trouvé un moyen de tuer l'ennui et de lutter contre la solitude : un autre être humain vivant ! Et c'est [jess_name] ! Mais encore faut-il réussir à entamer une discussion avec elle car pour le moment elle ne semble pas dans son état normal."))
            stages.append(Stage("quest_lewishouse_putligth",
                "quest_null_label",
                "Vous devez trouver un moyen de rallumer la lumière afin de pouvoir interagir avec [jess_name]."))

            stages.append(Stage("quest_lewishouse_end",
                "quest_null_label",
                "Vous avez trouvé [jess_name] complètement apeurée dans la cave de la maison de Lewis. Vous avez rétabli le courant pour discuter avec elle et la réconforter."))

            quests.append(Quest("La maison de Lewis",
                "Afin d'éviter de penser au suicide, vous avez décidé de vous rendre dans un lieu connu : la maison de Lewis. Lorsque Lewis et Anna se sont séparés, Lewis lui a laissé la maison et a déménagé seul dans une ville voisine. Vous croyez fermement que vous rendre dans cette 'garçonnière' vous permettra de trouver un moyen de tuer l'ennui et de combattre la solitude.",
                "En cours",
                goals,
                stages,
                image="gui/objective_image_lewishouse.jpg"))

So since I've spent so many time to make this code working and I'm pretty afraid to modify it again, is there anyone who can advise me on this topic before I messed everything up once again ? :lol:
Image

“He asked me to calm down, close my eyes and be quiet. He explained to me that if I was afraid, the shadow that ran barefoot in the street would feel it. I got scared seeing Jumanji on TV, so let me tell you, we didn't stay hidden for long and had to start running again.”
Jessica's Diary.

User avatar
Ocelot
Eileen-Class Veteran
Posts: 1882
Joined: Tue Aug 23, 2016 10:35 am
Github: MiiNiPaa
Discord: MiiNiPaa#4384
Contact:

Re: A strange interger bug

#4 Post by Ocelot » Sun Apr 10, 2022 2:40 am

Use RenPy translation framework so you won't have to write everything twice.

But I still not sure. The way it is written here, only proble should be already present quests not being translated.
< < insert Rick Cook quote here > >

User avatar
sculpteur
Veteran
Posts: 221
Joined: Fri Nov 17, 2017 6:40 pm
Completed: Apocalypse Lovers
Projects: Apocalypse Lovers
Organization: Awake_Production
Location: France
Discord: https://discord.gg/apocalypse-lovers
Contact:

Re: A strange interger bug

#5 Post by sculpteur » Sun Apr 10, 2022 12:43 pm

Ocelot wrote:
Sun Apr 10, 2022 2:40 am
But I still not sure. The way it is written here, only proble should be already present quests not being translated.
Yes that's so strannge !

Because I would have understand this error if I would have define different variable names for the quest in fonction of the langage, like this :

Code: Select all

        if (english == True):
            goals.append(Goal("quest_lewishouse_explore_ENGLISH", "Explore the house"))
and :

Code: Select all

        if (english == False):
            goals.append(Goal("quest_lewishouse_explore_FRENCH", "Explorer la maison"))
But in the code I sent in the previous message, the varible name is still " quest_lewishouse_explore " whether it was defined under one language condition or on another...

So if someone has any thought about this behavior let me know please !
Image

“He asked me to calm down, close my eyes and be quiet. He explained to me that if I was afraid, the shadow that ran barefoot in the street would feel it. I got scared seeing Jumanji on TV, so let me tell you, we didn't stay hidden for long and had to start running again.”
Jessica's Diary.

User avatar
sculpteur
Veteran
Posts: 221
Joined: Fri Nov 17, 2017 6:40 pm
Completed: Apocalypse Lovers
Projects: Apocalypse Lovers
Organization: Awake_Production
Location: France
Discord: https://discord.gg/apocalypse-lovers
Contact:

Re: A strange interger bug

#6 Post by sculpteur » Sun Apr 10, 2022 12:47 pm

Oh, and just for let you know, since the line of error is 1089 and 1093 there is the corresponding code refering to it :

Sorry for the long message but the spoiler tools seems to only hide the text but not put it under a short opening button

Code: Select all

# Questlog class
#
    class Questlog(Link):
        def __init__(self,
            quests=None,
            screen=None,
            key=None,
            enabled=False,
            notify="notification",
            tracker="tracker",
            completion="Completed"):

            self._quests = { }
            self._tabs = [ ]
            self._notify = None
            self._screen = screen
            self._key = key
            self._tracked = None
            self.qvar = None
            self.tvar = None
            self._completiontab = completion
            self.tracker(tracker)
            self.notifyimage(notify)
            self.enabled(enabled)
            self.addquests(quests)

        def activate(self, str):
            words = str.split()
            word = words[0]

            q = self._findquest(word)
            if q:
                q.activate(str)

        def deactivate(self, str):
            words = str.split()
            word = words[0]

            q = self._findquest(word)

            if q:
                q.deactivate(str)

        def addquest(self, quest=None, tab=None):
            if quest:
                i = tab or quest.tab()
                if i not in self._quests.keys():
                    self._tabs.append(i)
                    self._quests[i] = [ ]

                self._quests[i].append(quest)

                if not self.qvar:
                    self.qvar = quest
                    self.tvar = i

        def addquests(self, quests=None):
            if quests:
                for i in quests:
                    self.addquest(i)

        def emptytab(self, tab):
            return len(self.tab(tab)) == 0

        def tab(self, tab=None):
            if tab:
                return self._quests[tab]
            return self.tvar

        def cleartab(self, tab=None):
            if tab:
                if tab in self._quests.keys():
                    del self._quests[tab]

        def newtab(self):                           #function called when a new tab
            list = self._quests[self.tvar]          #is highlighted

            ret = None

            for i in list:
                if not i.hidden() and ret == None:
                    ret = i

            self.qvar = ret

        def _nextstage(self, quest):
            stage = quest.stage()
            str = stage.post()
            next = stage.next()

            #if there is another stage
            if next:
                stage = quest.stage(next)

                #activate new triggers
                quest.activate(stage.triggers())

                #update description
                quest.description(stage.description())

                #display notification
                if stage.notification():
                    self.notify(stage.notification())
                elif stage.notification()==None:
                    self.notify('{image=gui/objective_target.png}{color=#840cff}{size=+2}{font=fonts/GoodDog.otf} '+quest.title()+'{/color}{/size}{/font}')

            #if there isn't another stage
            else:

                quest._completed = True

                if self._completiontab:
                    self.movequest(quest, self._completiontab)
                else:
                    quest.hidden(True)
                    q = self._firstquest()
                    if q:
                        self.qvar = q
                        self.tvar = q.tab()
                    else:
                        self.keyoff()

                if stage.notification():
                    self.notify(stage.notification())
                elif stage.notification()==None:
                    self.notify('{image=gui/objective_target.png}{color=#840cff}{size=+2}{font=fonts/GoodDog.otf} '+quest.title()+'{/color}{/size}{/font}')


            #post-script runs if it exists
            if str:
                if renpy.has_label(str):
                    renpy.call(str)

        def _firstquest(self):
            for i in self._quests:
                for quest in self._quests[i]:
                    if not quest.completed() and not quest.hidden():
                        return quest

        def find(self, item, value=1, quest=None):
            q = quest

            if not q:
                q = self._findquest(item)

            if q.find(item, value):
                self._nextstage(q)

        def markdone(self, goal, quest=None):
            q = quest

            if not q:
                q = self._findquest(goal)

            if q.goaldone(goal):
                self._nextstage(q)

        def interactive(self, goals, quest=None):
            words = goals.split()
            word = words[0]

            q = quest

            if not q:
                q = self._findquest(word)

            return q.interactive(goals)

        def completed(self, str):  #can receive either a goal or quest id
            q = self.quest(str)

            #prioritizes a qid search
            if q:
                return q.completed()

            q = self._findquest(str)

            if q:
                return q.goal(str).completed()

            return False

        def have(self, item):
            q = self._findquest(item)

            return q.goal(item).have()

        def _findquest(self, goal=None, qid=None, stage=None):  #call only with goal or qid
            for list in self._quests.values():
                for item in list:
                    if goal and item.hasgoal(goal):
                        return item
                    if qid and item.id() == qid:
                        return item
                    if stage and item.hasstage(stage):
                        return item

            return None

        def setnext(self, str):
            q = self._findquest(stage=str)

            if q:
                q.stage().next(str)

        def quest(self, qid):
            return self._findquest(qid=qid)

        def assign(self, qid=None):               #assign the quest
            quest = self.quest(qid)

            stage = quest.stage(quest._firststage)

            quest.activate(stage.triggers())

            if stage.notification():
                self.notify(stage.notification())
            elif stage.notification()==None:
                self.notify('{image=gui/objective_target.png}{color=#840cff}{size=+2}{font=fonts/GoodDog.otf} '+quest.title()+'{/color}{/size}{/font}')



        def allhidden(self, tab):
            ret = True
            list = self._quests[tab]

            for i in list:
                ret = ret and i.hidden()

            return ret

        def stoptracking(self):
            q = self.qvar

            q.tracked(False)
            self._tracked = None

        def track(self, quest=None):

            q = quest or self.qvar

            q.tracked(True)
            if self._tracked:
                self._tracked.tracked(False)
            self._tracked = q

        def tracked(self):
            return self._tracked

        def tracker(self, str=None):
            if str:
                self._tracker = str
            return self._tracker

        def displayedtabs(self):
            list = self._tabs
            ret = [ ]

            for i in list:
                if not log.emptytab(i) and not log.allhidden(i):
                    ret.append(i)
            return ret

        def removequest(self, quest, tab):
            list = self._quests[tab]
            k = None
            i = 0

            while i < len(list):
                if list[i] == quest and k == None:
                    k = i
                i += 1

            del self._quests[tab][k]

        def movequest(self, quest, finish):
            self.addquest(quest, finish)
            self.removequest(quest, quest.tab())
            if self.qvar == quest:
                self.tvar = finish

        def screen(self, screen=None):
            if screen:
                self._screen = screen
            return self._screen

        def key(self, key=None):
            if key:
                self._screen = key
            return self._key

        def keyon(self):
            self.enable()
            if self.key():
                renpy.show_screen(self.key())

        def keyoff(self):
            self.disable()
            if self.key():
                renpy.hide_screen(self.key())

        def show(self):
            renpy.show_screen(self.screen())

        def enabled(self, flag=None):
            if flag != None:
                self._enabled = flag
            return self._enabled

        def enable(self):
            self.enabled(True)

        def disable(self):
            self.enabled(False)

        def notifyimage(self, img=None):
            if img:
                self._notifyimage = img
            return self._notifyimage

        def notify(self, str=None, img=None):
            self.message(str)
            renpy.show(img or self.notifyimage())

        def message(self, str=None):
            if str:
                self._notify = str
            return self._notify

        def activetab(self, show_hidden=False):
            list = self.tab(self.tvar)
            ret = [ ]

            for i in list:
                if show_hidden or not i.hidden():
                    ret.append(i)

            return ret

        def activedescription(self):
            return self.qvar.description()

        def activeimage(self):
            return self.qvar.img()

        def trackable(self):
            return not self.qvar.tracked() and not self.qvar.completed()

        def trackerprogress(self):
            return self.tracked().orderedgoals()

        def activeprogress(self):
            return self.qvar.orderedgoals()

        def trackedtitle(self):
            return self.tracked().title()
Image

“He asked me to calm down, close my eyes and be quiet. He explained to me that if I was afraid, the shadow that ran barefoot in the street would feel it. I got scared seeing Jumanji on TV, so let me tell you, we didn't stay hidden for long and had to start running again.”
Jessica's Diary.

User avatar
sculpteur
Veteran
Posts: 221
Joined: Fri Nov 17, 2017 6:40 pm
Completed: Apocalypse Lovers
Projects: Apocalypse Lovers
Organization: Awake_Production
Location: France
Discord: https://discord.gg/apocalypse-lovers
Contact:

Re: A strange interger bug

#7 Post by sculpteur » Mon Apr 18, 2022 1:47 am

Any thought?

(And the long message of code is optional to read, there is an other post before it)
Image

“He asked me to calm down, close my eyes and be quiet. He explained to me that if I was afraid, the shadow that ran barefoot in the street would feel it. I got scared seeing Jumanji on TV, so let me tell you, we didn't stay hidden for long and had to start running again.”
Jessica's Diary.

User avatar
Ocelot
Eileen-Class Veteran
Posts: 1882
Joined: Tue Aug 23, 2016 10:35 am
Github: MiiNiPaa
Discord: MiiNiPaa#4384
Contact:

Re: A strange interger bug

#8 Post by Ocelot » Mon Apr 18, 2022 5:03 am

My thought are "this is a job for inbuilt translation framework" and "descriptions should not be stored in quest array, and should be accessed from static global array by quest key when needed"
< < insert Rick Cook quote here > >

User avatar
sculpteur
Veteran
Posts: 221
Joined: Fri Nov 17, 2017 6:40 pm
Completed: Apocalypse Lovers
Projects: Apocalypse Lovers
Organization: Awake_Production
Location: France
Discord: https://discord.gg/apocalypse-lovers
Contact:

Re: A strange interger bug

#9 Post by sculpteur » Wed Jun 01, 2022 3:38 pm

All right, just to let you know I've of course take you opinion into consideration when you wrote that :
Ocelot wrote:
Sun Apr 10, 2022 2:40 am
Use RenPy translation framework so you won't have to write everything twice.
And after you wrote this :
Ocelot wrote:
Mon Apr 18, 2022 5:03 am
My thought are "this is a job for inbuilt translation framework"
So let me explain why I deliberately chose to avoid using the translation framework offered by Renpy.
The dialogs and their fluidity are essential for my game. There is humorous traits, witticisms, linguistic expressions and even colloquialism and slang.
I have a very good written expression in my mother langage which is French but I also know how to express myself in English fluently. As the understanding of my texts is really essential, I prefer to translate the text myself from French to English so that my words are reproduced as faithfully as possible and with clarity. Especially when it comes to jokes, puns, or specific language expressions that wouldn't make any sense with an automatic translation.



That being said, I'm really interested in your second suggestion regarding the structure of this variable :
"descriptions should not be stored in quest array, and should be accessed from static global array by quest key when needed"

You right and I clearly feel that the problem is coming from this way of defining my quest objective description, but unfortunately it goes to a level of coding in python that is beyond my knowledge and I have no concrete idea of how to go about cleaning it up a bit, hoping to finally be able to fix this error that has been chasing me for almost a year now .
Image

“He asked me to calm down, close my eyes and be quiet. He explained to me that if I was afraid, the shadow that ran barefoot in the street would feel it. I got scared seeing Jumanji on TV, so let me tell you, we didn't stay hidden for long and had to start running again.”
Jessica's Diary.

User avatar
Ocelot
Eileen-Class Veteran
Posts: 1882
Joined: Tue Aug 23, 2016 10:35 am
Github: MiiNiPaa
Discord: MiiNiPaa#4384
Contact:

Re: A strange interger bug

#10 Post by Ocelot » Wed Jun 01, 2022 4:07 pm

sculpteur wrote:
Wed Jun 01, 2022 3:38 pm
I prefer to translate the text myself from French to English so that my words are reproduced as faithfully as possible and with clarity. Especially when it comes to jokes, puns, or specific language expressions that wouldn't make any sense with an automatic translation.
And why you avoid translation framework then?
Translation framework has no relation on who performs the translation. It is a system which handles text extraction (to the separate files where it can be translated) and loading correct lines for currently selected language.

Let me show an example:

Code: Select all

define random_thoughts = [
    _('I am really tired...'),
    _('How long that is going to be?'),
    _('I wonder if it has an end or I am in hell an it is my eternal punishment'),
]

screen what_to_do():
    vbox:
        label _('You can try to leave early')
        hbox:
            textbutton _('Do it!') action [Hide('what_to_do'), Jump('run_away')]
            textbutton _('I better sit throught this') action Hide('what_to_do')

label start:
    "You spend almost four hours at meeting"
    $ renpy.notify( renpy.random.choice(random_thoughts ) )
    show screen what_to_do
    'Looks like this meeting will never ends...'
    # . . .
How many different languages does this script supports? As many as I want. What do I need to change to add another language to the mix? Technically, nothing. (I should probably add button to the preferences screen to choose that language...).
I just need to add another translation using RenPy itself. It will extract all text marked as translatable, and will place it in separate files. There I can translate it, and if I switch language within game, RenPy will load correct lines for current language.
< < insert Rick Cook quote here > >

User avatar
sculpteur
Veteran
Posts: 221
Joined: Fri Nov 17, 2017 6:40 pm
Completed: Apocalypse Lovers
Projects: Apocalypse Lovers
Organization: Awake_Production
Location: France
Discord: https://discord.gg/apocalypse-lovers
Contact:

Re: A strange interger bug

#11 Post by sculpteur » Sun Jun 19, 2022 4:42 am

Humm that's really interesting but also demoralizing since I'm sad I don't dwell into this in my earlier developement stage.
I mean I think now it's already too late for me since I have tons of data, variable, line of dialog etc wich is using my own way to do it and modifying all that will me a hudge chaotic work wich will messing up all the code and creat bugs everywhere. Just to let you know an overview of what I mean, there is some code exemple :

Code: Select all

default en = Character(None, condition='english == True')
default fr = Character(None, condition='english == False')
default fr_j = Character("[jess_name]", color="293ed7", condition='english == False')
default en_j = Character("[jess_name]", color="293ed7", condition='english == True')
default fr_s = Character("[sam_name]", color="ffdc19", condition='english == False')
default en_s = Character("[sam_name]", color="ffdc19", condition='english == True')
default fr_m = Character("[main_name]", condition='english == False')
default en_m = Character("[main_name]", condition='english == True')
default fr_ez = Character("Ezekiel", condition='english == False')
default en_ez = Character("Ezekiel", condition='english == True')

default fr_mp = Character ("[main_name]", condition='english == False', who_suffix=" {i}{size=-5}(pensées){/size}{/i}", what_prefix="{i}", what_suffix="{/i}")
default en_mp = Character ("[main_name]", condition='english == True', who_suffix=" {i}{size=-5}(thoughts){/size}{/i}", what_prefix="{i}", what_suffix="{/i}")

default fr_dp = Character("[deb_name]", color="9813ff", condition='english == False', what_prefix="{i}", what_suffix="{/i}")
default en_dp = Character("[deb_name]", color="9813ff", condition='english == True', what_prefix="{i}", what_suffix="{/i}")

default fr_d = Character("[deb_name]", color="9813ff", condition='english == False')
default en_d = Character("[deb_name]", color="9813ff", condition='english == True')

default fr_dream = Character("Dream", color="9813ff", condition='english == False')
default en_dream = Character("Dream", color="9813ff", condition='english == True')

default fr_u = Character ("Inconnu", color="ffffff", condition='english == False')
default en_u = Character ("Unknown", color="ffffff", condition='english == True')

Code: Select all

screen Lewis_house_navigation_prologue: # Prologue Lewis House
    modal True
    use quick_screen_keys_input
    if (english == False):
        imagemap:
            ground "0-4-IntroHouse_Corridor1"
            hover "0-4-IntroHouse_Corridor1_fr_hover"
            alpha False
            hotspot (0, 326, 310, 754) action Jump("LewisHouse_First_Arrival_Living")          # Living Room
            hotspot (261, 0, 672, 269) action Jump("LewisHouse_First_Arrival_Upstair")         # Upstairs
            hotspot (954, 102, 222, 342) action Jump("LewisHouse_First_Arrival_Bathroom")      # Bathroom
            hotspot (1191, 105, 216, 762) action Jump("LewisHouse_First_Arrival_Mainbedroom")  # MainRoom
            hotspot (1407, 105, 423, 975) action Jump("LewisHouse_First_Arrival_Kitchen")      # Kitchen
            hotspot (873, 501, 263, 255) action Jump("LewisHouse_First_Arrival_BasementAcces") # Move to the end of corridor
        add "gui/Interface_Indicator_Interaction.png"
        use quick_screen_keys_input
        use interactive_indicator_number_screen_top
    else:
        imagemap:
            ground "0-4-IntroHouse_Corridor1"
            hover "0-4-IntroHouse_Corridor1_en_hover"
            alpha False
            hotspot (0, 326, 310, 754) action Jump("LewisHouse_First_Arrival_Living")          # Living Room
            hotspot (261, 0, 672, 269) action Jump("LewisHouse_First_Arrival_Upstair")         # Upstairs
            hotspot (954, 102, 222, 342) action Jump("LewisHouse_First_Arrival_Bathroom")      # Bathroom
            hotspot (1196, 113, 222, 749) action Jump("LewisHouse_First_Arrival_Mainbedroom")  # MainRoom
            hotspot (1418, 81, 432, 999) action Jump("LewisHouse_First_Arrival_Kitchen")      # Kitchen
            hotspot (873, 501, 263, 255) action Jump("LewisHouse_First_Arrival_BasementAcces") # Move to the end of corridor
        add "gui/Interface_Indicator_Interaction.png"
        use quick_screen_keys_input
        use interactive_indicator_number_screen_top

Code: Select all

if (english == False):
    menu:
        "Attraper le pisolet":
            hide countdown
            hide screen countdown
            jump DarkBasment_Bedroom_mastaction_rush_win_0
        "Ne pas bouger":
            hide countdown
            hide screen countdown
            jump DarkBasment_Bedroom_mastaction_ending_rush2_dontmove
if (english == True):
    menu:
        "Grab the gun":
            hide countdown
            hide screen countdown
            jump DarkBasment_Bedroom_mastaction_rush_win_0
        "Don't move":
            hide countdown
            hide screen countdown
            jump DarkBasment_Bedroom_mastaction_ending_rush2_dontmove

Code: Select all

fr_d "« Alors maintenant dis moi... »"
fr_d "« Est-ce que tu connais beaucoup de personnes capables de faire ça ? »"
en_d "“So now tell me...”"
en_d "“Do you know a lot of people who can do this?”"
Image

“He asked me to calm down, close my eyes and be quiet. He explained to me that if I was afraid, the shadow that ran barefoot in the street would feel it. I got scared seeing Jumanji on TV, so let me tell you, we didn't stay hidden for long and had to start running again.”
Jessica's Diary.

Post Reply

Who is online

Users browsing this forum: Google [Bot]