w3g html5 中文手册,w3g · PyPI

这是一个用于读取Warcraft 3重播文件(*.w3g)的单模块包。W3G是自定义的二进制格式,文件小巧,但需要额外数据才能有意义地解析。此库提供元数据(地图、玩家等)和事件列表的访问,并计算如APM等指标。提供简单易用的API,示例代码展示了如何获取胜者和打印APM。该库也可在脚本模式下使用,打印整个游戏和统计信息。

This is a single module package that contains everything that is needed to

read in the Warcraft 3 replay file format *.w3g. W3G is a custom

binary format. The benefits of this are that the files are small, even for

very long games. The downside is that for them to be meaningfully a lot of

extra data needs to be provided (as is done here for you) for these files

to be meaningfully deciphered.

The replays basically amount to a bunch of metadata (map, players, etc) and a

big event list. The file parser here provides you with access to this data

as well as some post-processed metrics, such as actions-per-minute (APM).

The API should be easy to use and figure out. Classes and attributes are named in a

sane way. Here is an example of usage:

import w3g

f = w3g.File('replay.w3g')

winner = f.winner()

print(winner)

f.print_apm()

You can also use this file in script mode to print out the entire game and

its stats:

$ ./w3g.py replay.w3g

If you have any questions or issues, please email me or leave an issue on the

issue tracker.

/scopzout

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符  | 博主筛选后可见
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值