GithubHelp home page GithubHelp logo

eigenein / wotbreplay-parser Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 0.0 8.23 MB

World of Tanks Blitz replay parser

Home Page: https://lib.rs/crates/wotbreplay-parser

License: MIT License

Rust 100.00%
rust-crate world-of-tanks-blitz parser rust-library rust

wotbreplay-parser's Introduction

wotbreplay-parser

World of Tanks Blitz replay parser in Rust.

Crates.io Last commit GitHub Workflow Status License: MIT docs.rs

Quickstart

use std::fs::File;

use anyhow::Result;
use wotbreplay_parser::models::battle_results::TeamNumber;
use wotbreplay_parser::replay::Replay;

fn main() -> Result<()> {
    let battle_results = Replay::open(File::open("replays/20221203_player_results.wotbreplay")?)?.read_battle_results()?;

    assert_eq!(battle_results.timestamp_secs, 1670083956);
    assert_eq!(battle_results.players.len(), 14);

    assert_eq!(battle_results.players[0].account_id, 595693744);
    assert_eq!(battle_results.players[0].info.nickname, "yuranhik_hustriy26");
    assert_eq!(battle_results.players[0].info.team(), TeamNumber::One);
    assert_eq!(battle_results.players[0].info.platoon_id, Some(545104609));

    assert_eq!(battle_results.players[1].info.nickname, "SNAK_THE_RIPPER");
    assert_eq!(battle_results.players[1].info.team(), TeamNumber::Two);
    assert_eq!(battle_results.players[1].info.platoon_id, Some(273692628));

    Ok(())
}

wotbreplay-parser's People

Contributors

eigenein avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

wotbreplay-parser's Issues

[Question] Contents of data.wotreplay

Hi,

Your readme on the structure of the *.wotBreplay is very useful.

Have you've figured out the structure of the *.wotreplay yet?

I wonder if it is the same structure as the wotreplay. This tool, for example, seems to be designed for wotPC replays: https://github.com/evido/wotreplay-parser.

I'm trying to get positions of tanks for bulk data analysis. Another alternative I thought of is to record the screen and get the positions from the minimap using image processing. However, I'd only get high-level information.

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.