用于读取和操作starmade游戏数据的api
starmadep的Python项目详细描述
#starmadepy v0.1
由于该项目是一个相当新的项目,目前唯一受支持的文件类型是`.smtpl`,或**starmade template**文件类型。
[docs](http://starmadepy.readthedocs.org/en/latest/)
颜色,您希望生成此模板的不同颜色的副本。
下面的代码将打开一个模板文件,选择所有灰色块,然后将其替换为橙色。
``python
from starmadepy import starmade
用橙色等价物
template=starmade.template.fromsmtpl('sometemplatefile.smtpl')
template.replace({'color':'grey'},{'color':'orange'})
template.save('outtemplatefile.smtpl')
```
![转换模板](docs/img/tutorial1.png)
` pip install-r requirements.txt`并使用[文档]中的“py.test”运行测试
完整指南(http://starmadepy.readthedocs.org/en/latest/contribution/)
由于该项目是一个相当新的项目,目前唯一受支持的文件类型是`.smtpl`,或**starmade template**文件类型。
[docs](http://starmadepy.readthedocs.org/en/latest/)
颜色,您希望生成此模板的不同颜色的副本。
下面的代码将打开一个模板文件,选择所有灰色块,然后将其替换为橙色。
``python
from starmadepy import starmade
用橙色等价物
template=starmade.template.fromsmtpl('sometemplatefile.smtpl')
template.replace({'color':'grey'},{'color':'orange'})
template.save('outtemplatefile.smtpl')
```
![转换模板](docs/img/tutorial1.png)
` pip install-r requirements.txt`并使用[文档]中的“py.test”运行测试
完整指南(http://starmadepy.readthedocs.org/en/latest/contribution/)