Giter Club home page Giter Club logo

rainbowsixfileconverters's Introduction

RainbowSixFileConverters

These collection of python scripts will allow you to extract data from Rainbow Six, Eagle Watch and Rogue Spear.

CodeFactor mypy

Discord

If you'd like to follow this project or help out, please join the discord channel at https://discord.gg/YygR4S8

Discussions of other projects related to older RSE games is also welcome.

Wiki

Currently the wiki is being filled out with information, make sure to check here for additional info. https://github.com/boristsr/RainbowSixFileConverters/wiki

Packages

This project consists of several python packages.

  • RainbowFileReaders - This package is dedicated to reading the Files from Rainbow Six, Rogue Spear and other Red Storm Entertainment games.
  • FileUtilities - This package consists of a few utility classes which are used in RainbowFileReaders
  • BlenderImporters - This package uses RainbowFileReaders to read files and then imports the data to Blender. Blender specific code resides here.

Requirements

RainbowFileReaders

  • Python 3.6 & newer
  • Pillow 5.0 is required for the RSB conversion utility

BlenderImporters

  • Blender 2.8

Notes on file formats and code

In almost all of the converters there are several fields which are unknown. These are stored in the classes as well as in the accompanying JSON files, and are labelled in ascending order, such as "unknown1". I've tried to account for later versions of the files even though i'm not focusing on those versions for this project, so these field names/numbers will still be taken into account.

For the avoidance of confusion, the shorthand abreviations and prefixes that are used in code are:

  • RSE - Red Storm Entertainment, shared data structures, or datastructures that can be conformed easily with a few variations between versions
  • R6 - Rainbow Six, Eagle Watch. The first game and mission pack in the series
  • RS - Rogue Spear, Urban Operations, (possibly Covert Ops Essentials). The second game in the series.

There are also prefixes for specific formats, like SOB, MAP, etc. These match the file extension of the file types that these datastructures appear in.

If a datastructure is specific to game version, but used in many files, it will contain a game prefix. If it's specific to a file type, it will contain a type prefix. If it is specific to a game and filetype, it will contain both.

[GamePrefix][FiletypePrefix]DataStructure

Status of specific formats

Please refer to the wiki

Usage

Commandline

I highly recommend the use of virtualenvwrapper.

Currently the gamepath is defined in settings.json. Most of the tools should reference this.

paths = []
paths.append("../Data/Test")

To setup the environment and run the scripts, run the following commands

mkvirtualenv -p python3 rainbow
workon rainbow
pip install pillow
python RSBtoPNGConverter.py
python SOBtoOBJConverter.py

List of provided commandline tools

  • MapConverter.py - Reads all maps and writes a plain text JSON to show the data in the file. Useful for learning the structure of maps.
  • RSBPNGCacheGenerator.py - Converts all RSBs to PNGs, with the suffix .CACHE.PNG. References the relevant CXP files to apply the alpha key. Single Threaded.
  • RSBtoPNGConverter.py - Converts all RSBs to PNGs. Does not reference CXP file, so no alpha keys are converted. Writes meta data to a JSON file beside the PNG. Uses multiprocessing.
  • SOBtoOBJConverter.py - Converts SOB files to OBJ files. OBJ doesn't support all data, so some data is lost in the process.
  • gameLoadTest.py - Uses RSEGameLoader to load a game and list missions. Will be expanded to test loading mods as well.

Blender Usage

Coming soon. It's a bit hacky at the moment and the tools need a bit of love as Unreal has been the focus recently. If you would like some help with these, please file an issue or jump on discord and I'll help you out.

Special Thanks

This project is made much easier thanks to the information published by Alexander Evdokimov (https://github.com/AlexKimov), at https://github.com/AlexKimov/RSE-file-formats.

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.