Skip to content

Latest commit

 

History

History
34 lines (29 loc) · 1.7 KB

ReadMe.md

File metadata and controls

34 lines (29 loc) · 1.7 KB

Local Setup

DEPRECATION WARNING

OpenAI is deprecating the 3.5-turbo-0613 endponts in June 13, 2024. If I didn't remove this message by then that means I didn't get around to updating this to use the latest endpoint

Dependencies:

Running

  • place GAMEMASTER folder in steamapps/common/Barotrauma/LocalMods
  • make a copy of resources/secretTemplate.lua in the Lua folder
    • name it secret.lua
    • input your OpenAI API token
  • Open Barotrauma
  • Host a Server
    • When making the game there will be a dropdown for "Server executable" set this to "Lua for Barotrauma"
  • press F3 and feast your eyes upon the errors :)

Refrences

Contributing

  • If for some reason you want to contribute to this repo make a fork and put in a PR

Basic Overview

  • listener.lua uses Hooks to log whats happening in the game, and then, at a random interval will send these logs to GPT
  • actions.lua is where all the different abilities the Gamemaster has are defined
  • helpers.lua has a bunch of assorted utility functions
  • GPT.lua handles generating the prompts for GPT and making and processing API calls to OpenAI
  • json.lua is a handy little json parser that someone else made
  • You can edit the prompts sent to GPT by editing the prompt files in resources
    • I did not implement a sophisticated prompt selection solution out of laziness
    • Maybe you can make that