Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/dark0dave/post_infinity

Reads BGEE, BG2EE files from the command line
https://github.com/dark0dave/post_infinity

bg1ee bg2ee eet infinity-engine modding-tools rust weidu

Last synced: about 2 months ago
JSON representation

Reads BGEE, BG2EE files from the command line

Awesome Lists containing this project

README

        

# Post Infinity
[![](./docs/rust.svg)](https://www.rust-lang.org/tools/install)
[![](https://img.shields.io/badge/Linux-FCC624?style=for-the-badge&logo=linux&logoColor=black)](https://github.com/dark0dave/post_infinity/releases/latest)
[![](https://img.shields.io/badge/Windows-0078D6?&style=for-the-badge&logoColor=white&logo=git-for-windows)](https://github.com/dark0dave/post_infinity/releases/latest)
[![](https://img.shields.io/badge/mac%20os-grey?style=for-the-badge&logo=apple&logoColor=white)](https://github.com/dark0dave/post_infinity/releases/latest)
[![](https://img.shields.io/github/actions/workflow/status/dark0dave/post_infinity/main.yaml?style=for-the-badge)](https://github.com/dark0dave/post_infinity/actions/workflows/main.yaml)
[![](https://img.shields.io/github/license/dark0dave/post_infinity?style=for-the-badge)](./LICENSE)

This tool can read infinity engine binary game files for BGEE and BG2EE. Similar to NearInfinity. It prints the binary game data files into human readable text. With optional json output.

### Supported files

Taken from [infinity file formats](https://gibberlings3.github.io/iesdp/file_formats/index.htm) on the iesdp.

- [area](https://gibberlings3.github.io/iesdp/file_formats/ie_formats/are_v1.htm)
- [biff](https://gibberlings3.github.io/iesdp/file_formats/ie_formats/bif_v1.htm)
- [character](https://gibberlings3.github.io/iesdp/file_formats/ie_formats/chr_v2.htm)
- [creature](https://gibberlings3.github.io/iesdp/file_formats/ie_formats/cre_v1.htm)
- [dialogue](https://gibberlings3.github.io/iesdp/file_formats/ie_formats/dlg_v1.htm)
- [effect_v1](https://gibberlings3.github.io/iesdp/file_formats/ie_formats/eff_v1.htm#effv1_Header)
- [effect_v2](https://gibberlings3.github.io/iesdp/file_formats/ie_formats/eff_v2.htm)
- [game](https://gibberlings3.github.io/iesdp/file_formats/ie_formats/gam_v2.0.htm)
- [ids](https://gibberlings3.github.io/iesdp/file_formats/ie_formats/ids.htm)
- [item_table](https://gibberlings3.github.io/iesdp/file_formats/ie_formats/cre_v1.htm#CREV1_0_Item)
- [item](https://gibberlings3.github.io/iesdp/file_formats/ie_formats/itm_v1.htm)
- [key](https://gibberlings3.github.io/iesdp/file_formats/ie_formats/key_v1.htm)
- [save](https://gibberlings3.github.io/iesdp/file_formats/ie_formats/sav_v1.htm)
- [spell_table](https://gibberlings3.github.io/iesdp/file_formats/ie_formats/cre_v1.htm#CREV1_0_KnownSpell)
- [spell](https://gibberlings3.github.io/iesdp/file_formats/ie_formats/spl_v1.htm)
- [store](https://gibberlings3.github.io/iesdp/file_formats/ie_formats/sto_v1.htm)
- [tlk](https://gibberlings3.github.io/iesdp/file_formats/ie_formats/tlk_v1.htm)
- [twoda](https://gibberlings3.github.io/iesdp/file_formats/ie_formats/2da.htm)
- [world_map](https://gibberlings3.github.io/iesdp/file_formats/ie_formats/wmap_v1.htm#wmapv1_0_Header)

### Other Supported files

- .bio files - Text format Baldur's Gate 2 only, Character biography
- embedded tileset files - Binary data for tilesets in maps can be viewed

## Dependencies

[Rust](https://www.rust-lang.org/tools/install)

## How to run me

Ensure rust is installed via rustup

```sh
cargo run / or target file
```

## Demo

![](./docs/demo.gif)

```sh
post_infinity(.exe) models/fixtures/gate1.spl
{
"signature": "SPL ",
"version": "V1 ",
"unidentified_spell_name": 14260,
"identified_spell_name": 9999999,
"completion_sound": "CAS_M03\u0000",
"flags": 0,
"spell_type": 1,
"exclusion_flags": 0,
"casting_graphics": 18,
"min_level": 0,
"primary_spell_school": 2,
"min_strength": 0,
"secondary_spell_school": 6,
"min_strength_bonus": 0,
"kit_usability_1": 0,
"min_intelligence": 0,
"kit_usability_2": 0,
"min_dexterity": 0,
"kit_usability_3": 0,
"min_wisdom": 0,
"kit_usability_4": 0,
"min_constitution": 0,
"min_charisma": 0,
"spell_level": 9,
"max_stackable": 1,
"spell_book_icon": "SPWI905C",
"lore": 0,
"ground_icon": "\u0000\u0000rb\u0000\u0000Un",
"base_weight": 0,
"spell_description_generic": 4294967295,
"spell_description_identified": 9999999,
"description_icon": "",
"enchantment": 0,
"offset_to_extended_headers": 114,
"count_of_extended_headers": 1,
"offset_to_feature_block_table": 154,
"offset_to_casting_feature_blocks": 0,
"count_of_casting_feature_blocks": 0,
"extended_headers": [
{
"spell_form": 1,
"friendly": 0,
"location": 2,
"memorised_icon": "SPWI905B",
"target_type": 4,
"target_count": 0,
"range": 25,
"level_required": 1,
"casting_time": 4,
"times_per_day": 0,
"dice_sides": 6,
"dice_thrown": 0,
"enchanted": 0,
"damage_type": 1,
"count_of_feature_blocks": 1,
"offset_to_feature_blocks": 0,
"charges": 1,
"charge_depletion_behaviour": 1,
"projectile": 1
}
],
"equipping_feature_blocks": [
{
"opcode_number": 177,
"target_type": 1,
"power": 9,
"parameter_1": 0,
"parameter_2": 2,
"timing_mode": 0,
"dispel_resistance": 2,
"duration": 100000,
"probability_1": 39,
"probability_2": 0,
"resource": "balorsu\u0000",
"dice_thrown_max_level": 0,
"dice_sides_min_level": 0,
"saving_throw_type": [
0,
0,
0,
0
],
"saving_throw_bonus": 0,
"stacking_id": 0
}
]
}
```

## How to build

```sh
cargo build --release
```

## Performance

It takes about 0.07 ish to read all the supported files in an unmodded bg1ee game, into memory, without parsing them.

```sh
time cargo run -- /chitin.key
0.07s user 0.58s system 99% cpu 0.655 total
```

you can analyze performance:

```sh
cargo install flamegraph
flamegraph -- target/release/post_infinity
```