Only the old renpy python version used to make a base like this.
Download and install python 2.7.10 (
https://www.python.org/downloads/release/python-2710/)
Copy:
C:\Program Files (x86)\Python\Python 2.7.10\Lib\sqlite3
C:\Program Files (x86)\Python\Python 2.7.10\DLLs\_sqlite3.pyd
C:\Program Files (x86)\Python\Python 2.7.10\DLLs\sqlite3.dll.
In the folder:
C:\Program Files (x86)\RenPy\renpy-*.**.**.*-sdk\lib\windows-i686\Lib
To check, add the following code to the beginning of script.py:
init:
python:
import sqlite3
conn = sqlite3.connect(config.basedir+'/example.db')
cur = conn.cursor()
cur.execute("insert into npc values ('snake', 'python')")
cur.execute("select npc_type, npc_name from npc where id='snake'")
result = cur.fetchone()
Example of working with Sqlite3:
cur.execute("select * from airlines limit 5;")
results = cur.fetchall()
print results
BerkeleyDB can be added in the same simple way:
Copy:
C:\Program Files (x86)\Python\Python 2.7.10\Lib\bsddb
C:\Program Files (x86)\Python\Python 2.7.10\DLLs\_bsddb.pyd.
In the folder:
C:\Program Files (x86)\RenPy\renpy-*.**.**.*-sdk\lib\windows-i686\Lib
To check, add the following code to the beginning of script.py:
init:
python:
import bsddb
db = bsddb.btopen(config.basedir+'/spam.db')
Example of working with BerkeleyDB:
db['player'] = '123'
print db