[1.7b1] Using new HUD elements

Freeform discussion about anything related to modding Transcendence.
Post Reply
User avatar
Xephyr
Militia Captain
Militia Captain
Posts: 857
Joined: Fri Dec 14, 2007 1:52 am
Location: Orion Arm, Milky Way
Contact:

1.7 beta 1 introduces some default HUD elements for playerships. These will be used by default if you use plyChangeShip to switch to a ship without a defined <PlayerSettings>, but you can also use them rather than the default HUD on your own ships.

This is particularly helpful because it saves you the trouble of making an armor HUD.

Code: Select all

<PlayerSettings
   ...
   >

   <ArmorDisplay
      style=         "circular"
      />

   <ReactorDisplay
      style=         "circular"
      />
         
   <WeaponDisplay
      style=         "circular"
      />
</PlayerSettings>
Project Renegade (Beta) : "The Poor Man's Corporate Command!"
Real programmers count from 0. And sometimes I do, too.
User avatar
Xephyr
Militia Captain
Militia Captain
Posts: 857
Joined: Fri Dec 14, 2007 1:52 am
Location: Orion Arm, Milky Way
Contact:

Searching through the source on GitHub I've discovered that the armorHUD also accepts color values!

Code: Select all

<ArmorDisplay style=	"circular"		
armorColor="#FFFFFF"
shieldsColor="#FFFFFF"/>
This will make the armor and shields appear white.

Reactor HUD also accepts the following values:

Code: Select all

<ReactorDisplay style=	"circular"
backgroundColor="..."
fuelColor="..."
powerColor="..."
warningColor="..."/>
Weapons/Targeting HUD accepts the following:

Code: Select all

<WeaponDisplay style=	"circular"
backgroundColor="..."
targetColor="..."
weaponColor="..."
/>
Project Renegade (Beta) : "The Poor Man's Corporate Command!"
Real programmers count from 0. And sometimes I do, too.
User avatar
digdug
Fleet Admiral
Fleet Admiral
Posts: 2620
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

what styles are available ? I see only circular
User avatar
Xephyr
Militia Captain
Militia Captain
Posts: 857
Joined: Fri Dec 14, 2007 1:52 am
Location: Orion Arm, Milky Way
Contact:

digdug wrote:what styles are available ? I see only circular
Just circular for now, but there's plans for more in the future.
Project Renegade (Beta) : "The Poor Man's Corporate Command!"
Real programmers count from 0. And sometimes I do, too.
relanat
Militia Captain
Militia Captain
Posts: 941
Joined: Tue Nov 05, 2013 9:56 am

Thanks for posting this info. Very helpful.
Stupid code. Do what I want, not what I typed in!
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?

From discord:
Archcannon wrote:Not just "circular"
there's also "default"
ArmorDisplay has "rectangular"
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.
relanat
Militia Captain
Militia Captain
Posts: 941
Joined: Tue Nov 05, 2013 9:56 am

Thanks, RPC.

Has anyone used the rectangular armor display? I messed around with it but couldn't get the armor percentages/HP to appear (as appear in the Balin Dragons) although the ship image appeared. I'm probably missing some required code/XML but have no idea what it is, or there might be limitations that I'm not aware of.
Stupid code. Do what I want, not what I typed in!
JohnBWatson
Fleet Officer
Fleet Officer
Posts: 1452
Joined: Tue Aug 19, 2014 10:17 pm

Xephyr wrote:
Wed Dec 28, 2016 8:18 pm
digdug wrote:what styles are available ? I see only circular
Just circular for now, but there's plans for more in the future.
Is it possible to create our own(a la HTML)? Given the stock market and some mission code, it shouldn't be too difficult to hack together a special - looking interface with just that, but given the ability to select between them and the way we could customize the default interface with images, I'd imagine that there's some way to do it.
Post Reply