Home » PLAYER'S HQ 1.13 » JA2 Complete Mods & Sequels » Arulco Vacations » AV v1.10
Re: AV v1.10[message #352995 is a reply to message #352994] Fri, 06 April 2018 21:19 Go to previous messageGo to previous message
edmortimer is currently offline edmortimer

 
Messages:1533
Registered:January 2015
Location: Home Free
Attachments, oh yeah . . . that also.

There are a two ways to do it. The old way (which I am transitioning away from but is still predominantly used in AV) is to add them in Attachments.XML. Each Attachment <uiIndex> number in Items.XML has the same number as an <attachmentIndex> value in Attachments.XML. For example, a Sniper Scope 10x is <uiIndex> 208 in Items.XML and is <attachmentIndex> 208 in Attachments.XML. In Attachments.XML every weapon that can use the Sniper Scope 10x has an entry listed by that weapon's <uiIndex> (in Items.XML) as a <itemIndex> number in the 208 section. So it looks like this:

<ATTACHMENT>
<attachmentIndex>208</attachmentIndex>
<itemIndex>19</itemIndex>
<APCost>20</APCost>
</ATTACHMENT>
<ATTACHMENT>
<attachmentIndex>208</attachmentIndex>
<itemIndex>334</itemIndex>
<APCost>20</APCost>
</ATTACHMENT>
<ATTACHMENT>
<attachmentIndex>208</attachmentIndex>
<itemIndex>335</itemIndex>
<APCost>20</APCost>
</ATTACHMENT>
<ATTACHMENT>
<attachmentIndex>208</attachmentIndex>
<itemIndex>618</itemIndex>
<APCost>20</APCost>
</ATTACHMENT>
<ATTACHMENT>
<attachmentIndex>208</attachmentIndex>
<itemIndex>620</itemIndex>
<APCost>20</APCost>
</ATTACHMENT>
<ATTACHMENT>
<attachmentIndex>208</attachmentIndex>
<itemIndex>625</itemIndex>
<APCost>20</APCost>
</ATTACHMENT>

. . . and so on . . .

You also will note there is an AP cost value that corresponds to the number of APs to attach or remove the attachment.

So basically, you add each attachment in the proper section for the gun you are making. What I do is take a similar gun's <uiIndex> and search for all it's entries, and at each attachment entry I will place the new weapon's attachment entry in the proper place within that section. While I do this I also make unique changes that have to be made for this new weapon - such as not put an attachment on that it can't use, and also put attachments on that it can use that the similar weapon can't. I hope that is clear.

The other way to use attachments is to define an <AttachmentPoint> for the attachment in Items.XML and an <AvailableAttachmentPoint> that corresponds in the new weapon entry in Items.XML. Like this:

<ITEM>
<uiIndex>241</uiIndex>
<szItemName>Laser Sight</szItemName>
<szLongItemName>Laser Sight</szLongItemName>
<szItemDesc>The Universal Daylight Laser projects a highly visible red spot at a rather significant range. In a stainless steel housing, it fits onto the trigger guard of most weapons. Best Laser Range = 10.</szItemDesc>
<szBRName>Laser Sight</szBRName>
<szBRDesc>You won't lose sight of your target when using one of these. The Universal Daylight Laser projects a highly visible red spot at a rather significant range. In a stainless steel housing, it fits onto the trigger guard of most weapons. Best Laser Range = 10.</szBRDesc>
<usItemClass>268435456</usItemClass>
<AttachmentClass>4</AttachmentClass>
<nasAttachmentClass>4</nasAttachmentClass>
<nasLayoutClass>1</nasLayoutClass>
<AttachmentPoint>4</AttachmentPoint>

and

<ITEM>
<uiIndex>762</uiIndex>
<szItemName>M16A1</szItemName>
<szLongItemName>Colt M16A1</szLongItemName>
<szItemDesc>The M16A1 is the finalized model of 1967. The M16A1 is no longer in service with the United States, but is still standard issue in many world armies. The A1 addressed issues raised during the the Vietnam War with the XM16E1. Malfunction issues declined, corrosion resistance improved, and other issues were corrected.</szItemDesc>
<szBRName>Colt M16A1</szBRName>
<szBRDesc>The M16A1 is the finalized model of 1967. The M16A1 is no longer in service with the United States, but is still standard issue in many world armies. The A1 addressed issues raised during the the Vietnam War with the XM16E1. Malfunction issues declined, corrosion resistance improved, and other issues were corrected.</szBRDesc>
<usItemClass>2</usItemClass>
<nasLayoutClass>1</nasLayoutClass>
<AvailableAttachmentPoint>4</AvailableAttachmentPoint>
...


While safe to use the AttachmentPoints I have already defined, it probably is not safe to use new AttachmentPoints because I am in the process of adding more AttachmentPoints and probably will not define them the same way as you do.

[Updated on: Fri, 06 April 2018 21:23]

Report message to a moderator

Sergeant Major
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Camo faces for AV
Next Topic: Change Calibers
Goto Forum:
  


Current Time: Thu Jan 30 07:11:56 EET 2025

Total time taken to generate the page: 0.01042 seconds