Search found 111 matches

by Human Bolt Diary
Fri Jul 27, 2018 2:03 pm
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED]Creating a file at a certain moment of the story
Replies: 3
Views: 483

Re: [SOLVED]Creating a file at a certain moment of the story

You don't need f.close() at the end. The "with open" statement will close the file at the end of the block.

Code: Select all

python:
        with open("noteSaveMe.txt", "w") as f:
            f.write(" Save me")
Should work just fine.
by Human Bolt Diary
Thu Jul 05, 2018 7:10 pm
Forum: Development of Ren'Py
Topic: RPMT
Replies: 7
Views: 2013

Re: RPMT

In terms of what makes a good plugin, looking at the cookbook there's generally 3 types of posts: - Tutorials - Code snippets / Examples - Additions / New functionality The difference between an example and new functionality can be vague sometimes, but what seems logical is to define a plugin as an ...
by Human Bolt Diary
Wed Jul 04, 2018 11:03 pm
Forum: Development of Ren'Py
Topic: RPMT
Replies: 7
Views: 2013

Re: RPMT

A package manager would be a fairly large amount of work. While it would be interesting to download packages and be able to manage versions, I don't see enough people making and updatings add-ons to make it really necessary. As far as imports or a specific plugin system, it's largely unnecessary due...
by Human Bolt Diary
Sun May 27, 2018 5:52 pm
Forum: Ren'Py Questions and Announcements
Topic: Opening the Save screen from a prompt
Replies: 1
Views: 1045

Opening the Save screen from a prompt

I'd like to implement a prompt asking the player if they want to save. Using ShowMenu("save") as the Yes action hasn't worked. The save occurs with the prompt still present. Loading essentially traps the player at the prompt. Alternatively, I've tried to have the Yes action send the player...
by Human Bolt Diary
Fri May 11, 2018 8:37 pm
Forum: Ren'Py Cookbook
Topic: Another Rock Paper Scissors game
Replies: 4
Views: 3732

Re: Another Rock Paper Scissors game

You can simplify the decision checks by replacing the nested if statements with dictionaries. This will also make it easier to implement more options (Rock, paper, scissors, lizard, spock, etc) The following is untested, but should give you the general idea: label results: rock_vs = { "rock&quo...
by Human Bolt Diary
Sat Apr 07, 2018 5:52 pm
Forum: Ren'Py Cookbook
Topic: Shooter / Shmup / Shoot 'em Up prototype
Replies: 1
Views: 3285

Shooter / Shmup / Shoot 'em Up prototype

Attached is a demo for a shooter style plugin which I currently don't have time to work on. Use it however you please. The source code is available at: https://github.com/jsfehler/renpy-shooter This prototype covers movement, weapons, an example of an enemy, enemy groups, and very basic overlap dete...
by Human Bolt Diary
Sun Mar 11, 2018 10:44 pm
Forum: Ren'Py Cookbook
Topic: Encyclopaedia / Bestiary Framework
Replies: 118
Views: 56350

Re: Encyclopaedia / Bestiary Framework

I can't reproduce this with a fresh project on 6.99.14.1. Have you made any customizations to the default gui.rpy file? Can you provide a minimum example game where the error occurs? Just tried to install this, but I got this error: I'm sorry, but an uncaught exception occurred. While running game c...
by Human Bolt Diary
Sun Dec 24, 2017 1:18 pm
Forum: Ren'Py Cookbook
Topic: A Tooltip whose x/y position follows the mouse's.
Replies: 13
Views: 8690

A Tooltip whose x/y position follows the mouse's.

Download files and demo files at: https://github.com/jsfehler/renpy-mouse-tooltip/ Basic Usage A MouseTooltip can be created with any type of Displayable as the default value. It can then be placed onto a screen using the add statement. Like a normal Tooltip, changing the value is done through the A...
by Human Bolt Diary
Sun Dec 10, 2017 10:11 am
Forum: Ren'Py Cookbook
Topic: Encyclopaedia / Bestiary Framework
Replies: 118
Views: 56350

Re: Encyclopaedia / Bestiary Framework

Thank you so much for this framework! I'm not sure if you've seen this already, or whether it can help you adjust the framework, but PyTom recently made a post about making a Codex/Wiki screen using Ren'Py's new GUI. The tutorial and coding can be found here. There's no plans for Wiki-esque links i...
by Human Bolt Diary
Sun Dec 03, 2017 9:43 pm
Forum: Ren'Py Questions and Announcements
Topic: Displaying content of a RevertableSet()
Replies: 13
Views: 5720

Re: Displaying content of a RevertableSet()

Python has variable dumps. I showed you dir(), there's also vars(), globals(), and locals().

You can also easily create a container with named keys:
https://pymotw.com/2/collections/namedtuple.html
by Human Bolt Diary
Sun Dec 03, 2017 5:59 pm
Forum: Ren'Py Questions and Announcements
Topic: Displaying content of a RevertableSet()
Replies: 13
Views: 5720

Re: Displaying content of a RevertableSet()

You say you want the items as they are in the list, and that's exactly what you're getting. What your desired data format shows isn't the items in the list. It shows 2 attributes of every Item instance in the backpack set, inside a nested list. In that case, what you want is something like: item_lis...
by Human Bolt Diary
Sun Dec 03, 2017 5:24 pm
Forum: Ren'Py Questions and Announcements
Topic: Displaying content of a RevertableSet()
Replies: 13
Views: 5720

Re: Displaying content of a RevertableSet()

What you're seeing is a complete print out of what's in the set you called "backpack".

It's showing you the Item objects in your set. So it already works.

Is there a particular piece of information you're looking for?
by Human Bolt Diary
Sun Dec 03, 2017 12:49 am
Forum: Ren'Py Questions and Announcements
Topic: [solved] invalid syntax for style properties in live composite
Replies: 2
Views: 758

Re: invalid syntax for style properties in live composite

yanchor 1.0 isn't valid syntax, you want something like yanchor=1.0. https://github.com/renpy/renpy/blob/7f2b53ec9acb314900fa2c62289058ea7703b946/renpy/display/layout.py#L255 The documentation is a bit vague and doesn't describe exactly what **properties should be, but if I had to guess I'd say it s...
by Human Bolt Diary
Sat Nov 25, 2017 9:14 pm
Forum: Ren'Py Cookbook
Topic: Encyclopaedia / Bestiary Framework
Replies: 118
Views: 56350

Re: Encyclopaedia / Bestiary Framework

In response to a lot of the difficulties people were having, I've been working on a version 2 of the Encyclopaedia Framework. I've kept most of the core concepts similar, but this is a hard break for quite a bit of the behaviour. Overall, it should be much more user-friendly and easier to customize....
by Human Bolt Diary
Thu Nov 23, 2017 9:26 pm
Forum: Ren'Py Questions and Announcements
Topic: Stopping Python functions from "recalculating" in rollback-replays.
Replies: 7
Views: 766

Re: Stopping Python functions from "recalculating" in rollback-replays.

As Errilhl suggested, you should be using:
https://www.renpy.org/doc/html/other.html#renpy-random

Which is a rollback safe implementation of python's random module.