Toggle Skip Mode from Python Call [Resolved]

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
Jackkel Dragon
Regular
Posts: 127
Joined: Mon Mar 31, 2014 7:17 pm
Projects: CPD2 series, EA, BN
Organization: Team Despair, Nightshade
Location: USA
Contact:

Toggle Skip Mode from Python Call [Resolved]

#1 Post by Jackkel Dragon » Sun Oct 07, 2018 9:30 pm

I'm attempting to more-or-less disable skipping during a credits sequence in my game, but I'm having a hard time with making it all work properly. So far I've been using this code before the credits begin:

Code: Select all

$ _skipping = False
$ _dismiss_pause = False
This is doing a good job at preventing the player from starting skip mode during the credits or accidentally skipping them entirely with one click. However, it doesn't solve my main problem, which is when skipping is turned on when the credits begin. If skipping is toggled on when the credits start, the credits skip instantly despite the above code. As far as I can tell, the code I'm using only prevents a player from entering skip mode, it doesn't exit skip mode if it's already on.

Therefore, my main question is if there is a way to toggle the current skip mode from a python command, like "renpy.get_skipping" does for finding the current value. A side question would be if there is a better way to handle this. I don't necessarily want to lock players into the credits sequence, but I don't want someone holding down control to simply never see the credits, either.
Last edited by Jackkel Dragon on Tue Oct 09, 2018 4:30 pm, edited 1 time in total.
Current Projects:
  • Eldritch Academy: A Romance/Paranormal Thriller Visual Novel about a Japanese boarding school's dark secret. (Lemmasoft) [Nightshade]
  • Blooming Nightshade: A lighthearted Romance Visual Novel set at the school from Eldritch Academy. (itch.io) [Nightshade]
  • Novels and short stories. (Shireishi, Those That Linger: GhostSense, and more) (Tumblr) [Nightshade]
  • Corpse Party D2: A series of RPG Maker and Ren'Py fangames based on CORPSE-PARTY's D-2 ending. (Tumblr) [Team Despair]

User avatar
Remix
Miko-Class Veteran
Posts: 959
Joined: Tue May 30, 2017 6:10 am
Completed: None... yet (as I cannot draw very well)
Projects: An un-named 3d anime based trainer game
Contact:

Re: Toggle Skip Mode from Python Call

#2 Post by Remix » Mon Oct 08, 2018 4:37 am

$ config.skipping = None
$ config.allow_skipping = False
...
Credits
...
$ config.allow_skipping = True

Maybe. (untested)
Mad Scientist Todo List:
  • Finish Improved Event Handler
  • Implement DragonBones animation as a Creator Defined Container
  • Finish Catmull-Rom Spline pathing
  • Finish Bitmask collision and rebound vector system
  • Develop time based building mechanic
  • Others
  • *Find a superb artist and actually write a game*

User avatar
Jackkel Dragon
Regular
Posts: 127
Joined: Mon Mar 31, 2014 7:17 pm
Projects: CPD2 series, EA, BN
Organization: Team Despair, Nightshade
Location: USA
Contact:

Re: Toggle Skip Mode from Python Call

#3 Post by Jackkel Dragon » Tue Oct 09, 2018 4:29 pm

Had to mess around with them a bit, but that code plus my existing code seems to work. One can still skip the credits by pressing tab (toggle skip mode) after the credits start in my current build, but my original problem (skipping the credits by accident) is fixed. Since clicking and the control button no longer break the credits, I think letting tab be used to skip them intentionally should be fine.

Edit: As a side note, the re-enabling of skip after the credits is important. Not doing so requires the player to re-start the game in order to be able to skip again, even if they load a saved game.
Current Projects:
  • Eldritch Academy: A Romance/Paranormal Thriller Visual Novel about a Japanese boarding school's dark secret. (Lemmasoft) [Nightshade]
  • Blooming Nightshade: A lighthearted Romance Visual Novel set at the school from Eldritch Academy. (itch.io) [Nightshade]
  • Novels and short stories. (Shireishi, Those That Linger: GhostSense, and more) (Tumblr) [Nightshade]
  • Corpse Party D2: A series of RPG Maker and Ren'Py fangames based on CORPSE-PARTY's D-2 ending. (Tumblr) [Team Despair]

Post Reply

Who is online

Users browsing this forum: No registered users