Home » MODDING HQ 1.13 » v1.13 Coding Talk » New Attachment System Beta
Re: New Attachment System Beta[message #289715] Tue, 23 August 2011 21:21 Go to previous messageGo to next message
ctiberious is currently offline ctiberious

 
Messages:605
Registered:March 2007
If you're using the most current version of NAS, itemslotassign.xml is no longer used. NAS 0.7 deals with all attachments using the existing Attachments.xml file.

If the bipod is integral it means it shouldn't be a valid attachment for the weapon. If the weapon in question is supporting a bipod, that means your attachments.xml file says the weapon can attach a bipod which should mean the bipod should no longer be integral. I'd check that first. Also, by the default xml files, the underslung slot can support bipods, foregrips, grippod and underslung GLs. If the slot is appearing for a particular weapon, it means one of those items is listed as a valid attachment in attachments.xml.

If you're using the older version of NAS which still uses itemslotassign.xml, then I can't really help you. Upgrade to the latest build which includes the latest version of NAS.

Report message to a moderator

First Sergeant
Re: New Attachment System Beta[message #289759] Wed, 24 August 2011 18:55 Go to previous messageGo to next message
ctiberious is currently offline ctiberious

 
Messages:605
Registered:March 2007
You might need to look at the incompatibleattachments.xml to make sure that bipod and foregrip aren't listed as incompatible with each other. Then in NAS you'd simply need to add a 2nd underbarrel slot in attachmentslots.xml. The only concern is that having two underbarrel slots gives you the ability to mount two underbarrel attachments. Not just a bipod and foregrip. So you'd make it possible for a bipod and UGL, for example. You'd have to setup your incompatibleattachments.xml appropriately (assuming it isn't already). Also, you probably wouldn't want all weapons able to support both attachments. For instance, an M16 might not be suitable for both a bipod and foregrip at the same time but an M60 might (just random examples based on size of weapon). So you'd probably want to create a new layout class specifically for weapons that could support two underbarrel attachments.

Report message to a moderator

First Sergeant
Re: New Attachment System Beta[message #290153] Wed, 31 August 2011 19:01 Go to previous messageGo to next message
ctiberious is currently offline ctiberious

 
Messages:605
Registered:March 2007
You can't make a 2nd underbarrel slot appear only when the first is used unless you create a new layout class and assign the underbarrel attachments to this class. THEN you'd have to also say that a foregrip could attach to a bipod and vice versa. The code would then see that a new slot needed to be added because the foregrip/bipod had it available. HOWEVER, this will have the undesired effect of allowing you to attach a bipod directly to a foregrip.

If only certain weapons should be allowed to use multiple underbarrel slots, the best way to do this is create a new layout class that includes just the two underbarrel slots. THEN assign the specific weapons to that new attachment class. This will allow that weapon to get both underbarrel slots (because they are part of the weapons primary layout class) and all the remaining default slots will be automatically selected as appropriate.

Report message to a moderator

First Sergeant
Re: New Attachment System Beta[message #294002] Mon, 21 November 2011 19:28 Go to previous message
ctiberious is currently offline ctiberious

 
Messages:605
Registered:March 2007
It's working as intended. There really isn't a way to force the system to display no attachment slots. We need at least one slot so that merges can function. I suppose you could create a special layout class that includes just one slot, then set the X/Y coords for that slot so it appeared under the item graphic. I never tested that setup, though, so I don't know if the item graphic would appear on top of the attachment slot (thereby making it appear that no attachment slot existed) or beneath it.

Report message to a moderator

First Sergeant
Previous Topic: Experimental Project 7
Next Topic: Code Snippets
Goto Forum:
  


Current Time: Sat Nov 30 11:07:48 GMT+2 2024

Total time taken to generate the page: 0.04208 seconds