Difference between revisions of "BroadcastComms MFD"
(→Version History) |
Cholmondely (talk | contribs) (→Using script_info to control messages: Added link to the BCC_Testbed OXP) |
||
(36 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | [[image:broadcastcomms.png|right|400px]] | + | [[image:broadcastcomms.png|thumb|right|400px|Once this MFD has been selected, use the b-key to select your option, and the n-key to broadcast it]] |
==Overview== | ==Overview== | ||
− | This OXP provides a means by which the player can communicate in a real way with other ships. That is, the types of communications the player transmits will have a bearing on the game in some way, depending on the transmission type | + | This OXP provides a means by which the player can communicate in a real way with other ships. That is, the types of communications the player transmits will have a bearing on the game in some way, depending on the transmission type. |
+ | |||
+ | It seems like such a simple OXP on the surface -- you send messages to other ships -- but adds so much functionality to the game. All at once, you can find other ships heading your way in a convoy, you can bribe (with credits, a boon to those of us who don't carry cargo) or scare off pirates, or taunt them into messing up a shot. You can call for help from other ships or even the police. | ||
+ | |||
+ | ''Useful, compact, entertaining.'' | ||
+ | |||
+ | Not to be confused with [[CommsLogMFD]] which keeps a long record of [[Vanilla game]] (non-Broadcast Comms) messages which you can scroll through. | ||
+ | |||
+ | ==Detail== | ||
There are 11 types of transmissions: | There are 11 types of transmissions: | ||
Line 17: | Line 25: | ||
# '''Target last comms message'''<br/>This will switch the players target to the ship that last sent a comms message. | # '''Target last comms message'''<br/>This will switch the players target to the ship that last sent a comms message. | ||
# '''Keep away from my target'''<br/>This will send a message to all ships in range, telling them to stay away from the players current target. Only ships that aren't fighting against the player will potentially respond. Enemy ships will ignore this message. | # '''Keep away from my target'''<br/>This will send a message to all ships in range, telling them to stay away from the players current target. Only ships that aren't fighting against the player will potentially respond. Enemy ships will ignore this message. | ||
− | + | ||
==Usage== | ==Usage== | ||
− | The BroadcastComms MFD is available for purchase for | + | The BroadcastComms MFD (Multi-Function Display) is available for purchase for 200₢ at all stations, regardless of techlevel. |
After displaying the BroadcastComms MFD and priming it, press the "b" (Mode) key to select a message from the available options. | After displaying the BroadcastComms MFD and priming it, press the "b" (Mode) key to select a message from the available options. | ||
Line 28: | Line 36: | ||
Once the desired message is selected, press the "n" (Activate) key to send the message. | Once the desired message is selected, press the "n" (Activate) key to send the message. | ||
+ | |||
+ | *See [[MFD]] for more details on managing MFDs. See [[Priming Equipment]] for details on how to prime OXP equipment such as BroadcastComms! | ||
==External access== | ==External access== | ||
+ | For devotees of [[The Dark Side]] who wish to their OXPs to access these comms features, press here -> -> -> | ||
+ | <div class="mw-collapsible mw-collapsed" data-expandtext="Reveal The Dark Side" data-collapsetext="Hide The Dark Side" style="overflow:auto;"> | ||
Provision has been made for other OXP's to access the comms features in this OXP. There are two methods that can be used: | Provision has been made for other OXP's to access the comms features in this OXP. There are two methods that can be used: | ||
Line 191: | Line 203: | ||
External messages, and the status of internal messages, are cleared each time the player loads from a saved game. If a persistent message needs to be shown, or if the status of internal messages needs to be changed in an ongoing manner, ensure the changes are made after the player loads from a saved game. | External messages, and the status of internal messages, are cleared each time the player loads from a saved game. If a persistent message needs to be shown, or if the status of internal messages needs to be changed in an ongoing manner, ensure the changes are made after the player loads from a saved game. | ||
+ | |||
+ | == Using script_info to control messages == | ||
+ | It is also possible to control messages by using the "script_info" property of a ship definition in shipdata.plist. The following options are available: | ||
+ | |||
+ | script_info = { | ||
+ | bcc_disable_defaults = (); // an array of numeric identifiers that correspond to default message id's | ||
+ | bcc_custom_defaults = {}; // a dictionary object with keys corresponding to default message id's | ||
+ | bcc_custom_messages = {}; // a dictionary object containing message definitions | ||
+ | }; | ||
+ | |||
+ | Looking at each of these in more detail: | ||
+ | |||
+ | // this would disable message types 3 (greeting), 4 (taunt) and 7 (demand cargo) | ||
+ | bcc_disable_defaults = (3,4,7); | ||
+ | |||
+ | // this definition includes all possible options for changing the standard transmissions and replies. | ||
+ | bcc_custom_defaults = { // note: [xyz] refers to an entry in descriptions.plist. Each one should be unique | ||
+ | "1" = { // wormhole request | ||
+ | reply_confirm = "[xyz]"; | ||
+ | reply_decline = "[xyz]"; | ||
+ | }; | ||
+ | "3" = { // greeting | ||
+ | transmit = "[xyz]"; | ||
+ | reply = "[xyz]"; | ||
+ | }; | ||
+ | "4" = { // taunt | ||
+ | transmit = "[xyz]"; | ||
+ | reply = "[xyz]"; | ||
+ | }; | ||
+ | "5" = { // threat | ||
+ | transmit = "[xyz]"; | ||
+ | reply_normal = "[xyz]"; | ||
+ | reply_fleeing = "[xyz]"; | ||
+ | }; | ||
+ | "6" = { // bribe | ||
+ | transmit = "[xyz]"; // [amount] && [credittype] must be included in descriptions.plist entry | ||
+ | reply_fine = "[xyz]"; // police vessel fines player | ||
+ | reply_decline = "[xyz]"; // decline bribe | ||
+ | reply_accept = "[xyz]"; // accept bribe | ||
+ | }; | ||
+ | "7" = { // demand cargo | ||
+ | reply_refuse = "[xyz]"; | ||
+ | }; | ||
+ | "8" = { // surrender | ||
+ | transmit = "[xyz]"; | ||
+ | reply_impatient = "[xyz]"; | ||
+ | reply_police_accept = "[xyz]"; | ||
+ | reply_police_reject = "[xyz]"; | ||
+ | }; | ||
+ | "9" = { // escape pod offer to rescue | ||
+ | transmit = "[xyz]"; | ||
+ | reply_friendly = "[xyz]"; | ||
+ | reply_unfriendly = "[xyz]"; | ||
+ | }; | ||
+ | "11" = { // keep away from target | ||
+ | reply = "[xyz]"; | ||
+ | }; | ||
+ | }; | ||
+ | |||
+ | bcc_custom_messages = { | ||
+ | "level1" = { | ||
+ | // this will show "Level 1 message" in the Broadcast Comms MFD | ||
+ | // when selected, it will display the "transmit" message | ||
+ | // after 2 seconds, it will display the "reply" message, and run the post_reply_function, passing the ship and messagekey ("level1") to the function | ||
+ | // then it will make the messages "level2a" and "level2b" visible | ||
+ | state = "visible"; // whether the player will be offered this option immediately; | ||
+ | display = "Level 1 message"; // what to display in the MFD | ||
+ | delete_on_transmit = yes; // indicates whether message option should be removed from MFD after use | ||
+ | transmit = "This is the transmitted message for level 1."; // what to transmit when the option is activated | ||
+ | delay = 2; // how long to delay after transmission | ||
+ | reply = "This is the response to level 1."; // the message that will be sent back to the player. | ||
+ | post_reply_function = "$test_reply"; // function to call after sending the reply (optional) | ||
+ | post_reply_worldscript = "MyWorldScriptName"; | ||
+ | post_reply_show_messages = ("level2a", "level2b"); // messages to make visible after the reply is received | ||
+ | }; | ||
+ | "level2a" = { | ||
+ | // this will show "Level 2 message A" in the Broadcast Comms MFD | ||
+ | // when selected, it will display the "transmit" message | ||
+ | // after 2 seconds, it will display the "reply" message, and run the post_reply_function, passing the ship and messagekey ("level2a") to the function | ||
+ | // then it will hide "level2b" (it doesn't need to hide itself, as the "delete_on_transmit" is set to "yes") | ||
+ | state = "hidden"; | ||
+ | display = "Level 2 message A"; // what to display in the MFD | ||
+ | delete_on_transmit = yes; // indicates whether message option should be removed from MFD after use | ||
+ | transmit = "This is the transmitted message for level 2A."; // what to transmit when the option is activated | ||
+ | delay = 2; // how long to delay after transmission | ||
+ | reply = "This is the response to level 2A."; // the message that will be sent back to the player. | ||
+ | post_reply_function = "$test_reply"; // function to call after sending the reply (optional) | ||
+ | post_reply_worldscript = "MyWorldScriptName"; | ||
+ | post_reply_hide_messages = ("level2b"); | ||
+ | }; | ||
+ | "level2b" = { | ||
+ | // this will show "Level 2 message B" in the Broadcast Comms MFD | ||
+ | // when selected, it will display the "transmit" message. | ||
+ | // after 2 seconds it will display the "reply" message, and run the post_reply_function, passing the ship and messagekey ("level2b") to the function | ||
+ | // then it will hide "level2a" (it doesn't need to hide itself, as the "delete_on_transmit" is set to "yes") | ||
+ | state = "hidden"; | ||
+ | display = "Level 2 message B"; // what to display in the MFD | ||
+ | delete_on_transmit = yes; // indicates whether message option should be removed from MFD after use | ||
+ | transmit = "This is the transmitted message for level 2B."; // what to transmit when the option is activated | ||
+ | delay = 2; // how long to delay after transmission | ||
+ | reply = "This is the response to level 2B."; // the message that will be sent back to the player. | ||
+ | post_reply_function = "$test_reply"; // function to call after sending the reply (optional) | ||
+ | post_reply_worldscript = "MyWorldScriptName"; | ||
+ | post_reply_hide_messages = ("level2a"); | ||
+ | }; | ||
+ | }; | ||
+ | |||
+ | There is a small OXP in the "Resources" folder of the BCC package that demonstrates all of these options. <br> | ||
+ | This is presumably this: [https://app.box.com/s/5xbksy48qr9cp31z2wpef6wjla05s3ih/file/985150915954 BCC_Testbed.oxp] | ||
+ | |||
+ | == Introducing more ship personality types for Broadcast Comms == | ||
+ | See [https://bb.oolite.space/viewtopic.php?p=285650#p285650 this thread] for Murgh's inclusion of Broadcast Comms for his Refugee Adders packages (2022). | ||
+ | </div> | ||
==Installation== | ==Installation== | ||
Line 200: | Line 325: | ||
==Download== | ==Download== | ||
− | Download [[Media: | + | Download [[Media:BroadcastCommsMFD_1.3.7.oxz|BroadcastCommsMFD_1.3.7.oxz]]<br/> |
− | Download [https://app.box.com/s/h3rxaf3oarvhodheupx9 BroadcastCommsMFD.zip] v1. | + | Download [https://app.box.com/s/h3rxaf3oarvhodheupx9 BroadcastCommsMFD.zip] v1.3.7 (extract OXP folder to AddOns)<br/><br/> |
+ | Download [https://app.box.com/s/189fphq82nvwphltvmrtudiahgq6i17h BCC_Testbed.zip] which is a small OXP to demonstrate the script_info integrations. This is also included in the "Resources" folder of the main OXP. | ||
==Licence/Author== | ==Licence/Author== | ||
Line 210: | Line 336: | ||
==Version History== | ==Version History== | ||
+ | 1.3.7 | ||
+ | * Better handling of unpurchased equipment. MFD will not be shown at all in this case. | ||
+ | |||
+ | 1.3.6 | ||
+ | * Better handling of damaged equipment - MFD will now show a "damaged" message. | ||
+ | |||
+ | 1.3.5 | ||
+ | * Really fixed JS error when targeting wormholes (or any entity that doesn't have a script object). | ||
+ | |||
+ | 1.3.4 | ||
+ | * Fixed JS error when targeting wormholes (or any entity that doesn't have a scriptInfo object). | ||
+ | * Fixed JS error where a ship may not be in a group when attacking the player and a bribe is offered. | ||
+ | |||
+ | 1.3.3 | ||
+ | * Added check for existing message before trying to add custom messages via bcc_custom_messages. | ||
+ | * Removed debug message. | ||
+ | |||
+ | 1.3.2 | ||
+ | * Fixed issue with not being able to replace core messages with custom ones. | ||
+ | |||
+ | 1.3.1 | ||
+ | * Fixed issue with some transmissions defaulting to a blank message. | ||
+ | * Added checks for "bcc_disable_defaults" when validating new external messages, making it easier to replace core messages with custom ones. | ||
+ | |||
+ | 1.3 | ||
+ | * Added ability to control messages via script_info. | ||
+ | * Added TestBed OXP (in Resources folder) for demonstrating how to use the script_info integrations. | ||
+ | * Fixed issue where requesting docking clearance from a station with no docks would not be correctly interpreted. | ||
+ | |||
+ | 1.2.12 | ||
+ | * Improved integration with Bounty System OXP. | ||
+ | * Improvements to the process of surrendering to police, as suggested by Milo. | ||
+ | * Added method to allow message responses to be overridden by another OXP. | ||
+ | |||
+ | 1.2.11 | ||
+ | * Fix for issue where surrendering to police was not implemented correctly/completely. | ||
+ | |||
+ | 1.2.10 | ||
+ | * Tweaks to routine that stops timers. | ||
+ | |||
+ | 1.2.9 | ||
+ | * Fixed missing expansion in bribe message. | ||
+ | |||
1.2.8 | 1.2.8 | ||
* Added missing ";" to role-categories.plist. | * Added missing ";" to role-categories.plist. | ||
Line 226: | Line 395: | ||
1.2.4 | 1.2.4 | ||
− | * Fix for "Send | + | * Fix for "Send distress message" not sending the correct message. |
* Further updates for docking requests to handle further changes in Oolite 1.85/6. | * Further updates for docking requests to handle further changes in Oolite 1.85/6. | ||
* Code refactoring. | * Code refactoring. | ||
Line 266: | Line 435: | ||
* Small tweaks to the wormhole request responses. | * Small tweaks to the wormhole request responses. | ||
* Made the equipment less likely to be damaged. | * Made the equipment less likely to be damaged. | ||
− | * Turned off the "portable_between_ships", as this is equipment installed in a ship and | + | * Turned off the "portable_between_ships", as this is equipment installed in a ship and logically would need to be installed in a new one. |
* Fixed manifest file so the category matches the expansion manager setting. | * Fixed manifest file so the category matches the expansion manager setting. | ||
Line 276: | Line 445: | ||
* Fixed issue with police responding to surrender like a pirate. If you're not a fugitive they will now wait for the player to disable their weapons systems, and if the player responds in time, they will (probably) accept the surrender. | * Fixed issue with police responding to surrender like a pirate. If you're not a fugitive they will now wait for the player to disable their weapons systems, and if the player responds in time, they will (probably) accept the surrender. | ||
* You can now also attempt to bribe a police ship. Police may accept a bribe, if they're not in the station aegis, and the chance increases with lower government types. They might also fine the player. | * You can now also attempt to bribe a police ship. Police may accept a bribe, if they're not in the station aegis, and the chance increases with lower government types. They might also fine the player. | ||
− | * Fixed issue with | + | * Fixed issue with surrendering to Thargoids. They will now curse you. And probably continue shooting. |
* Bug fixes. | * Bug fixes. | ||
Line 307: | Line 476: | ||
* Added the $disableMessage, $enableMessage, and $isMessageEnabled external functions, so that OXP developers can disable the standard internal messages, either individually or all of them. | * Added the $disableMessage, $enableMessage, and $isMessageEnabled external functions, so that OXP developers can disable the standard internal messages, either individually or all of them. | ||
</div> | </div> | ||
+ | |||
+ | [[File:Digebiti (Coat of Arms).png|thumb|right|[[Sector1/Digebiti|Digebitian Coat of Arms]]]] | ||
+ | |||
+ | ==Digebitian Variant== | ||
+ | For those in search of a more refined vocabulary and mode of expression, there is finally a Digebitian Variant available. Produced with the utmost skill and hand-tailored finesse in the workshops and laboratories of Lesser Walsingham, Xenon Industries are proud to present you with ''BroadcastComms Digebiti Variations''. | ||
+ | |||
+ | If you wish for a taste, see here: [[Jack Sterling]] (profile by Smivs - see especially the link at the bottom of the page) & [https://bb.oolite.space/viewtopic.php?p=270665#p270665 here] (a rant about being diddled in the Shipyards). The thread with the fons et origo is [https://bb.oolite.space/viewtopic.php?f=4&t=20969 here]. | ||
+ | |||
+ | You can add this to your game by downloading [[Media:BroadcastComms_Digebiti_Variations.oxz|BroadcastComms_Digebiti_Variations.oxz]] (also available through the in-game [[Expansions Manager]] - ''HUDs section''). | ||
+ | |||
+ | ==Cmdr Wyvern's variant== | ||
+ | See [[User:Wyvern|Cmdr Wyvern]]'s piratical dialectic [https://bb.oolite.space/viewtopic.php?p=283902#p283902 here] (2022) | ||
+ | |||
+ | == OXP's using Broadcast Comms == | ||
+ | *[[GalCop Missions]] (for some of the missions) | ||
+ | *[[Tionisla Orbital Graveyard]] (for interrogating the monuments) | ||
+ | *[[Iron Ass OXP]] - vol IV (for conversations with the [[Refugee Adder]]) | ||
+ | |||
+ | == Links == | ||
+ | *[[Communication]] | ||
+ | *[https://bb.oolite.space/viewtopic.php?f=6&t=3025 In-flight communication] (2007) | ||
+ | *[https://bb.oolite.space/viewtopic.php?f=2&t=9227 Comms Oxp Discussion] (2011) | ||
+ | *[https://bb.oolite.space/viewtopic.php?p=205505#p205505 Conversations with NPCs] (2013) | ||
+ | *[https://bb.oolite.space/viewtopic.php?f=2&t=16153 Help us make Oolite more immersive!] (2013) | ||
+ | *[https://bb.oolite.space/viewtopic.php?f=6&t=15680 communicating with other ships] (2013) also discusses speech recognition software | ||
+ | *[https://www.dropbox.com/sh/q8xqu5ymg79zuud/AADWY9bpwj2yH3-cVC9W7mnya Zireael's Dropbox] (2014) has a couple of relevant .js scripts if you know how to deal with them: see [[OXP howto]] if you are so inclined. | ||
==Quick Facts== | ==Quick Facts== | ||
{{OXPLevel|0}}{{IconOXP|ooVersion="1.80"|oxpCPU="Low"|oxpMEM="Low"|oxpGPU="Low"|oxpIsAPI=true|oxpIsParent=true|oxpIsDocumented=true}} | {{OXPLevel|0}}{{IconOXP|ooVersion="1.80"|oxpCPU="Low"|oxpMEM="Low"|oxpGPU="Low"|oxpIsAPI=true|oxpIsParent=true|oxpIsDocumented=true}} | ||
{{Infobox OXPb| title = BroadcastCommsMFD.oxz | {{Infobox OXPb| title = BroadcastCommsMFD.oxz | ||
− | |version = 1. | + | |version = 1.3.7 |
− | |release = | + | |release = 2023-10-17 |
|license = CC BY-NC-SA 4.0 | |license = CC BY-NC-SA 4.0 | ||
|features = Hud MFD | |features = Hud MFD | ||
|category = HUDs OXPs | |category = HUDs OXPs | ||
|author = [[User:phkb|phkb]], [[User:zireael|zireael]] | |author = [[User:phkb|phkb]], [[User:zireael|zireael]] | ||
− | |feedback = [ | + | |feedback = [https://bb.oolite.space/viewtopic.php?f=4&t=16826 Oolite BB] |
}} | }} | ||
==Gameplay and Balance indicator== | ==Gameplay and Balance indicator== | ||
− | [[Image:tag-colour- | + | [[Image:tag-colour-blue.png|right]] |
+ | Communication usually makes things a little easier! Especially when it influences the other's actions... |
Latest revision as of 20:21, 21 May 2024
Contents
- 1 Overview
- 2 Detail
- 3 Usage
- 4 External access
- 5 Using script_info to control messages
- 6 Introducing more ship personality types for Broadcast Comms
- 7 Installation
- 8 Requirements
- 9 Download
- 10 Licence/Author
- 11 Version History
- 12 Digebitian Variant
- 13 Cmdr Wyvern's variant
- 14 OXP's using Broadcast Comms
- 15 Links
- 16 Quick Facts
- 17 Gameplay and Balance indicator
Overview
This OXP provides a means by which the player can communicate in a real way with other ships. That is, the types of communications the player transmits will have a bearing on the game in some way, depending on the transmission type.
It seems like such a simple OXP on the surface -- you send messages to other ships -- but adds so much functionality to the game. All at once, you can find other ships heading your way in a convoy, you can bribe (with credits, a boon to those of us who don't carry cargo) or scare off pirates, or taunt them into messing up a shot. You can call for help from other ships or even the police.
Useful, compact, entertaining.
Not to be confused with CommsLogMFD which keeps a long record of Vanilla game (non-Broadcast Comms) messages which you can scroll through.
Detail
There are 11 types of transmissions:
- Requests for wormholes (broadcast ie. to all ships in range)
This transmission asks if anyone is going to your hyperspace destination. The message is only available if a destination has been set and the players status is not "red".
Ships can respond in three ways: (a) Not at all. (b) By telling the player they are headed somewhere else, or (c) by telling the player they are heading to the players destination.
This message can be sent repeatedly. - Send distress message (broadcast ie. to all ships in range)
This transmission requests immediate assistance against attackers. NPC ships may or may not choose to help.
Only available when the player ship is under attack.
This message can be sent repeatedly. - Send greeting to target
This transmission sends a basic "Hello" message to the ship the player is targeting. The other ship may choose to respond or not. Once a response has been received from the other ship, no further greetings can be sent to that ship. - Send taunt to target
This transmission sends a taunt to the other ship, and the other ship may or may not respond. But regardless of a verbal response, the other ship may do one of the following:
(a) Nothing at all
(b) If they are currently attacking the player, they might get angry and their accuracy might decrease for a few seconds, or increase for a few seconds.
(c) If they are not targeting the player at the moment, they might choose to start targeting the player instead.
Multiple taunts can be sent to other ships. - Issue threat to target
This transmission issues a threat to the other ship. Depending on who that ship is targeting, the response may be different:
(a) If the other ship is targeting the player, there is a small chance they might choose to flee.
(b) If the other ship is not targeting the player, they will possibly choose to attack the player.
Only one threat can be issues to a ship. - Offer bribe to target/Offer bribe to nearest attacker
This transmission offers money to a ship that is attacking the player. That ship can respond in a two ways.
(a) They can reject the offer. The amount the player can offer will then increase by a factor of 2 or 2.5 and the player can then try the bribe again if they wish. If the amount of bribe increases beyond the players current credit balance, the offer to bribe will be removed.
(b) They can accept the bribe. In this case, the bribe amount is deducted from the player bank account, and the ship targeting the player will break off their attack. If they are part of a pirate band, the pirate who accepted the bribe will share the spoils and they will all break off their attack.
If the attacking ship is targeted by the player, they will see the next bribe amount in the message text when selecting the message. If the player doesn't have a target (for instance, they are fleeing from a group of ships), the bribe amount will only be displayed when the transmission takes place. This is because it is not known who is the closest attacking ship until the transmission occurs, and the bid amounts are stored for each pirate group or ship. If a ship from one pirate group moves closer than another pirate group, the amount of the bribe will be adjusted accordingly. - Demand cargo from target
This transmission sends a demand for cargo to the other ship. They can either accept or reject the demand. If they accept the demand, they will drop some cargo and flee. If this action is performed in sight of a police vessel or the main station, there is a chance the victim will report the crime and the player will receive an increase to their offender status. - Surrender to target/Surrender to nearest attacker
This transmission sends a surrender message another ship. There is a small chance the attackers might accept the surrender. In that case they will stop attacking the player and wait for the player to dump some cargo. If the player doesn't dump any cargo, the pirates will start attacking the player again. If the player decides to use the lull in hostilities to start attacking the ships the pirates will get really angry and get a temporary boost in their accuracy. - Offer to rescue escape pod (only if fuel scoop is fitted)
This sends a message to the targeted escape pod, asking the occupant if they would like to be scooped and returned to the main station. Commanders should check that they have available cargo space before scooping escape pods. - Target last comms message
This will switch the players target to the ship that last sent a comms message. - Keep away from my target
This will send a message to all ships in range, telling them to stay away from the players current target. Only ships that aren't fighting against the player will potentially respond. Enemy ships will ignore this message.
Usage
The BroadcastComms MFD (Multi-Function Display) is available for purchase for 200₢ at all stations, regardless of techlevel.
After displaying the BroadcastComms MFD and priming it, press the "b" (Mode) key to select a message from the available options.
The selected message is marked with a ">" in the MFD.
You don't need the BroadcastComms MFD to be visible, though. There might be situations where it is not be visible, so changes to the selected message will also be displayed as a console message.
Once the desired message is selected, press the "n" (Activate) key to send the message.
- See MFD for more details on managing MFDs. See Priming Equipment for details on how to prime OXP equipment such as BroadcastComms!
External access
For devotees of The Dark Side who wish to their OXPs to access these comms features, press here -> -> ->
Provision has been made for other OXP's to access the comms features in this OXP. There are two methods that can be used:
var w = worldscripts.BroadcastCommsMFD; w.$createMessage({ messageName:string, callbackFunction:Function, displayText:string, messageText:string, ship:Ship, shipDisplayName:string, transmissionType:string, deleteOnTransmit:Boolean, delayCallback:integer, hideOnConditionRed:false});
Calling this function will add the message to the display that will be displayed when the conditions are met. Passed option can have the following properties.
- messageName = The name of this message, internally used for identification purposes. Can be any text. It is recommended to prefix the message name with the name of your worldscript to prevent the possibility of duplicate message names.
- callbackFunction = the function to call when the player transmits the message.
- displayText = The message text to display
- messageText = The message text that will be transmitted, if different to the display text.
- ship = reference to a ship object for a ship-to-ship transmission. Player must target the ship for the message to become available.
Can be null, and if transmission type is "target" this will create a message that can be sent to any targeted ship.
Will be ignored if transmission type is "broadcast". - shipDisplayName = display name of a ship for a ship-to-ship transmission. Player must target the ship for the message to become available.
Alternate method of targeting a specific ship, if the ship object is not available.
Will be ignored if transmission type is "broadcast". - transmissionType = transmission type, either "broadcast" (ie. transmitted to all ships) or "target" (the ship targeted by the player)
Including a ship property necessitates a "target" value here. Specifying "broadcast" will over override ship reference.
If not set, will default to "broadcast". - deleteOnTransmit = Boolean value indicating that the message will be removed from the list as soon as the player transmits it. If not set will default to true.
- delayCallback = integer value indicating how long (in seconds) to take before calling the callback function. A value of 0 (zero) means immediately. If not set will default to 2.
- hideOnConditionRed = Boolean value indicating that the message will be hidden from the player if their ship is under attack. Default is false.
Special case: If the displayText starts with any type of bracket (ie. "(", "{", "<" or "[") there will be no external transmission. That is, the callback function will be called, but there will be no comms messages sent to any ships. An external OXP can use this option to, for example, switch comms modes between a specialised set of comms messages, and the standard set.
var w = worldScripts.BroadcastCommsMFD; w.$updateMessage({ messageName:string, displayText:string, messageText:string, callbackFunction:Function, deleteOnTransmit:boolean, delayCallback:integer});
This function will update the settings of a particular message. Passed object can have the following properties:
- messageName = the name of the message that will be updated
- displayText = The new message text to be displayed, otherwise null if not being changed.
- messageText = The new message text that will be transmitted, otherwise null if not being changed.
- callbackFunction = The new function to call when the player transmits the message, otherwise null if not being changed.
- deleteOnTransmit = boolean value indicating that the message will be removed from the list as soon as the player transmits it. Null if not being changed.
- delayCallback = integer value indicating how long (in seconds) to take before calling the callback function. A value of 0 (zero) means immediately. Null if not being changed.
var w = worldScripts.BroadcastCommsMFD; w.$checkMessageExists(messageName : string);
This function returns true if messageName exists, otherwise false.
- messageName = the name of the message that will be searched for
var w = worldScripts.BroadcastCommsMFD; w.$removeMessage(messageName : string);
Calling this function will remove the message from the list. Only messages created via the "$createMessage" function can be removed.
- messageName = The name of the message that will be removed
var w = worldScripts.BroadcastCommsMFD; w.$disableMessage(msgid : int);
This function disables one or all of the internal messages, preventing it from being displayed
- msgid = The ID of the internal message that will be disabled, where
- 0 - all
- 1 - request for wormhole
- 2 - send distress message
- 3 - send greeting
- 4 - send taunt
- 5 - send threat
- 6 - offer bribe
- 7 - demand cargo
- 8 - surrender to target
- 9 - offer to rescue escape pod
- 10 - target last comms message
- 11 - keep away from my target
var w = worldScripts.BroadcastCommsMFD; w.$enableMessage(msgid : int);
This function enables one of all of the internal messages (if they have been disabled by the $disableMessage function), allow it to be displayed
- msgid = The ID of the internal message that will be enabled, where
- 0 - all
- 1 - request for wormhole
- 2 - send distress message
- 3 - send greeting
- 4 - send taunt
- 5 - send threat
- 6 - offer bribe
- 7 - demand cargo
- 8 - surrender to target
- 9 - offer to rescue escape pod
- 10 - target last comms message
- 11 - keep away from my target
var w = worldScripts.BroadcastCommsMFD; w.$isMessageEnabled(msgid : int);
This function is used to determine if an internal message is enabled or if it has been disabled.
Returns true if message is enabled, otherwise false.
Passing msgid value of 0 will check if all messages are enabled. Only returns true if all messages are enabled. Otherwise false.
- msgid = The ID of the internal message that will be evaluated.
Examples
var w = worldScripts.BroadcastCommsMFD; w.$createMessage({ messageName:this.name + "myMessage1", callbackFunction:this.$broadcastCallback.bind(this), distplayText:"Evacuation message", messageText:"Attention all ships. Please evacuate the area and move to a safe distance.", transmissionType:"broadcast", deleteOnTransmit:true, delayCallback:4});
This example adds a broadcast message to the display. It will be removed when transmitted, and it will take 4 seconds for the callback function "this.$broadcastCallback.bind(this)" to be executed.
var w = worldScripts.BroadcastCommsMFD; w.$createMessage({ messageName:this.name + "myMessage2", callbackFunction:this.$targetCallback.bind(this), displayText:"Ask native question", messageText:"Are you a native of these parts?", ship:myShip, transmissionType:"target", deleteOnTransmit:false, delayCallback:0});
This example adds a target-specific message to the display, to be shown when the ship object "myShip" is targeted by the player. It will be not removed when transmitted and the callback function this.$targetCallback.bind(this)" will be executed immediately
var w = worldScripts.BroadcastCommsMFD; w.$removeMessage(this.name + "myMessage2");
This example will remove the message "myMessage2" from the list of external messages.
var w = worldScripts.BroadcastCommsMFD; w.$disableMessage(0);
This example will disable all internal messages, leaving only the external messages to be displayed.
var w = worldScripts.BroadcastCommsMFD; w.$disableMessage(3);
This example will disable the "Send greeting to target" message.
var w = worldScripts.BroadcastCommsMFD; w.$enableMessage(0);
This example will enable all internal messages.
var w = worldScripts.BroadcastCommsMFD; w.$enableMessage(3);
This example will enable the "Send greeting to target" message.
External messages, and the status of internal messages, are cleared each time the player loads from a saved game. If a persistent message needs to be shown, or if the status of internal messages needs to be changed in an ongoing manner, ensure the changes are made after the player loads from a saved game.
Using script_info to control messages
It is also possible to control messages by using the "script_info" property of a ship definition in shipdata.plist. The following options are available:
script_info = { bcc_disable_defaults = (); // an array of numeric identifiers that correspond to default message id's bcc_custom_defaults = {}; // a dictionary object with keys corresponding to default message id's bcc_custom_messages = {}; // a dictionary object containing message definitions };
Looking at each of these in more detail:
// this would disable message types 3 (greeting), 4 (taunt) and 7 (demand cargo) bcc_disable_defaults = (3,4,7);
// this definition includes all possible options for changing the standard transmissions and replies. bcc_custom_defaults = { // note: [xyz] refers to an entry in descriptions.plist. Each one should be unique "1" = { // wormhole request reply_confirm = "[xyz]"; reply_decline = "[xyz]"; }; "3" = { // greeting transmit = "[xyz]"; reply = "[xyz]"; }; "4" = { // taunt transmit = "[xyz]"; reply = "[xyz]"; }; "5" = { // threat transmit = "[xyz]"; reply_normal = "[xyz]"; reply_fleeing = "[xyz]"; }; "6" = { // bribe transmit = "[xyz]"; // [amount] && [credittype] must be included in descriptions.plist entry reply_fine = "[xyz]"; // police vessel fines player reply_decline = "[xyz]"; // decline bribe reply_accept = "[xyz]"; // accept bribe }; "7" = { // demand cargo reply_refuse = "[xyz]"; }; "8" = { // surrender transmit = "[xyz]"; reply_impatient = "[xyz]"; reply_police_accept = "[xyz]"; reply_police_reject = "[xyz]"; }; "9" = { // escape pod offer to rescue transmit = "[xyz]"; reply_friendly = "[xyz]"; reply_unfriendly = "[xyz]"; }; "11" = { // keep away from target reply = "[xyz]"; }; };
bcc_custom_messages = { "level1" = { // this will show "Level 1 message" in the Broadcast Comms MFD // when selected, it will display the "transmit" message // after 2 seconds, it will display the "reply" message, and run the post_reply_function, passing the ship and messagekey ("level1") to the function // then it will make the messages "level2a" and "level2b" visible state = "visible"; // whether the player will be offered this option immediately; display = "Level 1 message"; // what to display in the MFD delete_on_transmit = yes; // indicates whether message option should be removed from MFD after use transmit = "This is the transmitted message for level 1."; // what to transmit when the option is activated delay = 2; // how long to delay after transmission reply = "This is the response to level 1."; // the message that will be sent back to the player. post_reply_function = "$test_reply"; // function to call after sending the reply (optional) post_reply_worldscript = "MyWorldScriptName"; post_reply_show_messages = ("level2a", "level2b"); // messages to make visible after the reply is received }; "level2a" = { // this will show "Level 2 message A" in the Broadcast Comms MFD // when selected, it will display the "transmit" message // after 2 seconds, it will display the "reply" message, and run the post_reply_function, passing the ship and messagekey ("level2a") to the function // then it will hide "level2b" (it doesn't need to hide itself, as the "delete_on_transmit" is set to "yes") state = "hidden"; display = "Level 2 message A"; // what to display in the MFD delete_on_transmit = yes; // indicates whether message option should be removed from MFD after use transmit = "This is the transmitted message for level 2A."; // what to transmit when the option is activated delay = 2; // how long to delay after transmission reply = "This is the response to level 2A."; // the message that will be sent back to the player. post_reply_function = "$test_reply"; // function to call after sending the reply (optional) post_reply_worldscript = "MyWorldScriptName"; post_reply_hide_messages = ("level2b"); }; "level2b" = { // this will show "Level 2 message B" in the Broadcast Comms MFD // when selected, it will display the "transmit" message. // after 2 seconds it will display the "reply" message, and run the post_reply_function, passing the ship and messagekey ("level2b") to the function // then it will hide "level2a" (it doesn't need to hide itself, as the "delete_on_transmit" is set to "yes") state = "hidden"; display = "Level 2 message B"; // what to display in the MFD delete_on_transmit = yes; // indicates whether message option should be removed from MFD after use transmit = "This is the transmitted message for level 2B."; // what to transmit when the option is activated delay = 2; // how long to delay after transmission reply = "This is the response to level 2B."; // the message that will be sent back to the player. post_reply_function = "$test_reply"; // function to call after sending the reply (optional) post_reply_worldscript = "MyWorldScriptName"; post_reply_hide_messages = ("level2a"); }; };
There is a small OXP in the "Resources" folder of the BCC package that demonstrates all of these options.
This is presumably this: BCC_Testbed.oxp
Introducing more ship personality types for Broadcast Comms
See this thread for Murgh's inclusion of Broadcast Comms for his Refugee Adders packages (2022).
Installation
Place the 'BroadcastCommsMFD.oxz' into your 'AddOns' folder and when you start the game, hold down 'Shift' until you see the spinning Cobra.
Alternatively, you can download the expansion using the expansion pack manager in the game itself.
Requirements
This expansion pack relies on having multi-function displays available in your HUD. You must at least be using Oolite version 1.79, and your HUD must have at least 1 MFD defined.
Download
Download BroadcastCommsMFD_1.3.7.oxz
Download BroadcastCommsMFD.zip v1.3.7 (extract OXP folder to AddOns)
Download BCC_Testbed.zip which is a small OXP to demonstrate the script_info integrations. This is also included in the "Resources" folder of the main OXP.
Licence/Author
This work is licensed under the Creative Commons Attribution-Noncommercial-Share Alike 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/4.0/ or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.
The expansion pack was developed by phkb and zireael.
With thanks to: cim, Norby, Wildeblood and marte for their suggestions and fixes.
Version History
1.3.7
- Better handling of unpurchased equipment. MFD will not be shown at all in this case.
1.3.6
- Better handling of damaged equipment - MFD will now show a "damaged" message.
1.3.5
- Really fixed JS error when targeting wormholes (or any entity that doesn't have a script object).
1.3.4
- Fixed JS error when targeting wormholes (or any entity that doesn't have a scriptInfo object).
- Fixed JS error where a ship may not be in a group when attacking the player and a bribe is offered.
1.3.3
- Added check for existing message before trying to add custom messages via bcc_custom_messages.
- Removed debug message.
1.3.2
- Fixed issue with not being able to replace core messages with custom ones.
1.3.1
- Fixed issue with some transmissions defaulting to a blank message.
- Added checks for "bcc_disable_defaults" when validating new external messages, making it easier to replace core messages with custom ones.
1.3
- Added ability to control messages via script_info.
- Added TestBed OXP (in Resources folder) for demonstrating how to use the script_info integrations.
- Fixed issue where requesting docking clearance from a station with no docks would not be correctly interpreted.
1.2.12
- Improved integration with Bounty System OXP.
- Improvements to the process of surrendering to police, as suggested by Milo.
- Added method to allow message responses to be overridden by another OXP.
1.2.11
- Fix for issue where surrendering to police was not implemented correctly/completely.
1.2.10
- Tweaks to routine that stops timers.
1.2.9
- Fixed missing expansion in bribe message.
1.2.8
- Added missing ";" to role-categories.plist.
1.2.7
- Moved initialisations to startUp.
1.2.6
- Corrected errors in descriptions.plist.
1.2.5
- Moved "AccuracyAdj" out of the global namespace.
- Improved methodology for NPC type identification.
- Added some additional responses.
- Code refactoring.
1.2.4
- Fix for "Send distress message" not sending the correct message.
- Further updates for docking requests to handle further changes in Oolite 1.85/6.
- Code refactoring.
1.2.3
- Updated method for determining player's next target system, to use new property "nextSystem". (Oolite 1.85/6 only - previous version will use old method).
- Added "Request docking clearance" and "Withdraw docking clearance" messages, available when targeting a station. (Oolite 1.85/6 only - not available in previous versions).
- Removed hard-coded scanner range value.
- Code stability improvements.
1.2.2
- Sound effects added for mode/activate functions of MFD.
- Determination of player's hyperspace destination now considers the presence of the ANA.
1.2.1
- Added the ability to sell the MFD.
- Corrected determination of Elite rankings when used in chance calculations.
- Changed "==" comparisons to "===" for performance improvements.
- Adjustments to the $playerTargetSystem calculation.
- Changed the logic for determining if a message already exists or not, making it purely based on the message name.
- Restructured internal array to include messageName in list, making it easier to reference message.
1.2.0
- Added "hideOnConditionRed" option to custom messages, allowing messages to be hidden if the player is under attack.
- Fixed issue where, after having targeted something which is then scooped (ie escape capsule), messages were staying available to transmit.
- Internal code cleanup.
1.1.2
- Fixed issue with $checkMessageExists function, which was not checking for a null value in the message array.
- Added check for hostile targets when switching to red alert mode, so the MFD understands the difference between an environment red alert and a situational red alert.
- Fixed inconsistency in external function names. $checkMessageExists was missing the leading "$" symbol.
- Code cleanup.
1.1.1
- Further small tweaks to the wormhole request responses.
1.1.0
- Added some exclusions for Generation ships, just to be sure.
- Small tweaks to the wormhole request responses.
- Made the equipment less likely to be damaged.
- Turned off the "portable_between_ships", as this is equipment installed in a ship and logically would need to be installed in a new one.
- Fixed manifest file so the category matches the expansion manager setting.
1.0.19
- Fixed issue with Javascript error when in interstellar space.
1.0.18
- Fixed issue with the MFD being too chatty and sending unnecessary updates to the console.
- Fixed issue with police responding to surrender like a pirate. If you're not a fugitive they will now wait for the player to disable their weapons systems, and if the player responds in time, they will (probably) accept the surrender.
- You can now also attempt to bribe a police ship. Police may accept a bribe, if they're not in the station aegis, and the chance increases with lower government types. They might also fine the player.
- Fixed issue with surrendering to Thargoids. They will now curse you. And probably continue shooting.
- Bug fixes.
1.0.17
- Correctly resets the target system after a hyperspace jump or a launch from a station, so the "Is anyone heading to ..?" question will be available immediately.
1.0.16
- Code improvements as suggested by Wildeblood.
1.0.15
- Updates for 1.82 compatibility, particularly around the player.ship.targetSystem not being the next jump point anymore. New process implemented.
- Made MFD equipment item portable between ships
1.0.14
- Changed specification of the createMessage and updateMessage functions to use an object rather than parameters.
- Added two new message types, "(Target last comms message)" and "Keep away from my target".
- Changed the default callback wait time for external messages to be 2 seconds.
- If there are more than 9 messages available to the player, the box will now scroll, and indicators in the title will show whether there are more items either on the top or bottom of the list.
- Lots of bug fixes
1.0.13
- Bug fixes and code refactoring
- Removed the "Answer distress call" message, as it never gets triggered
- Added the "Offer to rescue escape pod" message
- Added facility where messages starting with a bracket (ie. "(", "{", "<" or "[") don't get a message transmitted, although the callback function will still be called. This allows the MFD to used like a menu system. For instance, an OXP could add an item called "(Switch to special comms mode)". When the player executes that option, the OXP could disable all the default messages, and display a new, custom list, with an extra item called "(Switch to normal comms mode)" which then re-enables all the standard comms messages.
- Changed the initial bribe amount to 1 credit, based on the reasoning that 1 CR = 1/2 ton of food, therefore is a considerable amount
Also, this means there are more chances the pirates will accept a lower amount of bribe, thus making it more useful.
1.0.12
- Added "Send bribe to closest target" and "Surrender to closest target" messages, for when the player doesn't have a target but is under attack.
Thanks for Norby for the suggestions. - Added the $disableMessage, $enableMessage, and $isMessageEnabled external functions, so that OXP developers can disable the standard internal messages, either individually or all of them.
Digebitian Variant
For those in search of a more refined vocabulary and mode of expression, there is finally a Digebitian Variant available. Produced with the utmost skill and hand-tailored finesse in the workshops and laboratories of Lesser Walsingham, Xenon Industries are proud to present you with BroadcastComms Digebiti Variations.
If you wish for a taste, see here: Jack Sterling (profile by Smivs - see especially the link at the bottom of the page) & here (a rant about being diddled in the Shipyards). The thread with the fons et origo is here.
You can add this to your game by downloading BroadcastComms_Digebiti_Variations.oxz (also available through the in-game Expansions Manager - HUDs section).
Cmdr Wyvern's variant
See Cmdr Wyvern's piratical dialectic here (2022)
OXP's using Broadcast Comms
- GalCop Missions (for some of the missions)
- Tionisla Orbital Graveyard (for interrogating the monuments)
- Iron Ass OXP - vol IV (for conversations with the Refugee Adder)
Links
- Communication
- In-flight communication (2007)
- Comms Oxp Discussion (2011)
- Conversations with NPCs (2013)
- Help us make Oolite more immersive! (2013)
- communicating with other ships (2013) also discusses speech recognition software
- Zireael's Dropbox (2014) has a couple of relevant .js scripts if you know how to deal with them: see OXP howto if you are so inclined.
Quick Facts
Version | Released | License | Features | Category | Author(s) | Feedback |
---|---|---|---|---|---|---|
1.3.7 | 2023-10-17 | CC BY-NC-SA 4.0 | Hud MFD | HUDs OXPs | phkb, zireael | Oolite BB |
Gameplay and Balance indicator
Communication usually makes things a little easier! Especially when it influences the other's actions...