6.99.14.2 Prereleased

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.
Message
Author
User avatar
jack_norton
Lemma-Class Veteran
Posts: 4084
Joined: Mon Jul 21, 2008 5:41 pm
Completed: Too many! See my homepage
Projects: A lot! See www.winterwolves.com
Tumblr: winterwolvesgames
Contact:

Re: 6.99.14.2 Prereleased

#31 Post by jack_norton »

The latest version has a problem with the miss_cache attribute, that breaks compatibility with ALL old saves (which is VERY bad!).
I managed to make it work editing slast.py lines 2020 like this:

Code: Select all

        try:
            context.miss_cache = get_cache(current_screen.miss_cache)
        except:
            context.miss_cache = context.old_cache 
and screen.py line 612 with:

Code: Select all

        try:
            if self.miss_cache:
                self.miss_cache.clear()
        except:
            self.miss_cache={}
but of course this is a hack I did just to make it work :) I think though this bug should be fixed since breaking ALL saves due to incompatible screens is not good :o
Thanks again for all your work on Ren'Py, Tom ! 8)
follow me on Image Image Image
computer games

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:

Re: 6.99.14.2 Prereleased

#32 Post by PyTom »

Yep. Good catch. I fixed it in a slightly different way, but that would certainly have worked.
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

User avatar
jack_norton
Lemma-Class Veteran
Posts: 4084
Joined: Mon Jul 21, 2008 5:41 pm
Completed: Too many! See my homepage
Projects: A lot! See www.winterwolves.com
Tumblr: winterwolvesgames
Contact:

Re: 6.99.14.2 Prereleased

#33 Post by jack_norton »

Cool glad I was of help :)
I also believe there's some issue with variable saving. I posted on github about the rollback, but I think the real culprit is the variable saving (I saw the bug using rollback but because with autoreload it would save/reload every time, so I got confused).

Before (all previous ren'py versions):
init:
$var=val
label start:
$var=val2

load save game, and indeed var=val2.
Now it's no longer stored correctly, for example I just tried removing the init, and place:
default var=val
and even loading the previous save above, var is NOT val2, but still val (the value set by default). This is wrong behaviour I think since the values set in the main game code/script should always override the init/default ones, right?
Thanks
follow me on Image Image Image
computer games

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:

Re: 6.99.14.2 Prereleased

#34 Post by PyTom »

Yes, they certainly should. Do you have a more specific example of this?
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

User avatar
jack_norton
Lemma-Class Veteran
Posts: 4084
Joined: Mon Jul 21, 2008 5:41 pm
Completed: Too many! See my homepage
Projects: A lot! See www.winterwolves.com
Tumblr: winterwolvesgames
Contact:

Re: 6.99.14.2 Prereleased

#35 Post by jack_norton »

Code: Select all

define e = Character("Eileen")

init:
    $male=False

#KEEP LINE COMMENTED FIRST TIME YOU RUN
#default male=False

# The game starts here.

label start:

    # Show a background. This uses a placeholder by default, but you can
    # add a file (named either "bg room.png" or "bg room.jpg") to the
    # images directory to show it.

    scene bg room

    # This shows a character sprite. A placeholder is used, but you can
    # replace it by adding a file named "eileen happy.png" to the images
    # directory.

    show eileen happy
    $male=True
    # These display lines of dialogue.
    e "Male is [male]"

    e "Save now, change init to default and load."

    e "Now male is [male]"
    # This ends the game.

    return
basically:
1. first run it keeping default commented and save the game when it says so
2. exit game and uncomment the default
3. load the saved game and male will be False, even if in the code a few lines before was set True :)
follow me on Image Image Image
computer games

User avatar
IrinaLazareva
Veteran
Posts: 399
Joined: Wed Jun 08, 2016 1:49 pm
Projects: Legacy
Organization: SunShI
Location: St.Petersburg, Russia
Contact:

Re: 6.99.14.2 Prereleased

#36 Post by IrinaLazareva »

Hey. It is not a bug.
It is wrong to use old saves after change of the code. 8)

User avatar
jack_norton
Lemma-Class Veteran
Posts: 4084
Joined: Mon Jul 21, 2008 5:41 pm
Completed: Too many! See my homepage
Projects: A lot! See www.winterwolves.com
Tumblr: winterwolvesgames
Contact:

Re: 6.99.14.2 Prereleased

#37 Post by jack_norton »

Heh tell that to all the people who played 10+ hours in one of my RPGs :lol:
follow me on Image Image Image
computer games

rayminator
Miko-Class Veteran
Posts: 793
Joined: Fri Feb 09, 2018 12:05 am
Location: Canada
Contact:

Re: 6.99.14.2 Prereleased

#38 Post by rayminator »

IrinaLazareva wrote: Tue Mar 27, 2018 11:25 am Hey. It is not a bug.
It is wrong to use old saves after change of the code. 8)
well just imagine that you are playing call of duty or grand theft auto
and there was a major updates for those games that you were playing
the next day you go and play and find out that your save games didn't
work and you were halfway through the game how would you feel
bet that you would be pissed off about that.

keep up the great work
pytom

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:

Re: 6.99.14.2 Prereleased

#39 Post by PyTom »

Old saves are intended to be supported, within reason. I understand the problem and will fix it.
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

User avatar
Donmai
Eileen-Class Veteran
Posts: 1960
Joined: Sun Jun 10, 2012 1:45 am
Completed: Toire No Hanako, Li'l Red [NaNoRenO 2013], The One in LOVE [NaNoRenO 2014], Running Blade [NaNoRenO 2016], The Other Question, To The Girl With Sunflowers
Projects: Slumberland
Location: Brazil
Contact:

Re: 6.99.14.2 Prereleased

#40 Post by Donmai »

I probably shouldn't be entering this conversation, but I know that now a multitude of newbies and non-programmers like myself are wanting to know why

Code: Select all

init:
    $male=False
and not

Code: Select all

default male=False
Image
No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)

User avatar
jack_norton
Lemma-Class Veteran
Posts: 4084
Joined: Mon Jul 21, 2008 5:41 pm
Completed: Too many! See my homepage
Projects: A lot! See www.winterwolves.com
Tumblr: winterwolvesgames
Contact:

Re: 6.99.14.2 Prereleased

#41 Post by jack_norton »

Before the introduction of default, init was the way to define variables. So the fix also preserves the source code of 2-3 years old games, not just the old saves. Also in many cases an init block is much more convenient than default, like if you need to define a bunch of variables, you can do in a single line, instead with default you need to use 1 line each variable.
follow me on Image Image Image
computer games

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], henne