clickable hyperlink footnotes within the text
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.
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.
-
Watercolorheart
- Eileen-Class Veteran
- Posts: 1314
- Joined: Mon Sep 19, 2005 2:15 am
- Completed: Controlled Chaos / Sum of the Parts / "that" Midna game with ZONEsama
- Projects: Sparse Series/Oddments Shop original cartoon in Pevrea; Cybernetic Duels (fighting game); Good Vibin'
- Organization: Watercolorheart Studios
- IRC Nick: BCS
- Tumblr: adminwatercolor
- Deviantart: itsmywatercolorheart
- Github: Watercolordevdev
- Skype: heartnotes
- Soundcloud: Watercollider
- itch: watercolorheart
- Location: Florida
- Contact:
clickable hyperlink footnotes within the text
Within the dialogue window, I would like to create a little widget or small text like (1) at the end of a sentence that the player can click for a footnote but I don't know how to go about it.
I looked within the sample script for something that wasn't like an actual menu choice, but still able to make a small clickable piece of text with other descriptions around it. Then once you clicked the (1) it would bring you to footnote 1, display the text, and then go back to the original prose when you clicked again.
Is that feasible?
I looked within the sample script for something that wasn't like an actual menu choice, but still able to make a small clickable piece of text with other descriptions around it. Then once you clicked the (1) it would bring you to footnote 1, display the text, and then go back to the original prose when you clicked again.
Is that feasible?
- PyTom
- Ren'Py Creator
- Posts: 15893
- Joined: Mon Feb 02, 2004 10:58 am
- Completed: Moonlight Walks
- Projects: Ren'Py
- IRC Nick: renpytom
- Github: renpytom
- itch: renpytom
- Location: Kings Park, NY
- Contact:
Hm... The quick answer is, "not easily." It can probably be done by instantiating a button displayable and adding it as part of the string being shown, but that is well into the realm of hard.
Why do you want to do this? It seems to me that footnotes would tend to take one out of the game.
There is an extra (one I haven't touched in a while) that does commentary, perhaps that can be adapted to do what you want. A preference could turn cultural notes (or whatever) on or off at the user's whim.
Why do you want to do this? It seems to me that footnotes would tend to take one out of the game.
There is an extra (one I haven't touched in a while) that does commentary, perhaps that can be adapted to do what you want. A preference could turn cultural notes (or whatever) on or off at the user's whim.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom
There are various reasons why it might be desirable. For example, the forthcoming commercial Japanese game Scarlett (from which my current avatar comes) features an in-game encyclopedia system that explains technical stuff in the text (details of various types of gun, commentary on the American military presence in Okinawa, etc). The way that works is that the text window has an "encyclopedia" button built into it: whenever a new word is added to the encylopedia system, the button flashes, and a little icon in the text indicates the word that can now be looked up. Clicking the button opens a separate interface window. It is a bit intrusive, but not horribly so.
I think KID have implemented similar systems in some of their Infinity series.
I think KID have implemented similar systems in some of their Infinity series.
- PyTom
- Ren'Py Creator
- Posts: 15893
- Joined: Mon Feb 02, 2004 10:58 am
- Completed: Moonlight Walks
- Projects: Ren'Py
- IRC Nick: renpytom
- Github: renpytom
- itch: renpytom
- Location: Kings Park, NY
- Contact:
Having a separate encyclopedia button (and highlighting the new word) is doable. The problem here is that Ren'Py buttons are currently rectangular areas of the screen, rather than fragments of text that can be laid out using the normal text layout algorithms. (Think the difference between an HTML button and a html link.)
Actually, if I broke a single button up into a number of small buttons, one per word, that might work. Hm... need to think about it.
Actually, if I broke a single button up into a number of small buttons, one per word, that might work. Hm... need to think about it.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom
I think so, too.PyTom wrote:It seems to me that footnotes would tend to take one out of the game.
On the other hand, I found it very nice that one of the Alltogether games had this very nicely implemented - it was the one thing I wanted to have explained, and what do you know - there was a hyperlinkish thing and it explained the thing.
Anyway, it doesn't change my thoughts on this, and that is that making a game that will (to a greater extent) rely on footnotes to bring out the best in itself, isn't a good approach. I'd consider supplementary material such as diaries or an optional boring tech-historical intro before making a decision to make the game work with footnotes. But maybe it also depends on the player audience - players used to RPGs will not be all too distracted by footnotes or clickable items, while people like me who like to have their experience as simple as possible will find that a bit obtrusive.
- PyTom
- Ren'Py Creator
- Posts: 15893
- Joined: Mon Feb 02, 2004 10:58 am
- Completed: Moonlight Walks
- Projects: Ren'Py
- IRC Nick: renpytom
- Github: renpytom
- itch: renpytom
- Location: Kings Park, NY
- Contact:
Right now, the big problem is how to implement hypertext in Ren'Py. The current focus algorithm assumes that each button corresponds to a single rectangular region on the screen. Among other things, keyboard/joystick navigation makes use of this assumption, so eliminating it may not be trivial.
I may just require that hypertext not span a line-wrap, so that hypertext is laid out as a single unit. That would prevent the focus issue from happening. For the use case at hand, definitions of obscure terms, this should suffice, but it would prevent longer hyperlinks.
I may just require that hypertext not span a line-wrap, so that hypertext is laid out as a single unit. That would prevent the focus issue from happening. For the use case at hand, definitions of obscure terms, this should suffice, but it would prevent longer hyperlinks.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom
-
Watercolorheart
- Eileen-Class Veteran
- Posts: 1314
- Joined: Mon Sep 19, 2005 2:15 am
- Completed: Controlled Chaos / Sum of the Parts / "that" Midna game with ZONEsama
- Projects: Sparse Series/Oddments Shop original cartoon in Pevrea; Cybernetic Duels (fighting game); Good Vibin'
- Organization: Watercolorheart Studios
- IRC Nick: BCS
- Tumblr: adminwatercolor
- Deviantart: itsmywatercolorheart
- Github: Watercolordevdev
- Skype: heartnotes
- Soundcloud: Watercollider
- itch: watercolorheart
- Location: Florida
- Contact:
A heavenly voice (all complete with a ray of light) that always interrupts the main characters, in the most inconvenient of situations, for instanceBCS wrote:... what would be the best system for amusing commentary/footnotes/whatever?
(and maybe you can have the option of shutting her up, somehow ^_^)
-
Watercolorheart
- Eileen-Class Veteran
- Posts: 1314
- Joined: Mon Sep 19, 2005 2:15 am
- Completed: Controlled Chaos / Sum of the Parts / "that" Midna game with ZONEsama
- Projects: Sparse Series/Oddments Shop original cartoon in Pevrea; Cybernetic Duels (fighting game); Good Vibin'
- Organization: Watercolorheart Studios
- IRC Nick: BCS
- Tumblr: adminwatercolor
- Deviantart: itsmywatercolorheart
- Github: Watercolordevdev
- Skype: heartnotes
- Soundcloud: Watercollider
- itch: watercolorheart
- Location: Florida
- Contact:
LOL!!mikey wrote:A heavenly voice (all complete with a ray of light) that always interrupts the main characters, in the most inconvenient of situations, for instanceBCS wrote:... what would be the best system for amusing commentary/footnotes/whatever?
(and maybe you can have the option of shutting her up, somehow ^_^)
Yeah, but I like the "push a button" option too ... maybe a "push a button for additional comments" would work instead
I have no clue about how to program a status screen, with a hint and inventory and progress option. Maybe I can draft Pytom for help D: ...
- PyTom
- Ren'Py Creator
- Posts: 15893
- Joined: Mon Feb 02, 2004 10:58 am
- Completed: Moonlight Walks
- Projects: Ren'Py
- IRC Nick: renpytom
- Github: renpytom
- itch: renpytom
- Location: Kings Park, NY
- Contact:
mikey >> I'm almost certain that's a reference to one of the commercial games, but I'm not sure I remember which one. What's more, I'm not sure that if I did remember which one, I would admit to playing it.
BCS >> When you get a working game, I can help you with a status screen.
Although you should really consider if a status screen is actually necessary... While it might be for a stats-based DS, it generally isn't for a visual novel.
I don't know, for example, what good an inventory screen is when the player can't use or acquire items at arbitrary times. Either you have the item when it's needed or you don't, and no time spent looking at an inventory screen will change that.
Remember, Ren'Py is a visual novel engine. It's not an RPG engine, a text adventure engine, or a graphical adventure game engine (like Scummvm). Those are all great genres of games, which is why they deserve and have tools that are more suitable to them then Ren'Py is.
BCS >> When you get a working game, I can help you with a status screen.
Although you should really consider if a status screen is actually necessary... While it might be for a stats-based DS, it generally isn't for a visual novel.
I don't know, for example, what good an inventory screen is when the player can't use or acquire items at arbitrary times. Either you have the item when it's needed or you don't, and no time spent looking at an inventory screen will change that.
Remember, Ren'Py is a visual novel engine. It's not an RPG engine, a text adventure engine, or a graphical adventure game engine (like Scummvm). Those are all great genres of games, which is why they deserve and have tools that are more suitable to them then Ren'Py is.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom
Well, I never play such games, so... I just got it from a friend who played it and he told me... he plays all the hentai games, not me... and he also plays those sim dates in Flash... and he told me they are full of swearwords and hentai... I'd never touch that... you know...PyTom wrote:mikey >> I'm almost certain that's a reference to one of the commercial games, but I'm not sure I remember which one. What's more, I'm not sure that if I did remember which one, I would admit to playing it.
Depending on your setting, why not make the comments an optional menu? If in fantasy, your hero could choose to summon some "Charm of Ultimate Knowledge" YES/NO - and depending on that, he'd get some answers, of course whether he'd choose to use it would have no effect on the outcome of the game - like an optional path that gets you back to where you were without changing anything.BCS wrote:Yeah, but I like the "push a button" option too ... maybe a "push a button for additional comments" would work instead , after announcing it onscreen (Push "C" for additional information.)
If you're in the sci-fi setting, you could "switch on" your female holographic projection... (well, I was going to write "turn on", but...) - and in a more contemporary setting, dialing a toll-free number for information could also be an option. I think if you'd wrap this up into the gameplay, you wouldn't need to worry about footnotes and have relevant information right there in the game - spice it up with funny bits and I'm sure almost everyone will opt for the explanations/information once given the choice.
- PyTom
- Ren'Py Creator
- Posts: 15893
- Joined: Mon Feb 02, 2004 10:58 am
- Completed: Moonlight Walks
- Projects: Ren'Py
- IRC Nick: renpytom
- Github: renpytom
- itch: renpytom
- Location: Kings Park, NY
- Contact:
Documentation on the new hyperlink feature of Ren'Py can be found at:
http://www.bishoujo.us/trac/wiki/NewFeatures
This will be in 5.5.1, which I plan to release this week. (And which will be the only release for almost a month, as I will be away from my desktop computers for that long.)
http://www.bishoujo.us/trac/wiki/NewFeatures
This will be in 5.5.1, which I plan to release this week. (And which will be the only release for almost a month, as I will be away from my desktop computers for that long.)
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom
- chronoluminaire
- Eileen-Class Veteran
- Posts: 1153
- Joined: Mon Jul 07, 2003 4:57 pm
- Completed: Elven Relations, Cloud Fairy, When I Rule The World
- Tumblr: alextfish
- Skype: alextfish
- Location: Cambridge, UK
- Contact:
Hmm. Is it possible to use these hyperlinks to open an actual website in the user's system browser? I looked around the doc for config.hyperlink_callback , but couldn't see any way to do it. I'm guessing there'd have to be some Python system call that would open the browser pointing at the desired URL?
In this case, I'd be using it in the omake of WhenIRuleTheWorld to point to a discussion page.
In this case, I'd be using it in the omake of WhenIRuleTheWorld to point to a discussion page.
- PyTom
- Ren'Py Creator
- Posts: 15893
- Joined: Mon Feb 02, 2004 10:58 am
- Completed: Moonlight Walks
- Projects: Ren'Py
- IRC Nick: renpytom
- Github: renpytom
- itch: renpytom
- Location: Kings Park, NY
- Contact:
For windows, you can use os.start to start the url, which should open a web browser. AFAIK, there isn't an overly portable version that works for Linux and Mac.chronoluminaire wrote:Hmm. Is it possible to use these hyperlinks to open an actual website in the user's system browser? I looked around the doc for config.hyperlink_callback , but couldn't see any way to do it. I'm guessing there'd have to be some Python system call that would open the browser pointing at the desired URL?
In this case, I'd be using it in the omake of WhenIRuleTheWorld to point to a discussion page.
Welcome back, BTW...
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom
Who is online
Users browsing this forum: Bing [Bot]

