Repository navigation
Comm order types modder-configurable (take 2) - #7776
wookieejedi wants to merge 18 commits into
Conversation
dustinspace217
left a comment
There was a problem hiding this comment.
Thanks for picking this up. Against your #7721 review, 11 of the 12 points look addressed; the one I can't see is the extra whitespace (there's still a double blank line before hud_init_comm_orders, hudsquadmsg.cpp:180). Items 1, 2 and 4 are side effects of the mixed-wing fix (your point 3):
- The fighters-only and bombers-only flavors skip the wing pass (hudsquadmsg.cpp:1053), so Depart sets only the ship flag (1400) and never
Wing_Flags::Departure_ordered(1660), and a multi-wave bomber wing still sends its next wave (ship.cpp:8803). Could wings whose present members all match still go through the wing path, with per-ship orders only for mixed wings? - Per-ship orders get priority 100 against 95 for wing orders, so a later wing order should lose to an earlier "All Fighters only" one (aigoals.cpp:2318). I'm guessing the new same-priority ai_profiles flag is for that; could the description and docs say so? Item 1 would also avoid it for whole wings.
- Worth listing in the description: the retail All Fighters submenu no longer counts the player's ship, so its "(*)" marks change in retail missions; the per-ship pass now skips the ordering ship and Instructor ships; Abort Rearm is hidden under the Hide option. They all look like reasonable changes.
- In co-op, if every matching ship is human-flown, no order history gets written (1144), so
query-orders "<all bombers>"stays false. Recording history separately from picking the ship that replies would fix it, and skippingNo_builtin_messagesships there would keep a silenced ship from eating the reply. - Is
$Available squad orders:meant as a menu layout or a rule? Voice doesn't check it ("All Fighters" by voice always means fighters and bombers). If it's layout, a doc line is enough. - Version 64 is also in my #7947. Since 26.2 is already in RC, whichever of us lands second should take master's next unreleased number at rebase time.
Smaller: a +Text: of 256+ bytes is fatal in the comms gauge (truncate or warn at parse), enum class for the two new enums, a trailing space at 2221, and a few tests in test_mod_table.cpp would be welcome. I haven't playtested the comm menu or multiplayer yet.
Drop the double blank line before hud_init_comm_orders and a trailing space after the small craft switch.
Read +Text: into a buffer the size of the comms gauge line buffer, so text that would not fit is truncated with the parser's usual "Token too long" warning instead of failing the copy in the gauge.
The menu item and network packet fields stay ints, so values are cast where they cross into those fields. No behavior change.
…nly orders A wing whose present members all match the flavor now gets a wing order, so Depart marks the wing as ordered out and later waves stay home, and the reply and order history work as for All Fighters. Only wings with both matching and non-matching members are still ordered ship by ship.
The history entry is now written once the order reaches any ship, so query-orders works when every matching ship is human-flown. The ship that replies is still chosen separately, and now also skips ships that have built-in messages turned off.
For fighters-only and bombers-only orders, a wing whose members all match but that the wing pass skips (its cached leader class or the leader's accepted orders say no) now gets per-ship orders instead of none; the full fighters-and-bombers order still leaves wing members to the wing pass, as retail does. The history update returns if an order hook emptied the history, and the gauge's text limit uses the shared constant.
… orders Those orders already checked every present member, and the cached class can be stale after a class change on a later leader; skipping it lets such a wing take the order, and a Depart, as a wing.
|
I merged master in (three conflicts, all both-sides additions next to master's new flags) and pushed the points from my review as commits, one per point plus two follow-up fixes to points 4 and 5:
Things this changes that are worth knowing:
Tested on Linux (Debug, OpenGL, retail plus MediaVPs 5.0.3, a small test mod that turns on the narrower orders), this |
Regarding #7721, it turns out that it needs all kinds of edge case handling and other aspects to work properly, so here is a PR to supersede it.
Original Description:
Comm order types (that is, the list of things that can be messaged -- ships, wings, reinforcements, etc.) are now no longer a fixed list. Of the eight possible types, the modder may specify an arbitrary list in arbitrary order, with text specified in the table.
This was to facilitate the addition of two new types, All Fighters and All Bombers -- as distinct from the retail type typically called All Fighters, which is really "all fighters and bombers". (All player-facing retail naming remains as default.) My experience as a player suggests that these new options will be extremely useful.