This is NOT limited to ONLY this specific example, but I just happened to be working on this area and wanted to see if the provided link had anything I could use for my issue.
The "created project", with the "provided documentation", leads to the "online help section" for "Choice Screen". The code from the project that RenPy has made, is the following...
Code: Select all
## Choice screen ###############################################################
##
## This screen is used to display the in-game choices presented by the menu
## statement. The one parameter, items, is a list of objects, each with caption
## and action fields.
##
## https://www.renpy.org/doc/html/screen_special.html#choice
screen choice(items):
style_prefix "choice"
vbox:
for i in items:
textbutton i.caption action i.action
...Is listed as the "following"...
Choice
The choice screen is used to display the in-game choices created with the menu statement. It is given the following parameter:
items
This is a list of menu entry objects, representing each of the choices in the menu. Each of the objects has the following fields on it:
caption
A string giving the caption of the menu choice.
action
An action that should be invoked when the menu choice is chosen. This may be None if this is a menu caption, and config.narrator_menu is False.
chosen
This is True if this choice has been chosen at least once in any playthrough of the game.
args
This is a tuple that contains any positional arguments passed to the menu choice.
kwargs
This is a dictionary that contains any keyword arguments passed to the menu choice.
These items, and the actions within, become invalid when the menu statement ends.
In addition, any arguments passed to a menu statement are passed in during the call to the screen.
Code: Select all
screen choice(items):
window:
style "menu_window"
vbox:
style "menu"
for i in items:
if i.action:
button:
action i.action
style "menu_choice_button"
text i.caption style "menu_choice"
else:
text i.caption style "menu_caption"
Sample of a potentially more-readable help...
It is also clear that, through versions, the code has changed a bit. I propose that the help files for the "latest" supported versions, or a notation of the help-files "last updated version", be noted and isolated, where possible.Choice(items, *args, **kwargs)
The choice screen is used to display the in-game choices created with the menu statement. It is given the following parameter:
(items)
This is a list[] of menu entry objects, representing each of the choices in the menu. Each of the objects has the following fields on it:
- (items.caption)
A string giving the caption of the menu choice.
- (items.action)
An action that should be invoked when the menu choice is chosen. This may be None if this is a menu caption, and config.narrator_menu is False.
- (items.chosen)
This value is "True" if this choice has been chosen at least once in any playthrough of the game, except THIS choice. After this has been chosen and acted upon, the value will be set to "True", for all subsequent visits.
*args (Optional)
This is a tuple() that contains any positional "arguments" passed to the menu choice.
**kwargs (Optional)
This is a dictionary{} that contains any "keyword arguments" passed to the menu choice.
These items, and the actions within, become invalid when the menu statement ends.
In addition, any arguments passed to a menu statement are passed in during the call to the screen.
Such that, like with "Python", you can select the "version", and the appropriate "help files" associated with that version, will load. Instead of just the "wrong help files", intended for all but ??? version. (Since the help files are NOT being updated when the "Source" and "Code" is being ALSO updated, related to the "provided sample code".)
So a link may be as such...
https://www.renpy.org/doc/html/screen_s ... oice?6.3.x
https://www.renpy.org/doc/html/screen_s ... oice?7.2.x
https://www.renpy.org/doc/html/screen_s ... oice?8.1.x
Provided that the last "help file updates" for the THREE "latest major supported versions" were... 6.3+, 7.2+, 8.1+
If you were on version 8.2.x... and the link actually said 8.2.7... It would load the 8.1.x page, which is the latest page, along with a second link to changes for version 8.2.7, which MAY or MAY NOT be related, for the specific help page. With a cookie, the "version" that the user is using, for help, should also be "remembered", but still be a "selectable option", somewhere at the top of the help page, or at the end of each of those links, as "More versions".
I can't imagine that there would be many changes, but it really is important that the "correct changes", be present, for the versions we are working with. Especially when we have upgraded versions, but we are loading old projects, which have had specific formats like this change.
It would be a bonus if RenPy had a link generated, related to opening older files in "newer versions", which linked to possible solutions for 'issues' that crop-up when loading older files into newer versions. All those common errors, related to some of these format changes, which may just require a simple name-change or format change. (Projects really should identify "which version" of RenPy that they were made with, specifically to assist with these "issues". Place it right with the "config.version" data, or have it as an individual file that simply contains the version number of RenPy that was used to create the VN.)
This would be created by the "default project", when one is created. We could update the version codebase, when needed, or not... It is really only there for help-files issues and notes for the release of the original code-base used for making the VN. If we DID update it so it works with a newer version, we could then change the value, so we get the "new help files", associated with that version. When the debugger throws links at us, for help on issues. Or, just to let others know, who may be using the project, that it has been "updated" to "xxx" version, or ourselves... A nice warning when the editor runs, would be a bonus, about "version mismatching". Maybe even an "update code-base", which would just replace the links in the files with the "new version number", we use here, or the internal version number that is found in a "default project", which has the version number appended to the link... {https...choice?8.1.x}
Code: Select all
## The version of the game.
define config.version = "1.0"
## The version of RenPy, used to make the VN.
## DO NOT CHANGE THIS, unless you have updated the game to work on a higher version.
define config.version_renpy_codebase = "8.1.3"