Evilbob's howto: Working 6-plate armour display

This is a moderated forum that collects tutorials, guides, and references for creating Transcendence extensions and scripts.
User avatar
evilbob
Militia Captain
Militia Captain
Posts: 555
Joined: Sun Mar 05, 2006 1:23 pm

Sat Aug 02, 2008 3:53 pm

I've spent some time looking at the code for armour displays, and have coem up with an explanation, and a graphic to aid the explanation (even if it is a little buggy)

Code: Select all

<ArmorSection name="front starboard" Name of that piece of armour, used in repair dockscreens and the like, pretty obvious

imageID="&rs6PlateArmor;" Pretty obvious, the armour images you want to use
imageX="90" Location to choose part of image from (horizontal)
imageY="0" Location to choose part of image from (vertical)
imageWidth="9" Width of selection
imageHeight="28" Height of selection
destX="104" Location to draw the selection for the armour (horizontal)
destY="69" Location to draw the selection for the armour (vertical)

hpX="98" Location of HP number (horizontal)
hpY="60" Location of HP number (vertical

nameY="30" Location of Armour text (vertical) (I don't think nameX exists, but it would be useful if it did)
nameBreakWidth="275" defines how many pixels the line follows directly under armour text? 
nameDestX="0" location of end of line (horizontal)
nameDestY="8" /> location of end of line (vertical)
I hope that's not too abstract
Image

http://xelerus.de/index.php?s=mod&id=154
Last edited by evilbob on Sat Aug 02, 2008 9:00 pm, edited 1 time in total.

User avatar
digdug
Fleet Admiral
Fleet Admiral
Posts: 2615
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

Sat Aug 02, 2008 6:29 pm

cool! :D

this is perfect for the docs.

User avatar
evilbob
Militia Captain
Militia Captain
Posts: 555
Joined: Sun Mar 05, 2006 1:23 pm

Sat Aug 02, 2008 7:06 pm

I know the image is a little crude, but I had the idea for it when I looked at the parts referring to the "line" and thought it was a bit vague, so I quickly made that to demonstrate it.

Also, to get armour plates to correctly align, they must be in the same order in ArmorDisplay and the Armor section (IE, if front armour is first in one, it must be first in the other section, if it's second in one, it must be second in both etc. for all the segments)

User avatar
Periculi
Fleet Officer
Fleet Officer
Posts: 1259
Joined: Sat Oct 13, 2007 7:48 pm
Location: By the beach

Sat Aug 02, 2008 7:11 pm

This is the armor tag from the ship (sapphire)-

Code: Select all

		<Armor>
			<ArmorSection start="315" span="90" armorID="&itReactiveArmor;" areaSet="0,2" />
			<ArmorSection start="225" span="90" armorID="&itReactiveArmor;" areaSet="3,4" />
			<ArmorSection start="45"  span="90" armorID="&itReactiveArmor;" areaSet="7,13" />
			<ArmorSection start="135" span="90" armorID="&itReactiveArmor;" areaSet="1,6" />
		</Armor>
I understand start and span and even figured out armorID by myself, but what is areaSet ?

User avatar
evilbob
Militia Captain
Militia Captain
Posts: 555
Joined: Sun Mar 05, 2006 1:23 pm

Sat Aug 02, 2008 7:15 pm

I don't know. It doesn't appear to affect player ships, and only those 4 pairs of number are used- "0,2", "3,4", "7,13" and "1,6", even on ships with 12 armour segments, it still only uses those 4 repeatedly

The look like co-ordinates to me, which they might be with a name like "areaset"

And armorID is pretty obvious to me, it was the start and span I initially struggled with.

User avatar
evilbob
Militia Captain
Militia Captain
Posts: 555
Joined: Sun Mar 05, 2006 1:23 pm

Thu Aug 07, 2008 8:03 pm

Anyway, I have a new version, which uses a totally new armour image, which is smoother and more effective, plus allows 6 outer "non-critical" segments too

Armour project

User avatar
Psycholis
Militia Commander
Militia Commander
Posts: 295
Joined: Sun Mar 05, 2006 8:23 pm
Location: Missouri

Fri Aug 08, 2008 6:43 am

i remember a 8 segment graphic from before or is that still around?

User avatar
digdug
Fleet Admiral
Fleet Admiral
Posts: 2615
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

Fri Aug 08, 2008 1:41 pm

is it possible to create layered armors sections ? Like placing 2 layers of front armor one in front of the other, so that the second is damaged only when the first is completely gone ?

User avatar
evilbob
Militia Captain
Militia Captain
Posts: 555
Joined: Sun Mar 05, 2006 1:23 pm

Sun Aug 10, 2008 5:34 pm

try "noncritical=" tags, one of those should help- use the same span and start and it should work. I remember "general" and some other tag for noncritical, but one should relate to outer armour.

User avatar
Wolfy
Fleet Admiral
Fleet Admiral
Posts: 5389
Joined: Tue Feb 05, 2008 1:10 am
Location: Somewhere in the Frontier on a Hycrotan station, working on new ships.

Sun Aug 10, 2008 5:39 pm

evilbob wrote:try "noncritical=" tags, one of those should help- use the same span and start and it should work. I remember "general" and some other tag for noncritical, but one should relate to outer armour.
:D I... am going to try this... :D
(shpOrder gPlayership 'barrelRoll)
(plySetGenome gPlayer (list 'hycrotan 'nonBinary))
Image
Homelab Servers: Xeon Silver 4110, 16GB | Via Quadcore C4650, 16GB | Athlon 200GE, 8GB | i7 7800X, 32GB | Threadripper 1950X, 32GB | Atom x5 8350, 4GB | Opteron 8174, 16GB
Workstations & Render machines: Threadripper 2990WX, 32GB, 2x 1080ti | Xeon Platinum 8173M, 48GB, 1070ti | R9 3900X, 16GB, Vega64 | 2x E5 2430L v2, 24GB, 970
Office Systems: 2x Xeon Silver 4116, 96GB, 2x 1080ti | i7 3770, 16GB, some old quadro | i5 3210m, 8GB | some i7 macbook
Misc Systems: R5 3500U, 20GB | R5 2400G, 16GB | i5 7640X, 16GB, Vega56 | E5 2620, 8GB, R5 260 | P4 1.8ghz, 0.75GB, Voodoo 5 5500 | Athlon 64 x2 4400+, 1.5GB, FX 5800 Ultra | Pentium D 3.2ghz, 4GB, 7600gt | Celeron g460, 8GB, 730gt | 2x Athlon FX 74, 8GB, 8800gts 512 | FX 9590, 16GB, R9 295x2 | E350, 8GB | Phenom X4 2.6ghz, 16GB, 8800gt | random core2 duo/atom/i5/i7 laptops

User avatar
Ttech
Fleet Admiral
Fleet Admiral
Posts: 2756
Joined: Tue Nov 06, 2007 12:03 am
Location: Traveling in the TARDIS
Contact:

Mon Aug 11, 2008 5:05 pm

I must be trying this, thought my hack-ship has 16 plates of armor, have to take a look. :)
Image
Image

*** AWAY ON SABBATICAL ***
** USE EMAIL TO CONTACT ME **

User avatar
evilbob
Militia Captain
Militia Captain
Posts: 555
Joined: Sun Mar 05, 2006 1:23 pm

Wed Aug 13, 2008 10:46 pm

Could someone move this over to extension reference?

User avatar
Wolfy
Fleet Admiral
Fleet Admiral
Posts: 5389
Joined: Tue Feb 05, 2008 1:10 am
Location: Somewhere in the Frontier on a Hycrotan station, working on new ships.

Thu Aug 14, 2008 12:05 am

In a few days, I'll probably have a fully functional custom playership for Trans-X 2 with a dual hull to show off.
(shpOrder gPlayership 'barrelRoll)
(plySetGenome gPlayer (list 'hycrotan 'nonBinary))
Image
Homelab Servers: Xeon Silver 4110, 16GB | Via Quadcore C4650, 16GB | Athlon 200GE, 8GB | i7 7800X, 32GB | Threadripper 1950X, 32GB | Atom x5 8350, 4GB | Opteron 8174, 16GB
Workstations & Render machines: Threadripper 2990WX, 32GB, 2x 1080ti | Xeon Platinum 8173M, 48GB, 1070ti | R9 3900X, 16GB, Vega64 | 2x E5 2430L v2, 24GB, 970
Office Systems: 2x Xeon Silver 4116, 96GB, 2x 1080ti | i7 3770, 16GB, some old quadro | i5 3210m, 8GB | some i7 macbook
Misc Systems: R5 3500U, 20GB | R5 2400G, 16GB | i5 7640X, 16GB, Vega56 | E5 2620, 8GB, R5 260 | P4 1.8ghz, 0.75GB, Voodoo 5 5500 | Athlon 64 x2 4400+, 1.5GB, FX 5800 Ultra | Pentium D 3.2ghz, 4GB, 7600gt | Celeron g460, 8GB, 730gt | 2x Athlon FX 74, 8GB, 8800gts 512 | FX 9590, 16GB, R9 295x2 | E350, 8GB | Phenom X4 2.6ghz, 16GB, 8800gt | random core2 duo/atom/i5/i7 laptops

george moromisato
Developer
Developer
Posts: 2979
Joined: Thu Jul 24, 2003 9:53 pm
Contact:

Thu Aug 14, 2008 12:59 am

Wolfy wrote:In a few days, I'll probably have a fully functional custom playership for Trans-X 2 with a dual hull to show off.
Not sure what you mean by "dual hull". If you mean that you set up the angles of the armor segments so that they overlap, then I'm sorry to say that that won't work. The code will not handle that case the way you expect. Sorry about that.

User avatar
Wolfy
Fleet Admiral
Fleet Admiral
Posts: 5389
Joined: Tue Feb 05, 2008 1:10 am
Location: Somewhere in the Frontier on a Hycrotan station, working on new ships.

Thu Aug 14, 2008 1:14 am

george moromisato wrote:
Wolfy wrote:In a few days, I'll probably have a fully functional custom playership for Trans-X 2 with a dual hull to show off.
Not sure what you mean by "dual hull". If you mean that you set up the angles of the armor segments so that they overlap, then I'm sorry to say that that won't work. The code will not handle that case the way you expect. Sorry about that.
oh apparently there is a non critical tag that allows some to be on the outside
(shpOrder gPlayership 'barrelRoll)
(plySetGenome gPlayer (list 'hycrotan 'nonBinary))
Image
Homelab Servers: Xeon Silver 4110, 16GB | Via Quadcore C4650, 16GB | Athlon 200GE, 8GB | i7 7800X, 32GB | Threadripper 1950X, 32GB | Atom x5 8350, 4GB | Opteron 8174, 16GB
Workstations & Render machines: Threadripper 2990WX, 32GB, 2x 1080ti | Xeon Platinum 8173M, 48GB, 1070ti | R9 3900X, 16GB, Vega64 | 2x E5 2430L v2, 24GB, 970
Office Systems: 2x Xeon Silver 4116, 96GB, 2x 1080ti | i7 3770, 16GB, some old quadro | i5 3210m, 8GB | some i7 macbook
Misc Systems: R5 3500U, 20GB | R5 2400G, 16GB | i5 7640X, 16GB, Vega56 | E5 2620, 8GB, R5 260 | P4 1.8ghz, 0.75GB, Voodoo 5 5500 | Athlon 64 x2 4400+, 1.5GB, FX 5800 Ultra | Pentium D 3.2ghz, 4GB, 7600gt | Celeron g460, 8GB, 730gt | 2x Athlon FX 74, 8GB, 8800gts 512 | FX 9590, 16GB, R9 295x2 | E350, 8GB | Phenom X4 2.6ghz, 16GB, 8800gt | random core2 duo/atom/i5/i7 laptops

Post Reply