Page 1 of 2

Evilbob's howto: Working 6-plate armour display

Posted: Sat Aug 02, 2008 3:53 pm
by evilbob
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

Posted: Sat Aug 02, 2008 6:29 pm
by digdug
cool! :D

this is perfect for the docs.

Posted: Sat Aug 02, 2008 7:06 pm
by evilbob
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)

Posted: Sat Aug 02, 2008 7:11 pm
by Periculi
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 ?

Posted: Sat Aug 02, 2008 7:15 pm
by evilbob
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.

Posted: Thu Aug 07, 2008 8:03 pm
by evilbob
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

Posted: Fri Aug 08, 2008 6:43 am
by Psycholis
i remember a 8 segment graphic from before or is that still around?

Posted: Fri Aug 08, 2008 1:41 pm
by digdug
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 ?

Posted: Sun Aug 10, 2008 5:34 pm
by evilbob
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.

Posted: Sun Aug 10, 2008 5:39 pm
by Aury
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

Posted: Mon Aug 11, 2008 5:05 pm
by Ttech
I must be trying this, thought my hack-ship has 16 plates of armor, have to take a look. :)

Posted: Wed Aug 13, 2008 10:46 pm
by evilbob
Could someone move this over to extension reference?

Posted: Thu Aug 14, 2008 12:05 am
by Aury
In a few days, I'll probably have a fully functional custom playership for Trans-X 2 with a dual hull to show off.

Posted: Thu Aug 14, 2008 12:59 am
by george moromisato
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.

Posted: Thu Aug 14, 2008 1:14 am
by Aury
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