Page 1 of 1

DSE issues

Posted: Wed Feb 29, 2012 2:08 pm
by Raindrops
I'm using the DSE and altering it to my own needs, but I haven't altered the 'events_dispatcher.rpy", "styles.rpy", "stats.rpy" or "day_planner.rpy". However, whenever I try to launch my game, this appears:

Code: Select all

I'm sorry, but an uncaught exception occurred.

While executing init code:
  File "game/events_dispatcher.rpy", line 321, in script
        python hide:
Exception: Action is required in ui.key.

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

Full traceback:
  File "C:\Users\Anita\Documents\Games\PC\VN\renpy-6.13.0\renpy\bootstrap.py", line 276, in bootstrap
  File "C:\Users\Anita\Documents\Games\PC\VN\renpy-6.13.0\renpy\main.py", line 294, in main
  File "C:\Users\Anita\Documents\Games\PC\VN\renpy-6.13.0\renpy\execution.py", line 269, in run
  File "C:\Users\Anita\Documents\Games\PC\VN\renpy-6.13.0\renpy\display\error.py", line 96, in report_exception
  File "C:\Users\Anita\Documents\Games\PC\VN\renpy-6.13.0\renpy\game.py", line 289, in invoke_in_new_context
  File "C:\Users\Anita\Documents\Games\PC\VN\renpy-6.13.0\renpy\display\error.py", line 40, in call_exception_screen
  File "C:\Users\Anita\Documents\Games\PC\VN\renpy-6.13.0\renpy\ui.py", line 237, in interact
  File "C:\Users\Anita\Documents\Games\PC\VN\renpy-6.13.0\renpy\display\core.py", line 1799, in interact
  File "C:\Users\Anita\Documents\Games\PC\VN\renpy-6.13.0\renpy\display\core.py", line 555, in replace_transient
  File "C:\Users\Anita\Documents\Games\PC\VN\renpy-6.13.0\renpy\display\core.py", line 825, in remove
  File "C:\Users\Anita\Documents\Games\PC\VN\renpy-6.13.0\renpy\display\core.py", line 753, in hide_or_replace
  File "C:\Users\Anita\Documents\Games\PC\VN\renpy-6.13.0\renpy\display\screen.py", line 175, in _hide
  File "C:\Users\Anita\Documents\Games\PC\VN\renpy-6.13.0\renpy\display\screen.py", line 244, in update
  File "C:\Users\Anita\Documents\Games\PC\VN\renpy-6.13.0\renpy\screenlang.py", line 1166, in __call__
  File "C:\Users\Anita\Documents\Games\PC\VN\renpy-6.13.0\renpy\python.py", line 977, in py_exec_bytecode
  File "common/_errorhandling.rpym", line 438, in <module>
  File "C:\Users\Anita\Documents\Games\PC\VN\renpy-6.13.0\renpy\ui.py", line 435, in __call__
  File "C:\Users\Anita\Documents\Games\PC\VN\renpy-6.13.0\renpy\ui.py", line 560, in _key
Exception: Action is required in ui.key.

Windows-post2008Server-6.1.7600
Ren'Py 6.13.0.1603
Let's Date! v.1
I can't seem to find what I'm doing wrong. Help? :S

Re: "Action is required in ui.key"?

Posted: Thu Mar 01, 2012 9:05 am
by sciencewarrior
It appears that you have an error in your events, but a second error in renpy's error handling code is masking it. A few things you should try looking for, in order of likelihood:
  • Calls to event() passing the name of a label that you haven't declared in your code yet
  • Calls to event() without parameters
  • Creating a variable named event or all_events
If this fails, you could try running with renpy's latest version. It may at least help you discover the problem (but it may also break your script elsewhere).

Re: "Action is required in ui.key"?

Posted: Thu Mar 01, 2012 11:50 am
by Raindrops
I'm not quite sure what you mean really - sorry!
Here is my events.rpy so far:

Code: Select all

init:
    $ m = Character("Me", color="#cff8c8")
    $ l = Character("Les Glover", color="#cff8c8")
    image lsmile = "char/les/smile.gif"
    image lshock = "char/les/shock.gif"
    image lhurt = "char/les/hurt.gif"
    image leh = "char/les/eh.gif"
    image lcry = "char/les/cry.gif"
    image lblush = "char/les/blush.gif"
    image lmad = "char/les/mad.gif"
    image lsad = "char/les/sad.gif"
    image lnorm = "char/les/norm.gif"
    $ n = Character("Nathan Foss", color="#cff8c8")
    image nnorm = "char/nath/norm.gif"
    image nsweat = "char/nath/sweat.gif"
    image nshock = "char/nath/shock.gif"
    image nblush = "char/nath/blush.gif"
    image ncry = "char/nath/cry.gif"
    image nmad = "char/nath/mad.gif"
    image nsad = "char/nath/sad.gif"
    image ntalk = "char/nath/talk.gif"
    image nsmile = "char/nath/smile.gif"
    $ f = Character("Farley Warrick", color="#cff8c8")
    image fblush = "char/far/blush.gif"
    image fnorm = "char/far/norm.gif"
    image fsmile = "char/far/smile.gif"
    image fmad = "char/far/mad.gif"
    image ftalk= "char/far/talk.gif"
    $ b = Character("Bethania Oquendo", color="#c8ffc8")
    image bblush = "char/beth/blush.gif"
    image bnorm = "char/beth/norm.gif"
    image btalk = "char/beth/talk.gif"
    
init:
    $ event("school", "act == 'sch'", event.only(), priority = 200)
    $ event("skip", "act == 'skip'", event.only(), priority = 200)
    $ event("sleep", "act == 'sleep'", event.only(), priority = 200)
    $ event("roof", "act == 'roof'", event.only(), priority = 200)
    $ event("out", "act == 'out'", event.only(), priority = 200)
    $ event("canteen", "act == 'canteen'", event.only(), priority = 200)
    $ event("home", "act == 'home'", event.only(), priority = 200)
    $ event("lib", "act == 'lib'", event.only(), priority = 200)
    $ event("cafe", "act == 'cafe'", event.only(), priority = 200)
    $ event("arcade", "act == 'arc'", event.only(), priority = 200)
    $ event("bed", "act == 'bed'", event.only(), priority = 200)
    $ event("study", "act == 'study'", event.only(), priority = 200)
    $ event("email", "act == 'email'", event.only(), priority = 200)
    
label school:
    $ intel +=5
    scene classroom with fade
    "I get to school on time and make my way to class."
    "Lessons are, {w=.4}as usual, {w=.4}informatively boring."
    return
    
label skip:
    $ intel -=5
    $ social +=5
    scene garden with fade
    "I get to school on time, {w=.4}but I decide to skip first period."
    scene roof with fade
    "I spend my time on the roof instead, {w=.3}staring at the clouds pass by."
    return
    
label sleep:
    $ intel -=5
    scene bedroom with fade
    "I slam the snooze button on my alarm clock and go back to sleep."
    "It's only school."
    return
    
label roof:
    $ game +=5
    scene roof with fade
    "I eat my lunch on the roof of the school."
    "There aren't many people here, {w=.3}so it's nice and quiet."
    " After I finish my sandwich, {w=.4}I pull out my NDS and play some TokiMemo."
    return
    
label outside:
    $ social +=5
    scene outside with fade
    "I eat lunch outside with the others."
    show lsad with dissolve
    "Les begs me for food and gives me the puppy eyes."
    "Reluctantly, {w=.4}I share some with him."
    # if nathbreakup == 'true':
       # show nsad with dissolve at right
       # "I also share some food with Nathan, {w=.4}who no longer receives a love bento for lunch."
    return
    
label canteen:
    $ social +=5
    scene canteen with fade
    "I eat inside with the others."
    show lsad with dissolve
    "Les begs me for food and gives me the puppy eyes."
    "Reluctantly, {w=.4}I share some with him."
    # if nathbreakup == 'true':
       # show nsad with dissolve at right
       # "I also share some food with Nathan, {w=.4}who no longer receives a love bento for lunch."
    return

label home:
    scene train with fade
    "School ends, {w=.3}so I catch the train back home."
    return
    
label lib:
    $ intel +=5
    scene lib with fade
    "I go to the library to check out some books and return my old ones."
    return
    
label cafe:
    $ social +=5
    scene cafe with fade
    "I drop by the cafe and spend some time there before going home."
    return
    
label arcade:
    $ game +=5
    scene black with fade
    "I go to the arcade and spend some money of games."
    return
    
label bed:
    $ game +=5
    scene bedroom with fade
    "I get into bed and play some video games for the rest of the night."
    return
    
label study:
    $ intel +=5
    scene bedroom with fade
    "I go through the notes I took today and do some homework."
    return
    
label email:
    $ social +=5
    scene bedroom with fade
    "I log onto my HandBook account and check my emails."
    return
    
# Events

init:
    $ event("beth", "act == 'sch'", event.once(), event.only())
    
label beth:
    scene classroom with fade
    "I get to school on time and make my way to class."
    m "Beth!"
    show bnorm with dissolve
    b "What?"
    show classroomfade behind bnorm
    "Bethania Oquendo. \nSenior in high school. \n17 years old. \nBestest friend in the whole wide world."
    "Also, a first-class informant."
    m "Hi!"
    b "...{w=.3}is that all you wanted to say to me?"
    m "Err...{w=.3}yes?"
    b "*sigh*"
    hide bnorm with dissolve
    m "?"
    return
I've checked numerous times, but I don't think that I've missed anything out?

Re: "Action is required in ui.key"?

Posted: Thu Mar 01, 2012 11:54 am
by sciencewarrior
Aha! You called your event "out", but you created a label "outside".

Re: "Action is required in ui.key"?

Posted: Thu Mar 01, 2012 12:13 pm
by Raindrops
Oooo...thanks xD I can't believe I missed that D;
It works now though! :D
But I've come across another issue now...whenever the part with the text finishes, the day planner doesn't run, so it automatically returns to the main menu. Here's my code:

Code: Select all

...
l "No problem."
    hide lsmile with dissolve
    m "*sigh*"
    m "(It's been two years since we broke up but I still can't quite get over him.)"
    m "(I know they say that you never forget your first love, {w=.3}but if that's the case why do they also say that first loves never work out?)"
    m "*sigh*"
    jump day
    
label day:
    $ day +=1
    scene black with fade
    centered "Day [day]"
    $ morn = None
    $ lunch = None
    $ aftersch = None
    $ even = None
    call day_planner(["Morning", "Lunch", "After School", "Evening"])
   
label morning:
    centered "Morning"
    $ period = "Morning"
...
Is it something to do with the call day_planner? :S

Re: "Action is required in ui.key"?

Posted: Thu Mar 01, 2012 8:51 pm
by sciencewarrior
I didn't get it. Does it display "Day 1" and return?

BTW, renaming the topic to mention DSE is probably a good idea. Personally, I never made a game with it, so I can't help you much. :(

Re: DSE issues

Posted: Fri Mar 02, 2012 10:16 am
by Raindrops
Thanks for all the help so far xD
It's meant to show "Day 1" and then call the day_planner so you can choose what to do for the day, but it just returns to the main screen after displaying "Day 1" :/

Re: DSE issues

Posted: Fri Mar 02, 2012 11:06 am
by sciencewarrior
Verify your init block, right after you called register_stat() to create your character's stats, if the periods are correctly defined. They should look like this:

Code: Select all

    dp_period("Morning", "morn")
    dp_choice("Go to School", "school")
    dp_choice("Skip School", "skip")
    dp_choice("Sleep In", "sleep")

    dp_period("Lunch", "lunch")
    dp_choice("Roof", "roof")
    dp_choice("Outside", "out")
    dp_choice("Canteen", "canteen")

    dp_period("After School", "aftersch")
    dp_choice("Home", "home")
    dp_choice("Library", "lib")
    dp_choice("Café", "cafe")
    dp_choice("Arcade", "arcade")

    dp_period("Evening", "even")
    dp_choice("Go to Bed", "bed")
    dp_choice("Study", "study")
    dp_choice("Send Email", "email")


Re: DSE issues

Posted: Fri Mar 02, 2012 1:48 pm
by Raindrops
This is what I have:

Code: Select all

init python:
    register_stat("Intelligence", "intel", 0, 100)
    register_stat("Gaming", "game", 0, 100)
    register_stat("Social", "social", 0, 100)

    dp_period("Morning", "morn")
    dp_choice("Sleep in", "sleep")
    dp_choice("Skip first period", "skip")
    dp_choice("Go to school", "sch")
    
    dp_period("Lunch", "lunch")
    dp_choice("Eat lunch on roof", "roof")
    dp_choice("Eat lunch outside", "out")
    dp_choice("Eat lunch in canteen", "canteen")
    
    dp_period("After School", "aftersch")
    dp_choice("Go home", "home")
    dp_choice("Go to the library", "lib")
    dp_choice("Go to cafe", "cafe")
    dp_choice("Go to the arcade", "arc")
    
    dp_period("Evening", "even")
    dp_choice("Play video games in bed", "bed")
    dp_choice("Stay up studying", "study")
    dp_choice("Check emails", "email")
It's more or less the same isn't it?