Any editor options for the Mac?

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
User avatar
Darth Kiki
Newbie
Posts: 9
Joined: Sat Aug 25, 2007 1:47 pm

Any editor options for the Mac?

#1 Post by Darth Kiki » Sat Aug 25, 2007 1:59 pm

For a while now I've kinda felt like Mac users of Ren'Py are second class citizens because SciTE, the text editor that comes with Ren'Py and aids in creating one's own games, runs fine on Windows or Linux but has no OS X version. I'm posting in hopes of changing that, and/or learning something new, such as the existence of an alternative solution.

The syntax highlighting and so forth are very useful features, in fact I practically require them to be able to write in an organized fashion, and while I have a Windows machine that I can access sometimes to work from, my main platform is Mac OS and I'd love to have some way to edit files "in color" and preferably integrated with the Ren'Py launcher program.

Is a port of the existing editor possible? Alternatively, can a popular Mac editor such as TextMate be given the parameters to understand how to read Ren'Py files?

I believe TextMate uses regular expressions and a simple scripting language to dictate what colors go where and how tab completion should work for each language it can edit, so while working with strings of regexp directives is totally beyond my comprehension level, perhaps someone else would be willing to help out here.

If anyone has any suggestions or solutions that they themselves have used and would recommend (other than Virtual PC or VMware or the like), I'd appreciate hearing them. In my humblest opinion it's high time that some of the basic features of Ren'Py game creation and the Ren'Py Launcher worked correctly on Macs. ^^;;

User avatar
rocket
Veteran
Posts: 373
Joined: Tue Jul 10, 2007 2:54 am
Projects: Starlight Ep0, Ep1
Location: San Fransisco
Contact:

Re: Any editor options for the Mac?

#2 Post by rocket » Sat Aug 25, 2007 2:49 pm

I've been using BBEdit, mostly just cause it does tab expansion and has nice invisible char showing/hiding and a nice marker system.

I know it has highlighting for HTML and some other languages so I bet there's a python syntax module somewhere that we could hack up... been to lazy to find it myself. It's a great editor though a bit pricey if you've never bought a previous version (I've been upgrading since like 1980 so this latest update was a piddly $30ish for me).

User avatar
Free Time Machine
Regular
Posts: 42
Joined: Fri Jun 15, 2007 9:45 am
Location: Philly, USA
Contact:

Re: Any editor options for the Mac?

#3 Post by Free Time Machine » Sat Aug 25, 2007 3:25 pm

I use Smultron! It comes with Python syntax definition from which it's very easy to make a Ren'py one. I did have it crash once or twice, though, but I'm willing to deal with it because it's got all the features I want.
"HOLD ON TIGHT" ~ Outfits and expressions, where art thou? And why does Elsa's face look so awful??? *bangs head in*

Everytime you delete a traceback, someone else gets it. -PyTom

User avatar
PyTom
Ren'Py Creator
Posts: 15436
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: Any editor options for the Mac?

#4 Post by PyTom » Sat Aug 25, 2007 4:18 pm

IIRC, smultron is decent, and IIRC someone wrote up a Ren'Py syntax definition. The only reason why I don't ship it by default is that it's a little too big to include. SciTE is < 1MB, by comparison.

The launcher should use whatever text editor is registered with Launch Services.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

User avatar
Darth Kiki
Newbie
Posts: 9
Joined: Sat Aug 25, 2007 1:47 pm

Re: Any editor options for the Mac?

#5 Post by Darth Kiki » Sat Aug 25, 2007 4:22 pm

I've tried BBEdit, but I moved from that to SubEthaEdit, and then to TextMate eventually. All my PHP coder friends seem to like TextMate the best. *smile smile*

This Smultron app looks cool. The best part of it, of course, is that it seems to be open source. You wouldn't happen to have a set of Ren'Py definitions that you've made for it, would you? At this point I'd be willing to switch editors, if someone's already got syntax definitions written for an editor.

If anyone's actually got a definition file sitting around on their hard drive for their favorite editor, I'm officially requesting a copy. :)

I'd also absolutely love it if we as Mac users could decide on an editor and work out a way to have it packaged with Ren'Py itself. That would be my ultimate goal -- to have the Ren'Py Launcher load a decent editor when you click Edit Script. :D

User avatar
Darth Kiki
Newbie
Posts: 9
Joined: Sat Aug 25, 2007 1:47 pm

Re: Any editor options for the Mac?

#6 Post by Darth Kiki » Sat Aug 25, 2007 4:25 pm

PyTom - thanks for the quick reply! I did a quick Google search and found a thread linking back to the forum here:

http://lemmasoft.renai.us/forums/viewto ... f=8&t=2053

It contains a link to the editor, third post from the bottom (scroll down). So, I've got my answer now. :) Perhaps we could put a sticky or something in the Wiki about this? Including that Launch Services bit.

User avatar
PyTom
Ren'Py Creator
Posts: 15436
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: Any editor options for the Mac?

#7 Post by PyTom » Sat Aug 25, 2007 4:40 pm

Sure, feel free to edit the wiki to include this.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

User avatar
Darth Kiki
Newbie
Posts: 9
Joined: Sat Aug 25, 2007 1:47 pm

Re: Any editor options for the Mac?

#8 Post by Darth Kiki » Sat Aug 25, 2007 5:01 pm

Cool, I'll edit it when I have a while to write up a worthy tutorial - unless someone beats me to it. :)

One question, though.. how would I go about changing the editor that automatically loads from the launcher? I've been googling about LaunchServices and I'm kinda lost. ^^; I've done Get Info on files with the .rpy extension and made it so that they'll all open with Smultron when double-clicked, but it hasn't affected the launcher.

Double-clicking the files loads Smultron, but going into Ren'Py Launcher and clicking Edit Script still loads TextEdit. Any ideas on how to fix that? I've been poking around in the launcher's code, but I'm not having much luck since I'm not sure what I'm looking for.

User avatar
NetGenSuperstar
Regular
Posts: 113
Joined: Sun Oct 08, 2006 1:29 am
Location: BEHIND YOU!!!
Contact:

Re: Any editor options for the Mac?

#9 Post by NetGenSuperstar » Sat Aug 25, 2007 9:04 pm

Darth Kiki wrote:One question, though.. how would I go about changing the editor that automatically loads from the launcher?
Try this:
  • 1. Go to "<Ren'Py Folder>/data/" and open the file "editor.rpy"

    2. Find line 21. It should say:

    Code: Select all

    config.editor = "open -t '%(allfiles)s'"
    3. Replace it with this line:

    Code: Select all

    config.editor = "open /Applications/Smultron.app '%(allfiles)s'"
    Make sure you replace "/Applications/" with the path to which you saved Smultron.app.

    4. Save the file and quit Smultron.
If all went well, Ren'Py should now use Smultron to open. I don't know why it currently doesn't, but this works for now. Just be careful when upgrading Ren'Py; these changes will be lost if you replace the file.

User avatar
Darth Kiki
Newbie
Posts: 9
Joined: Sat Aug 25, 2007 1:47 pm

Re: Any editor options for the Mac?

#10 Post by Darth Kiki » Sat Aug 25, 2007 11:08 pm

Thanks for the tip! It works perfectly. <3 I think that's basically all the information needed to compile a tutorial. I could include little screenshots, too.. *gets evil ideas*

At any rate, I couldn't help but notice that you're the one who originally uploaded the patched application to begin with, and I also noticed that the version of Smultron used is version 2.2.7 when there is a version 3.1.2 available.

Have you had any luck outfitting the latest version for Ren'Py use? If so, would you be willing to upload that? Also, if you still have the modified source code, would you be willing to send that to me and/or upload it somewhere? I'm pretty sure I could use some command-line knowledge to get an easily-installable patch created and uploaded, which was something Tom was asking about in the original forum thread.

At the very least, having access to your modifications would allow for new versions to be manually updated by myself and other willing individuals. ^^


Edit: After messing around, I found that updating version 3.1.2 of Smultron to include the patches in the old version was quite trivial. Providing a method to upgrade all new versions of Smultron to have Ren'Py support as soon as they're released should be pretty easy.

A compiled tutorial will be provided ASAP, including information on self-patching. For now, though, please accept my upload of the latest version of the program as a stopgap measure.

Tabbed editing doesn't seem to be enabled by default, by the way, so you need to go to the View menu and turn it on if you're editing multiple documents at once.
Attachments
SmultronNew.zip
(4.11 MiB) Downloaded 123 times

User avatar
rocket
Veteran
Posts: 373
Joined: Tue Jul 10, 2007 2:54 am
Projects: Starlight Ep0, Ep1
Location: San Fransisco
Contact:

Re: Any editor options for the Mac?

#11 Post by rocket » Sun Aug 26, 2007 1:35 pm

Argh...

Must... resist... temptation to try new editor until Starlight Script Re-write is finished...

User avatar
rocket
Veteran
Posts: 373
Joined: Tue Jul 10, 2007 2:54 am
Projects: Starlight Ep0, Ep1
Location: San Fransisco
Contact:

Re: Any editor options for the Mac?

#12 Post by rocket » Sat Sep 29, 2007 5:01 pm

Wah! I tried it (loved Smultron), but the change to make RenPy auto launch it didn't work. Any ideas? I followed the instructions exactly. RenPy thinks it opened the editor but nothing happens...

User avatar
rocket
Veteran
Posts: 373
Joined: Tue Jul 10, 2007 2:54 am
Projects: Starlight Ep0, Ep1
Location: San Fransisco
Contact:

Re: Any editor options for the Mac?

#13 Post by rocket » Sun Sep 30, 2007 11:23 am

On further exploration I must have a problem with defining the path for the app properly. When I change the line to:
config.editor = "open /Applications/Smultron.app '%(allfiles)s'"
It doesn't work.

When I do:
config.editor = "open /Applications/TextEdit.app '%(allfiles)s'"
Which is in the same directory as Smultron it still doesn't work.

However changing back to:
config.editor = "open -t '%(allfiles)s'"
Works fine...

Any ideas? The files are in the root /Applications directory, not the user apps, so I'm kinda stumped...

User avatar
Darth Kiki
Newbie
Posts: 9
Joined: Sat Aug 25, 2007 1:47 pm

Re: Any editor options for the Mac?

#14 Post by Darth Kiki » Sun Sep 30, 2007 1:06 pm

Hi hi! Just wanted to let you know that I'm still working on optimizing Smultron; Tom's said that once I've got a couple more things working it'll probably be included in with RenPy. Work is slow, but not hard - I just don't have much time for it. ^^;; That being said, I'm almost done. I've been digging through the source code, fixing and editing things, and it's been actually kinda fun. Just wanted to mention that so that people would know I'm not dead. ^^

Anyway, your error is pretty interesting to me because I haven't run into it myself and I'm not sure how to duplicate it. I'm really picking my brain here, and it's important that the problem gets solved because I don't want to ship out something that's not working right. ^^;

My first question would be, what version of Mac OS X and RenPy are you using? I'm always using the latest version of each, and I believe that some Mac bugs have gotten fixed by RenPy recently, so it strikes me that there could be a problem with older versions. If you need a certain version of RenPy for what you're working on, try downloading the latest and putting it into a separate folder and just using it once to test if Smultron loads after the configuration file's edited.

Secondly, I had an idea that might help to try. Try opening Terminal and typing out the path that you use for the editor to see if it runs. In other words, open up the command line and type "open /Applications/Blah.app" and see if TextEdit/Smultron loads. Does TextEdit load? If it does, then the problem lies with something in the RenPy configuration files. On the other hand, if typing basically the exact same thing into the command line *doesn't* work, then something's screwy with where your OS installation thinks the path is.

If none of the above leads to any conclusions, can you post your editor.rpy file up here as an attachment? Might shed some light on the subject.

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

Re: Any editor options for the Mac?

#15 Post by DaFool » Sun Sep 30, 2007 6:27 pm

When this is packaged for Ren'Py, it will really help Mac-compatible visual novels take off.

A bit off-topic, but something I'm wondering from the Mac users here, how on earth were you able to get exposure on Visual Novels? Considering that most commercial VNs are only for Windows, and I have a hard time believing most of the exposure came from multiplatform onscripter-based translations? Or do you usually run Windows emulation to play them?

Post Reply

Who is online

Users browsing this forum: Majestic-12 [Bot]