Members | Sign In
All Forums > Mission Scripting
avatar

Custom Buttons for Consoles

posted May 10, 2011 18:55:03 by Mike_Substelny
It would be awesome if all five consoles had a reserved region of the screen where mission script writers could send a special button (or two or three). Clicking of the button could be detected by the script to trigger game actions. Here are some examples:

If Artemis docks at Starbase 1, send button "TransWarp Drive" to the Helmsman. If the Helmsman clicks that button the maximum throttle is increased while power is drained (or the ship blows up or whatever the mission script writer specifies).

If Artemis docks at Starbase 2, send button -> "Wave Motion Gun" to weapons officer. If Weapons Officer clicks the button another action is triggered with takes a bunch of power and destroys some bad guys (or throws a moon-sized cream pie at a Berserker).

If Artemis is approaching the Sargasso nebula, send button -> "Distress Call" to the Comms officer. When Artemis gets trapped in the nebula the Coms officer can click the button, attracting the attention of whomever the mission writer has chosen to put in the area.

If Artemis gets a certain Skaraan ship to surrender then a cloaking device is captured (LARPers would love this). Thereafter the "Activate Cloak" button appears on the Engineer's console. If the Engineer clicks this button, mission script actions cause all enemy ships to ignore Artemis and target something else.

Mission scripters might come up with all sorts of sci-fi do-dads for the Science Officer. Maybe one mission could have a "Deep Scan DRADIS" button that counts the number of enemy ships in a distant sector. Another mission might have a "ExtraPlanetary Bioscanner" button that analyzes the DNA of the planet-eating space bacteria.

These custom buttons could be a lot of fun in combination with the concept of the mission script sending individualized messages to each of the consoles.
"Damn the torpedoes! Four bells, Captain Drayton!"

(Likely actual words of Admiral David Farragut, USN, at the battle of Mobile Bay. Four bells was the signal for the engine room to make full steam ahead).
page   1
8 replies
avatar
PatrickMackey said May 11, 2011 01:26:25
This would be super cool.
avatar
Mike_Substelny said May 11, 2011 01:39:51
Yes, I know. :)

I'm just not sure this is the appropriate place to discuss this sort of concept. Maybe this belongs in the Development forums?
"Damn the torpedoes! Four bells, Captain Drayton!"

(Likely actual words of Admiral David Farragut, USN, at the battle of Mobile Bay. Four bells was the signal for the engine room to make full steam ahead).
avatar
ThomRobertson said May 13, 2011 03:19:23
No Mike, anything to do with scripting goes in this forum. Yer doin it rite. :)

Let me consider how I could implement your idea...
Creator of Artemis
avatar
Mike_Substelny said May 13, 2011 16:41:00
On further thought, mission script writers would want the ability to destroy or change these buttons so they could sometimes be used as toggles. While "Distress Call" and "Wave Motion Gun" could be instantaneous events with immediate consequences, "Transwarp Drive" and "Cloaking Device" would be ongoing game states that could be turned on and off.

Or perhaps all script-created buttons could be toggles by default, turning red while their state is active and grey when they are inactive (or something like that). In that case it would be up to the script writer to, for example, turn the Wave Motion Gun button off immediately after it was fired.

Or give the buttons several states indicated by color that the script could control. This would give the script writer an extra way to communicate with the crew. Maybe the Wave Motion Gun button is normally white, it turns yellow when the weapon is charging, and red when it is ready to fire. So perhaps all buttons could have possible states like red orange yellow green black white grey. Such a button need not be a control; a mission script might use it like the "radiological alarm" in Battlestar Galactica or the warp engine superheat alarm in original Star Trek.

I am salivating at the possibilities for power ups that this would present to mission scripters.
"Damn the torpedoes! Four bells, Captain Drayton!"

(Likely actual words of Admiral David Farragut, USN, at the battle of Mobile Bay. Four bells was the signal for the engine room to make full steam ahead).
avatar
Eric said May 14, 2011 02:14:36
Definite +1 for this idea. You could use these button as custom science probes as well.
avatar
Eric said Jun 15, 2011 05:02:35
Some sort of player input would be very useful in the mission scripting. Even if it's just a generic button that we slap text over, it gives the mission scripter more options.

For instance, you give a button that says "OverdriveWarp" which only can be clicked once. Something like this:

<event>
<if_button_clicked name="OverdriveWarp"/>
<if_variable name="OWclicked" comparator="!=" value="1"/>
<set_object_property name="Artemis" property="topSpeed" value="5"/>
<set_timer name="OW" seconds="60"/>
<set_variable name="OWclicked" value="1"/>
</event>

<event>
<if_timer_finished name="OW"/>
<set_object_property name="Artemis" property="topSpeed" value="0.7"/>
</event>

You could even give players choices in a mission and then branch off based on their choice.
avatar
Mike_Substelny said Jun 15, 2011 18:55:00
I love your hypothetical code snippet, Eric!

If the program allowed the buttons to have colored states I would like to write a code snippet like this:

<!-- Artemis docks at a special base to get the experimental Warp Overdrive installed -->
<event>
<if_docked name="Utopia Planitia"/>
<if_variable name="OWinstalled" comparator="!=" value="1"/>
<!-- The button is sent to the Engineering console -->
<!-- While deactivated the button is white -->
<send_button_to console="E" name="OverdriveWarp" state="W"/>
<warning_popup_message message="Warp Overdrive Installed" console="EH"/>
<set_variable name="OWinstalled" value="1"/>
</event>

<!-- Clicking the button enables the Warp Overdrive for 60 seconds -->
<!-- and turns the button yellow -->
<event>
<if_variable name="OWinstalled" comparator="=" value="1"/>
<if_button_clicked name="OverdriveWarp"/>
<if_button_state name="OverdriveWarp" state="W"/>
<set_object_property name="Artemis" property="topSpeed" value="5"/>
<set_button_state name="OverdriveWarp" state="Y"/>
<set_timer name="overdrive_on_timer" seconds="60"/>
</event>

<!-- After 60 seconds Overdrive cuts out -->
<!-- and the button turns red -->
<event>
<if_variable name="OWinstalled" comparator="=" value="1"/>
<if_button_state name="OverdriveWarp" state="Y"/>
<if_timer_finished name="overdrive_on_timer"/>
<set_button_state name="OverdriveWarp" state="R"/>
<set_object_property name="Artemis" property="topSpeed" value="0.7"/>
<!-- Overdrive must cool for four minutes -->
<set_timer name="overdrive_overheat_timer" seconds="240"/>
</event>

<!-- After cooling re-enable Overdrive by turning button white -->
<event>
<if_variable name="OWinstalled" comparator="=" value="1"/>
<if_button_state name="OverdriveWarp" state="R"/>
<if_timer_finished name="overdrive_overheat_timer"/>
<set_button_state name="OverdriveWarp" state="W"/>
</event>

<!-- Overdrive is easily destroyed by any damage through the back shield -->
<event>
<if_variable name="OWinstalled" comparator="=" value="1"/>
<if_object_property name="Artemis" property="shieldStateBack" comparator="LESS" value="1"/>
<warning_popup_message message="Warp Overdrive Destroyed" console="EH"/>
<set_object_property name="Artemis" property="topSpeed" value="0.7"/>
<destroy_button console="E" name="OverdriveWarp"/>
<set_variable name="OWinstalled" value="0"/>
</event>
[Last edited Jun 15, 2011 18:59:53]
"Damn the torpedoes! Four bells, Captain Drayton!"

(Likely actual words of Admiral David Farragut, USN, at the battle of Mobile Bay. Four bells was the signal for the engine room to make full steam ahead).
avatar
Eric said Jun 27, 2011 03:11:19
Just had a thought about the custom buttons: we'll need to be able to script them out as well. For example, I'm hoping to use the custom buttons to present choices to captains. If they choose button A (use unusual anomaly to boost beam damage), I'll need to be able to make button B (use unusual anomaly to boost warp) disappear.
Login below to reply: