Most game control related commands in commands_yr.proto are low level, and map almost directly to a call of specific underlying game function. While this simplifies the library implementation, there are several problems:
All high-level commands, such as "move unit", "produce building", etc. must be implemented client-side as wrappers built upon these low level commands. This is the case in pyra2yr currently.
It's not clear what the commands actually do, and how should they be issued to achieve desired operation. In practice one needs to consult pyra2yr sources.
While there are basic checks for invalid command data, some inputs might still cause crash, and perfectly restricting all illegal inputs is difficult, as the functionality of the underlying game commands isn't totally understood. In addition, restrictions may be counterproductive for debug/test purposes.
Solution is to add high-level API, that provide human readable commands for essential game controls. The low level API should be left intact for development purposes, but could be disabled by default as a safety precaution.
Non-exhaustive list of high level API features:
Production
[x] Produce units and buildings
[ ] Cancel production
[ ] Put production on hold
[ ] Queue/dequeue production
Unit control
[x] Attack
[ ] Attack move
[ ] Boarding into IFV, flak track, BF etc.
[ ] Capture
[x] Deploy/undeploy
[ ] Detonate with Seal/Tanya or place Ivan bomb
[ ] Eject passengers from IFV, flak track, BF etc.
Most game control related commands in
commands_yr.proto
are low level, and map almost directly to a call of specific underlying game function. While this simplifies the library implementation, there are several problems:Solution is to add high-level API, that provide human readable commands for essential game controls. The low level API should be left intact for development purposes, but could be disabled by default as a safety precaution.
Non-exhaustive list of high level API features:
Production
Unit control
Building-related controls
Superweapons and specials
Other