Is this possible? override Ship Status screen

Freeform discussion about anything related to modding Transcendence.
Post Reply
steelwing
Militia Lieutenant
Militia Lieutenant
Posts: 100
Joined: Sun Aug 01, 2010 4:33 pm

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.
User avatar
digdug
Fleet Admiral
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)

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>
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

<PlayerSettings>
shipScreen="{unid} | {screen-name}"
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?

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
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

You can also override the screen entirely by making a dockscreen and giving it the UNID &dsShipInterior;
Get your own Galactic Omni Device
Get it now. It's free!!
Image
steelwing
Militia Lieutenant
Militia Lieutenant
Posts: 100
Joined: Sun Aug 01, 2010 4:33 pm

alterecco wrote:You can also override the screen entirely by making a dockscreen and giving it the UNID &dsShipInterior;
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}"
Awesome, thank you both! :mrgreen: 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?
User avatar
digdug
Fleet Admiral
Fleet Admiral
Posts: 2620
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

:mrgreen: 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?
Yes, it overrides the status screen of your custom playership only. Other ships (or vanilla ships will use the standard dsShipInterior)
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 :P

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>
Sorry if I didn't explain it better before :P
User avatar
Star Weaver
Militia Commander
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:

Code: Select all

(if (eq aScreen (objGetDataField gPlayerShip "shipStatusScreen"))
  (block nil 
    (dbglog "We're on the playership status screen.") 
  )
)
Image
Image
Image
steelwing
Militia Lieutenant
Militia Lieutenant
Posts: 100
Joined: Sun Aug 01, 2010 4:33 pm

digdug wrote:
:mrgreen: 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?
Yes, it overrides the status screen of your custom playership only. Other ships (or vanilla ships will use the standard dsShipInterior)
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 :P

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>
Sorry if I didn't explain it better before :P
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>.
george moromisato
Developer
Developer
Posts: 2998
Joined: Thu Jul 24, 2003 9:53 pm
Contact:

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>.
Looks like a typo to me. I think it should be inside the tag:

Code: Select all

<PlayerSettings
   ...
   shipScreen="..."
   >

   ...

</PlayerSettings>
Everything else looks right to me.
User avatar
digdug
Fleet Admiral
Fleet Admiral
Posts: 2620
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

.Does it have an equivalent for the weapons display?
<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>.
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! :P indeed, that is a typo :D
Thanks for pointing that out.
steelwing
Militia Lieutenant
Militia Lieutenant
Posts: 100
Joined: Sun Aug 01, 2010 4:33 pm

Thank you for the help, George and digdug! :D
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.
TheLastBrunnenG
Commonwealth Pilot
Commonwealth Pilot
Posts: 86
Joined: Fri Dec 04, 2009 1:46 am

alterecco wrote:You can also override the screen entirely by making a dockscreen and giving it the UNID &dsShipInterior;
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.
Vaiyo A-O
A Home Va Ya Ray
Vaiyo A-Rah
Jerhume Brunnen G
ImageImage
steelwing
Militia Lieutenant
Militia Lieutenant
Posts: 100
Joined: Sun Aug 01, 2010 4:33 pm

TheLastBrunnenG wrote:
alterecco wrote:You can also override the screen entirely by making a dockscreen and giving it the UNID &dsShipInterior;
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.
Thanks, I'll definitely check it out.
Post Reply