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.
-
SONTSE
- Regular
- Posts: 95
- Joined: Sun Nov 24, 2013 10:49 pm
- Completed: 8 VN's so far
-
Contact:
#1
Post
by SONTSE » 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'
Look! It's moving. It's alive. It's alive... IT'S ALIVE! Oh, in the name of God! Now I know what it feels like to be God!(@Henry_Frankenstein. Sums up my coding style)
-
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:
#2
Post
by isobellesophia » Thu Feb 14, 2019 12:58 am
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..

I am a friendly user, please respect and have a good day.

-
Imperf3kt
- Lemma-Class Veteran
- Posts: 3636
- Joined: Mon Dec 14, 2015 5:05 am
- Location: Your monitor
-
Contact:
#3
Post
by Imperf3kt » Thu Feb 14, 2019 2:43 am
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
Free Android GUI - Updated occasionally
Twitter
Imperf3kt Blackjack - a WIP blackjack game for Android made using Ren'Py
-
SONTSE
- Regular
- Posts: 95
- Joined: Sun Nov 24, 2013 10:49 pm
- Completed: 8 VN's so far
-
Contact:
#4
Post
by SONTSE » Thu Feb 14, 2019 3:09 pm
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..
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.
Look! It's moving. It's alive. It's alive... IT'S ALIVE! Oh, in the name of God! Now I know what it feels like to be God!(@Henry_Frankenstein. Sums up my coding style)
Users browsing this forum: Google [Bot]