No release in over a year
Library reading Bethesda's plugins files (.esp, .esm and .esl) files. Provides a simple API to access plugins' data organized in chunks
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
 Dependencies

Development

Runtime

~> 2.4
~> 0.4
~> 0.0
 Project Readme

Elder Scrolls Plugin

Elder Scrolls Plugin - Reading Bethesda's esp, esm and esl files

Getting Started

Prerequisites

You just need to have Ruby installed.

Installing

ElderScrollsPlugin installs as any Rubygem, either using gem command or Bundler.

gem install elder_scrolls_plugin

Or using Bundler, add this in your Gemfile and issue bundle install.

gem 'elder_scrolls_plugin'

Once the gem is installed you can require its main library in your Ruby code and use its API:

require 'elder_scrolls_plugin'

my_esp = ElderScrollsPlugin.new 'my_file.esp'

The gem also comes with a nice executable that dumps various info about an esp file.

esp_dump my_file.esp

Here is the usage help of the esp_dump executable:

Usage: esp_dump [options] files
    -d, --debug                      Activate log debugs
    -f, --include-fields             Read the fields
    -j, --output-json                Output the tree of records as JSON
    -i, --diff                       Output a JSON of the differences between 2 esps. Requires 2 esps files to be given. Will display file2 - file1.
    -m, --output-masters             Output the masters list
    -o, --only-tes4                  Read only the TES4 header
    -r, --output-form-ids            Output the absolute form IDs
    -t, --output-tree                Output the tree of records
    -u, --output-unknown             Output unknown chunks

ElderScrollsPlugin API

ElderScrollsPlugin uses a simple API that exposes the structure of an esp file as a tree of Riffola::Chunk objects. A Chunk object contains:

  1. A 4 bytes header
  2. An encoded data size (on 4 or 2 bytes)
  3. An optional header
  4. Data of the given encoded data size

Running the tests

Executing tests is done by:

  1. Cloning the repository from Github:
git clone https://github.com/Muriel-Salvan/elder_scrolls_plugin
cd elder_scrolls_plugin
  1. Installing dependencies
bundle install
  1. Running tests
bundle exec rspec

Deployment

Like any Rubygem:

gem build elder_scrolls_plugin.gemspec

Contributing

Please fork the repository from Github and submit Pull Requests. Any contribution is more than welcome! :D

Versioning

We use SemVer for versioning.

Authors

License

This project is licensed under the BSD License - see the LICENSE file for details