Ren'Py scripting tool

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
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.
Message
Author
Jake
Support Hero
Posts: 3826
Joined: Sat Jun 17, 2006 7:28 pm
Contact:

Ren'Py scripting tool

#1 Post by Jake »

I've been working for a couple of evenings - anime and Bond movies and curries and drinking aside - on a UI tool to try and ease the creation of simple VNs. In the long run, I'd like it to readily switch to support more than just Ren'Py (a friend of mine is theoretically working on an engine for VNs on the DS, if nothing else), but that's where I'm starting for probably obvious reasons.

Anyway, I've got a proof-of-concept built, and I'd appreciate it if someone 'in the wild' as such could give it a whack and see if it even runs... to my knowledge the only pre-req for the app should be a Windows system (I'm a Windows developer, I'm afraid...) with the .NET2 runtime installed, which I think means any Windows system from 2000 above which is up-to-date on updates. You'll need a 5.6.x version of Ren'Py - with launcher - to run from the app, though.

Installation just consists of downloading this zip:
http://www.eviscerate.net/projects/berl ... 061123.zip
then unzipping to and running from a directory on your local HDD.

A good shakedown test would be to hit the "Load Test Data" button, then hit the "Output to Ren'Py" button.

If anything breaks apart from the following list, I'm interested to know what went wrong - probably the easiest method would be to take a screenshot of the error dialog - and what you were trying to do at the time.
- Don't use characters in the story name that you can't put in a folder name, 'cause I'm not too careful stripping out characters there yet.
- move-items-up-and-down buttons don't work for arcs or scenes, 'cause I so-far forgot to write that functionality into the classes.

Functionality is pretty light at the moment, since it's just a proof of concept. I'm also well aware that the UI is ugly and unintuitive - it's literally just a window onto the data structures at the moment, I intend to get the rendering-full-scripts part done before making it pretty and usable...

For now, my main priority is just getting a core set of actions implemented and rendering to Ren'Py script, then getting a library of locations, characters and music accessible and linked into the script. I'm also interested if anyone has any opinions on:
- What the finished interface might work like. I have a couple, mostly based around a film-strip/screenplay paradigm, but they're fairly inchoate.
- What kind of 'prettiness' is necessary for the output Ren'Py script. Is it worth breaking arcs across different files, for instance? Does it need more comments, perhaps with scene names or something? While I have no intention of writing a tool that parses Ren'Py script, it does seem to me to be a good idea to make the output as easy to read and edit as possible...
Server error: user 'Jake' not found

User avatar
mikey
Lemma-Class Veteran
Posts: 3249
Joined: Sat Jan 10, 2004 6:03 am
itch: atpprojects
Contact:

#2 Post by mikey »

Hmmm, it tells me I need to have the framework v.2.0.50727 installed. :(

Why do some apps need this? Can't it be somehow included? I dislike installing the package just for this... :( Bad experiences.

monele
Lemma-Class Veteran
Posts: 4101
Joined: Sat Oct 08, 2005 7:57 am
Location: France
Contact:

#3 Post by monele »

It asks me for the NET2 thingie. I know I already installed some .NET thingie for a program... and then even an update of it for another program. But I guess .NET2 is something even newer then ?
Attachments
Error message in french
Error message in french

magi
Special Project Artist
Posts: 323
Joined: Thu Jul 14, 2005 7:06 pm
Projects: Hanafuda Club, Infinity Rain
Location: Arizona
Contact:

#4 Post by magi »

Image
I have a working copy of Paint.net on my computer, which also requires the dot net frame work.

Holy smoke, that was quick!
Image
and here it is the outputed script:
# Auto-generated by Berlinetta POC 20061123
# Generated: 11/25/2006 6:30:27 AM
# Story Title: Unnamed Story

# Initialisation of library data
init:
python hide:
config.window_title = u"Unnamed Story"
# Define Characters, Backdrops and so on
image grey = "#c0c0c0"
# start of script proper
label start:
label arc0:
$ save_name = "Date 1"
label arc0scene0:
show grey
"This is the small park in the middle of the city."
"There isn\'t usually anybody here, though, interestingly"
""
""
label arc0scene1:
show grey
Image

Jake
Support Hero
Posts: 3826
Joined: Sat Jun 17, 2006 7:28 pm
Contact:

#5 Post by Jake »

Yeah, .NET2 is a second version of the original .NET runtime - it's available for download here:
http://www.microsoft.com/downloads/deta ... laylang=en

Unfortunately, I don't have much of an option to develop for the .NET1 framework without spending more than I'm ready to on a copy of Visual Studio, 'cause I'm using VS Express which only supports building for v2; I could include the runtime in the package, but that would take a <100kB package up to >22MB...

That it runs on one other computer suggests I'm not having the same issues I was having before, though - thanks!
Server error: user 'Jake' not found

monele
Lemma-Class Veteran
Posts: 4101
Joined: Sat Oct 08, 2005 7:57 am
Location: France
Contact:

#6 Post by monele »

Got the NET3 in the end :). Works without problem. Now I'm wondering what gamemaker who are currently avoiding Ren'Py for the coding part think of this ^^.

Jake
Support Hero
Posts: 3826
Joined: Sat Jun 17, 2006 7:28 pm
Contact:

#7 Post by Jake »

Another build - this time with simple location (read: backgrounds) and character (as in Character() rather than sprite) support and the additions of editors for scenes, actions, locations and characters - doubleclick the items in the list boxes to edit them.

http://www.eviscerate.net/projects/berl ... 061126.zip

(I'm one of those people who likes to give status updates frequently 'cause it gives me a sense of responsibility to get enough stuff done to actually merit a status update, and thus spurs me to work faster. And also 'cause any feedback is really useful for a thing like this. ;-))



Which brings me to my questions...
monele wrote:Now I'm wondering what gamemaker who are currently avoiding Ren'Py for the coding part think of this ^^.
Probably "man, this is unusable! Where do I do what and how does it work?". ;-)

Seriously, I'd like some opinions on the way the UI should behave, particularly from non-programmers. A few specific questions:
  • Do the editors make sense - the "Scene Properties" and so on windows? My current plan is to continue along constructing more properties windows for most of the editable details... I'd like to have dialogue typable directly into the 'scene script' tab (which will replace the current actions list box) with a drop-down next to it for which character, but aside from that nearly everything will be pop-up windows. Does this sit right with people?
  • What kind of behaviour would you expect if an item in the library were deleted which was used within the script? Say, you define a character, place the character into a scene, write a load of dialogue for them, then go back to the library and delete the character? Should the tool delete all their dialogue also? Refuse to let you delete the character until they're no longer used anywhere? Re-map their dialogue to be narration instead of character speech? Currently it leaves that character in the script, and writes an invalid file if you try and save it, which is obviously less than ideal... myself, I lean towards re-mapping lines of dialogue to narration, and just removing any stage-management stuff for that character.
  • A similar question for files - currently, the tool maintains a link to the full path of the image for a background wherever it is on your HDD (and will do the same for characters when I finish the UI parts for adding them) - what would you expect the tool to do when one of these files disappears? Or would it perhaps be a better idea to copy the images local to the save file and keep them together?
  • One thing that came up while adding locations and characters was that I need at some point to come up with in-Ren'Py-script game variable names for these characters, so they can be used in the script. Myself, I'd like the script to be as human-readable as possible, if nothing else so that the tool can be used for prototyping more complex things.
    The problem is that in-tool, locations and characters can have totally freeform names, where variables can only use a small set of characters, can't have spaces in, and so on. So as a temporary solution I've gone with "loc1" and "character3" and so on, but that's obviously not so readable. Options I can think of include:
    • Creating the variable name out of the character name, and forbidding new character names which class with existing variable names. This means that the user doesn't have to worry about it, but potentially confusingly can't have a character named "Joan N." in the same story as a character named "Jo-ann" because they'd both map down to the variable name 'joann'.
    • Allowing the user to edit the variable name for the character and enforce uniqueness on these instead - easy to code, but means that the user is exposed to more of the 'coding' part.
    • Sticking with generated meaningless var names - easy to code, user doesn't need know anything about it, but bad for anyone who wants to hand-edit the script afterwards.
Server error: user 'Jake' not found

Jake
Support Hero
Posts: 3826
Joined: Sat Jun 17, 2006 7:28 pm
Contact:

#8 Post by Jake »

Basically, I spent half the last week too ill to do anything much, and the other half of the last week making changes that don't really result in anything noticable from the front end - but it now saves out all the graphics resources alongside the save file (in a <savefile>.resources directory) to ensure they don't get mysteriously lost. I did try serializing them into the [XML] save file via SOAP, but it more than doubled the hard drive space taken up rather unnecessarily. On the other hand it also saved everything out to one file, so maybe that was a better idea after all. Eh. It's not too late to go back, anyway, if anyone else has any strong opinions on that?

Anyway, new version - there's a few new things, I just forget exactly what they are. I think rendering out to Ren'Py of positions and transitions?:
http://www.eviscerate.net/projects/berl ... 061206.zip

Also, the test script I've been adding bits to to make sure everything renders out OK:
http://www.eviscerate.net/projects/berl ... 061206.zip

I got carried away rendering the backgrounds in that zip, and this is all I'm ever likely to use them for, so if anyone wants to nab 'em for anything else, feel free, it'd be a shame for them to go to waste. Hands off the character sprite, though, she's mine! ;-P
Server error: user 'Jake' not found

Counter Arts
Miko-Class Veteran
Posts: 649
Joined: Fri Dec 16, 2005 5:21 pm
Completed: Fading Hearts, Infinite Game Works
Projects: Don't Save the World
Organization: Sakura River
Location: Canada
Contact:

#9 Post by Counter Arts »

Jake wrote:What kind of behaviour would you expect if an item in the library were deleted which was used within the script? Say, you define a character, place the character into a scene, write a load of dialogue for them, then go back to the library and delete the character? Should the tool delete all their dialogue also? Refuse to let you delete the character until they're no longer used anywhere? Re-map their dialogue to be narration instead of character speech? Currently it leaves that character in the script, and writes an invalid file if you try and save it, which is obviously less than ideal... myself, I lean towards re-mapping lines of dialogue to narration, and just removing any stage-management stuff for that character.
Sorry but I am a programmer.

To keep non-programmers' answers untainted...
Give them a choice of the above.
Jake wrote:A similar question for files - currently, the tool maintains a link to the full path of the image for a background wherever it is on your HDD (and will do the same for characters when I finish the UI parts for adding them) - what would you expect the tool to do when one of these files disappears? Or would it perhaps be a better idea to copy the images local to the save file and keep them together?
Use a placeholder picture. A simliar thing happens in Adobe After Effects.
Jake wrote:One thing that came up while adding locations and characters was that I need at some point to come up with in-Ren'Py-script game variable names for these characters, so they can be used in the script. Myself, I'd like the script to be as human-readable as possible, if nothing else so that the tool can be used for prototyping more complex things.
Warning... Tsukihime Spoiler
Make a ID number for each character and prefix that on the character name (i.e. 01-shiki, 02-SHIKI or ch01_shiki, ch02_SHIKI)

Jake
Support Hero
Posts: 3826
Joined: Sat Jun 17, 2006 7:28 pm
Contact:

#10 Post by Jake »

Counter Arts wrote:To keep non-programmers' answers untainted...
I don't think that's really that much of a problem, but thanks for the thought... ;-) I've removed them in my reply just 'cause they make it (intentionally, I know) hard to read.
Counter Arts wrote: Use a placeholder picture. A simliar thing happens in Adobe After Effects.
I guess that's a sound option, yeah. I'm more or less doing this with locations already, since each one also has a colour which is used for the background colour if the image is absent or undefined, it wouldn't be difficult to embed a simple silhouette or something into the EXE...
Counter Arts wrote:
Jake wrote:One thing that came up while adding locations and characters was that I need at some point to come up with in-Ren'Py-script game variable names for these characters...
Make a ID number for each character and prefix that on the character name
Hmm... possible, yeah... It makes it readable enough, but I'd worry that it would make it more annoying to type further uses of that character by hand if necessary. I'm wondering about just creating a script-var name from the character name and then appending '2' or '3' or so on to the end to distinguish between them. So "Joan N" would become "joann" and "Jo Ann" would become "joann2". (That's a contrived example anyway, since those could easily be "joan_n" and "jo_ann", but I can't think of a better one and I know the potential would still remain...;-))
Server error: user 'Jake' not found

Azure
Regular
Posts: 29
Joined: Thu Dec 07, 2006 8:34 am
Contact:

#11 Post by Azure »

Woo I'm a non programmer who has been lurking about a bit, so when I saw this I thought oooooo!. I found it seasy enough to use but when I tried to export I get an error:
ee the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
at VN.Render.RenPyRenderer.WriteAction(Action action) in C:\Documents and Settings\Jake\My Documents\Visual Studio 2005\Projects\Berlinetta\VN.Render\RenPyRenderer.cs:line 438
at VN.Render.RenPyRenderer.WriteScene(Scene scene) in C:\Documents and Settings\Jake\My Documents\Visual Studio 2005\Projects\Berlinetta\VN.Render\RenPyRenderer.cs:line 404
at VN.Render.RenPyRenderer.WriteStory(Story story) in C:\Documents and Settings\Jake\My Documents\Visual Studio 2005\Projects\Berlinetta\VN.Render\RenPyRenderer.cs:line 350
at VN.Render.Renderer.Render(Story story) in C:\Documents and Settings\Jake\My Documents\Visual Studio 2005\Projects\Berlinetta\VN.Render\Renderer.cs:line 35
at Berlinetta.Form1.renderButton_Click(Object sender, EventArgs e) in C:\Documents and Settings\Jake\My Documents\Visual Studio 2005\Projects\Berlinetta\Berlinetta\Form1.cs:line 505
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINNT/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
Berlinetta
Assembly Version: 0.0.2.0
Win32 Version: 0.0.2.0
CodeBase: file:///C:/Documents%20and%20Settings/Administrator/renpyvisual/Berlinetta.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINNT/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINNT/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINNT/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
VN
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Documents%20and%20Settings/Administrator/renpyvisual/VN.DLL
----------------------------------------
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINNT/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
VN.Render
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Documents%20and%20Settings/Administrator/renpyvisual/VN.Render.DLL
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.


It then only exports the basic settings for the game, and no actual story that Ren'Py can pick up. ^^,,


I'd also like to request adding menus, as well as the ability to define transitions ourselves. ( ie using your tool to put them in and make sure they are formatted properly, but so I can put in the name of the fade etc).

As it stands this seems really useful, but to be honest if possible I'd like to avoid stepping into the code as much as possible. The new version of Ren'py makes it easier, but I constantly keep misformating things and then am unable to fix them. This would make things sooo much easier, and witht he addition of menus I can make a basic multipath VN. If you want some idea of how to present it I suggest you look at AGs, as a non porgrammer I can understand it and use it for basic game making.

Jake
Support Hero
Posts: 3826
Joined: Sat Jun 17, 2006 7:28 pm
Contact:

#12 Post by Jake »

Azure wrote: when I tried to export I get an error:
Looks like I missed some validation on one of the actions, allowing the tool to get itself into a state where it's got invalid data stored internally - do you happen to have a saved script file that causes this problem so I can take a look and see what might have caused it, or a set of steps I can perform to reproduce the problem? I plan on looking more closely at action validation (there isn't much at all, currently) next anyway, but any more information would be helpful!

Although the renderer should catch errors at each step and try its best to output as much of a script as it can manage, all the same... that's on my long-term to-do list.
Azure wrote: I'd also like to request adding menus, as well as the ability to define transitions ourselves. ( ie using your tool to put them in and make sure they are formatted properly, but so I can put in the name of the fade etc).
Menus will certainly happen - they're one of the things I plan on working on next, in fact, alongside better action validation.

Transitions... I certainly plan to increase the set of transitions available to cover all the ones mentioned in the Ren'Py manual, at the least. Past that, I'm not sure the approach I want to take. One option is to add an option everywhere you can choose a transition to also specify a duration for that transition. Another option would be to allow people to define prefab named transitions (e.g. "3 second dissolve", "1.5 second wipe") and only choose from those in the scene/character-show/etc. A third option would be 'both', but that would be more troublesome to code... ;-)
Azure wrote: This would make things sooo much easier, and witht he addition of menus I can make a basic multipath VN.
Well, my absolute-minimum-standard-of-functionality is to be able to construct something on a par with Moonlight Walks, complexity wise, without doing any hand-coding at all. That's probably a month of work off at least, though, particularly since I also want to overhaul the UI as I go. ;-)
Azure wrote: If you want some idea of how to present it I suggest you look at AGs, as a non porgrammer I can understand it and use it for basic game making.
AGs? Do you have a URL I could ifnd out more at?
Server error: user 'Jake' not found

User avatar
DaFool
Lemma-Class Veteran
Posts: 4171
Joined: Tue Aug 01, 2006 12:39 pm
Contact:

#13 Post by DaFool »

The only thing that's hard for me with this project is the .NET2 requirement. I don't know but for me I had a bad experience installing .NET1 and found installing gtk, java sdk far easier. I don't do automatic updates btw.

But otherwise I'm really rooting for this project and hope a standalone package might be feasible. In my opinion, those who had to deal with hassles installing libraries are more or less competent enough to script Ren'Py by hand without a GUI, so that's my worry.

Azure
Regular
Posts: 29
Joined: Thu Dec 07, 2006 8:34 am
Contact:

#14 Post by Azure »

Wow I typed that badly, sorry :lol:
AGS= adventure game studio it's for point clicks mainly , so has basics stuff like variables, inventory, dialogue , conversations, all built in so a non coder can do the basics with very little work.
http://www.adventuregamestudio.co.uk .


I hope it's OK I've enclosed the file your programe saved, so you can take a look.
Attachments
monkey.zip
This is the script I was messing about with, excuse the art I just grabbed this first thing I had XD
(191.19 KiB) Downloaded 83 times

Jake
Support Hero
Posts: 3826
Joined: Sat Jun 17, 2006 7:28 pm
Contact:

#15 Post by Jake »

DaFool wrote:The only thing that's hard for me with this project is the .NET2 requirement. I don't know but for me I had a bad experience installing .NET1 and found installing gtk, java sdk far easier. I don't do automatic updates btw.
Unfortunately, I'm a C# programmer by trade, and there are some things about Java that wind me up (as a whole, it's quite prescriptivist) and I don't know the UI libraries at all well, so it would probably take me five times as long and involve more swearing and giving up to do the same thing on that platform, as much as that would be more actually-cross-platform. (Which reminds me, I'll have to look into Mono again one of these days...)

That, and I always find GTK apps look really ugly under Windows. Something to do with the layout method, IIRC. :/
DaFool wrote: But otherwise I'm really rooting for this project and hope a standalone package might be feasible.
Well, if by 'standalone' you mean "~50-60 MB package which also installs .NET1&2 to your system at the same time", then yeah, I think so... ;-)

I know that some people do have problems, but the only time I've seen any myself with installing .NET it was on a development machine that had had quite a lot of manual registry-fiddling and the like performed on it. Given the number of things out there that do run on .NET, I hope it's reasonable to assume that most people running XP will at least have .NET1, and be in a position to easily upgrade, even if they're not on auto-updates and already have it installed. I know my mother has a .NET2-capable system, which is the benchmark I usually go by!

Anyway, in a year's time everyone will have Vista which comes with it out of the box... right? Because everyone's going to upgrade, right? ;-)
Azure wrote: I hope it's OK I've enclosed the file your programe saved, so you can take a look.
Cool, thanks - I'll have a look at it as soon as I get home!

(And check out that AGS thing, for that matter...)
Server error: user 'Jake' not found

Post Reply

Who is online

Users browsing this forum: Baidu [Spider], Google [Bot], Jackkel Dragon