importing python into renpy

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.
Post Reply
Message
Author
User avatar
lovebby
Regular
Posts: 106
Joined: Mon Sep 09, 2013 12:24 am
Deviantart: lovebby
Contact:

importing python into renpy

#1 Post by lovebby »

Hello!
So I've started working with a group f developers where most of them do not know renpy, but python. I do not have an experience porting things over from python, and am having a little trouble understanding how to do it. I'm trying to understand before we start working on any serious code. Is there a specific method to do this?

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3794
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: importing python into renpy

#2 Post by Imperf3kt »

Just put it in a python init as far as I am aware:

Code: Select all

init python:
    # paste code indented 4 spaces
Or there's also just

Code: Select all

python:
    # same as above
The Ren'Py documentation likely has more accurate answers than I can give.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

User avatar
trooper6
Lemma-Class Veteran
Posts: 3712
Joined: Sat Jul 09, 2011 10:33 pm
Projects: A Close Shave
Location: Medford, MA
Contact:

Re: importing python into renpy

#3 Post by trooper6 »

Just remember that Ren'Py is based off of Python 2, not Python 3.
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978

Post Reply

Who is online

Users browsing this forum: Google [Bot], voluorem