Home » PLAYER'S HQ 1.13 » JA2 Complete Mods & Sequels » All about modding JA2 » Too many items for an attachment?
Too many items for an attachment?[message #351760] Mon, 25 December 2017 04:54 Go to next message
edmortimer

 
Messages:1077
Registered:January 2015
Location: Home Free
Is there a limit to how many items a single attachment can be assigned to in Attachments.xml? Specifically, I am having a problem where all recently new weapons I have made that are assigned a Rifle Sling as an attachment do not allow the Rifle Sling to be attached even though the weapon's attachment box (in-game) indicates a Rifle Sling is attachable in that box. The past few days I've been trying to find out why, but I am stumped.




Arulco Vacations Blog

Arulco Vacations Bears Pit Forum


Re: Too many items for an attachment?[message #351761 is a reply to message #351760] Mon, 25 December 2017 05:03 Go to previous messageGo to next message
sevenfm

 
Messages:1641
Registered:December 2012
Location: Soviet Russia
You can define attachment point for Rifle Sling, it should work well.



7609+fix | 7609+AI (r774) | 7609 unofficial modpack | Win8+ fix | Experimental project | Vengeance:Reloaded | Youtube

"I like sharks. They're soothing"


Re: Too many items for an attachment?[message #351763 is a reply to message #351761] Mon, 25 December 2017 05:17 Go to previous messageGo to next message
edmortimer

 
Messages:1077
Registered:January 2015
Location: Home Free
Quote:

You can define attachment point for Rifle Sling, it should work well.


I have not read up on that system yet. Can you point me to a description of how the system works and what the attachment tags are? After this release of AV I plan on re-working the attachment system to this newer one, but as of now I don't have a clue on how to implement it.




Arulco Vacations Blog

Arulco Vacations Bears Pit Forum


Re: Too many items for an attachment?[message #351766 is a reply to message #351763] Mon, 25 December 2017 05:46 Go to previous messageGo to next message
sevenfm

 
Messages:1641
Registered:December 2012
Location: Soviet Russia
edmortimer wrote on Mon, 25 December 2017 08:17
Quote:

You can define attachment point for Rifle Sling, it should work well.


I have not read up on that system yet. Can you point me to a description of how the system works and what the attachment tags are? After this release of AV I plan on re-working the attachment system to this newer one, but as of now I don't have a clue on how to implement it.

You simply define attachment point which is actually a bitmask, for example possible attachment points in VR (it's just a list for convenience, you don't need to define it anywhere):
Toggle Spoiler

Add this point to Items.xml:
Toggle Spoiler

Then define available attachment point for the weapon you want your sling to attach to:
Toggle Spoiler

That's all, as far as I know.
You can also add these points to lookup table if you plan to use XML Editor:
AttachmentPoint.xml:
Toggle Spoiler

You can combine as many available attachment point tags in items.xml entry as you like as they are only combined as a bitmask. Since the value is stored in int64, there can be no more than 64 bits that represent different attachment points, but you can combine several bits together for convenience.
You also don't need to define attachment point for each item, instead you can use it like in real life - if weapon has a rail, any attachment that fits this rail type can be attached here, something like this was implemented in AFS, also SDO mod uses attachment point system.

Also, this code
<!-- Small Molle -->
is just a comment, you can ignore it.

[Updated on: Mon, 25 December 2017 05:52]




7609+fix | 7609+AI (r774) | 7609 unofficial modpack | Win8+ fix | Experimental project | Vengeance:Reloaded | Youtube

"I like sharks. They're soothing"


Re: Too many items for an attachment?[message #351770 is a reply to message #351766] Mon, 25 December 2017 06:14 Go to previous message
edmortimer

 
Messages:1077
Registered:January 2015
Location: Home Free
Thank you! happy That works -- and doesn't seem to break anything else!




Arulco Vacations Blog

Arulco Vacations Bears Pit Forum


Previous Topic: How can I get source code for 1.13 build 7609 with UN inside
Next Topic: kL Animations
Goto Forum:
  


Current Time: Tue Sep 25 02:30:30 EEST 2018

Total time taken to generate the page: 0.01216 seconds