Skip to main content

No project description provided

Project description

rwmapeditor-exgcdwu

一个铁锈战争 (Rusted Warfare) 地图编辑 python 库

released version

目标

python实现铁锈地图文件地块编辑和宾语编辑。

暂时不打算接触地块集。

重点减轻城市争夺地图的宾语编辑工作量

基本框架已完成。

安装

pip install rwmapeditor-exgcdwu

使用之前

1.使用地图编辑器(Tiled,notTiled)创建新地图,确定大小。

2.手动载入地块集

3.即可使用python库自动改变地块和宾语

简易使用例子

# coding: utf-8
import rwmap as rw

map_dir = 'D:/Game/steam/steamapps/common/Rusted Warfare/mods/maps/'
map_name = 'example_mission.tmx'
map_name_out = 'example_mission(1).tmx'

mygraph:rw.RWmap = rw.RWmap.init_mapfile(map_dir + map_name, map_dir)

print(mygraph.output_str())

mygraph.addObject("Triggers", {"id": "100","type": "unitAdd", "x": "1000", "y":"1000", "width": "20", "height": "20"}, {"resetActivationAfter":"5s", "spawnUnits": "heavyTank*10", "team" :"0", "warmup":"20s"})

mygraph.addTile("Ground", rw.Coordinate(1, 0), "Long Grass", rw.Coordinate(0, 0))
mygraph.addTile("Ground", rw.Coordinate(2, 0), "Long Grass", rw.Coordinate(0, 0))
mygraph.addTile("Ground", rw.Coordinate(0, 1), "Long Grass", rw.Coordinate(0, 0))

mygraph.addTile_square("Ground", rw.Rectangle(rw.Coordinate(5, 5), rw.Coordinate(10, 10)), "Deep Water", rw.Coordinate(0, 0))

mygraph.write_file(map_dir + map_name_out)

Project details


Release history Release notifications | RSS feed

This version

1.1.2

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rwmapeditor_exgcdwu-1.1.2.tar.gz (20.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rwmapeditor_exgcdwu-1.1.2-py3-none-any.whl (23.9 kB view details)

Uploaded Python 3

File details

Details for the file rwmapeditor_exgcdwu-1.1.2.tar.gz.

File metadata

  • Download URL: rwmapeditor_exgcdwu-1.1.2.tar.gz
  • Upload date:
  • Size: 20.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.19

File hashes

Hashes for rwmapeditor_exgcdwu-1.1.2.tar.gz
Algorithm Hash digest
SHA256 ba7781f82af24433f2c2be5c21d12d731b76711f84e573da8816548cb8a59baa
MD5 72e939b8bba096c56feb6ec5a63c0839
BLAKE2b-256 fdffe73a48184c07758f455d96675cebe5223baf1dab4e2bf1341ba35a61a04a

See more details on using hashes here.

File details

Details for the file rwmapeditor_exgcdwu-1.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for rwmapeditor_exgcdwu-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 eb34603fd15fce1ed2a24dbdc82b32e05a1f6885b20aa29dff0f209d23932fd8
MD5 c4ab35648266036beac7b029c48870f0
BLAKE2b-256 d9a12d34dbc75f561edc2c32beeb824e1b8b8a4747895c6f355c0994beb4c775

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page