ChatVisualNovel - a fully customizable visual novel engine powered by ChatGPT. ChatVisualNovel —— 基于ChatGPT的定制化视觉小说引擎。
English | 简体中文
Online Demo: https://chatvisualnovel.com/
Genshin Impact Doujin: https://genshin.chatvisualnovel.com/
Ace Attorney Doujin: https://ace.chatvisualnovel.com/
Join us:
Follow these steps to deploy ChatVisualNovel on Vercel with a serverless MySQL database provided by Planetscale:
pscale auth login
.pscale password create <DATABASE_NAME> <BRANCH_NAME> <PASSWORD_NAME>
.npx prisma db push
.DATABASE_URL
to your Planetscale database URL.node scripts/gen-enc.js
and set it as ENC_KEY
.With these steps completed, your ChatVisualNovel will be deployed on Vercel with a Planetscale serverless MySQL database.
DATABASE_URL
in the .env
file.npm install
.node scripts/gen-enc.js
and configure it in the .env
file in the format ENC_KEY=***
. (Note: You can copy the .env
file from env.template)npm run dev
.{
"genres": string[], //(Required)(i18n) Genres, used in Prompt.
"player": { //(Optional) Player characters whose name will be generated by ChatGPT. Used only when there is no isPlayer: true in characters.
"images": {
[key: string]: string //(Required) Each key is a mood of the character. Can have any number of moods but there must be one named neutral. All possible moods of the first character will be used in Prompt for mood selection of all characters. Value is the URL to the image of corresponding mood.
},
"imageSettings": {
[key: string]: string //(Optional) CSS override to this character's image when displayed. Take highest priority.
}
},
"playerGender": string, //(Optional)(i18n) Gender of player, used in Prompt when there is no isPlayer: true in characters.
"girls": [{ //(Optional) Girl characters whose names will be generated by ChatGPT. Used only when there is no isPlayer: false in characters.
"images": {
[key: string]: string //(Required) Each key is a mood of the character. Can have any number of moods but there must be one named neutral. All possible moods of the first character will be used in Prompt for mood selection of all characters. Value is the URL to the image of corresponding mood.
},
"imageSettings": {
[key: string]: string //(Optional) CSS override to this character's image when displayed. Take highest priority.
}
}],
"characters": { //(Optional) Named characters.
[key: string]: { //(Required)(i18n) Character name, used in Prompt.
"isPlayer": boolean, //(Optional) When set to true, will be the player character. Please only set one character as isPlayer: true.
"images": {
[key: string]: string //(Required) Each key is a mood of the character. Can have any number of moods but there must be one named neutral. All possible moods of the first character will be used in Prompt for mood selection of all characters. Value is the URL to the image of corresponding mood.
},
"imageSettings": {
[key: string]: string //(Optional) CSS override to this character's image when displayed. Take highest priority.
}
}
},
"places": { //(Required) Location (Background).
[key: string]: { //(Required)(i18n) Each key is a location. There must be at least one location. All possible locations will be used in Prompt for location selection.
"image": string, //(Required) URL to the image of the location.
"bgm": string //(Optional) Background music of this location.
},
"imageSettings": { //(Optional) Global Character image settings (CSS).
[key: string]: string
},
"tts": { //(Optional) Online Text-to-speach service integration. Only basic GET is supported for now.
[key: string]: { //(Required) i18n locale, can set a default.
"method": string, //(Optional) GET or POST(not supported yet) or HuggingFaceSpace, defaults to GET.
"url": string, //(Required) API URL.
"params": { //(Optional) URL query param map. Required when method is GET.
"speaker": string, //(Required) Query param name for speaker.
"text": string, //(Required) Query param name for text(dialogue).
"additionalParams": string //(Optional) Additional parameters as a string.
},
"ws": { //(Optional) When method is HuggingFaceSpace, this is required.
url: string; //(Required) Hugging Face Space websocket URL.
data: string[]; //(Optional) Data payload schema. Each key name will be replaced by the corresponding value.
},
"voices": {
male: string[]; //(Optional) Collection of allowed male voice names.
female: string[]; //(Optional) Collection of allowed female voice names.
}
}
}
}
This code is distributed under the MIT license. See LICENSE in this directory.