Developer tool idea: Notes system
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.
-
- Regular
- Posts: 70
- Joined: Sun Jul 15, 2007 2:36 pm
- Projects: EH...
- Contact:
Developer tool idea: Notes system
So, while working on development for Errant Heart, I came across this idea for something that I thought would be useful: A notes system.
To give you an idea of what I'm talking about:
Voight-Kampff will create a sort of bare-bones version of the VN, placing the script, along with placeholder backgrounds and sprites into RenPy. As the artist, I'll play through the VN, taking notes and making sketches as I do so…
However, he also likes to put notes in comments—things like what should be in a background, thoughts on what a character should look like, the mood of the music, sound effects, etc. The problem is, I need to go back through the actual code to look at any of this.
So my thought is: Is there some way we can make some sort of Notes system that can be enabled or disabled (for the developer only, of course) that would…well, I'm not sure. Contain a pop-up with comments on the scene? I'm not exactly sure how or where they should appear, since the VN uses both ADV and NVL modes.
Do any of you coding geniuses out there have any ideas on how such a thing could be implemented?
To give you an idea of what I'm talking about:
Voight-Kampff will create a sort of bare-bones version of the VN, placing the script, along with placeholder backgrounds and sprites into RenPy. As the artist, I'll play through the VN, taking notes and making sketches as I do so…
However, he also likes to put notes in comments—things like what should be in a background, thoughts on what a character should look like, the mood of the music, sound effects, etc. The problem is, I need to go back through the actual code to look at any of this.
So my thought is: Is there some way we can make some sort of Notes system that can be enabled or disabled (for the developer only, of course) that would…well, I'm not sure. Contain a pop-up with comments on the scene? I'm not exactly sure how or where they should appear, since the VN uses both ADV and NVL modes.
Do any of you coding geniuses out there have any ideas on how such a thing could be implemented?
-
- Veteran
- Posts: 448
- Joined: Wed Nov 18, 2009 11:17 am
- Completed: Loren
- Projects: PS2
- Location: Germany
- Contact:
Re: Developer tool idea: Notes system
You could use a screen for that and give the text as an argument to the screen.
Something like:
The screen should be formatted a bit, but that's the gist of it.
Something like:
Code: Select all
init :
screen developerNotes:
default devNote = ""
text devNote
python:
def showdevNote(pNote):
if config.developer == True:
renpy.show_screen("developerNotes", devNote = pNote)
# The game starts here.
label start:
$ showdevNote("Hello World")
Avatar created with this deviation by Crysa
Currently working on:
Currently working on:
- Winterwolves "Planet Stronghold 2" - RPG Framework: Phase III
- PyTom
- Ren'Py Creator
- Posts: 16096
- 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:
Re: Developer tool idea: Notes system
Since characters are really just python functions, you can simplify the use of Anima's code a bit.
Code: Select all
screen developerNotes:
if devNote:
window:
yalign 0.0
background "#0008"
text devNote
init python:
devNote = ""
def note(s, **kwargs):
global devNote
devNote = s
# The game starts here.
label start:
show screen developerNotes
note "Perhaps we should have some thunder sound effects here as well."
"It was a dark and stormy night; the rain fell in torrents..."
# Hide the note.
note ""
"except at occasional intervals, when it was checked by a violent gust of wind which swept up the streets (for it is in London that our scene lies)..."
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?)
Software > Drama • https://www.patreon.com/renpytom
- SusanTheCat
- Miko-Class Veteran
- Posts: 952
- Joined: Mon Dec 13, 2010 9:30 am
- Location: New Brunswick, Canada
- Contact:
Re: Developer tool idea: Notes system
My brain just became evil and now wants to have something that would let you add notes to a screen during the game that are spit out to a log.
/me goes off to figure out how to do this.
Susan
/me goes off to figure out how to do this.
Susan
" It's not at all important to get it right the first time. It's vitally important to get it right the last time. "
— Andrew Hunt and David Thomas
— Andrew Hunt and David Thomas
- rioka
- Royal Manga Tutor
- Posts: 1255
- Joined: Fri Jul 16, 2004 12:21 pm
- Completed: Amgine Park, Garden Society: Kykuit, Metropolitan Blues (art)
- Location: somewhere in NY
- Contact:
Re: Developer tool idea: Notes system
Pretty neat! You can make a director's cut-type game or completely use that as a game play mechanic.
-
- Newbie
- Posts: 17
- Joined: Mon Jan 10, 2011 5:28 am
- Completed: Across the Night to You
- Projects: In The Chaos, Das Minneschwert, Star Gazers
- Location: USA
- Contact:
Re: Developer tool idea: Notes system
Not sure if this is what you want, but there are some Python commands that print strings to plaintext files.SusanTheCat wrote:My brain just became evil and now wants to have something that would let you add notes to a screen during the game that are spit out to a log.
Code: Select all
$ name = renpy.input("Enter your name.", length=20)
python:
with open(config.gamedir + "/records/name.txt", 'wb') as fo:
fo.write(name)
fo.close()
-
- Regular
- Posts: 70
- Joined: Sun Jul 15, 2007 2:36 pm
- Projects: EH...
- Contact:
Re: Developer tool idea: Notes system
Finally got a chance to try some of this code out. It'll probably take a little playing around to get something to my liking, but these suggestions give me a good place to start. Thanks!
- SusanTheCat
- Miko-Class Veteran
- Posts: 952
- Joined: Mon Dec 13, 2010 9:30 am
- Location: New Brunswick, Canada
- Contact:
Re: Developer tool idea: Notes system
Cool! Thanks.Gargargarrick wrote: Not sure if this is what you want, but there are some Python commands that print strings to plaintext files.will put the text entered as "name" into the text file "name.txt" in the "records" directory, for example. (Make sure these both exist.) You have to be careful with whether text is appended to or replaces existing text, but it can be quite handy if you only want to log certain things, as opposed to Ren'Py's usual log function. ^^Code: Select all
$ name = renpy.input("Enter your name.", length=20) python: with open(config.gamedir + "/records/name.txt", 'wb') as fo: fo.write(name) fo.close()
I have created some code that puts a button in the top right-hand corner that puts the the word "TYPO" and the file and line number. I can pair that with the code you put and have a snazzy typo indicator. The idea is that when the playtester sees a typo, they can hit the button and the fixer would know exactly where the typo took place!
Susan
" It's not at all important to get it right the first time. It's vitally important to get it right the last time. "
— Andrew Hunt and David Thomas
— Andrew Hunt and David Thomas
- Greeny
- Miko-Class Veteran
- Posts: 921
- Joined: Sun Dec 20, 2009 10:15 am
- Completed: The Loop, The Madness
- Projects: In Orbit, TBA
- Organization: Gliese Productions
- Location: Cantankerous Castle
- Contact:
Re: Developer tool idea: Notes system
Look, let me be honest here. Unless you're prepared to go back in the end and manually delete all these notes, this is going to have a very bad influence on your file size, you'll be sending the end-user a large portion of junk data.
And if you are willing to do manually remove them, you might as well just put these notes into regular say statements.
I also don't see when .txt files got obsolete in this whole story.
And if you are willing to do manually remove them, you might as well just put these notes into regular say statements.
I also don't see when .txt files got obsolete in this whole story.
In Orbit [WIP] | Gliese is now doing weekly erratic VN reviews! The latest: Halloween Otome!
Gliese Productions | Facebook | Twitter
Gliese Productions | Facebook | Twitter
- SusanTheCat
- Miko-Class Veteran
- Posts: 952
- Joined: Mon Dec 13, 2010 9:30 am
- Location: New Brunswick, Canada
- Contact:
Re: Developer tool idea: Notes system
I've been making "#TODO" comments in my code. Then I can do a quick grep to see what still needs to be done.
The same could be done for the notes. 'Specially if you call them stuff_todo instead of notes. Then it is a simple thing to strip them out and they do their job to let the play testers know that there was supposed to be a sound effect there. (Or whatever)
Susan
The same could be done for the notes. 'Specially if you call them stuff_todo instead of notes. Then it is a simple thing to strip them out and they do their job to let the play testers know that there was supposed to be a sound effect there. (Or whatever)
Susan
" It's not at all important to get it right the first time. It's vitally important to get it right the last time. "
— Andrew Hunt and David Thomas
— Andrew Hunt and David Thomas
- SusanTheCat
- Miko-Class Veteran
- Posts: 952
- Joined: Mon Dec 13, 2010 9:30 am
- Location: New Brunswick, Canada
- Contact:
Re: Developer tool idea: Notes system
In case anyone is interested, here is my hacked together code.
The purpose is to put it in while developing so that when your play testers encounter a typo or continuity problem, all they have to do is click a button and the file and line number are entered into a file called "comments.txt".
Of course different types of muttons can be added for different purposes. (Sound, pauses, graphics)
Susan
The purpose is to put it in while developing so that when your play testers encounter a typo or continuity problem, all they have to do is click a button and the file and line number are entered into a file called "comments.txt".
Code: Select all
init python:
def log_typo(myType = "TYPO"):
try:
f = file(config.gamedir + "/comments.txt", "a")
filename, line = renpy.get_filename_line()
print >>f, myType,filename,line
f.close()
except:
pass
def log_typo_plot():
log_typo("PLOT")
def button_log_typo():
ui.vbox(xpos=0.99, ypos=0.02, xanchor='right', yanchor='top')
ui.textbutton("Typo", xminimum=80, clicked=log_typo)
ui.textbutton("Plot", xminimum=80, clicked=log_typo_plot)
ui.close()
config.window_overlay_functions.append(button_log_typo)
Susan
" It's not at all important to get it right the first time. It's vitally important to get it right the last time. "
— Andrew Hunt and David Thomas
— Andrew Hunt and David Thomas
Who is online
Users browsing this forum: Google [Bot]