Home » MODDING HQ 1.13 » v1.13 Coding Talk » New Attachment System Beta
Re: New Attachment System Beta[message #268166] Sat, 11 December 2010 19:10 Go to previous messageGo to next message
ctiberious

 
Messages:607
Registered:March 2007
That might work. I'll be playing around with it over the new few days.

Re: New Attachment System Beta[message #268333] Wed, 15 December 2010 13:27 Go to previous messageGo to next message
smeagol

 
Messages:2714
Registered:June 2008
Location: Bremen, Germany
So... I just installed the 0.7 and as far as I can tell, it looks quite nice to be able to add attachments with the editor again. Damn... this will still be so much work....

I also have a few questions about it:

- Layout Class? Any chance to describe in a few words what this is and what the possible settings are? Screenshot of in-game difference would also be nice.

- I'm missing a few slots for some attachments (Flashlight, Trigger Group, Ballistic Computer, Match Trigger... I guess the Mag Adapters use the ammo slot?)


Hmm... that's about it for the moment. I guess if I really am getting deeper into this, more questions will show up.


Edit1:
Well... how do I actually make the attachment slots show up on the items? k, figured it out... still had my old 150kb attachmentslots file instead of the 10kb one.

Edit2:
Uhm... the xml editor automatically replaces the attachmentslots.xml with 10kb with the bigger file upon saving, thus slots dissappear again in-game. Weird...

[Updated on: Wed, 15 December 2010 13:48] by Moderator



Re: New Attachment System Beta[message #268360] Wed, 15 December 2010 19:37 Go to previous messageGo to next message
ctiberious

 
Messages:607
Registered:March 2007
Layout Class is a binary value that tells the system which set of attachment slots you want to use based on the weapon (and it's attachments). Layout class can technically have any value from 0 to whatever an unsigned 128bit variable will hold. However, you normally stay with powers of 2 (0, 1, 2, 4, 8, 16, etc) unless you want items or slots to use multiple classes (which can make setting up slots fairly complicated). Also, while the code can support up to an unsigned 128bit value, currently the xml editor can only support a signed 32bit value. I'm still trying to correct that.
As an example using the default xml files, compare a Milkor multi-shot GL with a Talon underslung GL. Both can hold 40mm rifle grenades which have an attachment class of 8192 but each has a different layout class (2 and 1, respectively). The result is that the Talon displays only a single grenade slot to the left of the UGL slot, and the Milkor displays six grenade slots on the right hand side of the attachment window.
When the code is deciding which slots to display it looks at the layout class of the item and tries to find a slot with the same layout class that supports the appropriate attachment class. If no slot is found, the code defaults to using LayoutClass 1. As an example, assume you create a layout class with a single attachment slot that will support Stock attachments. Further assume that you assign the M4 to your custom layout class. Since the M4 can attach a stock, you'll get your custom stock slot. But the M4 can also support things like barrel, sight and scope attachments which you didn't explicitly setup in your custom layout. Therefore, the M4 would display the default Barrel, Sight and Scope slots along with your custom Stock slot.

Without seeing your AttachmentSlots.xml, I can't say why you would be missing slots. In the default xml files, I made sure that all attachments had an appropriate attachment class based on how I thought they should be grouped. And in the default AttachmentSlots.xml, there is a default layout for every attachment class, plus the multi-shot GL/RL slots (layoutClass 2). If you've changed the nasAttachmentClass values in Items.xml, or changed the nasLayoutClass 1 and 2 setups in AttachmentSlots.xml, then it's possible you've removed a slot. But I'd have to see those two xml files to know for sure.

As for the xml editor, I'm not sure what's causing the result you're seeing. I just tested the current editor (0.46) by adding a line to the AttachmentSlots.xml file and it saved just fine. The only issue I saw was that nasLayoutClass wasn't displayed as a field on the table. I'll see about getting that corrected.

Re: New Attachment System Beta[message #268366] Wed, 15 December 2010 22:22 Go to previous messageGo to next message
ctiberious

 
Messages:607
Registered:March 2007
I've been looking at options for a multi-select list box for the xml editor. So far what I'm reading says that the "ComboBox" style drop down window we currently use has no multi-select option. The only suggestion I've come across so far is to change over to a "ListBox" but that doesn't come with "drop down" capabilities, meaning the listbox would always be displayed. I haven't given up hope yet, but for now we still can't select multiple attachment classes.

That said, I do have a valid work around. The text/value that gets displayed/set when you choose the Attachment Class dropdown is populated by the AttachmentClass.xml file found in the lookup folder. That file gets created by default if it doesn't exist. But you can also edit this file outside of the editor. If you add an entry for whatever combinations you want to use, you'll see the extra options in the drop down list in the editor. For example, if you add the following to your AttachmentClass.xml file, you'll be able to set the attachment class of items to 192 which is a combination of the Sight and Scope classes.:
	
		192
		Sight+Scope
	

Re: New Attachment System Beta[message #268369] Thu, 16 December 2010 00:05 Go to previous messageGo to next message
Faithless

 
Messages:445
Registered:October 2009
Location: The safe end of the barre...
Quote:
unless you want items or slots to use multiple classes (which can make setting up slots fairly complicated).
While complicated, it might be worth looking into because you could make different kinds of slot layouts *just* for the upper receiver.
Then you can tell guns that they have an AR upper receiver but only a pistol barrel (only layout wise, of course).

Just if someone wants to try and doesn't understand it yet, here's a few examples.
Toggle Spoiler
Re: New Attachment System Beta[message #268371] Thu, 16 December 2010 00:31 Go to previous messageGo to next message
Wil473

 
Messages:2820
Registered:September 2004
Location: Canada
We're going to have to figure out some kind of "best practices" for NAS 0.7. So far what has worked for me is:

- only using multi-class bit masks for slots and layouts; not multi-classing the attachment items
- stuffing layout 1 with as many slots as possible, this involves working out a lot of multi-attachment class slots in advance
- keeping the active copy of attachmentslots.xml away from the XMLEditor (in profiles for instance)

I've used up so far:
22 Attachment Classes (scrapped your default ChrisL in the process, as oddly enough I found some of the default attachment classes to be redundant with each other, then again I do have 5 different flavours of "optics")
18 Layouts, many of which are "add-ons" to layout 1

EDIT: I could have gotten away with using up less layouts and attachment classes, but I found that for "add-on" objects I needed to be more restrictive on what could fit, otherwise I'd end up with a Scope-to-RIS adapter that added a new slot that displayed having the Scope-to-RIS adapter as a valid attachment. Also the addon that was supposed to replace Sniper Scope compatibility with RIS scope compatibility still could accept Sniper Scopes. Yes I know I could use incompatible attachments definitions, but using the more restrictive add-on slots looked cleaner as they didn't advertise unworkable attachments.

[Updated on: Thu, 16 December 2010 00:41] by Moderator



Re: New Attachment System Beta[message #268375] Thu, 16 December 2010 02:07 Go to previous messageGo to next message
ctiberious

 
Messages:607
Registered:March 2007
Keep in mind that just because a slot can support an attachment, doesn't mean the weapon can. If a slot can fit the Sniper Scope, but your weapon can't use that scope, then you can't attach it regardless of the slots you have setup.

And why should you keep your active copy of attachmentslots.xml away from the editor. The mosst recent version of the editor (which I uploaded today) should work just fine.

Re: New Attachment System Beta[message #268508] Sat, 18 December 2010 00:51 Go to previous messageGo to next message
smeagol

 
Messages:2714
Registered:June 2008
Location: Bremen, Germany
Jeez... the attachments.xml gets huge... I now have a file that allows each attachment on each gun (except launchers), that file has more than 500.000 lines and is as big as 12 MB!

Although I'll delete a lot of possible combinations and thus make the file considerably smaller, this still doesn't seem to be very efficent. :/



Re: New Attachment System Beta[message #268520] Sat, 18 December 2010 07:53 Go to previous messageGo to next message
ctiberious

 
Messages:607
Registered:March 2007
Why would you want to make it so that every attachment could fit on every gun? Shouldn't some attachments not fit on some guns? For example, anything that is supposed to connect to some kind of rail system isn't going to attach to a weapon that doesn't have a rail system. I suppose if you rally have a purpose for making every possible attachment valid on every possible weapon, I could add some INI setting that let you ignore Attachments.xml and automatically return TRUE when we try and attach any item with an attachmentClass. Again, though, I'm not really understanding why you'd want this in the first place.

Re: New Attachment System Beta[message #268523] Sat, 18 December 2010 14:11 Go to previous messageGo to next message
smeagol

 
Messages:2714
Registered:June 2008
Location: Bremen, Germany
My point was not adding all attachments to all guns, but how huge the file gets rather quickly.

Even with basic attachements (that is each gun has the attachments it should have), the file is much bigger than with WS version, simply because each attachment gun combination requires a single entry like this:


2181
1488
20
0



with currently 433 guns in AIMNAS and around 200 attachments, this adds up rather quickly.



Re: New Attachment System Beta[message #268530] Sat, 18 December 2010 17:55 Go to previous messageGo to next message
Wil473

 
Messages:2820
Registered:September 2004
Location: Canada
UC-1.13 has half as many guns, and I'm sure less than half the number of attachments. The conversion still took up over a week's worth of free time.*** I made the job a bit easier by doing most of the work with spreadsheets that I could sort based on a weapon's real world characteristics (ie. sort by number of RIS rails on the handguard). After that it was just cutting and pasting the appropriate columns and filling down the attachment index in attachments.xml


*** The spreadsheet was from before NAS, so in reality the research work adds another week or two of spare time.

[Updated on: Sat, 18 December 2010 17:57] by Moderator



Re: New Attachment System Beta[message #268542] Sat, 18 December 2010 22:26 Go to previous messageGo to next message
ctiberious

 
Messages:607
Registered:March 2007
smeagol: Admittednly I'm only using the released Items.xml and Attachments.xml files, so less then 1400 items. That results in a 1.3mb and .6mb file (respectively). And my Attachments.cml is only 25.5k lines. So yes, the file does take up alot of space, but I still don't see why your's would be 20 times larger unless you've added 20 times as many guns and/or attachments.

My main concern for questioning the size of your attachments.xml file is to make sure you aren't misunderstanding the capabilities of NAS. Unless a weapon is meant to have, "out of the box", the ability to support all attachments, then you don't need to give it support for all attachments in Attachments.xml.

Re: New Attachment System Beta[message #268552] Sat, 18 December 2010 22:57 Go to previous messageGo to next message
Faithless

 
Messages:445
Registered:October 2009
Location: The safe end of the barre...
The amount of xml entries does increase exponentially with the amount of items you add, it has always been this way and it was also the case in NAS 0.6.
It was less apparent with NAS 0.6 because there it was like using templates for guns.
If you work with excel or a text editor you can still make groups of attachments that would have gone in one slot.
I think this is what wil does and it would help if you're going to change alot.

In theory the editor could even create these templates for you, but it would be alot of work I guess.
But it would be alot of work and I'm not sure you'd even gain that much from it.
Re: New Attachment System Beta[message #268559] Sun, 19 December 2010 03:13 Go to previous messageGo to next message
Wil473

 
Messages:2820
Registered:September 2004
Location: Canada
I actually threw out the old Attachments.xml and built it back up from my research spreadsheets (Hint: if you are going to do it this way, be very diligent about filling in item indexes, it is a pain to have to go in and add these after the research is done). However I didn't used "templates" (finding examples of attachment series to copy) too often. Basically I looked at all the guns in game, and researched for the following characteristics: Stock, Muzzle, Scope/Sight, Bipod/Grip, Additional RIS, Built-in Handguard, Magazine adapters, Launcher

When I wanted to add the Bipod, I sorted by the Bipod/Grip to line up all the guns according to the four possible entries: blank, Both, Bipod(only), Grip(only). Copied the item indexs that had Both and Bipod(only) and filled in the columns with the Bipod index and AP costs.

After the bulk of this was done, I went back in and fixed any errors, the XMLEditor was also used at this stage.


While doing some quick testing of new guns added, I noticed that attachment slots were not appearing consistently for armours. After some research I found that armours that are not party to some merger, specifically as a , did not display any attachment slots. I fixed it (work-around if what I'm seeing is intentional) by filtering out all the armour class items and setting up a dummy merger with an item which should never appear in-game.

Now it may also have something to do with my custom attachment classes; All non-gun related items are set to attachment class 1. The intention is that for these non-gun attachments, four slots corresponding to the old four slots (the defaults) should appear. I noticed that armour plates and add-on camo each are separate and unique class in the stock NAS 0.7 XML's. Should I not be using attachment class 1 as a catch all? Or is this a bug?

EDIT: noticed that the above is happening with explosives as well. If the explosive cannot have RDX merged into it, no attachment slots show. I think I've found the cause, it looks like leftovers from troubleshooting the mystery slots appearing (older versions of NAS 0.7) are interfering with slot appearance.

EDIT2: fixed it (without the dummy mergers). It looks like a combination of me cramming all non-gun attachments into attachment class 1; and not actually having any slots in layout 1 to take attachment class 1 items. Used up two more layouts to produce a visually appealing solutions

[Updated on: Sun, 19 December 2010 04:07] by Moderator



Re: New Attachment System Beta[message #268560] Sun, 19 December 2010 04:52 Go to previous messageGo to next message
ctiberious

 
Messages:607
Registered:March 2007
Actually, putting all the "non-gun attachments" into AC1 is a good idea. I didn't do it that way because I didn't think of doing it that way. Smile I think I'll probably update the default NAS 0.7 so that it follows that system since it sounds like it's a more viable option and frees up 3 ACs for modders to use. Considering you (and probalby smeagol) are setting up drastically altered Items.xml and Attachments.xml from what's in "standard" 1.13, this shouldn't effect you anyway but it might make things a bit easier for the next modders that come along.
I can also make sure that the 4 default slots are appearing properly. I thought I had resolved it so that they always appeared if no other slots were setup but it's possible that I've still missed something.

Re: New Attachment System Beta[message #268575] Sun, 19 December 2010 18:46 Go to previous messageGo to next message
Wil473

 
Messages:2820
Registered:September 2004
Location: Canada
I finally traced my problem to not having slots able to take Attachment Class 1 in Layout 1. Setting the default slots to be in Layout 1 wasn't a good solution, so I ended up using two new layouts (later just one, as I just gave Layout 1 four of the new slots, the other one I kept for items that only will take a single attachment like the X-Ray detector and explosives). So no .exe based NAS bug, just user error again.

How is progress on multiple default attachments? ie. Are they being enumerated so that to the XMLEditor (and MS Excel) will see each attachment with a unique tag?

[Updated on: Sun, 19 December 2010 18:46] by Moderator



Re: New Attachment System Beta[message #269069] Wed, 29 December 2010 07:59 Go to previous messageGo to next message
Wil473

 
Messages:2820
Registered:September 2004
Location: Canada
Double posting as this is something of an ongoing bug. NAS 0.7 Map Editor is still inconsistent with multiple default attachments appearing. Dozens of weapons with multiple default attachments and most will always show up with one default attachment when placed in a map.

[Updated on: Wed, 29 December 2010 08:01] by Moderator



Re: New Attachment System Beta[message #269094] Wed, 29 December 2010 18:00 Go to previous messageGo to next message
ctiberious

 
Messages:607
Registered:March 2007
I've not even looked at the NAS 0.7 Map Editor. I'll put it on my todo list.

Re: New Attachment System Beta[message #269113] Thu, 30 December 2010 01:06 Go to previous messageGo to next message
Wil473

 
Messages:2820
Registered:September 2004
Location: Canada
Sounds good. Right now with the current NAS 0.7 supplied SCI, weapons when placed by the Map Editor (and only the Map Editor) sometimes only end up with only one of the defined multiples, others appear with all of them, and in at least one case it was missing only one default (out of three). It remains consistent within the item index (ie. all G36's in my testing last night had only one of two defaults, all Enfield L86 LSW had two of three, while all OICW's had the expected two of two).

Bobby Rays, random generated weapons, and Cheat Code produced items have the full set of defaults however.

I have no basis for suggesting this, but perhaps the missing multiple defaults issue could be resolved by using different tags for each of the defaults (and whatever mechanism for pre-attaching multiple defaults simply goes down the list). This change has already been suggested for XMLEditor compatibility purposes, so perhaps this is one case where we cannot get away with reusing the same tag over and over.

[Updated on: Thu, 30 December 2010 01:14] by Moderator



Re: New Attachment System Beta[message #269152] Thu, 30 December 2010 18:25 Go to previous messageGo to next message
ctiberious

 
Messages:607
Registered:March 2007
Don't suppose you could email me your Items.xml file?

Re: New Attachment System Beta[message #269158] Thu, 30 December 2010 21:55 Go to previous messageGo to next message
Wil473

 
Messages:2820
Registered:September 2004
Location: Canada
Sure, but due to the numerous new item graphics, it would be easier if I just quietly upload a pre-build of UC-1.13 v3. I should be building a pre-release periodically to make sure the thing is still modular via VFS.

EDIT: cannot put together the files now, but if you have no problems with esnips, I'll contact you later with a link to the file.

[Updated on: Thu, 30 December 2010 22:00] by Moderator



Re: New Attachment System Beta[message #269161] Thu, 30 December 2010 22:36 Go to previous messageGo to next message
ctiberious

 
Messages:607
Registered:March 2007
I don't think I have a current install of UC on my system. I had to reinstall everything when I came back and haven't had a chance to get everything back up to date. So to test the problem you've been having, I'll need as much as you can send me. Graphics and Items.xml files at the very least, though. With those I should at least be able to load into the map editor and see if I can recreate (and resolve) the problem.

Re: New Attachment System Beta[message #269522] Fri, 07 January 2011 11:40 Go to previous messageGo to next message
nollan

 
Messages:112
Registered:July 2006
Location: Le Su
This seems related to NAS so I post here: when I dropped a M14 and a M21 in the EBR the wodden stocks was replaced with nothing. Should not the fixed polymer-stock be a part of the EBR?
Re: New Attachment System Beta[message #269543] Fri, 07 January 2011 16:24 Go to previous messageGo to next message
Wil473

 
Messages:2820
Registered:September 2004
Location: Canada
From the wooden stock, I'm guessing what you've run into nollan, is with a game of AIMNAS. You might want to address this one to Smeagol in the current AIMNAS thread. Fixed wood and polymer stocks are not stock v1.13.

EDIT: I just noticed the bad pun in the last line.

[Updated on: Fri, 07 January 2011 16:25] by Moderator



Re: New Attachment System Beta[message #270570] Mon, 17 January 2011 22:47 Go to previous messageGo to next message
Wil473

 
Messages:2820
Registered:September 2004
Location: Canada
Double Posting to get ChrisL's (and any interested parties attention) to the following small NAS feature requests (no rush as are all conveniences instead of anything inhibiting action):

1) Given that a possible workaround to NAS 0.7 not having the ability to remove attachment slots(as previous NAS did), is to use the old incompatible attachment system, I'd like to have the pop-up tool tips in-game that list possible attachments not list attachments that are incompatible with attached attachments. Basically before displaying the list, check and remove any attachments that are incompatible.

2) XML Editor request, pop-up tool tip that lists the attachment slots made up by a the entry in Layout Class when you hover over the number.

3) XML Editor request, sounds a bit backwards and old fashion, but instead of a drop down with Attachment Classes in "Data - Attachment Class," have an option to enter numbers directly and have a list of the attachment Class or Classes that the number translates into show up.

I've got 2 and 3 covered external to the XML Editor in the form of the spreadsheet I use to calculate (multi-)Attachment Class entries which have to be entered again outside of the XMLEditor. These multi attachment class attachment slots now show up as blank, and every time I save I hope the XMLEditor simply ignores these entries (so far this is case).


By the way any developments (like changing the tag notation) for multiple default attachments?

[Updated on: Mon, 17 January 2011 22:49] by Moderator



Re: New Attachment System Beta[message #270762] Thu, 20 January 2011 08:23 Go to previous messageGo to next message
Wil473

 
Messages:2820
Registered:September 2004
Location: Canada
Triple Posting here as I don't want to start a new bug thread: In Tais final SCI, multiples of the same grenade can no longer be attached to multi-shot launchers. I can fill up all the grenade slots as long as it is one of each type of grenade. It seems whatever was done to allow multiples of the same attachment has been disabled. I remember this working a few versions ago when I was testing my 12 shot launcher.

The bug is easily replicated with the stock "vanilla" 1.13 campaign, cheat codes and Bobby Rays - go to Drassen airport, buy a multi-shot launcher and multiple grenades of the same kind, use the cheat code for instant delivery.

EDIT: forgot, there is an "items is already attached" error when I try to load a second of an already attached grenade.

[Updated on: Thu, 20 January 2011 08:43] by Moderator



Re: New Attachment System Beta[message #270798] Thu, 20 January 2011 19:11 Go to previous messageGo to next message
ctiberious

 
Messages:607
Registered:March 2007
Hmm. In my existing test game I've got an AICW which I have had no problems loading, unloading and reloading with 3 40mm HE grenades. I also took an empty Milkor and starting loading 40mm HE grenades without issue. Also tried loading multiple 40mm illum, stun and smoke grenades into the milkor, again without issue. Finally, I downloaded Tais' SCI_r4057 and used that exe (but all the rest of the current files) and was able to repeat my tests without issue.
This sounds like a problem with the nasAttachmentClass value of 40mm grenades in your Items.xml file. I checked both copies of items.xml in Tais' SCI_r4057 but I don't see a problem there. I'd check your local items.xml files, including any that might be in your profiles folder. Make sure the nasAttachmentClass=1024 or 2048. Those are the only two attachment classes that are exempt from the duplicate item check so if for some reason you've got your grenades set to another attachment class, then you wouldn't be able to load more then one.

Re: New Attachment System Beta[message #270845] Thu, 20 January 2011 23:59 Go to previous messageGo to next message
Wil473

 
Messages:2820
Registered:September 2004
Location: Canada
Thanks, I suspected it may have been something I did. Up until today I wasn't conscious to needing to use 1024 and 2048 for multi-shots - now as for whether I should have known is a different story. I think I changed the grenade attachment class while trying to fix another false bug. Back on track for preview release based on Tais' final SCI.

I guess this means NAS 0.7 is dropping general attachments of multiples of the same attachment, where any attachments that are to be restricted to one are defined as incompatible with itself? Not that I've figured out how to use that capability of old-NAS, beyond grenades, but that was how I thought multiples of the same thing were to be handled in general.

[Updated on: Fri, 21 January 2011 00:00] by Moderator



Re: New Attachment System Beta[message #271792] Sun, 30 January 2011 00:02 Go to previous messageGo to next message
Wil473

 
Messages:2820
Registered:September 2004
Location: Canada
Not sure if you've had a chance to look at this, or if this even changes it priority, but I found a case of the Map Editor (the one the one the comes with Tais Final SCI) not attaching a singular default attachment when it places items in a map. The Agram 2000 in the recently released UC-1.13 v3, has an integral grip default attachment, instead of the auto/burst bonuses directly on the gun. I found earlier that this item when placed into maps via the Map Editor that the one default is missing. Considering a few workarounds, such as the Extra Items XML's which work for all defaults, but this issue may cause problems for others who are not doing anything special with the current tools.


Re: New Attachment System Beta[message #271794] Sun, 30 January 2011 00:51 Go to previous messageGo to next message
SpaceViking

 
Messages:762
Registered:January 2004
Location: Rochester, Minnesota, USA
This is probably a minor bug in the new attachment system:

Take a gun that can have a Kobra or Reflex Sight (like an AS VAL). Put on another sight (like a PSO1). Now try to put on the Kobra. No can do. Put on the reflex sight and then drop the kobra on top of it. Tah dah! You now have a gun with a Kobra and a PSO sight.


Re: New Attachment System Beta[message #271796] Sun, 30 January 2011 01:17 Go to previous messageGo to next message
Wil473

 
Messages:2820
Registered:September 2004
Location: Canada
Ah, this is actually an ongoing issue with the Map Editor and how it handles multiple (and now singular) default attachments that an Item is supposed to have when it appears. Ie. an item has four default attachments defined in the XML, it reliably appears with all four defaults when: your buy it, when the AI is randomly assigned it, when it appears in NPC/RPC inventory, and (new for me at least) via the extra items XML's. However when using the Map Editor to pre-place items, more often than not, an item index (meaning all of that item) will be missing one or more default attachments. Which item indexes the map editor will not pre-place with correct number of attachments seems to randomize with any changes to the XML's, so it is hard to pin down as it cannot be reliably forced to happen.

Getting the multi-default attachments to work reliably with the Map Editor has been an issue on the back burner for quite some time now. They work with every other method of making an item appear in-game. Frankly, there are not many of us that it will be affecting as not many of us are playing around with multi-defaults. Affects me probably the worse because my application of NAS is completely removed from the official NAS XML's, the last of which is now in v1.13. I use a lot of default attachments to accomplish what I have done so far.

Until now it was thought to only affect items with multiple default attachments. Today while trying to fix something, found that the issue affects all default attachments. Specifically, in UC-1.13 all Agram 2000's pre-placed with the current Map Editor are missing the integral grip (default attachment). As it affects singular default attachments, this issue now has greater potential to affect other modders.

See also: http://www.ja-galaxy-forum.com/board/ubbthreads.php?ubb=showflat&Number=271791#Post271791


EDIT: re-read your post there Space Viking, sorry, I thought you were responding to my earlier post, instead of reporting a different bug... Sorry, starting to go all scatter brained again.

[Updated on: Sun, 30 January 2011 01:58] by Moderator



Re: New Attachment System Beta[message #271917] Mon, 31 January 2011 20:39 Go to previous messageGo to next message
ctiberious

 
Messages:607
Registered:March 2007
SpaceViking
This is probably a minor bug in the new attachment system:

Take a gun that can have a Kobra or Reflex Sight (like an AS VAL). Put on another sight (like a PSO1). Now try to put on the Kobra. No can do. Put on the reflex sight and then drop the kobra on top of it. Tah dah! You now have a gun with a Kobra and a PSO sight.
That's not really a NAS issue or a bug for that matter. The tooltip displays valid attachments regardless of settings you have in IncompatibleAttachments.xml. The point here is that the tooltip should display all attachments that are valid for the weapons. The Kobra and PSO-1, however, are listed as incompatible in the IncompatibleAttachments.xml file, so the attachment process fails. The Reflex Sight and PSO-1 are not listed as incompatible which is why you can attach them together.

Re: New Attachment System Beta[message #271920] Mon, 31 January 2011 20:54 Go to previous messageGo to next message
SpaceViking

 
Messages:762
Registered:January 2004
Location: Rochester, Minnesota, USA
Chris, perhaps you misunderstand.

You should not be able to have a Kobra and a PSO sight (-1 or -3) on a gun at the same time. If you have a Kobra on a gun you can't put a PSO on it. And vice-versa.

But if you put on a reflex sight along with a PSO (which is a valid combination) and then replace the reflex sight with a Kobra it works and you end up with a Kobra and a PSO on a gun at the same time.

This same issue allows you to put an ISM-V-IR and a scope on a NATO gun which you normally can't do.

I would guess that the code that *replaces* attachments isn't doing the valid combination checking properly while the code that *adds* attachments does do the check properly.


Re: New Attachment System Beta[message #271933] Tue, 01 February 2011 01:58 Go to previous messageGo to next message
ctiberious

 
Messages:607
Registered:March 2007
Ah. Gotcha. And I've got a fix for it that I'll be committed shortly. Smile

Re: New Attachment System Beta[message #276312] Mon, 21 March 2011 23:31 Go to previous messageGo to next message
Wil473

 
Messages:2820
Registered:September 2004
Location: Canada
Found what looks like an issue with how NAS displays slot information. One of the UC-1.13v3 testers ran into a bug where under Restricted items mode attempting to view the details of some guns would CTD the game. I found that I could replicate it, the same gun would CTD the game only in restricted items mode when I cycled to it with the cheat codes, but would not crash the game in Tons of Guns mode.

Earlier today I found a case where a grenade set as a hidden attachment, but not a hidden addon (the slot lights up, but the grenade is not specifically named as an attachment) resulted in a CTD whenever if tried to bring up the launcher's description display. The launcher's description was working just fine before I started messing with the hidden attachment setting of the only grenade that fits it. Oddly the other slot the grenade fit into, on the weapon, appeared just fine and displayed the slot's label which I was using as an ad hoc tooltip. I fixed this by creating a dummy attachment that would be listed as a possible attachment for the launcher.

Thinking that the two CTD's may be related I quickly cleared the Tons of Guns Only flag on all attachments and tried to replicate the Restricted Items CTD, I couldn't, and was even able to open up the details display for the problem guns in the save game the original reporter of the bug supplied.

I am suspecting this CTD has something to do with NAS, specifically, how NAS deals with slots (slots appearance, or the list of possible attachment, or both) on a gun's layout where the attachments are illegal based on game mode. ie. the CTD went away when I made all attachments legal under Restricted items mode.

Or I could be seeing two separate NAS slot related CTD's (the one for game mode and attachment availability, plus the one I stumbled on while tweaking Bun's pseudo rifle grenade system to display tool tips).


Re: New Attachment System Beta[message #276386] Tue, 22 March 2011 14:58 Go to previous messageGo to next message
smeagol

 
Messages:2714
Registered:June 2008
Location: Bremen, Germany
Got a similiar problem with incompatible attachments not working correctly:

http://img854.imageshack.us/img854/9682/itlmarsbug.gif

The ITL Mars shouldn't be combined with a Laser, as clearly defined in the incompatible attachment section, yet you can attach a Rifle LAM (and all other lasers as well).

[Updated on: Tue, 22 March 2011 14:59] by Moderator



Re: New Attachment System Beta[message #276400] Tue, 22 March 2011 17:16 Go to previous messageGo to next message
Wil473

 
Messages:2820
Registered:September 2004
Location: Canada
A few questions related to my CTD's:
- What is the maximum character length for slot labels?
- Are there any characters that shouldn't be used in a slot label?

The only commonality between the two CTD's are that the Muzzle slot and label is expected to be displayed (ie. the grenades are not listed, and with Restricted Items, rifles do not have muzzle devices of any kind listed either). The thing is, the Muzzle slot label displays properly in cases of missing default inseparable attachments caused by the Map Editor (ie. VSS rifle missing the default sound suppressor has not crashed the game as far as I know).

[Updated on: Tue, 22 March 2011 17:20] by Moderator



Re: New Attachment System Beta[message #276425] Wed, 23 March 2011 02:25 Go to previous messageGo to next message
ctiberious

 
Messages:607
Registered:March 2007
Slot names hold up to 200 characters and I don't think there are any restricted characters. But then, it's just a standard CHAT16 (typedef wchar_t) variable.

If you have a savegame you can send in, that would be great. And if you could file a bugzilla report with details and the savegame, that would be even better. I'm focused on bug reports on Bugzilla right now and only noticed this post by accident. Smile So if you create a bugzilla report, I'm sure to get to the problem in the next couple days.

@Smeagol: Since the "basic" game doesn't have anything called a "ITL MARS", there could be any number of reasons for the problem you're reporting. Some could be code related but it's just as likely that you've set something up incorrectly. And since I don't have access to the files you're using, I'd have no clue where to start looking. If you can recreate your issue using the "basic" xml files, open a bugzilla report and I'll get the problem resolved.

Re: New Attachment System Beta[message #276426] Wed, 23 March 2011 02:39 Go to previous messageGo to next message
smeagol

 
Messages:2714
Registered:June 2008
Location: Bremen, Germany
Same is true for example for the ISM-V, it should be incompatible with the regular Laser Sight (which are both in regular 1.13... the ITL Mars was just an example), yet the two items go together on the same gun. Somehow the incompatible attachments check seems not to work.


Re: New Attachment System Beta[message #276428] Wed, 23 March 2011 04:46 Go to previous messageGo to previous message
Wil473

 
Messages:2820
Registered:September 2004
Location: Canada
As far as save games go, I can supply Ikaruga's save game, however I am guessing that for a Bugzilla posting this CTD should be demonstrated with the v1.13 XML's instead of UC-1.13. I'll see if the circumstances for the CTD exist and cause a similar CTD with v1.13.


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


Current Time: Wed Jan 17 03:24:20 EET 2018

Total time taken to generate the page: 0.02344 seconds