how do I make text skippable on first read?

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
SONTSE
Regular
Posts: 96
Joined: Sun Nov 24, 2013 10:49 pm
Completed: 11 VN's so far
Discord: jkx0282_10798
Contact:

how do I make text skippable on first read?

#1 Post by SONTSE »

I need some part of my story to behave like user already read it.
i.e be skippable with 'skip' feature right away on the first run, even if 'skip unseen text' preference is off.
I think something like "register" these lines as already seen, would be ideal solution. Can I do it?

Code: Select all

#this text should be always skippable
label boring_part:
    'lines of boring text which you can skip'
    'more lines of boring text which you can skip'
    'even more lines of boring text which you can skip'
    #dozens of boring lines but we skipped them
    
#this text shouldn't be skippable if unseen and not opted to skip unseen
label resume_good_story:
    'wow a story!'
    'such plot'
    'very great'

User avatar
isobellesophia
Miko-Class Veteran
Posts: 979
Joined: Mon Jan 07, 2019 2:55 am
Completed: None
Projects: Maddox and Friends! (AI Teacher friend), Friendly Universities! (Soon)
Organization: Friendly Teachers series
Deviantart: SophBelle
itch: Child Creation
Location: Philippines, Mindanao
Contact:

Re: how do I make text skippable on first read?

#2 Post by isobellesophia »

Lena_Borodach wrote: Wed Feb 13, 2019 5:25 pm I need some part of my story to behave like user already read it.
i.e be skippable with 'skip' feature right away on the first run, even if 'skip unseen text' preference is off.
I think something like "register" these lines as already seen, would be ideal solution. Can I do it?

Code: Select all

#this text should be always skippable
label boring_part:
    'lines of boring text which you can skip'
    'more lines of boring text which you can skip'
    'even more lines of boring text which you can skip'
    #dozens of boring lines but we skipped them
    
#this text shouldn't be skippable if unseen and not opted to skip unseen
label resume_good_story:
    'wow a story!'
    'such plot'
    'very great'
How about you try..

Code: Select all

label boring_part:
    $ _skipping = True
    'lines of boring text which you can skip'
    'more lines of boring text which you can skip'
    'even more lines of boring text which you can skip'
    #dozens of boring lines but we skipped them

Code: Select all

#this text shouldn't be skippable if unseen and not opted to skip unseen
label resume_good_story:
    $ _skipping = False
    'wow a story!'
    'such plot'
    'very great'
This works for me, found it from Pytom answer sonewhere.. :mrgreen:
I am a friendly user, please respect and have a good day.


Image

Image


User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3785
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: how do I make text skippable on first read?

#3 Post by Imperf3kt »

But what if a player pauses and selects to lock skipping again?
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

User avatar
SONTSE
Regular
Posts: 96
Joined: Sun Nov 24, 2013 10:49 pm
Completed: 11 VN's so far
Discord: jkx0282_10798
Contact:

Re: how do I make text skippable on first read?

#4 Post by SONTSE »

isobellesophia wrote: Thu Feb 14, 2019 12:58 am
How about you try..

Code: Select all

label boring_part:
    $ _skipping = True
    'lines of boring text which you can skip'
    'more lines of boring text which you can skip'
    'even more lines of boring text which you can skip'
    #dozens of boring lines but we skipped them

Code: Select all

#this text shouldn't be skippable if unseen and not opted to skip unseen
label resume_good_story:
    $ _skipping = False
    'wow a story!'
    'such plot'
    'very great'
This works for me, found it from Pytom answer sonewhere.. :mrgreen:
Doesn't work for me. But here is working solution for this approach:
1) in screens.rpy
1.1) in screen preferences:
replace

Code: Select all

                    textbutton _("Unseen Text") action Preference("skip", "toggle")
with

Code: Select all

                    textbutton _("Unseen Text") action ToggleField(persistent,'skip_unseen')
1.2) in screen say:
add

Code: Select all

    on 'show' action If(mode_skipping,true = SetField(preferences,'skip_unseen',True),false = SetField(preferences,'skip_unseen',persistent.skip_unseen))
2) add somewhere in initial phase:

Code: Select all

default persistent.skip_unseen = False
3) use it as following example:

Code: Select all

#this text should be always skippable
label boring_part:
    $mode_skipping = True
    'lines of boring text which you can skip'
    'more lines of boring text which you can skip'
    'even more lines of boring text which you can skip'
    #dozens of boring lines but we skipped them
    
#this text shouldn't be skippable if unseen and not opted to skip unseen
label resume_good_story:
    $mode_skipping = False
    'wow a story!'
    'such plot'
    'very great'
But i'm not a fan of this approach because of potential flaw - if the mode_skipping toggle is somehow evaded, the whole skip_unseen preference will be broken for entire game. So i keep it to the last resort.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot]