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.手动创建所需的地块层和宾语层

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

简易使用例子

# coding: utf-8
import rwmap as rw

rwmap_dir = 'D:/Game/steam/steamapps/common/Rusted Warfare/mods/maps/'
youmap_dir = 'D:/Game/steam/steamapps/common/Rusted Warfare/mods/maps/'
map_name = '[p2]example_skirmish_(2p).tmx'
map_name_out = '[p2]example_skirmish_(2p)(1).tmx'
mygraph:rw.RWmap = rw.RWmap.init_mapfile(youmap_dir + map_name, rwmap_dir)
print(mygraph)

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

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.addTile_group(rw.Coordinate(5, 20), rw.data.tile_group_grid.fill_tile_group_one_ground_water_28_24)

mygraph.write_file(youmap_dir + map_name_out)

Project details


Release history Release notifications | RSS feed

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.2.2.tar.gz (1.2 MB 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.2.2-py3-none-any.whl (1.2 MB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for rwmapeditor_exgcdwu-1.2.2.tar.gz
Algorithm Hash digest
SHA256 4f4b7445cb1f7d54bbc0c571636ae62bdabdd47214ea58a735155ac37c8c4eca
MD5 f0ed97fa23a9121062a44347166f534f
BLAKE2b-256 c63b02adb5301a8b42ed4e3424df37ef4e8f8a0d536b354ddf5e23a2ab82872b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rwmapeditor_exgcdwu-1.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7270bdc28cfe39a4324d23f7c0be8038d96a0392dceba8824c92bf9aff36511f
MD5 da8f6022dcf17d6d7fadf221214f3de3
BLAKE2b-256 b0767dd7dbb388031c04fd16d05e37e386697b244e38baa1e4370904f7ec3b28

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