happyleavesaoc / aoc-mgz

Age of Empires II recorded game parsing and summarization in Python 3.
MIT License
197 stars 42 forks source link

Improved Action.MOVE and Action.WALL parsing. #62

Closed qwyt closed 3 years ago

qwyt commented 3 years ago

Action.WALL:

Previously only start_x and start_y were returned not it also return x,y end positions, the selected workers and the building_id of the wall (so that palisades can be discerned from stone walls). Did not rename x/y to start_x/y to preserve some backwards compatibility.

FYI the format described in aoc-mgx-format (https://github.com/stefan-kolb/aoc-mgx-format/blob/master/spec/body/actions/69-wall.md) seems to be incorrect in DE. The format which worked for me was:

int8 :selection_count int8 :player_number int8: zero1

int16 :start_x_coord int16 :start_y_coord int16 :end_x_coord int16 :end_y_coord

int16 :building_id int16 :zero2 int32 :const array :selected_ids, type => :int32, initial_length => :selection_count

- Action.MOVE

now includes the ids of units to to which the command is being issues (previously only click position was returned).

qwyt commented 3 years ago

Will reopen after fixing the tests.