Com Groups

Post about your finished mods here.
Post Reply
NMS
Militia Captain
Militia Captain
Posts: 569
Joined: Tue Mar 05, 2013 8:26 am

I'm pleased to announce my first publicly released mod (for any game, I think): Com Groups!

This mod creates two groups: "All Combatants" and "All Non-Combatants". Each one will appear in the Communications menu if the player has any escorts (including autons and wingmen) of that type that can receive orders. The player can send any message to the group that could be sent to any of its members, causing all of the members that can receive that order to carry it out.

Please let me know what you think, and if you encounter any bugs or performance problems when opening the Communications menu or sending an order. Feel free to suggest features or improvements. It would be possible to add more specific groups, and maybe even customizable groups (with ships added through a dock screen), but it's a lot of work and might need to be redone later if some engine improvements I've suggested are implemented. So I'm not planning any new features right away unless there's huge demand.

Enjoy!


Change log:

version 1.3:
- Changed the keys for All Combatants and All Non-Combatants to X and Z, respectively. This prevents ship escorts from stealing their keys (assigning them the next letter alphabetically) unless the player has 30-something escorts that can receive individual orders.

version 1.2:
- Com Groups now work even if the player's ship is farther than 3600 light seconds from the center of the system.
- Com Groups no longer sometimes allow the player to send messages to ships that are over 3600 light seconds away from their ship. This is consistent with vanilla com functionality.

version 1.1:
- Now groups that include autons can be ordered to return if there's an installed auton bay that isn't a cargo bay.


Technical info:

All types of escorts present in the vanilla game should respond exactly the same to each command sent to a com group as they would when it's sent to the squadron or a single ship, except in the following cases where I consider the vanilla behavior to be a bug:
- In vanilla, Fleet squadrons can receive a "Form up" order while waiting, but incorrectly report that they can't. So if the player has no other escorts that can currently "Form up", they will be unable to send the order. With Com Groups, it's possible to send the "Form up" order to all combatants in this situation. As a side effect, this allows the player to send the order to the whole squadron, too.
- In vanilla, a player with an auton bay can order any number of autons to return to the ship in quick succession, resulting in the cargo bay being overfilled when they arrive. With Com Groups, the player can order all combatant or all non-combatant autons to return at once. However, only a set of autons that can fit in the cargo bay will return, taking into account any autons which are already returning. It's still possible to overfill the bay by looting items after ordering autons to return. This is fixed by Improved Auton Bay Screens.
- There's some commented-out code near the beginning marked "For testing". Uncomment it and you'll start the game with a variety of escorts.


Compatibility:

Com Groups does not modify any vanilla entities and should be compatible with all mods. However, if a mod gives the player escorts with new <Communications> messages, they will not be able to send those messages to a com group. Also, escorts with unusual behaviors in response to a standard command will behave like normal escorts when sent orders via a com group. And escorts with unusual controllers may behave differently. There's currently nothing I can do about these issues due to engine limitations, but I've made several related bug reports and feature requests on Ministry, so this might change.

EDIT: OK, technically it might be possible to use XML functions to find all the entities that have <Communications> messages and duplicate the functionality using <Events>, which Com Groups could then call. I'll think about whether I want to get into redoing it this way.
Last edited by NMS on Fri Aug 05, 2016 12:47 am, edited 9 times in total.
User avatar
TheLoneWolf
Militia Captain
Militia Captain
Posts: 802
Joined: Thu Nov 28, 2013 5:03 pm
Location: Aboard the CSS Radiant

I'm going for that!
User avatar
AssumedPseudonym
Fleet Officer
Fleet Officer
Posts: 1190
Joined: Thu Aug 29, 2013 5:18 am
Location: On the other side of the screen.

 Permit me to say: Welcome to the modding scene — and about kackin’ time, too, heh. I haven’t had a chance to really look over this thing yet, but it certainly sounds promising! I guess this means it’s time for me to dust off a Constellation and take a test drive…
Image

Mod prefixes: 0xA010 (registered) and 0xDCC8 (miscellaneous)

My mods on Xelerus: Click here!

Of all the things I’ve lost in life, I miss my mind the least. (I’m having a lot more fun without it!)
NMS
Militia Captain
Militia Captain
Posts: 569
Joined: Tue Mar 05, 2013 8:26 am

Updated to version 1.2:
- Com Groups now work even if the player's ship is farther than 3600 light seconds from the center of the system.
- Com Groups no longer sometimes allow the player to send messages to ships that are over 3600 light seconds away from their ship. This is consistent with vanilla com functionality.

Updated to version 1.3:
- Changed the keys for All Combatants and All Non-Combatants to X and Z, respectively. This prevents ship escorts from stealing their keys (assigning them the next letter alphabetically) unless the player has 30-something escorts that can receive individual orders.
Post Reply