Giter VIP home page Giter VIP logo

genieutils's Introduction

genieutils

Genieutils is a library to work with data and asset files of Genie engine games (everything from AoE1 Alpha versions, via SWGB:CC to the Definitive Editions).

Notice that this library is in developement, that means the API will change. Please also backup your files before editing to avoid file corruption because of possible bugs.

This repo is originally a fork of https://github.com/Tapsa/genieutils, but because a lot of stuff doesn't like github forks, it is now a separate repo.

Features

  • reading/writing of empires*.dat and genie*.dat files
  • reading/writing of drs, slp, smp, smx, blendomatic, and pal files
  • reading/writing of scn, scx, cpx, bln, sin, wav files
  • reading/writing of language*.dll files

For a lot of stuff it is also possible to convert between different versions of the formats. The only version conversion that has a tool (i. e. you don't need to write code) is the .dat files, though. For e. g. graphics you will have to hook together the SLP and ICM classes yourself with a couple of lines of C++.

Also includes several extra tools.

Command line tools

  • cpxtool: command line tool to work with campaign and scenario files (view details and extract).
  • genie-datextract: convert .dat files between game versions, or just extract to raw.
  • drstool: list and/or extract contents from .drs files (graphics, sound, etc.)
  • pcriotool: list or show a single string from the language DLLs.
  • genie-bindiff: very simple binary differ (mostly for debugging, better to use dhex if you need something serious).

Graphical tools (requires Qt)

  • picviewer: display SLP/SMP/SMX files.
  • drsexplorer: browse and show SLP/SMP/SMX graphics in a DRS archive.

Dependencies

  • A modern C++ Compiler (i. e. supports C++17)

This assumes that you do a recursive clone of the repo or remember to update the submodules, otherwise you need to install zstr, and winiconv when building for Windows.

You can update submodules after cloning the repo or pulling new commits by doing:

git submodule update --init --recursive

Building

The build uses CMake.

mkdir build && cd build
cmake ..
cmake --build .

This creates a genieutils.dll or libgenieutils.so file.

To create a static library instead, use the GENIEUTILS_STATIC_BUILD flag:

cmake .. -DGENIEUTILS_STATIC_BUILD=YES
cmake --build .

Optionally, enable link-time optimization:

cmake .. -DCMAKE_BUILD_TYPE=Release -DENABLE_IPO=YES
cmake --build .

TODO

File formats used in Genie that are not supported (yet):

  • MP3 files, used for in-game music.
    • I recommend using something like miniaudio's implementation if you need it, it's used in freeaoe and works fine with the genie games' music.
  • MIDI files, also used for in-game music.
  • AVI videos, used for intro videos etc.
    • All the games (pre-DE at least) seem to use plain avi files with indeo41, with the same bit depth etc. and the scummvm implementation should work. So it's just a matter of porting it over.
    • According to Folkert van Verseveld (the author of the aoe project, ffmpeg's indeo41 implementation introduces jitter, so just using that is probably out of the window.
    • Started on in the martin/video branch in freeaoe, I'll probably throw it in genieutils when it gets finished and I manage to implement write support (don't like read-only stuff in genieutils).
  • AI scripts.
  • PNG Files, used by HD and later for e. g. terrains.
    • Bring your own, everything ships with PNG support these days.
  • RMS (random map) files.

In progress (i. e. started on importing code from elsewhere and got bored):

  • DDS files, used by DE games for e. g. terrain textures, started in the martin/dds branch.
  • wwise wav files, used by the DE games, started in the martin/wwise branch.
  • Recorded games, started in the martin/mgx branch.
  • LZ4, which the DE games have started using, lives in src/file/LZ4.cpp but not used.
  • CAB support, to be able to e. g. load the data directly from the installer for the trial versions without manual unpacking. Lives in src/file/CabFile.cpp, but got bored of fixing LZX support.

genieutils's People

Contributors

apreiml avatar goto-bus-stop avatar mic-e avatar sandsmark avatar tapsa avatar teaalltr avatar withmorten avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

genieutils's Issues

Outdated CMake requirements

This line should be updated to 3.13 or newer:

cmake_minimum_required(VERSION 3.9)

cmake_policy(SET CMP0077 NEW)

This policy was introduced in CMake version 3.13.

EDIT: I assume this is a follow-up issue caused by the outdated cmake version (3.10.2):

CMake Error at CMakeLists.txt:237 (target_link_libraries):
  Object library target "genieutils_common" may not link to anything.

What is the genie .dat made of.

Hello, thank you for the updates, had AGE3 compiled on ubuntu :) (GUI opens, altough coredumps when opening the empire.dat after what seems like reading a good chunk).
I managed to compile it only once with your forks though, you seem to have a hard time with those horrible git submodules ...
Dropped the effort of compiling on windows after trials with msys2, almost there but cmake + wxwidgets + msys2 is a pain.

Found the bundled AGE3 from Tapsa with AoE2DE from steam : wouldn't it be nice to be able to export the hole .dat in human-readable form?

What is the .dat made of?
I fiddled with this stub decompression, I get a few readable strings, but 99% garbage.

macos support

currently won't build on macos because for some reason apple doesn't ship with a compiler with (proper) c++17 support.

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.