Giter Club home page Giter Club logo

anoxbot's Introduction

AnoxBot

Mastodon bot posting quotes from Anachronox. The script to post quotes is quite simple, see anoxbot.py. The actual complexity is in creating the quote database.

This script is repsonsible for the quotes posted at https://botsin.space/@anachronox

Generating the quote database

The quotes are extracted from decompiled APE (Anachronox Programming Language) files.

To get the decompiled APE files you must first extract the APE files from the gameflow.dat file, follewed by extracting the newer APE files from the anox1.zip in the game data directory, and finally followed by the newer APE files in the game data's subdirectory gameflow.

Extracting the DAT files can be done with the DATExtract tool available on: https://anachrodox.talonbrave.info/

Decompiling the APE files is done with the modding tools on: https://code.google.com/archive/p/anachronox-modding/source/default/source

To create the quote database run the extract-quotes.py with the files you process.

The extract-quotes.py script partially parses the APE source files to construct dialogs as they could appear in the game. Many of the dialogs have variable conditions, the script takes a best effort to take these into account. Luckily the developers did not create too complex and overlapping conditions in the dialog. And various variable substitutions could be fixed with a simple lookup table.

Subtitles

The extract-quotes.py script makes a distinciton between plain quotes, and subtitles. The latter are the subtitles in cinematics and are often fragments of a dialog.

The subtitle quotes are stored in a separate table for further processing.

To process the subtitles into quotes you need the script files (with .s extension). The assemble-subs.py script takes the script files to process as its input arguments and tried to assemble quotes based on the parsed .s files.

You will encouter a lot of errors concerning missing subtitles. These are probably not missing subtitles, the script is actually refering to "switch" sequences which are started.

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.