Is there a place where the available python modules(?) that are already included in Renpy are listed?
specifically I was wondering if I could use import math to use the math functions?
I tried to google an answer but I couldn't find one that explained it in a way that I understood > < (i tried looking through the renpy directories but couldn't figure that out either)
import math
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.
Re: import math
I think math is in the package from the start, try:
And then something that you want to test out in the main script.
Code: Select all
init -1 python:
import math
- Remix
- Eileen-Class Veteran
- Posts: 1628
- Joined: Tue May 30, 2017 6:10 am
- Completed: None... yet (as I'm still looking for an artist)
- Projects: An un-named anime based trainer game
- Contact:
Re: import math
renpy-version}-source/renpy/bootstrap.py list the common included import'ables...
import datetime; datetime
import encodings.ascii; encodings.ascii
import encodings.utf_8; encodings.utf_8
import encodings.zlib_codec; encodings.zlib_codec
import encodings.unicode_escape; encodings.unicode_escape
import encodings.string_escape; encodings.string_escape
import encodings.raw_unicode_escape; encodings.raw_unicode_escape
import encodings.mbcs; encodings.mbcs
import encodings.utf_16; encodings.utf_16
import encodings.utf_16_be; encodings.utf_16_be
import encodings.utf_16_le; encodings.utf_16_le
import encodings.utf_32_be; encodings.utf_32_be
import encodings.latin_1; encodings.latin_1
import encodings.hex_codec; encodings.hex_codec
import encodings.base64_codec; encodings.base64_codec
import encodings.idna; encodings.idna
#
import math; math
#
import glob; glob
import pickle; pickle
import difflib; difflib
import shutil; shutil
import tarfile; tarfile
import bz2; bz2 # @UnresolvedImport
import webbrowser; webbrowser
import posixpath; posixpath
import ctypes; ctypes
import ctypes.wintypes; ctypes.wintypes
import argparse; argparse
import compiler; compiler
import textwrap; textwrap
import copy; copy
import urllib; urllib
import urllib2; urllib2
import codecs; codecs
import rsa; rsa
import decimal; decimal
import plistlib; plistlib
import _renpysteam; _renpysteam
import compileall; compileall
As Alem alludes though, you still need to import ones you want into any file that uses it
import datetime; datetime
import encodings.ascii; encodings.ascii
import encodings.utf_8; encodings.utf_8
import encodings.zlib_codec; encodings.zlib_codec
import encodings.unicode_escape; encodings.unicode_escape
import encodings.string_escape; encodings.string_escape
import encodings.raw_unicode_escape; encodings.raw_unicode_escape
import encodings.mbcs; encodings.mbcs
import encodings.utf_16; encodings.utf_16
import encodings.utf_16_be; encodings.utf_16_be
import encodings.utf_16_le; encodings.utf_16_le
import encodings.utf_32_be; encodings.utf_32_be
import encodings.latin_1; encodings.latin_1
import encodings.hex_codec; encodings.hex_codec
import encodings.base64_codec; encodings.base64_codec
import encodings.idna; encodings.idna
#
import math; math
#
import glob; glob
import pickle; pickle
import difflib; difflib
import shutil; shutil
import tarfile; tarfile
import bz2; bz2 # @UnresolvedImport
import webbrowser; webbrowser
import posixpath; posixpath
import ctypes; ctypes
import ctypes.wintypes; ctypes.wintypes
import argparse; argparse
import compiler; compiler
import textwrap; textwrap
import copy; copy
import urllib; urllib
import urllib2; urllib2
import codecs; codecs
import rsa; rsa
import decimal; decimal
import plistlib; plistlib
import _renpysteam; _renpysteam
import compileall; compileall
As Alem alludes though, you still need to import ones you want into any file that uses it
Frameworks & Scriptlets:
- Speech Bubble dialogue system
- Multiple Notify with ATL and history
- (WIP) Radial Masking - needs updating to use Shader
- 7.4 - Smooth Tinting using ATL and matrixcolor
- Several other repositories there too
Who is online
Users browsing this forum: AWizardWithWords, Ocelot, piinkpuddiin