A library to handle the 3D data format XBF from the game Emperor: Battle for Dune.
Project description
xanlib
xanlib is a Python library built to handle the 3D data format XBF of the Xanadu engine, used in the game Emperor: Battle for Dune.
It may be used to load and save all 1521 XBF files from the game.
Examples
Console Usage
The following commands entered into a python console will edit the sidebar to move it to the left:
from xanlib import load_xbf, save_xbf
scene = load_xbf('Data/UI0001/SIDEBAR/SIDEBAR1.XBF')
scene['~~0hide#'].transform = tuple(v - 100 if i == 12 else v for i, v in enumerate(scene['~~0hide#'].transform))
save_xbf(scene, 'Output/SIDEBAR1.XBF')
Explanation:
- Import the load and save functions
- Load the sidebar file
- Subtract 100 from the x-coordinate of the translation component of the transformation matrix. It is a flat tuple in column-major order, thus need to modify the element at index 12. Because it is a tuple, it has to be entirely replaced.
- Save to a new file.
Put the new file in a UI/SIDEBAR folder in the game's DATA folder to override the original and view the change in-game.
blender_import.py
A script that can be run within Blender to import the meshes of a XBF file.
xbf_viewer.py
A rudimentary vertex animation viewer made with pygame
. It highlights the normals in these animations.
(A more functional viewer is under development)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file xanlib-0.1.0.tar.gz
.
File metadata
- Download URL: xanlib-0.1.0.tar.gz
- Upload date:
- Size: 6.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.13.0 Linux/5.15.0-124-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d13a6b422992407a1817fb7836ce048227daec2c4887f38feba6c4bee8b9544 |
|
MD5 | 3bc30efa215c6879458636e2154a026c |
|
BLAKE2b-256 | 502dbcde43695e4dccf0c9b810ad58e33e8ace671c5dd0bc65a0d4619e8d7a19 |
File details
Details for the file xanlib-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: xanlib-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.13.0 Linux/5.15.0-124-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 36dabc91ccd306d3d624d895ee4456c64982289ab323fa0d110624c0963c0a20 |
|
MD5 | eed1d43f77a953f876068dc4ed8f46c1 |
|
BLAKE2b-256 | 1a9a09e68e8f2ec3b87e7187550723d07efb0f9ca5e1df0b47efbef0d4788dac |