Search found 101 matches

by Human Bolt Diary
Sun Feb 03, 2019 12:55 am
Forum: Ren'Py Cookbook
Topic: Example for a turn-based battle system
Replies: 0
Views: 884

Example for a turn-based battle system

Download at: https://github.com/jsfehler/the_hero_arrives_in_35_minutes This example is for anyone interested in building a turn-based battle system. It's not a framework, just a dump of source code. I've tried to add as many comments as possible and organize everything to be easy to read, but YMMV....
by Human Bolt Diary
Sat Feb 02, 2019 2:33 am
Forum: Ren'Py Questions and Announcements
Topic: How to loop an array when it ends? Here are my failures...
Replies: 3
Views: 180

Re: How to loop an array when it ends? Here are my failures...

What you want is a modulo: https://en.wikipedia.org/wiki/Modulo_operation

Code: Select all

textbutton "Foo" action SetVariable("counter", (counter + 1) % len(myarray))
The remainder can never be greater than the length of your list

ie:

1 % 4 = 1
2 % 4 = 2
3 % 4 = 3
4 % 4 = 0
5 % 4 = 1
by Human Bolt Diary
Fri Jan 25, 2019 4:44 pm
Forum: Works in Progress
Topic: The Hero Arrives in 35 Minutes
Replies: 5
Views: 721

Re: The Hero Arrives in 35 Minutes

I just gave it a go, so right now I get to the part where it says "your name is: blahblahblah" and then it freezes or stops. It does not return to the main menu, though the Esc menu will still open. I tried twice with two different sets of choices and the same thing happened both times. I am not su...
by Human Bolt Diary
Fri Jan 25, 2019 5:09 am
Forum: Works in Progress
Topic: The Hero Arrives in 35 Minutes
Replies: 5
Views: 721

The Hero Arrives in 35 Minutes

A while ago I was on a podcast to discuss failed game ideas and why they never went anywhere. Specifically, an idea for a game called "The Heroes Arrive in 35 Minutes". The podcast itself goes into more detail about why we thought the game could be interesting, and why it probably wouldn't have ever...
by Human Bolt Diary
Fri Jan 04, 2019 11:34 pm
Forum: Ren'Py Cookbook
Topic: Encyclopaedia / Bestiary Framework
Replies: 92
Views: 18395

Re: Encyclopaedia / Bestiary Framework

Off the top of my head, remove the Return action from the button that closes the encyclopaedia and just hide the screen. If that fails, provide a minimal example for what you're doing and I'll see what I can figure out.
by Human Bolt Diary
Wed Dec 26, 2018 4:17 pm
Forum: Ren'Py Cookbook
Topic: Encyclopaedia / Bestiary Framework
Replies: 92
Views: 18395

Re: Encyclopaedia / Bestiary Framework

Hi, I have a few questions 1) Can I use the hyperlink to jump from one entry to another? Like for example "George Washington is the President of the USA", and the the "USA" is a hyperlink to another entry about USA. 2) Can the entry buttons in the index show more than one line? For example, I want ...
by Human Bolt Diary
Sun Dec 16, 2018 4:42 pm
Forum: Ren'Py Cookbook
Topic: Encyclopaedia / Bestiary Framework
Replies: 92
Views: 18395

Re: Encyclopaedia / Bestiary Framework

Incidentally, I implemented natural sorting in this framework–-the biggest thing is ignoring the/a/an at the start of a string, so e.g. "The Beatles" subject would be sorted as if it starts with B, not T. Shall I do a pull request on github or something similar? PRs are welcome. Just make sure you ...
by Human Bolt Diary
Sun Oct 28, 2018 10:44 pm
Forum: Ren'Py Cookbook
Topic: Alternate Quick/Auto Load/Save screen
Replies: 0
Views: 518

Alternate Quick/Auto Load/Save screen

As seen in the screenshot, this changes the Quick / Auto slots from two pages to one. It overrides the default Load/Save screen, however the behaviour on the normal Load/Save pages is not changed. Inspired by Hitman 2016: http://videogameinterfaces.com/content/ui/io-interactive/hitman/main-menu/hitm...
by Human Bolt Diary
Fri Oct 26, 2018 3:50 pm
Forum: Ren'Py Cookbook
Topic: Encyclopaedia / Bestiary Framework
Replies: 92
Views: 18395

Re: Encyclopaedia / Bestiary Framework

define config.hyperlink_handlers = { "set_entry": set_enc_entry_from_text_anchor, } init -1500 python: def set_enc_entry_from_text_anchor(value): p = value.split('->') enc = getattr(store, p[0]) entry = getattr(store, p[1]) enc.SetEntry(entry)() init python: my_enc = Encyclopaedia() entry_one = Enc...
by Human Bolt Diary
Tue Oct 09, 2018 10:59 pm
Forum: Ren'Py Cookbook
Topic: [CODE] Glossary Screen Implementation
Replies: 14
Views: 1575

Re: [CODE] Glossary Screen Implementation

While you're free to build and use whatever you want, I think everything you need has already been accomplished with the Encylopaedia Framework I developed a while ago: https://lemmasoft.renai.us/forums/viewtopic.php?f=51&t=25204 https://renpy-encyclopaedia.readthedocs.io/en/latest/index.html Thank...
by Human Bolt Diary
Sun Oct 07, 2018 1:15 pm
Forum: Ren'Py Cookbook
Topic: [CODE] Glossary Screen Implementation
Replies: 14
Views: 1575

Re: [CODE] Glossary Screen Implementation

While you're free to build and use whatever you want, I think everything you need has already been accomplished with the Encylopaedia Framework I developed a while ago:

viewtopic.php?f=51&t=25204
https://renpy-encyclopaedia.readthedocs ... index.html
by Human Bolt Diary
Wed Sep 12, 2018 7:10 am
Forum: Ren'Py Cookbook
Topic: Encyclopaedia / Bestiary Framework
Replies: 92
Views: 18395

Re: Encyclopaedia / Bestiary Framework

You're creating the encyclopaedia twice. Once in an init block, once in a python block. If the code in the python block isn't inside a label, it won't be run. The entry is inside the python block, and so isn't run either. Thus the encyclopaedia is empty.
by Human Bolt Diary
Tue Sep 11, 2018 8:43 am
Forum: Ren'Py Cookbook
Topic: Encyclopaedia / Bestiary Framework
Replies: 92
Views: 18395

Re: Encyclopaedia / Bestiary Framework

In this case, what you want is: textbutton _("Encyclopedia") action ShowMenu("encyclopaedia_list", your_new_encyclopaedia) After creating entries I tried to make a button to open the Encyplopedia. I inserted the Encyclopedia button at the start menu. The documentation says it needs two arguments, bu...
by Human Bolt Diary
Wed Aug 22, 2018 10:27 pm
Forum: Ren'Py Questions and Announcements
Topic: Drawing in Ren'Py
Replies: 23
Views: 1998

Re: Drawing in Ren'Py

Imperf3kt wrote:
Tue Aug 21, 2018 9:13 pm
The big question is: can you draw an Eileen with it?
I got pretty close.
by Human Bolt Diary
Mon Aug 20, 2018 11:37 pm
Forum: Ren'Py Questions and Announcements
Topic: Drawing in Ren'Py
Replies: 23
Views: 1998

Re: Drawing in Ren'Py

I've added the ability to draw straight lines so that it's easier to draw Gundams. I know how important that is to the kids. Go forth, and draw the polygonal shapes of your dreams.