Elder Scrolls Plugin - Reading Bethesda's esp, esm and esl files
You just need to have Ruby installed.
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 uses a simple API that exposes the structure of an esp file as a tree of Riffola::Chunk
objects.
A Chunk object contains:
- A 4 bytes header
- An encoded data size (on 4 or 2 bytes)
- An optional header
- Data of the given encoded data size
Executing tests is done by:
- Cloning the repository from Github:
git clone https://github.com/Muriel-Salvan/elder_scrolls_plugin
cd elder_scrolls_plugin
- Installing dependencies
bundle install
- Running tests
bundle exec rspec
Like any Rubygem:
gem build elder_scrolls_plugin.gemspec
Please fork the repository from Github and submit Pull Requests. Any contribution is more than welcome! :D
We use SemVer for versioning.
- Muriel Salvan - Initial work - Muriel-Salvan
This project is licensed under the BSD License - see the LICENSE file for details