Tiny bug found (I think)

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
Zen_Tribe

Tiny bug found (I think)

#1 Post by Zen_Tribe »

Not sure if this is the right place to mention this but I'm just starting to play with this program so please forgive noobishness.

The use of an animated cursor in a fixed location disrupts voice from completing. Non-fixed animated cursor works fine. Using code from 5.2.1 demo. The code statements used are:

#
voice "blahblah.wav"
ectcf "blah blah"
#

$ ectcf = Character('Eileen', color=(200, 255, 200, 255),
ctc = anim.Blink("arrow.png", xpos=760, ypos=560),
ctc_position="fixed")

Using voice sustain does not fix it.

Anyway, if anyone can confirm its its a bug might be worth fixing in a future release. If its a "feature", well, thats cool too.

:wink:

User avatar
PyTom
Ren'Py Creator
Posts: 16093
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

#2 Post by PyTom »

It's a bug, and I've fixed it in my current code, so it will be fixed in the next release. (You'll need to pick up the new version of voice.rpy, which has a change that enables the fix.)

Are you actually working on a game that will incorporate voice? If so, there's a number of ways in which voice.rpy could be improved. For example, we could enable voice on a per-character basis.

Let me know.

zen
Newbie
Posts: 16
Joined: Thu Dec 01, 2005 5:00 pm
Contact:

#3 Post by zen »

Great news on the fix. I can't draw worth a crap, but I'm good with Fireworks so any game I do will be reworked photos. Not sure if thats cool with the Ren' crowd, but this is mostly for my own amusement and a way to learn Python in a fun way.

So far I have one story nearly done, using dse code merged into a base script. Has fairly complex pathing (lots of nested ELIF's and lots of evals to get a feel for the toolset. Don't seem to be able to evaluate multiple variables (other than depends) on one event line though. Is that possible? Something boolean like:

$ event("fit", "act == 'gym' and strength >= 70", and bmi <= 15, and appearance >= 60, event.depends('membership'), event.once())

To work around this I had test each condition(str, bmi, app) seperately, then resolve each of those to an event label, then use those three events as depends in a final $event. kinda kludgy but works well enough. Nice thing about ren'py is there are many ways to get things done.

It's almost exclusively voice driven (Using ATT Natural voices, smashing down the .wav's to about 10k/sec of voice using 88kps, 8bit, mono, 11khz sample, and PCM) Not sure what else would be needed for voice, fairly slick as is.

Thanks again for the many hours of amusement! Great engine.

User avatar
PyTom
Ren'Py Creator
Posts: 16093
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

#4 Post by PyTom »

zen wrote:So far I have one story nearly done, using dse code merged into a base script.
Great. Right now, the next release is unscheduled, but if you need the fix soon for a game, let me know and I'll cut the release.
Has fairly complex pathing (lots of nested ELIF's and lots of evals to get a feel for the toolset. Don't seem to be able to evaluate multiple variables (other than depends) on one event line though. Is that possible? Something boolean like:

$ event("fit", "act == 'gym' and strength >= 70", and bmi <= 15, and appearance >= 60, event.depends('membership'), event.once())
Not sure what you mean by this. You have two choices for evaluating multiple variables. Either and them together (like you did for act and strength), or simply list them separately. All the parameters to event are implicitly anded together. So the code:

$ event("fit", "act == 'gym' and strength >= 70 and bmi <= 15 and appearance >= 60", event.depends('membership'), event.once())

is equivalent to:

$ event("fit", "act == 'gym'", "strength >= 70", "bmi <= 15", "appearance >= 60", event.depends('membership'), event.once())

Which would both seem to do what you wanted.

Anyway, don't be a stranger.

zen
Newbie
Posts: 16
Joined: Thu Dec 01, 2005 5:00 pm
Contact:

#5 Post by zen »

Ah, both those work. I had the syntax wrong, using both the double quotes and no commas. Thanks.

zen
Newbie
Posts: 16
Joined: Thu Dec 01, 2005 5:00 pm
Contact:

Another wee bug?

#6 Post by zen »

Played with the Pixellate transition to see its possible use as a blur transition (no good, back to animation. A gauzian blur function would be a nice future transition for when characters wake up drunk ;-) ).

Using the demo game, place this line in the first init: section

$ myblur = Pixellate(15, 3)

The call it by changing the first Eileen happy show to:

show eileen happy with myblur

This consistantly tosses up a Microsoft debug error in run_game.exe as the transition finishes.

If I change it to Pixellate(15, 1) or Pixellate(15, 2) it works fine. 8 and above seem to crash it everytime with a different error, ZeroDivisionError: float divmod()

Might just be my setup, but its very consistant. Anyway, cheers.

User avatar
PyTom
Ren'Py Creator
Posts: 16093
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

#7 Post by PyTom »

Hm... for whatever reason, the first argument of Pixellate needs to be a float. So if you write 15.0 rather than 15, it will work.

I've modified Ren'Py to force the issue.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

shaja
Regular
Posts: 73
Joined: Sun Oct 16, 2005 8:34 am
Contact:

#8 Post by shaja »

A dissolve between preprocessed blurred art and the same non-blurred looks not-too-bad, or at least better than I would guess Pixellate does.

zen
Newbie
Posts: 16
Joined: Thu Dec 01, 2005 5:00 pm
Contact:

5.3.1 possible bug

#9 Post by zen »

If you would prefer a new bug thread per release, let me know, otherwise reusing this one.

Bug in 5.3.1 - adding voice code (from extras) to demo game script causes the following error:

I'm sorry, but an exception occured while executing your Ren'Py
script.

Exception: library.has_voice is not a known configuration variable.

The last script statement executed was on line 1527 of game/script.rpy.

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

File "renpy\bootstrap.pyo", line 76, in bootstrap
File "renpy\main.pyo", line 221, in main
File "renpy\main.pyo", line 89, in run
File "renpy\execution.pyo", line 76, in run
File "renpy\ast.pyo", line 322, in execute
File "renpy\python.pyo", line 689, in py_exec_bytecode
File "game/script.rpy", line 1530, in <module>
File "common/library.rpy", line 26, in __setattr__
Exception: library.has_voice is not a known configuration variable.

The last script statement executed was on line 1527 of game/script.rpy.

Ren'Py Version: Ren'Py 5.3.1

Worked fine in 5.3.0 so this is real new.

User avatar
PyTom
Ren'Py Creator
Posts: 16093
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

#10 Post by PyTom »

I understand the problem. The fix is to change the line

init -10:

to

init -450:

in library.rpy.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

zen
Newbie
Posts: 16
Joined: Thu Dec 01, 2005 5:00 pm
Contact:

#11 Post by zen »

Can't confirm fix. Library.rpy contains two init lines, one at begining that is init -500 and one near end that is init -401 Changing the first to -450 results in different error. Did you mean to edit the voice.rpy code that contains the Init -10 line to -401 or change the -401 in the library.rpy to init -10? Both of those work.

User avatar
PyTom
Ren'Py Creator
Posts: 16093
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

#12 Post by PyTom »

Blah.

I meant to make the change in voice.rpy, not library.rpy.

(I don't know what's wrong with me today.)
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

zen
Newbie
Posts: 16
Joined: Thu Dec 01, 2005 5:00 pm
Contact:

#13 Post by zen »

Sorry to bother you, still can't confirm fix. In 5.3.1, line 229 of the library.rpy file was changed from Init: to Init -401. Changing the voice.rpy Init -10 line to -450 still produces an error. Changing it to -401 works.

I'm not sure what these arguments indicate, but it seem the change to -401 in library.rpy is the culprit. If it is changed back to the 5.3.0 version, the voice.rpy works fine with the -10 setting.

User avatar
PyTom
Ren'Py Creator
Posts: 16093
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

#14 Post by PyTom »

That's what I get for not testing the fix. -450 is the same level as preferences.rpy. -440 makes it work.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

zen
Newbie
Posts: 16
Joined: Thu Dec 01, 2005 5:00 pm
Contact:

#15 Post by zen »

That works. Thanks.

Post Reply

Who is online

Users browsing this forum: Bing [Bot]