Print selected command templates (#8454)

This commit is contained in:
2026-07-11 13:30:44 -07:00
committed by GitHub
parent c1c60c406a
commit 1cd7474864
3 changed files with 104 additions and 4 deletions
+8 -2
View File
@@ -37,7 +37,7 @@ commands
commands-json
```
`state` is the concise map and owned-province view. `state-json` prints the complete view. `commands-json` includes the exact fields, IDs, resource amounts, and command choices currently accepted by the server.
`state` is the concise map and owned-province view. `state-json` prints the complete view. `commands-json` includes the exact fields, IDs, resource amounts, and command choices currently accepted by the server. Each entry also includes a `post-json` template for its corresponding selected command.
Generated text is stored locally during the client process. Use `text <text-id>` for a text ID without spaces, such as `text hn_105`. Province leaders in `state` are resolved through this store when their names have been received.
@@ -49,6 +49,12 @@ Use the available-command data from `commands-json` to select a command, then po
post-json <province-id> <SelectedCommandType> <JSON>
```
Templates contain the accepted JSON field names and default values. Replace zero
IDs, `UNKNOWN` enum values, empty collections, and other placeholders with a legal
choice from the available-command payload before posting. Where a selected command
must echo server data, such as a ransom offer, the client copies that data into the
template automatically.
For example:
```text
@@ -57,7 +63,7 @@ post-rest 13
post-feast 13
```
The client has shortcuts for `post-rest`, `post-return`, `post-feast`, riot decisions, and battle aftermath. Other selected-command JSON schemas are defined in:
The client has shortcuts for `post-rest`, `post-return`, `post-feast`, riot decisions, and battle aftermath. The authoritative selected-command schemas are defined in:
```text
src/main/protobuf/net/eagle0/eagle/api/selected_command.proto