Page 1 of 1

Tiny bug found (I think)

Posted: Thu Dec 01, 2005 5:14 pm
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:

Posted: Thu Dec 01, 2005 6:40 pm
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.

Posted: Thu Dec 01, 2005 8:38 pm
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.

Posted: Thu Dec 01, 2005 8:55 pm
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.

Posted: Thu Dec 01, 2005 9:34 pm
by zen
Ah, both those work. I had the syntax wrong, using both the double quotes and no commas. Thanks.

Another wee bug?

Posted: Mon Dec 05, 2005 9:34 pm
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.

Posted: Mon Dec 05, 2005 9:54 pm
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.

Posted: Tue Dec 06, 2005 6:26 pm
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.

5.3.1 possible bug

Posted: Sun Dec 25, 2005 8:51 pm
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.

Posted: Sun Dec 25, 2005 9:04 pm
by PyTom
I understand the problem. The fix is to change the line

init -10:

to

init -450:

in library.rpy.

Posted: Mon Dec 26, 2005 12:05 am
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.

Posted: Mon Dec 26, 2005 1:14 am
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.)

Posted: Mon Dec 26, 2005 10:12 am
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.

Posted: Mon Dec 26, 2005 11:12 am
by PyTom
That's what I get for not testing the fix. -450 is the same level as preferences.rpy. -440 makes it work.

Posted: Mon Dec 26, 2005 12:01 pm
by zen
That works. Thanks.