GithubHelp home page GithubHelp logo

renpy / renpy Goto Github PK

View Code? Open in Web Editor NEW
4.5K 142.0 652.0 213.92 MB

The Ren'Py Visual Novel Engine

Home Page: http://www.renpy.org/

Python 21.25% Shell 0.05% HTML 0.24% C 3.79% C++ 0.01% CSS 0.02% Ren'Py 61.63% Makefile 0.05% JavaScript 0.21% Cython 12.76%
renpy visual-novel visual novel game engine python

renpy's Introduction

The Ren'Py Visual Novel Engine

https://www.renpy.org

Ren'Py development takes place on the master branch, and occasionally on feature branches.

Getting Started

Ren'Py depends on a number of Python modules written in Cython and C. For changes to Ren'Py that only involve Python modules, you can use the modules found in the latest nightly build. Otherwise, you'll have to compile the modules yourself.

The development scripts assume a POSIX-like platform. The scripts should run on Linux or macOS, and can be made to run on Windows using an environment like MSYS.

Nightly Build

Nightly builds can be downloaded from:

https://nightly.renpy.org

Note that the latest nightly build is at the bottom of the list. Once you've unpacked the nightly, change into this repository, and run:

./after_checkout.sh <path-to-nightly>

Once this script completes, you should be able to run Ren'Py using renpy.sh, renpy.app, or renpy.exe, as appropriate for your platform.

If the current nightly build doesn't work, please wait 24 hours for a new build to occur. If that build still doesn't work, contact Tom (pytom at bishoujo.us, or @renpytom on twitter) to find out what's wrong.

The doc symlink will dangle until documentation is built, as described below.

Compiling the Modules

Building the modules requires you have the many dependencies installed on your system. On Ubuntu and Debian, these dependencies can be installed with the command:

sudo apt install virtualenvwrapper python3-dev libavcodec-dev libavformat-dev \
    libswresample-dev libswscale-dev libharfbuzz-dev libfreetype6-dev libfribidi-dev libsdl2-dev \
    libsdl2-image-dev libsdl2-gfx-dev libsdl2-mixer-dev libsdl2-ttf-dev libjpeg-dev

Ren'Py requires SDL_image 2.6 or greater. If your distribution doesn't include that version, you'll need to download it from:

https://github.com/libsdl-org/SDL_image/tree/SDL2

We strongly suggest installing the Ren'Py modules into a Python virtualenv. To create a new virtualenv, open a new terminal and run:

. /usr/share/virtualenvwrapper/virtualenvwrapper.sh
mkvirtualenv renpy

To return to this virtualenv later, run:

. /usr/share/virtualenvwrapper/virtualenvwrapper.sh
workon renpy

After activating the virtualenv, install additional dependencies:

pip install -U cython future six typing pefile requests ecdsa

Then, install pygame_sdl2 by running the following commands:

git clone https://www.github.com/renpy/pygame_sdl2
pushd pygame_sdl2
python setup.py install
python setup.py install_headers
popd

Next, set RENPY_DEPS_INSTALL To a :-separated (;-separated on Windows) list of paths containing the dependencies, and RENPY_CYTHON to the name of the cython command:

export RENPY_DEPS_INSTALL="/usr:/usr/lib/$(gcc -dumpmachine)/"
export RENPY_CYTHON=cython

Finally, use setup.py in the Ren'Py module directory to compile and install the modules that support Ren'Py:

pushd module
python setup.py install
popd

Ren'Py will be installed into the activated virtualenv. It can then be run using the command:

python renpy.py

Documentation

Building

Building the documentation requires Ren'Py to work. You'll either need to link in a nightly build, or compile the modules as described above. You'll also need the Sphinx documentation generator. If you have pip working, install Sphinx using:

pip install -U sphinx sphinx_rtd_theme sphinx_rtd_dark_mode

Once Sphinx is installed, change into the sphinx directory inside the Ren'Py checkout and run:

./build.sh

Format

Ren'Py's documentation consists of reStructuredText files found in sphinx/source, and generated documentation found in function docstrings scattered throughout the code. Do not edit the files in sphinx/source/inc directly, as they will be overwritten.

Docstrings may include tags on the first few lines:

:doc: section kind

Indicates that this function should be documented. section gives the name of the include file the function will be documented in, while kind indicates the kind of object to be documented (one of function, method or class. If omitted, kind will be auto-detected.

:name: name

The name of the function to be documented. Function names are usually detected, so this is only necessary when a function has multiple aliases.

:args: args

This overrides the detected argument list. It can be used if some arguments to the function are deprecated.

For example:

def warp_speed(factor, transwarp=False):
    """
    :doc: warp
    :name: renpy.warp_speed
    :args: (factor)

    Exceeds the speed of light.
    """

    renpy.engine.warp_drive.engage(factor)

Translating

For best practices when it comes to translating the launcher and template game, please read:

https://lemmasoft.renai.us/forums/viewtopic.php?p=321603#p321603

Contributing

For bug fixes, documentation improvements, and simple changes, just make a pull request. For more complex changes, it might make sense to file an issue first so we can discuss the design.

License

For the complete licensing terms, please read:

https://www.renpy.org/doc/html/license.html

renpy's People

Contributors

andykl avatar antoinentx avatar axypb avatar beuc avatar booplicate avatar geomat0101 avatar gouvernathor avatar jsfehler avatar kassy2048 avatar kobaltcore avatar kyouryuukunn avatar luquedaniel avatar mal avatar midgethetree avatar moshibit avatar neyunse avatar nyaatrap avatar pratomoastan avatar qtich avatar renoa avatar renpy-bot avatar renpytom avatar ria-kon avatar shawna-p avatar tey avatar uyjulian avatar vbkaisetsu avatar vollschauer avatar xavi-mat avatar zedraxlo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

renpy's Issues

Tooltip stays persistent even after moving to another menu

Here is a small sample of actual code I used:

hotspot (916, 315, 260, 103) action ShowMenu('preferences') hovered [ Play ("test_three", "sfx/click.wav"), Show("gui_tooltip", my_picture="gui/tooltip/tooltip_main_menu_config.png", my_tt_xpos=0, my_tt_ypos=591), With(quickdissolve)] unhovered [Hide("gui_tooltip"), With(quickdissolve)]

What happens is that the tooltip will appear and disappear as dictated by the script while hovering but once you clicked on the hotspot the tooltip that appeared after you hovered in the said hotspot stays persistent in the screen even after moving to another menu and only disappears after hovering to another hotspot.

Here is a working sample demonstrating the problem... the hover problem should be very visible from the start when you go from main menu to config

http://www.mediafire.com/?0g6zswuu2z9vckk

crash on roll-forward around the movie

Step to reproduce:

  1. launch Tutorial game and choose "Video Playback"
  2. click few times and playback the first movie
  3. press "Page Up" key
  4. press "Page Down" key

Then, renpy is crashed and the following message is shown on the terminal:

Fatal Python error: (pygame parachute) Segmentation Fault

This bug is not occurred on the second movie.

Ren'Py 6.14.0
OS: Linux x86 (Debian unstable)

im.FactorScale() bilinear filtering is slightly corrupted

When using im.FactorScale() (or im.Scale()), the default "squares" background of RenPy is merged with the image being scaled. The effect is subtle and is most noticeable with large blocks of a single bright color when viewed at an angle towards the edge of the view angle range on an LCD.

The effect only occurs when using bi-linear filtering. Switching to nearest neighbor filtering avoids the effect.

Reproducible case: create a new project (e.g. theme: "TV", color scheme: "colorblind"). Default screen size for the project is set to 800x600. Create a png file ("white.png") that is 800x600 pixels in size and consists of just a solid opaque block of white. Put the file into the new project's "game" directory and alter "game/script.rpy" to read:

init:
  define e = Character('Eileen', color="#c8ffc8")
  image scaled_pic = im.FactorScale("white.png", 1.0, bilinear=True)

label start:
  show scaled_pic
  e "Hmmm..."
  return

Tested with the Linux (32-bit) version of RenPy 6.14.1.366.

Traceback on imagemaps

https://twitter.com/gazornonplat/status/237677450736312320

While running game code:
File "game/script.rpy", line 335, in script
File "game/script.rpy", line 337, in python
TypeError: 'NoneType' object does not support item assignment
-- Full Traceback ------------------------------------------------------------
Full traceback:
File "/home/peter/Software/Ren'Py/renpy/execution.py", line 266, in run
node.execute()
File "/home/peter/Software/Ren'Py/renpy/ast.py", line 646, in execute
renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
File "/home/peter/Software/Ren'Py/renpy/python.py", line 1159, in py_exec_bytecode
exec bytecode in globals, locals
File "game/script.rpy", line 337, in <module>
(522, 222, 728, 378, "2")
File "/home/peter/Software/Ren'Py/renpy/exports.py", line 803, in imagemap
roll_forward=roll_forward)
File "/home/peter/Software/Ren'Py/renpy/ui.py", line 237, in interact
rv = renpy.game.interface.interact(roll_forward=roll_forward, *_kwargs)
File "/home/peter/Software/Ren'Py/renpy/display/core.py", line 1813, in interact
repeat, rv = self.interact_core(preloads=preloads, *_kwargs)
File "/home/peter/Software/Ren'Py/renpy/display/core.py", line 2336, in interact_core
rv = root_widget.event(ev, x, y, 0)
File "/home/peter/Software/Ren'Py/renpy/display/layout.py", line 717, in event
rv = i.event(ev, x - xo, y - yo, cst)
File "/home/peter/Software/Ren'Py/renpy/display/layout.py", line 717, in event
rv = i.event(ev, x - xo, y - yo, cst)
File "/home/peter/Software/Ren'Py/renpy/display/layout.py", line 717, in event
rv = i.event(ev, x - xo, y - yo, cst)
File "/home/peter/Software/Ren'Py/renpy/display/layout.py", line 717, in event
rv = i.event(ev, x - xo, y - yo, cst)
File "/home/peter/Software/Ren'Py/renpy/display/behavior.py", line 627, in event
rv = run(self.clicked)
File "/home/peter/Software/Ren'Py/renpy/display/behavior.py", line 211, in run
return var(_args, *_kwargs)
File "/home/peter/Software/Ren'Py/renpy/ui.py", line 660, in **call**
self.chosen[(self.location, self.label)] = True
TypeError: 'NoneType' object does not support item assignment
Linux-3.2.0-29-generic-x86_64-with-debian-wheezy-sid
Ren'Py 6.14.0.350
INCURSION 1.0

Transitions cause ATL to stop working

When you use a transition to switch between screens, either user-defined or default, any ATL transforms attached to any screen stop working the next time the screen is shown. This only affects the "on show" ATL, not "on hide".

Gallery: Allow arbitrary data to be associated with images.

The idea is that the user should be able to assign data to their images. This data would be passed (as additional parameters) to the screen that shows the image. The user should be able to override the gallery screen in order to add additional functionality.

We should also have new actions for advancing to the next image, returning to the previous image, and (perhaps) leaving the sequence of images.

Perhaps also integrate in some of the functionality that was in the cradle song image gallery.

Crash on Mountain Lion when going fullscreen

I've a really weird crash. I build Bionic Heart with the latest Ren'Py version. It starts windowed, but if I go in options and click the button to go fullscreen, crashes with the following text:
I'm sorry, but an uncaught exception occurred.

While running game code:
File "game\story.rpy", line 26, in script
Exception: Could not set video mode.

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

Full traceback:
File "/Users/celsoriva/Desktop/dist/Bionic Heart/Bionic Heart.app/Contents/Resources/autorun/renpy/bootstrap.py", line 228, in bootstrap
File "/Users/celsoriva/Desktop/dist/Bionic Heart/Bionic Heart.app/Contents/Resources/autorun/renpy/main.py", line 342, in main
File "/Users/celsoriva/Desktop/dist/Bionic Heart/Bionic Heart.app/Contents/Resources/autorun/renpy/main.py", line 98, in run
File "/Users/celsoriva/Desktop/dist/Bionic Heart/Bionic Heart.app/Contents/Resources/autorun/renpy/execution.py", line 266, in run
File "/Users/celsoriva/Desktop/dist/Bionic Heart/Bionic Heart.app/Contents/Resources/autorun/renpy/ast.py", line 401, in execute
File "/Users/celsoriva/Desktop/dist/Bionic Heart/Bionic Heart.app/Contents/Resources/autorun/renpy/exports.py", line 750, in say
File "/Users/celsoriva/Desktop/dist/Bionic Heart/Bionic Heart.app/Contents/Resources/autorun/renpy/character.py", line 770, in call
File "/Users/celsoriva/Desktop/dist/Bionic Heart/Bionic Heart.app/Contents/Resources/autorun/renpy/character.py", line 664, in do_display
File "/Users/celsoriva/Desktop/dist/Bionic Heart/Bionic Heart.app/Contents/Resources/autorun/renpy/character.py", line 471, in display_say
File "/Users/celsoriva/Desktop/dist/Bionic Heart/Bionic Heart.app/Contents/Resources/autorun/renpy/ui.py", line 237, in interact
File "/Users/celsoriva/Desktop/dist/Bionic Heart/Bionic Heart.app/Contents/Resources/autorun/renpy/display/core.py", line 1813, in interact
File "/Users/celsoriva/Desktop/dist/Bionic Heart/Bionic Heart.app/Contents/Resources/autorun/renpy/display/core.py", line 2336, in interact_core
File "/Users/celsoriva/Desktop/dist/Bionic Heart/Bionic Heart.app/Contents/Resources/autorun/renpy/display/layout.py", line 717, in event
File "/Users/celsoriva/Desktop/dist/Bionic Heart/Bionic Heart.app/Contents/Resources/autorun/renpy/display/behavior.py", line 289, in event
File "/Users/celsoriva/Desktop/dist/Bionic Heart/Bionic Heart.app/Contents/Resources/autorun/renpy/display/behavior.py", line 211, in run
File "common/00library.rpy", line 262, in invoke_game_menu
File "/Users/celsoriva/Desktop/dist/Bionic Heart/Bionic Heart.app/Contents/Resources/autorun/renpy/game.py", line 335, in call_in_new_context
File "/Users/celsoriva/Desktop/dist/Bionic Heart/Bionic Heart.app/Contents/Resources/autorun/renpy/execution.py", line 266, in run
File "/Users/celsoriva/Desktop/dist/Bionic Heart/Bionic Heart.app/Contents/Resources/autorun/renpy/ast.py", line 646, in execute
File "/Users/celsoriva/Desktop/dist/Bionic Heart/Bionic Heart.app/Contents/Resources/autorun/renpy/python.py", line 1172, in py_exec_bytecode
File "common/_layout/classic_preferences.rpym", line 83, in
File "common/_layout/classic_preferences_common.rpym", line 60, in _prefs_screen_run
File "/Users/celsoriva/Desktop/dist/Bionic Heart/Bionic Heart.app/Contents/Resources/autorun/renpy/ui.py", line 237, in interact
File "/Users/celsoriva/Desktop/dist/Bionic Heart/Bionic Heart.app/Contents/Resources/autorun/renpy/display/core.py", line 1813, in interact
File "/Users/celsoriva/Desktop/dist/Bionic Heart/Bionic Heart.app/Contents/Resources/autorun/renpy/display/core.py", line 2092, in interact_core
File "/Users/celsoriva/Desktop/dist/Bionic Heart/Bionic Heart.app/Contents/Resources/autorun/renpy/display/core.py", line 1375, in set_mode
Exception: Could not set video mode.

Darwin-12.1.0-x86_64-i386-32bit
Ren'Py 6.14.1.366
1.21

The weird thing is that if I press key "F" it works just fine! I can toggle windowed/fullscreen without problem with it.

imagebutton auto doesn't work on Android

I am using imagebutton with the "auto" parameters and I get a traceback "None is not a displayable" while running on Android. The code is:
imagebutton auto "gfx/ui/lemmabutton1_%s.png" action SetVariable("statustab",0) xalign 1.0
imagebutton auto "gfx/ui/lemmabutton2_%s.png" action SetVariable("statustab",1) xalign 1.0
imagebutton auto "gfx/ui/lemmabutton3_%s.png" action SetVariable("statustab",2) xalign 1.0
imagebutton auto "gfx/ui/lemmabutton3_%s.png" action SetVariable("statustab",3) xalign 1.0
imagebutton auto "gfx/ui/lemmabutton3_%s.png" action SetVariable("statustab",4) xalign 1.0

and of course works fine on desktop versions.

Use GL_BGRA/GL_UNSIGNED_INT_8_8_8_8_REV when supported.

According to several sources, doing a glTexSubImage2D with GL_BGRA and GL_UNSIGNED_INT_8_8_8_8_REV can be faster than using GL_RGBA/GL_UNSIGNED_BYTE. Sources include:

We'll need a separate code path for OpenGL and OpenGL ES, since the latter does not support BGRA out of the box.

wonky bar keyboard behavior

-vertical bars scroll with L & R once selected, instead of more sensible up and down.

-selecting a bar in the game menu, then exiting the game menu without pressing enter to deselect a bar first prevents the player from using arrow keys to select items on the say screen. Can't press enter to advance either. Haven't tried with space, probably same behavior.

Side image not appearing when displayed during choice/story menu

lemma "Here is text"
menu:
lemma "What do you think about the text?"
"It's great!":
(stuff)
"It sucks.":
(more stuff)

If Lemma is using a side image, it will display for the first "Here is text" line, but it will not for the "What do you think about the text?" line.

user experiencing crashes while skipping

Have some users on PC that experience crashes if they use the skip function. Users said:

"I was wondering if anyone else is having problems with skipping already seen dialouges? For me it seems to crash if I use it too often. Wasn't sure if anyone else is having this problem. Seems to work fine if I don't use the skip. "

"It happens both during fights and randomly when playing. A windows message pops up saying "LorenRPG.exe has stopped working" and then it searches for a solution, but doesn't find one and exits the program. It seems that if I take it really slowly and carefully and don't skip or click anything too fast, it works okay, but if I rush anything, it'll give me the same message."

And posted the traceback.txt:
Couldn't import angle renderer:
Traceback (most recent call last):
File "C:\Users\ashley\Downloads\LorenRPG-all(1)\LorenRPG-all\renpy\display\core.py", line 1265, in make_draw
File "renpy\angle\gldraw.pyo", line 12, in
File "renpy\angle\gldraw.pyo", line 10, in __load
ImportError: DLL load failed: The specified module could not be found.
Unknown renderer: angle

so not sure if they somehow are playing DX but they don't have the right DX installed ? but I guess it should show a warning message instead of crashing? not sure :) thanks

Memory/Scene Gallery Support

Ren'Py should provide a way to replay a scene, and then return to a specific menu. Details TBD.

In order to do this, we need to be able to navigate through a menu, start the game, and then return to the place in the menu that we started from. (Or some equivalent to this, that works at least at the main menu.)

why curry.py?

Just curious why curry.py exists? Is this for compatibility with older versions of Python?
(functools.partial() was added in 2.5, so I guess compatibility with 2.4 or before would require you to roll your own...)

Just for clarity:

curry.curry(fn) ==> lambda: fn
curry.partial(fn, _a, *_kw) ==> functools.partial(fn, _a, *_kw)

Curry objects support intelligent equality testing, whereas functools.partial objects do not.

>>>> functools.partial(operator.add, 3) == functools.partial(operator.add, 3)
False

Is this behavior important?

Cancelling the closing of the Ren'Py window can result in a crash

Closing the Ren'Py window by clicking the "close button" on the window title bar and then cancelling the game exit attempt can sometimes result in a crash.

A testcase for this bug is to create a new project, run it and then (from the main menu) click on the title bar "close button" and select "No" when presented with the "Are you sure you want to quit?" screen. Repeat this sequence of attempting to close the window and selecting "No" and a crash will eventually result.

Switching to the software renderer appears to prevent this issue from occurring. The issue has only been observed when using the OpenGL renderer (not tested with the DirectX renderer).

I will attempt to attach log.txt and traceback.txt files from a crash caused by this issue.

Issue observed in Ren'Py build 6.14.0.329 on platforms Ubuntu 12.04 LTS 32-bit and Windows 7 64-bit.

Resizing the Ren'Py window stops any playing movie

Resizing the Ren'Py window (either using the resize control at the bottom right of the window or using the preferences screen to switch between window and fullscreen displays) causes any movie currently playing in Ren'Py to stop without restarting.

A testcase for this bug is to create a new project, provide a sample video file "test_movie.webm" and set script.rpy to:

# Test script
init:
  image movie = Movie (size=(config.screen_width, config.screen_height), xalign=0.0, yalign=0.0)

label start:
  scene black
  show movie

  play movie "test_movie.webm"

  "Is it still playing?"

  stop movie
  hide movie

  return

The video format does not appear to make a difference. Tested with a WebM (VP8 + Vorbis) video and a Matroska (Theora + Vorbis) video.

Possibly related: running on Linux, the following message was dumped to the console when switching between window and full screen displays:

OpenGL Warning: glXChooseVisual: ignoring attribute 0x22

Issue observed in Ren'Py build 6.14.0.329 on platforms Ubuntu 12.04 LTS 32-bit and Windows 7 64-bit.

Transform zoom unexpected behavior

When setting zoom on an image to 0.5, then increasing to zoom 1.0, the image scales from 0.25 to 1.0.

The following test cases are broken:
zoom 0.5 -> 1.5
zoom 0.5 -> 1.0

The following test cases are NOT broken: (seem to be using expected behavior)
zoom 1.0 -> 1.5
zoom 1.5 -> 1.0

Reproducing code:

    transform zoom1:
        easein 2.0 zoom 1.0
    $ renpy.image("shazbot",  Transform("shazbot.png", zoom=0.5));
    show shazbot
    pause
    show shazbot at zoom1
    pause
    return

Bug in {w} and {p} followed immediately by other text modifiers

"Text{w}{size=20}more text{/size}"
will cause "Text" and "more text" to be displayed without having to wait for a click. However, to advance to the next box, it will also require 2 clicks.

putting a space in between {w} and {size=20} works fine. I'm guessing the {size} tag could be any other tag like {b} too.

missing_image_callback doesn't work on Android

If I try to use JCC, it crashes because the missing_image_callback doesn't work properly. If I manually use im.AlphaMask to "build" the final image, it works fine. So it's just that function that prevents JCC from working on Android.

Please add letter-by-letter text fade

The ability for Ren'py to fade in text for every letter as it is displayed is a highly requested feature that would improve the look and feel of games. Better yet, the ability to apply an ATL transition to each letter as it appears.

Fullscreen on startup broken on Mountain Lion

If I set the game to start up in fullscreen, the game starts but all I see is a black screen. The first time I had to reboot since the mac was not responding. The second time I heard the game music, so I could press "F" to switch to windowed.
If I go back to fullscreen from windowed, it works. But if I set it to start fullscreen again, the same problem shows up.
In previous version of Ren'Py it was working fine (I just tested it).

possible bug on save/load

Ok I know this might seem extremely vague, but... I have several people reporting a bug on Loren that is related to variables not loaded (or saved?) correctly. The variables are pretty simple:
$ My_flirt = 0
etc and then during the game they can increase. The problem is that after updating, they lose the variable (I mean is set to zero like in the init).
I am not 100% sure what is the reason, the code didn't change vs the first game and it worked. So I'm quite sure is something related to this new version.
Maybe using the autoupdater somehow resets it? I update the config.version everytime I release a new version...
If I load an old savegame from Ren'Py 6.13, those values are correctly displayed. So I think is either during saving in the new version or after an update.
Sorry if I can't be more accurate...

LiveTile crash: range() integer end argument expected, got float

When I try to show a LiveTile displayable, it crashes with this error:

Traceback (most recent call last):
  File "C:\Renpy\renpy-6.14.0\renpy\execution.py", line 266, in run
  File "C:\Renpy\renpy-6.14.0\renpy\ast.py", line 401, in execute
  File "C:\Renpy\renpy-6.14.0\renpy\exports.py", line 750, in say
  File "C:\Renpy\renpy-6.14.0\renpy\character.py", line 770, in __call__
  File "C:\Renpy\renpy-6.14.0\renpy\character.py", line 664, in do_display
  File "C:\Renpy\renpy-6.14.0\renpy\character.py", line 471, in display_say
  File "C:\Renpy\renpy-6.14.0\renpy\ui.py", line 237, in interact
  File "C:\Renpy\renpy-6.14.0\renpy\display\core.py", line 1813, in interact
  File "C:\Renpy\renpy-6.14.0\renpy\display\core.py", line 2118, in interact_core
  File "C:\Renpy\renpy-6.14.0\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 "C:\Renpy\renpy-6.14.0\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 "C:\Renpy\renpy-6.14.0\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 "C:\Renpy\renpy-6.14.0\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 "C:\Renpy\renpy-6.14.0\renpy\display\image.py", line 164, in render
  File "C:\Renpy\renpy-6.14.0\renpy\display\image.py", line 54, in wrap_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 "C:\Renpy\renpy-6.14.0\renpy\display\layout.py", line 1596, in render
TypeError: range() integer end argument expected, got float.

This error happens on Ren'Py 6.14.1.366, but not on 6.13.12.1728 (the LiveTile displays fine there).

Simple game demonstrating the error: http://lemmasoft.renai.us/forums/viewtopic.php?f=8&t=17703

This post at Lemma Soft mentions a similar error as well: http://lemmasoft.renai.us/forums/viewtopic.php?p=210962#p210962

Shift+G fails while a movie is playing

Shift+G fails to bring up the graphics acceleration menu when pressed while a movie is playing in Ren'Py (although shift+D does bring up the developer menu while a movie is playing). The example code in #12 can be used to observe this issue.

Pressing shift+G followed by shift+D and then clicking "Return" in the developer menu does result in the graphics acceleration menu being shown. However, the movie stops and does not restart (probably related to #12). Note that accessing the developer menu without trying to open the graphics acceleration menu first does not stop the movie.

The format of the movie does not appear to make a difference. Tested with a WebM (VP8 + Vorbis) video and a Matroska (Theora + Vorbis) video.

Issue observed in Ren'Py build 6.14.0.329 on platforms Ubuntu 12.04 LTS 32-bit and Windows 7 64-bit.

Add Functions to Voice.

Alright I've come up with an Idea on how to add functions to voice, like switching on and off individual characters and having the developer set a default voice directory for their game. I like some feed back before I continue this...

NEW VOICE PARAMETERS

Usuage: voice(tag_name, file, **kwargs)

This extra contains the new implementation of voice support. It can
be toggle on and off as a whole, but now has support to toggle off
and on for individual characters in the Preference Screen. Plus
once you set the config.voice_dir you can place the voice files in
another folder without haveing to type or retype the path/to/file
every time you want voice in the game.

To use it, place a voice tag_name sndfile line before
each line of dialogue. Please note that the tag_name is an
optional argument, but in order to switch off an on voice for
individual characters a character name must be place there.

  voice "e_1002.ogg"
  e "Voice support lets you add spoken word to your games."

Normally, a voice is cancelled at the start of the next interaction.
If you want a voice to span interactions, call the
voice_sustains

  voice "e_1002.ogg"
  e "Voice sustain is a technique that allows the same voice #        file..."

  voice sustain
  e "...to play through the two lines of dialogue"

Now to in order to toggle on and off the voice for each individual
character, you to set the has_voice in the Character() to
true cause by default has_voice is set to false.

   difine e = Character("Elieen", has_voice=True)

When has_voice is set to true the Character() name variable
will be added to the _voice.list variable as a string with a
list of other Character() that has the has_voice set to
true.

  _voice.list = [("Elieen", "True"),("Darin", "True")]

Now to make sure that renpy will not re-add these characters to the
_voice.list variable it will be set as a persistent variable and
will be automatically loaded next time the game is started again.

On the Preference Screen developer would set an
action button(s) that would utilize the _voice.list variable
of characters. When you click on the characters name it will darken
indicating the character's voice is off or normal color indicating
the character's voice is on.

Alright to utilize the voice toggle in the game script, the
developer needs to place the character's name or substitute name from
in the define argument in to the tag_name from voice.

  voice "Elieen" "e_1002.ogg"
  e "Now since \"Elieen\" is added to voice...
   ..My voice can now be toggle on or off by the user."

Now and example with the substitute name from define argument.

  voice "e" "e_1002.ogg"
  e "Even though \"e\" is used instead of \"Elieen\...
   ...My voice can still be toggle on or off by the user."

Now the one last new thing about voice is that if you set the
config.voice_dir in the config.rpy to the directory of the
voice files. Once that is set, you wouldn't have to type or retype
the path/to/file every time you want voice in the game.

  config.voice_dir = "Path/To/Voice/Dir"

Please not that config.voice_dir default path will be the game
base which is when it is set to "None"

Rollback sound error

Rolling back text with "bleep" sound causes the sound to keep repeating until the text is forwarded again.

Viewport Edge Scrolling

Viewports would take edge_scrolling properties, which takes a (distance, speed) tuple. When we're within distance of the screen edge, we scroll in that direction at speed. (TODO - what sort of units should distance and speed be in?)

Font Groups

Some games want to have lines containing text in multiple writings systems. For example, Analogue wants to display both English and Korean text in the same block.

To support this, Ren'Py will allow the user to define "Font Groups". A font group contains multiple fonts, each covering a range of code points. When displaying a code point, Ren'Py will automatically iterate through the font group and pull the character from the first font that covers that code point.

Irrelevant styles shouldn't be able to stop error handling.

Right now, if:

  • we define (in a python early block) style.foo inherits from style.bar, and
  • style.bar is defined in an init python block
  • a parse error occurs

Ren'Py crashes in error handling.

That's because there's a dangling bit of style inheritance. We should fix that so user code can't block error handling.

ui.textbutton bug in 6.14 when using text_align=.5

Rather simple to reproduce, if you have something like:
ui.textbutton(" ",size=18,style="rpg",clicked=None,text_align=.5,xpos=0,xminimum=124,yminimum=210)

you get a crash in 6.14 (worked fine in previous versions) with the traceback:

I'm sorry, but an uncaught exception occurred.

While running game code:
File "game/warchived.rpy", line 1979, in script call
File "game\script.rpy", line 1886, in script
File "game\script.rpy", line 1901, in python
TypeError: 'float' object has no attribute 'getitem'

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

Full traceback:
File "C:\Users\Intel 2120\Downloads\renpy-6.14.0-sdk\renpy\execution.py", line 266, in run
File "C:\Users\Intel 2120\Downloads\renpy-6.14.0-sdk\renpy\ast.py", line 646, in execute
File "C:\Users\Intel 2120\Downloads\renpy-6.14.0-sdk\renpy\python.py", line 1172, in py_exec_bytecode
File "game\script.rpy", line 1901, in
File "C:\Users\Intel 2120\Downloads\renpy-6.14.0-sdk\renpy\ui.py", line 903, in textbutton
File "C:\Users\Intel 2120\Downloads\renpy-6.14.0-sdk\renpy\ui.py", line 448, in call
File "C:\Users\Intel 2120\Downloads\renpy-6.14.0-sdk\renpy\text\text.py", line 1019, in init
File "C:\Users\Intel 2120\Downloads\renpy-6.14.0-sdk\renpy\display\core.py", line 127, in init
File "C:\Users\Intel 2120\Downloads\renpy-6.14.0-sdk\renpy\style.py", line 810, in init
File "C:\Users\Intel 2120\Downloads\renpy-6.14.0-sdk\renpy\style.py", line 629, in build_style
File "C:\Users\Intel 2120\Downloads\renpy-6.14.0-sdk\renpy\style.py", line 514, in expand_properties
File "C:\Users\Intel 2120\Downloads\renpy-6.14.0-sdk\renpy\style.py", line 201, in index_0

TypeError: 'float' object has no attribute 'getitem'

if you remove the text_align=.5 so it becomes:
ui.textbutton(" ",size=18,style="rpg",clicked=None,xpos=0,xminimum=124,yminimum=210)
all works fine :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.