Is this possible? override Ship Status screen
In a mod that I'm working on, I've realized that I have to be able to fully override the Ship Status screen in the game, or at least the actions offered on that screen. I know there's DSF, which allows custom menu entries to be added to that screen, but can it (or anything else) replace/override that screen? Looks like Star Weaver asked about something like this when 1.04 came out, over here.
- digdug
- Fleet Admiral
- Posts: 2620
- Joined: Mon Oct 29, 2007 9:23 pm
- Location: Decoding hieroglyphics on Tan-Ru-Dorem
you can easily ADD actions to the ship status screen by using something similar to this example code (this is what i'm using to add the weapons extended action to the dockscreen)
It's basically a virtual station bearing the new <OnGlobalPaneInit> event.
Also, if you have a custom ship, you can also have a custom ship screen:
Code: Select all
<StationType UNID="&WE_OGPIStation;" virtual="true">
<Events>
<OnGlobalPaneInit>
(switch
(eq aScreenUNID &dsShipInterior;)
(scrAddAction
gScreen
'WE4
-1
"WE4 Configurator"
"w"
(block Nil
(setq prevScreen &dsShipInterior;)
(scrShowScreen gScreen &dsWEConfigurator;)
)
)
)
</OnGlobalPaneInit>
</Events>
</StationType>
Also, if you have a custom ship, you can also have a custom ship screen:
Code: Select all
<PlayerSettings>
shipScreen="{unid} | {screen-name}"
-
- Fleet Admiral
- Posts: 2876
- Joined: Thu Feb 03, 2011 5:21 am
- Location: Hmm... I'm confused. Anybody have a starmap to the Core?
Basically, look at scrAddAction. You can add actions to any screen.
Tutorial List on the Wiki and Installing Mods
Get on Discord for mod help and general chat


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.
Get on Discord for mod help and general chat


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.
alterecco wrote:You can also override the screen entirely by making a dockscreen and giving it the UNID &dsShipInterior;
Awesome, thank you both!digdug wrote:Also, if you have a custom ship, you can also have a custom ship screen:
Code:Code: Select all
<PlayerSettings> shipScreen="{unid} | {screen-name}"

digdug, I see this uses the <PlayerSettings> tag...There's not much reference for what it does and does not support, even in the wiki or XML sources. Anyone got anything documenting that tag?
- digdug
- Fleet Admiral
- Posts: 2620
- Joined: Mon Oct 29, 2007 9:23 pm
- Location: Decoding hieroglyphics on Tan-Ru-Dorem
Yes, it overrides the status screen of your custom playership only. Other ships (or vanilla ships will use the standard dsShipInterior)Does the custom ship screen override the normal ship status screen?
digdug, I see this uses the <PlayerSettings> tag...There's not much reference for what it does and does not support, even in the wiki or XML sources. Anyone got anything documenting that tag?
To do that you have to put the shipScreen=xxx line into the <PlayerSettings> of your custom ship, that's why I wrote it like that

so simply, in your custom ship, add the shipScreen line:
Code: Select all
<PlayerSettings
desc= "This ship is a playable custom ship"
initialClass= "true">
shipScreen="&dsMyCustomScreen;"
<ArmorDisplay>
armorblahblahextravaganza
</ArmorDisplay>
<ShieldDisplay>
<Image imageID="&rsWolfenShields;" imageX="0" imageY="0" imageWidth="136" imageHeight="136"/>
</ShieldDisplay>
<ReactorDisplay>
blah blah
</ReactorDisplay>
</PlayerSettings>

- Star Weaver
- Militia Commander
- Posts: 311
- Joined: Sun Nov 07, 2010 10:20 pm
- Location: . . . between the stars and the warm black sky . . .
Hey, I actually confirmed this with George in PM and used it in Detailed Ship Config (only to determine where the 'back' needs to go, which is now done some other way and I need to update that mod, but this should still work:)
I guess the information never got out. x_x
This is how you determine if you're on the status dockscreen regardless of what the screen's unid is:
I guess the information never got out. x_x
This is how you determine if you're on the status dockscreen regardless of what the screen's unid is:
Code: Select all
(if (eq aScreen (objGetDataField gPlayerShip "shipStatusScreen"))
(block nil
(dbglog "We're on the playership status screen.")
)
)
Not a problem. The syntax just looked weird, having the shipScreen= outside the tag like that. Thanks for explaining!digdug wrote:Yes, it overrides the status screen of your custom playership only. Other ships (or vanilla ships will use the standard dsShipInterior)Does the custom ship screen override the normal ship status screen?
digdug, I see this uses the <PlayerSettings> tag...There's not much reference for what it does and does not support, even in the wiki or XML sources. Anyone got anything documenting that tag?
To do that you have to put the shipScreen=xxx line into the <PlayerSettings> of your custom ship, that's why I wrote it like that
so simply, in your custom ship, add the shipScreen line:Sorry if I didn't explain it better beforeCode: Select all
<PlayerSettings desc= "This ship is a playable custom ship" initialClass= "true"> shipScreen="&dsMyCustomScreen;" <ArmorDisplay> armorblahblahextravaganza </ArmorDisplay> <ShieldDisplay> <Image imageID="&rsWolfenShields;" imageX="0" imageY="0" imageWidth="136" imageHeight="136"/> </ShieldDisplay> <ReactorDisplay> blah blah </ReactorDisplay> </PlayerSettings>

Now, another question...I see <PlayerSettings> has <ShieldDisplay>, <ArmorDisplay>, and <ReactorDisplay>...Does it have an equivalent for the weapons display? This is why I asked about documentation for <PlayerSettings>.
-
- Developer
- Posts: 2998
- Joined: Thu Jul 24, 2003 9:53 pm
- Contact:
Looks like a typo to me. I think it should be inside the tag:steelwing wrote:Not a problem. The syntax just looked weird, having the shipScreen= outside the tag like that. Thanks for explaining!
Now, another question...I see <PlayerSettings> has <ShieldDisplay>, <ArmorDisplay>, and <ReactorDisplay>...Does it have an equivalent for the weapons display? This is why I asked about documentation for <PlayerSettings>.
Code: Select all
<PlayerSettings
...
shipScreen="..."
>
...
</PlayerSettings>
- digdug
- Fleet Admiral
- Posts: 2620
- Joined: Mon Oct 29, 2007 9:23 pm
- Location: Decoding hieroglyphics on Tan-Ru-Dorem
<PlayerSettings> contains the settings for a playership like starting money or description in the ship selection screen. It contains the details for the shield HUD <ShieldDisplay>, reactor and fuel bars (top left of the HUD) in <ReactorDisplay>, armor HUD in <ArmorDisplay>..Does it have an equivalent for the weapons display?
The bottom left part (weapons) of the HUD is not moddable and hardcoded. (well, we can change the colour of the HUD since the image resource is not hardcoded, but we cannot change the size for example)
@George
ops!


Thanks for pointing that out.
Thank you for the help, George and digdug! 
I'm probably not the first, but can I get in a feature request for the ability to mod the weapon and radar displays? I doubt I would actually ever mod the radar myself, but it would be best to be able to mod everything. A truly custom playership should be able to have fully customized displays, as much as is appropriate.

I'm probably not the first, but can I get in a feature request for the ability to mod the weapon and radar displays? I doubt I would actually ever mod the radar myself, but it would be best to be able to mod everything. A truly custom playership should be able to have fully customized displays, as much as is appropriate.
-
- Commonwealth Pilot
- Posts: 86
- Joined: Fri Dec 04, 2009 1:46 am
I'm sure there are better examples, but if you need to see it in action, I used this trick in my Playable Pteravore mod (http://xelerus.de/index.php?s=mod&id=669). I replaced dsShipInterior, dsShipConfig, dsCargoHold, and dsManualRefuel with custom dockscreens, each with new dockreen graphics too. Works well.alterecco wrote:You can also override the screen entirely by making a dockscreen and giving it the UNID &dsShipInterior;
Vaiyo A-O
A Home Va Ya Ray
Vaiyo A-Rah
Jerhume Brunnen G


A Home Va Ya Ray
Vaiyo A-Rah
Jerhume Brunnen G


Thanks, I'll definitely check it out.TheLastBrunnenG wrote:I'm sure there are better examples, but if you need to see it in action, I used this trick in my Playable Pteravore mod (http://xelerus.de/index.php?s=mod&id=669). I replaced dsShipInterior, dsShipConfig, dsCargoHold, and dsManualRefuel with custom dockscreens, each with new dockreen graphics too. Works well.alterecco wrote:You can also override the screen entirely by making a dockscreen and giving it the UNID &dsShipInterior;