Giter Club home page Giter Club logo

sinner's Introduction

Schattenakte Readme

Animation.gif

This project is still work in progress. If you see something strange or something isn't working just write me! I am always eager to help, even for small things.

Schattenakte is an application to create NPCs for Shadowrun Pen&Paper. It uses GPT for NPCs description, and midjourney to create images. The image generation is a bit of manual labor currently, since there is no actual API.

The backend is Python based (Django), while the frontend uses React and Arwes (https://arwes.dev/).

Installation

Environment Variables

Invite a midjourney bot to your server: https://docs.midjourney.com/docs/invite-the-bot I recommend setting up a private channel to not disturb anyone.

Copy the .env.example to .env: cp .env.example .env.

Please set the env variables in the .env file:

ENV Variable Description
OPENAI_API_KEY Create and copy the api key from: https://platform.openai.com/account/api-keys
MJ_SERVER_ID Your Discord server ID (right click on server -> Copy ID)
MJ_CHANNEL_ID Your Discord channel ID (right click on channel -> Copy ID)
MJ_PRIVATE_DISCORD_TOKEN see https://linuxhint.com/get-discord-token/ how to get it
DJANGO_SECURE_KEY from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())
DJANGO_HOST localhost or your domain
DJANGO_PORT like, 8000 or 80

Frontend

Download and Install NPM: https://www.npmjs.com/

cd frontend
npm install

Then you can run it with npm start. If there is no Backend running, it will result in an error page. Look into frontend/README for further instructions.

Backend

Download and Install Python: https://www.python.org/

(if you installed the frontend previously, don't forget to go back into the project root, with cd ..)

pip install -r backend\requirements.txt
cd backend
python manage.py migrate
python manage.py runserver

It will create one npc and then start the flask backend server. However, at the moment the image won't be created. This is still WIP.

Costs

GPT-3.5 costs $0.002 / 1K tokens. One NPC call is around 1.3K tokens. Even with planned changes and additional features, it will be around 0.01$ per npc creation.

Midjourney costs 8$ for ca. 200 generations in the cheapest subscription plan. This means 0.04$ per NPC, but you can choose between 4 images.

In summary, it costs around 0.05$ per NPC creation.

I would like to add other AI image generators, so if you have experience with other AI image generators, please let me know. I have tried DALL-E 2, but the results are not suitable.

Docker

Creates a volume to store the current database (sqlite) and the images docker volume create sinner-data

use the dockerscript.sh to run everything.

sinner's People

Contributors

quantenradierer avatar

Stargazers

 avatar JoschkaSchulz avatar Anson avatar

Watchers

James Cloos avatar

Forkers

devzys

sinner's Issues

improve metatype images

STATUS QUO:
humans: perfect
dwarfs: good, sometimes it isn't a dwarf
elves: good, elven ears are missing or it's too medieval/fantasy inspired
orcs: too inconsistent, looks more from games
trolls: too inconsistent, no shadowrun trolls

edit NPCs

Allow users/adminstrators to edit or regenerate the NPC before publishing them

Run Creation

can create runs (for each NPC?)

relevant information:

  • job acceptance
  • what happened to the NPC
  • why he wants it to be done
  • how much is he going to pay? or what he will be pay
  • other significant people for this run
  • significant locations for this run
  • maybe some unexpected twist

remove banned words

IS: before using the image generator, the prompt is checked for banned word. If one is detected, no image will be generated
SHOULD BE: when an banned word is detected, remove it from the prompt and create a image anyway

Resonance / Magic

Add magic and resonance in the frontend.

main issue:

Some charactere are technomancer, but GPT gives them magic. Showing both is not good.

Check: does the same happen to magic users? like, does a shaman have resonance? If not, a custom check for technomancer would be enough.

Custom text not saved

Observed in Chrome 119.0.6045.200
After I let ChatGPT prefill the form fields, custom edits by the user are not saved upon clicking "Save and generate image".

image won't get loaded

IS: image is not shown after creation

SHOULD BE: autoload image when it has been create

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.