date sim relationship bar help

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
Audria
Newbie
Posts: 18
Joined: Tue Feb 26, 2013 4:16 am
Projects: Bed & Breakfast, Grace Academy
Organization: Bloody Rose Designs
Contact:

date sim relationship bar help

#1 Post by Audria »

This is in response to the post: http://lemmasoft.renai.us/forums/viewto ... =8&t=15089 I'm sorry I've reposted, but since I posted in that topic and it says solved, no one has taken a look at my help need :)
OokamiKasumi wrote:
Zalkyria wrote:Hi I was wondering if you could help me. I would like to use this, or something similar for my date sim I am working on. I am stumped as to how to add in a love meter to my game. Can you please help me?
Sure!
I hope that helps. :)
Okay, no clue what version of DSE or Ren'Py was used when you helped her out. I did everything you put in and I'm getting a crap load of errors no matter what I do. Here's the latest one:

Code: Select all

I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game\script.rpy", line 138, in script
UnicodeDecodeError: 'ascii' codec can't decode byte 0xed in position 24: ordinal not in range(128)

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

Full traceback:
  File "G:\...novel maker\renpy-6.14.1-sdk\renpy\execution.py", line 266, in run
  File "G:\...novel maker\renpy-6.14.1-sdk\renpy\ast.py", line 1028, in execute
  File "G:\...novel maker\renpy-6.14.1-sdk\renpy\exports.py", line 939, in with_statement
  File "G:\...novel maker\renpy-6.14.1-sdk\renpy\display\core.py", line 1512, in do_with
  File "G:\...novel maker\renpy-6.14.1-sdk\renpy\display\core.py", line 1813, in interact
  File "G:\...novel maker\renpy-6.14.1-sdk\renpy\display\core.py", line 2118, in interact_core
  File "G:\...novel maker\renpy-6.14.1-sdk\renpy\display\core.py", line 1402, in draw_screen
  File "render.pyx", line 366, in renpy.display.render.render_screen (gen\renpy.display.render.c:4567)
  File "render.pyx", line 166, in renpy.display.render.render (gen\renpy.display.render.c:2032)
  File "G:\...novel maker\renpy-6.14.1-sdk\renpy\display\layout.py", line 514, in render
  File "render.pyx", line 95, in renpy.display.render.render (gen\renpy.display.render.c:2290)
  File "render.pyx", line 166, in renpy.display.render.render (gen\renpy.display.render.c:2032)
  File "G:\...novel maker\renpy-6.14.1-sdk\renpy\display\transition.py", line 362, in render
  File "render.pyx", line 95, in renpy.display.render.render (gen\renpy.display.render.c:2290)
  File "render.pyx", line 166, in renpy.display.render.render (gen\renpy.display.render.c:2032)
  File "G:\...novel maker\renpy-6.14.1-sdk\renpy\display\layout.py", line 514, in render
  File "render.pyx", line 95, in renpy.display.render.render (gen\renpy.display.render.c:2290)
  File "render.pyx", line 166, in renpy.display.render.render (gen\renpy.display.render.c:2032)
  File "G:\...novel maker\renpy-6.14.1-sdk\renpy\display\layout.py", line 514, in render
  File "render.pyx", line 95, in renpy.display.render.render (gen\renpy.display.render.c:2290)
  File "render.pyx", line 166, in renpy.display.render.render (gen\renpy.display.render.c:2032)
  File "accelerator.pyx", line 74, in renpy.display.accelerator.transform_render (gen\renpy.display.accelerator.c:1068)
  File "render.pyx", line 166, in renpy.display.render.render (gen\renpy.display.render.c:2032)
  File "G:\...novel maker\renpy-6.14.1-sdk\renpy\text\text.py", line 1282, in render
  File "G:\...novel maker\renpy-6.14.1-sdk\renpy\text\text.py", line 440, in __init__
  File "G:\...novel maker\renpy-6.14.1-sdk\renpy\text\text.py", line 219, in glyphs
  File "G:\...novel maker\renpy-6.14.1-sdk\renpy\text\font.py", line 569, in get_font
  File "G:\...novel maker\renpy-6.14.1-sdk\renpy\text\font.py", line 530, in load_face
UnicodeDecodeError: 'ascii' codec can't decode byte 0xed in position 24: ordinal not in range(128)

Windows-7-6.1.7601-SP1
Ren'Py 6.14.1.366
 
and here's the block of code it's refering to:

Code: Select all

    $ show_devon=True 
    # This makes the Meter appear.

    pause 0.5
    # This makes the meter sit there for half a second, so that when the points 
    # are added, the player can actually 'see' the meter extend.

    $ devon_love+=50
    #This adds points to the meter. 
    
    show expression Text("{color=ffffff}{font=LHFmisterkookyREG_0.TTF}+50 Love Points{/font}{/color}", 
        size=50, 
        yalign=0.5, # Centers the text -- Toward Bottom.
        xalign=0.5, # Centers the text -- Toward Right. 
        drop_shadow=(2, 2)) as text
    with dissolve
    # This is the Announcement Text for the Love Meter, including a specific font, and font color.
    # This states how many points Devon is being awarded.  
    
    $ show_devon=True
    # This is a Refresh that shows the increase in points ON the meter.

    $ renpy.pause()
    #This keeps the bar visible until the player hits a key. 

    hide text with dissolve
    # This hides the Text. 

    $ show_devon=False
    # This hides the Meter. 
the WITH DISOLVE is the line that's throwing the error

Thanks in advance for any help I can get :)

Unin
Regular
Posts: 54
Joined: Wed Sep 01, 2010 8:08 pm
Location: Florida
Contact:

Re: date sim relationship bar help

#2 Post by Unin »

Just a thought, but hows it work without the font?

User avatar
OokamiKasumi
Eileen-Class Veteran
Posts: 1779
Joined: Thu Oct 14, 2010 3:53 am
Completed: 14 games released -- and Counting.
Organization: DarkErotica Games
Deviantart: OokamiKasumi
Location: NC, USA
Contact:

Re: date sim relationship bar help

#3 Post by OokamiKasumi »

Audria wrote:Okay, no clue what version of DSE or Ren'Py was used when you helped her out.
Renpy version 6.15.
Audria wrote:I did everything you put in and I'm getting a crap load of errors no matter what I do.
Your code:

Code: Select all

    $ show_devon=True 
    pause 0.5
    $ devon_love+=50
    
    show expression Text("{color=ffffff}{font=LHFmisterkookyREG_0.TTF}+50 Love Points{/font}{/color}", 
        size=50, 
        yalign=0.5, 
        xalign=0.5, 
        drop_shadow=(2, 2)) as text
    with dissolve
    
    $ show_devon=True
    $ renpy.pause()

    hide text with dissolve
    $ show_devon=False
Audria wrote: --the WITH DISSOLVE is the line that's throwing the error...
This is the code straight from my game in script.rpy, and the source of the screenshot:

Code: Select all

    $ show_giselle=True
    pause 0.5
    $ giselle_love+=50
    
    #The Announcement Text for the Love Bar
    show expression Text("{color=ffffff}{font=LHFmisterkookyREG_0.TTF}+50 Love Points{/font}{/color}", 
        size=50, 
        yalign=0.5, 
        xalign=0.5, 
        drop_shadow=(2, 2)) as text
    with dissolve
    
    $ show_giselle=True
    $ renpy.pause() 

    hide text with dissolve
    $ show_giselle=False
    
    $ clue_1_seen = True
    gi "You've created a new Ren'Py game."
Question: Do you actually have this font in your game folder?
-- LHFmisterkookyREG_0.TTF

If you don't, THIS is why you're getting errors.
Ookami Kasumi ~ Purveyor of fine Smut.
Most recent Games Completed: For ALL my completed games visit: DarkErotica Games

"No amount of great animation will save a bad story." -- John Lasseter of Pixar

User avatar
Audria
Newbie
Posts: 18
Joined: Tue Feb 26, 2013 4:16 am
Projects: Bed & Breakfast, Grace Academy
Organization: Bloody Rose Designs
Contact:

Re: date sim relationship bar help

#4 Post by Audria »

ah ha! I will have to remove that :) I didnt even notice that the font was in there. Thank you :)

Edit: just wanted to say thank you. That fixed it. You are awesome, and I thank you so much for sharing your bit of code with everyone (me)!
Last edited by Audria on Sat Mar 30, 2013 12:27 am, edited 1 time in total.

User avatar
OokamiKasumi
Eileen-Class Veteran
Posts: 1779
Joined: Thu Oct 14, 2010 3:53 am
Completed: 14 games released -- and Counting.
Organization: DarkErotica Games
Deviantart: OokamiKasumi
Location: NC, USA
Contact:

Re: date sim relationship bar help

#5 Post by OokamiKasumi »

Audria wrote:ah ha! I will have to remove that :) I didnt even notice that the font was in there. Thank you :)
See, that's the funny thing about coding -- every little tiny little thing counts. :)
Ookami Kasumi ~ Purveyor of fine Smut.
Most recent Games Completed: For ALL my completed games visit: DarkErotica Games

"No amount of great animation will save a bad story." -- John Lasseter of Pixar

User avatar
Audria
Newbie
Posts: 18
Joined: Tue Feb 26, 2013 4:16 am
Projects: Bed & Breakfast, Grace Academy
Organization: Bloody Rose Designs
Contact:

Re: date sim relationship bar help

#6 Post by Audria »

just wanted to say thank you. That fixed it. You are awesome, and I thank you so much for sharing your bit of code with everyone (me)!

Post Reply

Who is online

Users browsing this forum: Google [Bot]