Squadron Orders

Freeform discussion about anything related to modding Transcendence.
Post Reply
RPC
Fleet Admiral
Fleet Admiral
Posts: 2876
Joined: Thu Feb 03, 2011 5:21 am
Location: Hmm... I'm confused. Anybody have a starmap to the Core?

Anybody know how to mod the 'Squadron Orders' when you press Q? I know that changing the controller to something like "fleet" gives you a whole new set of Squadron Orders and even gives you formations (alpha formation would save many an auton) to chose from. Are they internal functions? I already know how to mod the individual commands using bases or the <communications> tag, but I don't want to reassign every ship I have if I have a fleet of 10 ships.
Maybe dockscreens are the way to go to manage fleets?
Tutorial List on the Wiki and Installing Mods
Get on Discord for mod help and general chat
Image
Image
Der Tod ist der zeitlose Frieden und das leben ist der Krieg
Wir müssen wissen — wir werden wissen!
I don't want any sort of copyright on my Transcendence mods. Feel free to take/modify whatever you want.
User avatar
alterecco
Fleet Officer
Fleet Officer
Posts: 1658
Joined: Wed Jan 14, 2009 3:08 am
Location: Previously enslaved by the Iocrym

As far as I know <Communications> is the only way to provide or change options in the squadron screen.
User avatar
digdug
Fleet Admiral
Fleet Admiral
Posts: 2620
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

create a new event handler for your custom squadron, add the <communications> to it, then just make your wingmen inherit the new event handler.
RPC
Fleet Admiral
Fleet Admiral
Posts: 2876
Joined: Thu Feb 03, 2011 5:21 am
Location: Hmm... I'm confused. Anybody have a starmap to the Core?

Digdug wrote:create a new event handler for your custom squadron,

Custom squadron as in custom formation or as in custom wingmen?
Being able to mod formations would be good enough for me :wink: .
Tutorial List on the Wiki and Installing Mods
Get on Discord for mod help and general chat
Image
Image
Der Tod ist der zeitlose Frieden und das leben ist der Krieg
Wir müssen wissen — wir werden wissen!
I don't want any sort of copyright on my Transcendence mods. Feel free to take/modify whatever you want.
User avatar
alterecco
Fleet Officer
Fleet Officer
Posts: 1658
Joined: Wed Jan 14, 2009 3:08 am
Location: Previously enslaved by the Iocrym

Like digdug said, event handlers are the easiest way to add communication orders to other ships

It would be /something/ like this:

Code: Select all

<ShipClass UNID="&scSomeEventHandlerName;"
    class=              "(my event handler)"
    virtual=            "true"
    attributes=      "eventHandler"
    >
    <Communications>
        <Message name="Test" key="t">
           <OnShow>
              true
              ;; or some other calculation you want to do
           </OnShow>
           <Invoke>
              (block nil
                 ;; run whatever code in here
                 (plyMessage gPlayer "Ran Test")
              )
           </Invoke>
        </Message>
    </Communications>
</ShipClass>
The above is a simple example of an event handler that has one communication order. You can attach that to a ship by using the objSetEventHandler function.

You might need to experiment a it with some other factors, such as whether the ship needs to be wingman or not.
Post Reply