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

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: 2620
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

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

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: 1282
Joined: Sat Oct 13, 2007 7:48 pm
Location: Necroposting in a forum near you

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

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

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: 298
Joined: Sun Mar 05, 2006 8:23 pm
Location: Missouri

i remember a 8 segment graphic from before or is that still around?
User avatar
digdug
Fleet Admiral
Fleet Admiral
Posts: 2620
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

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

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
Aury
Fleet Admiral
Fleet Admiral
Posts: 5421
Joined: Tue Feb 05, 2008 1:10 am
Location: Somewhere in the Frontier on a Hycrotan station, working on new ships.

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 'Varalyn 'nonBinary))
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 | Xeon E5 2620 v3, 8GB | 2x Xeon Silver 4116, 96GB, 2x 1080ti | i7 8700, 32GB, 6500XT
Workstations & Render machines: Threadripper 3990X, 128GB, 6900XT | Threadripper 2990WX, 32GB, 1080ti | Xeon Platinum 8173M, 48GB, 1070ti | R9 3900X, 16GB, Vega64 | 2x E5 2430L v2, 24GB, 970 | R7 3700X, 32GB, A6000
Gaming Systems: R9 5950X, 32GB, 6700XT
Office Systems: Xeon 5318Y, 256GB, A4000
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: 2767
Joined: Tue Nov 06, 2007 12:03 am
Location: Traveling in the TARDIS
Contact:

I must be trying this, thought my hack-ship has 16 plates of armor, have to take a look. :)
Image
Image
User avatar
evilbob
Militia Captain
Militia Captain
Posts: 555
Joined: Sun Mar 05, 2006 1:23 pm

Could someone move this over to extension reference?
User avatar
Aury
Fleet Admiral
Fleet Admiral
Posts: 5421
Joined: Tue Feb 05, 2008 1:10 am
Location: Somewhere in the Frontier on a Hycrotan station, working on new ships.

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 'Varalyn 'nonBinary))
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 | Xeon E5 2620 v3, 8GB | 2x Xeon Silver 4116, 96GB, 2x 1080ti | i7 8700, 32GB, 6500XT
Workstations & Render machines: Threadripper 3990X, 128GB, 6900XT | Threadripper 2990WX, 32GB, 1080ti | Xeon Platinum 8173M, 48GB, 1070ti | R9 3900X, 16GB, Vega64 | 2x E5 2430L v2, 24GB, 970 | R7 3700X, 32GB, A6000
Gaming Systems: R9 5950X, 32GB, 6700XT
Office Systems: Xeon 5318Y, 256GB, A4000
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: 2997
Joined: Thu Jul 24, 2003 9:53 pm
Contact:

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
Aury
Fleet Admiral
Fleet Admiral
Posts: 5421
Joined: Tue Feb 05, 2008 1:10 am
Location: Somewhere in the Frontier on a Hycrotan station, working on new ships.

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 'Varalyn 'nonBinary))
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 | Xeon E5 2620 v3, 8GB | 2x Xeon Silver 4116, 96GB, 2x 1080ti | i7 8700, 32GB, 6500XT
Workstations & Render machines: Threadripper 3990X, 128GB, 6900XT | Threadripper 2990WX, 32GB, 1080ti | Xeon Platinum 8173M, 48GB, 1070ti | R9 3900X, 16GB, Vega64 | 2x E5 2430L v2, 24GB, 970 | R7 3700X, 32GB, A6000
Gaming Systems: R9 5950X, 32GB, 6700XT
Office Systems: Xeon 5318Y, 256GB, A4000
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