Home » MODDING HQ 1.13 » v1.13 Coding Talk » New Attachment System Beta
Re: New Attachment System Beta[message #266831] Sat, 13 November 2010 19:48 Go to previous messageGo to next message
Wil473

 
Messages:2820
Registered:September 2004
Location: Canada
Yeah I'll second Smeagol's request(it was what I meant by enumerated yesterday); though for a different reason: Excel/Spreadsheet compatibility. The 20 noted earlier should be more than enough, but I seem to remember Warmsteel increasing that limite some time ago to accomodate that project to make all weapons made up of discrete components.

I was adding a new item to UC-1.13NAS v2.8 when I realized I forgot something important in that list of NAS Features; one that Warmsteel had some trouble getting to work in the first place: Nested Attachments Adding Slots

ie. Worse case/overboard scenario (but it does exist and works):
- in my projects the AK's do not take RIS optics, but I have a AK/RIS Optics adapter; which adds the RIS optics slot
- Now the 6x and 10x sniper scopes do not fit the RIS mount, but there are two RIS to Scope Mount adapters (one also adds a Reflex Sight pedestal)
- The AK can have a 10x sniper scope attached, but only if first the AK/RIS Optics adapter is attached to give the extra RIS Optics slot, so that a RIS to Scope Mount adapter can be fitted to give the scope slot. (I even set things up so that these add-on slots don't conflict... well except for the one I added today which brought me here)

[Updated on: Sat, 13 November 2010 19:50] by Moderator



Re: New Attachment System Beta[message #266837] Sun, 14 November 2010 01:27 Go to previous messageGo to next message
ctiberious

 
Messages:607
Registered:March 2007
As far as the XML editor, I intend to look at that code once I get the NAS updates completed. But I'm not really a VB programmer which is what the editor is written in so I don't really know how much I'll be able to do. That said, if the editor is setup to recognize the defaultattachment value as an array, then I don't see why it would be a problem. That's how the ja2 code looks at that field right now (though I haven't yet had a chance to play around with it).

Currently the code is setup with a maximum attachments value of 20, though the way I'm writting the code, we could technically have up to 32. Beyond that and we'd need to change the variable I'm using to deal with activating slots. But, honestly, 20 is way more then enough. There's only so much space available in the graphic.

Currently I only have 1 "internal" and 1 "external" attachment slot available. Internal being things like Rod&Spring. External being things like trigger group and rails. I could probably add a second "external" attachment slot, but we're back to the lack of room for the graphics.

As for "Nested Attachments", I'm not sure what you mean. I've already written the code so that it calculates the available attachment slots by:
1- The weapons/item
2- By all attachments currently on the weapon/item
So, by default an AK would not be allowed to mount a 10x scope to it's scope attachment point. But if you add your AK/RIS Optics attachment to the "External" attachment point, the code would automatically know to allow your AK to support a 10x scope. I think if you want to have attachments that fit together to make other attachments, you need to work with merges. There are going to be limits to what the code can handle no matter what we do.

Re: New Attachment System Beta[message #266838] Sun, 14 November 2010 02:00 Go to previous messageGo to next message
Wil473

 
Messages:2820
Registered:September 2004
Location: Canada
You almost have the example, but another layer:
AK-107 = RSA Optics Mount
AK-107 + RSA/RIS Adapter = RIS Optics Mount
AK-107 + RSA/RIS Adapter + RIS/Scope Ring = Scope Mount

The above is not just a thought experiment, but describes an actual implemtation of this feature (from a few months back).

Attachment 1. produces slot X on a gun
Attachment 2. fits into slot X, and in turn produces slot Y
and so on...

I don't remember if Warmsteel called it nested adding attachments, but it is an existing feature of NAS that at the very least I have in use right now this moment (in fact I was testing a further implementation for slot confliction which triggered the memory), and I forgot to mention in my list earlier.

[Updated on: Sun, 14 November 2010 02:15] by Moderator



Re: New Attachment System Beta[message #266840] Sun, 14 November 2010 03:19 Go to previous messageGo to next message
ctiberious

 
Messages:607
Registered:March 2007
Well, technically yes. The code can handle that kind of thing because it determines what slots to "activate", and what attachments can use each slot, by the weapon/item and ALL attachments that are attached to it. The catch I have right now is I currently only have 1 "external" attachment point. For your example to work, you'll need 2. I'll look at adding a 2nd, which should work just like the extra grenade slots. I just have to get the code to recognize that both slots are valid for certain items. That shouldn't be impossible, though, since I'm using bitwise math to figure out what can go where. If I make two external slots, one with class=2048 and the other with class=4096, then setting an attachment with a class=6144 should allow it to be marked as valid for both slots. You'd just need to be sure and include any attachments that can fit into more then one slot in the IncompatibleAttachments.xml so that you couldn't attach two at the same time.

Re: New Attachment System Beta[message #266908] Mon, 15 November 2010 12:27 Go to previous messageGo to next message
Bever

 
Messages:24
Registered:March 2009
Location: Australia
Hope this isn't off topic at all but has there been or are you thinking of making an under-barrel shotgun attachment. Haven't been on the forums for probably a year now so bit behind on the development of everything.
Re: New Attachment System Beta[message #266909] Mon, 15 November 2010 12:31 Go to previous messageGo to next message
Logisteric

 
Messages:3471
Registered:December 2008
Location: B
how many posts about umderbarrel shotguns do you want to read? that is probably the weapon of choice for a lot of people - with 6/12 so close, try asking santa :saint:
Re: New Attachment System Beta[message #266912] Mon, 15 November 2010 13:22 Go to previous messageGo to next message
smeagol

 
Messages:2714
Registered:June 2008
Location: Bremen, Germany
Well, Masterkey Shotgun is indeed a popular demand, but from what I understand the engine limitations don't allow for it (or don't allow for it at the moment... maybe someday someone will come up for asolution).

I would also like to see 40mm Buckshot Grenades, but again, not really doable as they don't work well with the other grenades and the fact that grenade launchers use the trajectory target cursor.


Re: New Attachment System Beta[message #266917] Mon, 15 November 2010 14:00 Go to previous messageGo to next message
Bever

 
Messages:24
Registered:March 2009
Location: Australia
Logisteric
how many posts about umderbarrel shotguns do you want to read? that is probably the weapon of choice for a lot of people - with 6/12 so close, try asking santa :saint:

Lol I've been a good boy this year so will make a request Very Happy

smeagol
Well, Masterkey Shotgun is indeed a popular demand, but from what I understand the engine limitations don't allow for it (or don't allow for it at the moment... maybe someday someone will come up for asolution).

I would also like to see 40mm Buckshot Grenades, but again, not really doable as they don't work well with the other grenades and the fact that grenade launchers use the trajectory target cursor.


Damn engine limitations, they spoil a lot of good ideas. What code is JA2 written in btw? Haven't done any since uni but might start looking into it and tinkering in spare time one of these days if it's a language I'm vaguely familiar with.
Re: New Attachment System Beta[message #266918] Mon, 15 November 2010 14:14 Go to previous messageGo to next message
DepressivesBrot

 
Messages:3788
Registered:July 2009
Quote:
What code is JA2 written in btw? Haven't done any since uni but might start looking into it and tinkering in spare time one of these days if it's a language I'm vaguely familiar with.

C++, link to the SVN repository below
https://81.169.133.124/source/ja2/branches/Wanne/JA2 1.13 MP


Re: New Attachment System Beta[message #266920] Mon, 15 November 2010 14:18 Go to previous messageGo to next message
RoWa21

 
Messages:2049
Registered:October 2005
Location: Austria
DepressivesBrot
Quote:
What code is JA2 written in btw? Haven't done any since uni but might start looking into it and tinkering in spare time one of these days if it's a language I'm vaguely familiar with.

C++, link to the SVN repository below
https://81.169.133.124/source/ja2/branches/Wanne/JA2 1.13 MP


Additional Info: You need Visual Studio 2005/2008/2010 to compile the code.


Re: New Attachment System Beta[message #266933] Mon, 15 November 2010 19:37 Go to previous messageGo to next message
Bever

 
Messages:24
Registered:March 2009
Location: Australia
Sweet thanks for info... yay actually know c++ or although haven't used it for 3yrs or so, mainly been teaching Java. Good thing the uni has Visual Studio cause no way I could afford it.
Re: New Attachment System Beta[message #266934] Mon, 15 November 2010 20:25 Go to previous messageGo to next message
Faithless

 
Messages:445
Registered:October 2009
Location: The safe end of the barre...
Visual C++ express is free. You can get it from their website.
I doubt anyone here is actually using the payed version Wink
Re: New Attachment System Beta[message #266942] Tue, 16 November 2010 03:32 Go to previous messageGo to next message
Bever

 
Messages:24
Registered:March 2009
Location: Australia
Good Point... will download it today Very Happy

Hmmm... just ran build solution and got the JA2_EN_Debug.exe from \JA2 1.13 MP\Build\bin\VS2010\Debug\ folder and added it to the files from \JA2 1.13 MP\GameDir\

Was wondering if this is all I have to do before copying the files overtop of the latest 1.13 Stable SVN release or have I missed some other files produced by the build?

[Updated on: Tue, 16 November 2010 05:15] by Moderator

Re: New Attachment System Beta[message #266946] Tue, 16 November 2010 09:26 Go to previous messageGo to next message
ctiberious

 
Messages:607
Registered:March 2007
One of the features of NAS is the ability to do away with "cylinder" ammo for grenade launchers. Instead of a cylinder, we'll have up to 6 slots specifically set aside for grenade launchers to use. When all is said you'll hopefully be able to load each slot what whatever grenade (of the appropriate size) that you want. So you should be able to "mix and match" as you like. But while I've been working on all this I noticed that the GM-94 Grenade Launcher is the only 43mm launcher in the game. As such, the only 43mm "shells" that are currently in Items.xml are the equivalent of 40mm cylinders. Can someone out there create the graphics and xml entry updates needed to have each of the 5 types of 43mm grenades as single grenade items?

Re: New Attachment System Beta[message #266950] Tue, 16 November 2010 12:00 Go to previous messageGo to next message
Logisteric

 
Messages:3471
Registered:December 2008
Location: B
there are single grenades for the gm-94 (4 slots)

edith: of course i'm talking about aimNAS as well

[Updated on: Tue, 16 November 2010 12:30] by Moderator

Re: New Attachment System Beta[message #266952] Tue, 16 November 2010 12:19 Go to previous messageGo to next message
DepressivesBrot

 
Messages:3788
Registered:July 2009
Quote:
Can someone out there create the graphics and xml entry updates needed to have each of the 5 types of 43mm grenades as single grenade items?

You should ask smeagol, he made some for AIMNAS.


Re: New Attachment System Beta[message #266954] Tue, 16 November 2010 12:28 Go to previous messageGo to next message
smeagol

 
Messages:2714
Registered:June 2008
Location: Bremen, Germany
Uhm... just grab the latest AIMNAS version and take a look if you like the stuff I made.


Re: New Attachment System Beta[message #266966] Tue, 16 November 2010 18:19 Go to previous messageGo to next message
ctiberious

 
Messages:607
Registered:March 2007
Ok. I'll take a look for that. I've not seen AIMNAS yet.

BTW smeagol and wil473, I'm hoping to have "pre-beta" code ready in a day or two. I'll make it available to you guys when it's ready so you can see the changes and figure out how to make the new system work with your mods. I just need to get a couple more things finished.

Re: New Attachment System Beta[message #266969] Tue, 16 November 2010 18:40 Go to previous messageGo to next message
RoWa21

 
Messages:2049
Registered:October 2005
Location: Austria
BeVeR
Good Point... will download it today Very Happy

Hmmm... just ran build solution and got the JA2_EN_Debug.exe from \JA2 1.13 MP\Build\bin\VS2010\Debug\ folder and added it to the files from \JA2 1.13 MP\GameDir\

Was wondering if this is all I have to do before copying the files overtop of the latest 1.13 Stable SVN release or have I missed some other files produced by the build?


Right click on the "ja2" project -> Properties -> Configuration Properties -> Debugging -> Working Directory.
Set the "Working Directory" to the absolut path of your JA2 installation folder (e.g: C:\Games\JA2).

Then you can press F5 in Visual Studio. After compilation the Debug EXE automatically starts and you can start debugging Smile

Short Install instruction:
- Install JA2
- Get offical 1.13 GameDir files via TortoiseSVN from https://81.169.133.124/source/ja2_v1.13_data/GameDir and copy the content in your JA2 installation directory
- Get development 1.13 GameDir files via TortoiseSVN from https://81.169.133.124/source/ja2/branches/Wanne/JA2%201.13%20MP/GameDir and copy the content in your JA2 installation directory
- Compile an EXE with Visual Studio, press F5 and start playing/debugging

Any more questions? You know what to do Smile


Re: New Attachment System Beta[message #266975] Tue, 16 November 2010 20:29 Go to previous messageGo to next message
Wil473

 
Messages:2820
Registered:September 2004
Location: Canada
No need to rush Chris. I've got plans to release DL-1.13NAS sometime this weekend. I'll have time take stock of the situation afterwards. At the very least I'll be needing to actually implement that plan to quickly build OAS attachment definitions from (current) NAS slots.

From what I've seen, I'm suspecting that I won't have to throw out too much, just need to define attachment classes and assign them to the slots.

However, there is something that has been nagging me about the grenade slots discussion. Does the modder define them (as is now) or are they hard coded? I'm almost certain you said the modder still has control over creating them, but some of the recent wording has me worried.

[Updated on: Tue, 16 November 2010 20:42] by Moderator



Re: New Attachment System Beta[message #266981] Tue, 16 November 2010 21:07 Go to previous messageGo to next message
ctiberious

 
Messages:607
Registered:March 2007
There are 6 grenade slots in AttacmehtSlots.xml. You'll have full control over the display coords and size for each, just like all the other slots (though I don't recommend making the grenade slots into big slots).
All rifle grenades should be (at present) nasAttachmentClass = 1032192 which makes them valid for all 6 grenade slots.
I'm using the "GrenadeLauncher" tag in Items.xml to determine how many slots you want to activate. If it's set to 0, like most items, then you won't have any grenade slots display. If it's set to 1, like most UGLs, then you get only a single slot. You can set it as high as 6. So, as examples, the Milkor grenade launcher (item 906) has a "GrenadeLauncher" value of 6 while the AICW Grenade Launcher (item 909) has a "GrenadeLauncher" value of 3.

This brings up a concern. Some of the grenade slots overlap the external slots. For the moment so I can test, I've move the external slots so they are above the scope slots. Is that an issue or would you all prefer the grenade slots to be at the top of the interface? Here's some examples of how the interface looks.
http://img593.imageshack.us/img593/7197/interface2.jpghttp://img576.imageshack.us/img576/4324/interfacec.jpg
http://img146.imageshack.us/img146/2306/milkor.jpg
http://img842.imageshack.us/img842/7532/m16y.jpg

Re: New Attachment System Beta[message #266982] Tue, 16 November 2010 21:32 Go to previous messageGo to next message
Wil473

 
Messages:2820
Registered:September 2004
Location: Canada
Sorry, I think I was dancing around the issue; but if I'm reading the last bit correctly, this means at the very least with New New Attachment System I will no longer be able to define "decorative" grenade slots for "special cases."

ie. my case as already in use
1. all single shot grenade launchers use the same slot (bottom most row, immediately below the slot position always used for grenade launcher attachments) = Grenade Slot 1
2. above grenade slot plust 5 more slots for the 6 shot launchers (forming a 2x3 arrangement below the gun image) = Grenade Slots 2-6
3. OICW has its own grenade slot to indicate bullpup magazine feed (to the right of the gun image) = Grenade Slot 7
4. AICW has three more of its own grenade slots along the top, purely for decoration indicating the real world placement of the Metal storm launcher = Grenade slots 8-10
5. STK Squad Support Weapon has one more to the right of last AICW slot = Grenade slot 11


More of, "perhaps Wil is reading too much between the lines," but your technical description of adding slots seems to indicate a finite number of attachments may add slots. Granted I understand the reasoning for wanting to get one attachment adding slots working before worrying about more; but the way I seem to be reading it, its not just "nested" or "recursive" addition of slots, but total number of attachments that add slots that will be finite for technical reasons.

ie. A RIS Hand Guard and a RIS Optics adapter will take up two of the attachments that may add attachments allowance. And these two are independent of each other unlike my earlier example.

This means that my worse case example of attachments adding attachments needs to be bumped up by one. Some future modder may need more.

Note: unlike Smeagol, I am using attachments to add slots to create RIS equipped "oldie" guns. To get the equivalent of some modern "RIS-everywhere-guns" two independent attachments are needed. One for optics, and one for the handguard.

[Updated on: Tue, 16 November 2010 21:59] by Moderator



Re: New Attachment System Beta[message #266983] Tue, 16 November 2010 21:32 Go to previous messageGo to next message
Minty

 
Messages:118
Registered:July 2009
Location: UK
Personally, I'd prefer all slots to be modder-definable, in both x/y co-ords, attachment-capability AND number. 6 slots for grenades may seem like plenty, but what if someone wanted to make this beast ?

http://3.bp.blogspot.com/_oZaomizvY8M/S9e2-SeMMwI/AAAAAAAAHU0/plcyA8g2LPU/s1600/MM1-781323.jpg


Or even for some theoretical scifi mod, with potentially more, for grenades OR RPGs..

Edit: Ninja'd by Wil. Very Happy

[Updated on: Tue, 16 November 2010 21:36] by Moderator

Re: New Attachment System Beta[message #266984] Tue, 16 November 2010 21:39 Go to previous messageGo to next message
Wil473

 
Messages:2820
Registered:September 2004
Location: Canada
Thanks Minty, your example is more real, rather than pure decoration like mine. Which also means that yes right now I could get away with only 6 slots, if I had to....

EDIT: for more information of what NAS features are already in place, this is an example of the current worse case scenario I have implemented:

AK-107 base slots
AK RIS Handguard = adding slots to make up a RIS quad up front
RSA Optics to RIS = adding a RIS optics slot
RIS grenade launcher (generic name) = adding a grenade slot, fits one of the slots added by the AK RIS Handguard
RIS Scope rings w/Reflex mount = adding a slot for sniper scope and a slot for a reflex sight, this one is sitting in the RIS Optics slot added by the RSA Optics to RIS attachment.

So four attachments adding slots, some of them sitting in slots added by previous attachments, others independent.

[Updated on: Tue, 16 November 2010 22:13] by Moderator



Re: New Attachment System Beta[message #266986] Tue, 16 November 2010 21:53 Go to previous messageGo to next message
Logisteric

 
Messages:3471
Registered:December 2008
Location: B
this is definately a gun for biff
Re: New Attachment System Beta[message #266987] Tue, 16 November 2010 21:53 Go to previous messageGo to next message
Minty

 
Messages:118
Registered:July 2009
Location: UK
And don't forget attachments adding AND/or removing slots too.. VERY important for those that want to have uber-customisable weapons, via attachments: RIS-attachment adds RIS slots, and removes non-RIS slots, for example.
Re: New Attachment System Beta[message #266989] Tue, 16 November 2010 22:48 Go to previous messageGo to next message
ctiberious

 
Messages:607
Registered:March 2007
Let's see if I can answer everything.

You have total control over where each slot will appear. If you don't want them on the bottom row like I have them, you can change the x,y coords in the xml file.

You can't have one arrangement for one gun, and another arrangement for another gun. That is the downside of this setup. The counter to this, however, is that you don't have to build a completely new set of xml entries for every weapon that doesn't exactly conform to one of the setups already in the old system. I know this doesn't worry you guys that already have your mods, but I'm thinking it will be a bonus for people trying to write mods. Plus it takes out the concern of whether to make a mod "NAS-only" or not.
The slots in my above examples dynamically created themselves based on the allowable attachments. So in the case of the M16 graphic, if you said that the ISM-V-IR and Reflex Scope were not valid attachments for that weapon, that slot simply wouldn't appear. If you wanted the AICW to support a folding stock (bare with me, I know that weapon really can't support that Smile ) then you just add the appropriate entry to Attachments.xml and the system would automatically display the stock slot.

As I mentioned, I currently have 6 Grenade slots available. This is hardcoded because we have to tell the code what each attachment class means. That doesn't mean I can't increase that. Right now there is a 21 attachment limit. Because of how I'm handling attachment classes, we can support up to 32. I will code in the other 11 classes before I'm finished and I will alter the hard coded gl limit (currently set to 6). But there still has to be a hard coded limit so we don't try to use an attachment class that is outside of the 32bit range I'm currently using. That said, if you guys seriously think 32 different attachment classes isn't enough, I can alter the flag to a 64bit value but I figured that would be overkill.

When you attach an item, if that attachment itself can have attachments, then the item you attach to can also use those attachments. In other words, you setup a "RIS Hand Guard" that can take a reflex site and "RIS Optics Adapter", and you setup a "RIS Optics Adapter" that can take an ACOG. Then you say that the M1 Garand can fit the "RIS Hand Guard". Without the hand guard, the M1 can't use a reflex sight, ACOG or RISOA. If you fit the hand guard to the M1, you'll now be able to fit the reflex sight and the RISOA. And if you then fit the RISOA, you can fit the ACOG.

http://img705.imageshack.us/img705/6595/m11c.jpgWithout any rails
http://img708.imageshack.us/img708/2517/m12w.jpgWith "RIS Hand Guard"
http://img547.imageshack.us/img547/9408/m13e.jpgWith "RIS Hand Guard and RIS Optics Adapter"

As for removing possible attachments, I haven't figured out a way to do that. Possibly using IncompatibleAttachments.xml would work but I need to test that.

Re: New Attachment System Beta[message #266990] Tue, 16 November 2010 22:49 Go to previous messageGo to next message
smeagol

 
Messages:2714
Registered:June 2008
Location: Bremen, Germany
Milkor in AIMNAS

http://img713.imageshack.us/img713/6717/nasmilkor.gif


GM-04 in AIMNAS

http://img339.imageshack.us/img339/8229/nasgm94.gif

Fully tricked out M16 in AIMNAS

http://img836.imageshack.us/img836/817/trickedoutm16v4.gif



Just to show that it's not like we didn't spent some time on thinking how to place all those slots. Wink


Re: New Attachment System Beta[message #266991] Tue, 16 November 2010 22:55 Go to previous messageGo to next message
ctiberious

 
Messages:607
Registered:March 2007
I'm not suggesting otherwise. I'm simply working within the restrictions this new setup uses. Since all UGLs, plus the Milkor, plus the GM-04, plus the AICW all use "Grenade Slot 1", that slot would be in the same location for each. The one possibly work around I have would be to hard code a condition that if the "GrenadeLauncher" field from Items.xml is >1, use "Grenade Slots 2-7", thus leaving GL1 just for UGLs. It would mean adding a 7th GL slot but since there are suggestions to allow for tons of GL rounds, that isn't an impossibility.

Re: New Attachment System Beta[message #266992] Tue, 16 November 2010 23:03 Go to previous messageGo to next message
smeagol

 
Messages:2714
Registered:June 2008
Location: Bremen, Germany
Really don't know what's wrong with the current setup. If I feel I need to have a gun with 20 grenade slots, I can add those slots to the appropriate xml file.

I can have different slots for UGL grenades, regular GL grenades and multi-shot grenades without any problem.

Really don't get yet, what you want to achieve (btw... you could check out the IRC Channel if you want to discuss this Wink ).


Re: New Attachment System Beta[message #266993] Tue, 16 November 2010 23:18 Go to previous messageGo to next message
Wil473

 
Messages:2820
Registered:September 2004
Location: Canada
Slot layout is generated by the attachments.xml in your NAS? If true, then this is going to force a rethink of how my mod looks at least. Probably going to have to ditch multiple possible slots for an attachment. ie. that refex sight is only going to appear in one slot position on-screen regardless of if it is mounted directly to the weapon, or on a mount built into another scope/sight.

Right now: RIS Handguard - of which there is one for the AK, G3, MP5, FAL and most recently (Mini)Uzi

Adds (generally):
Top RIS slot = accepts all LAMs, RIS bipod
Side RIS slot = accepts all LAMs
Bottom RIS = accepts all LAMs, RIS bipod, RIS Grip, Grippod, FN SCAR grenade launcher, HK AG36 grenade launcher, Metal Storm underslung launcher, bipod(non-RIS), foregrip(non-RIS)

Removes:
non-RIS Grenade launcher slot (HK 79, GP-30)
standalone bipod and foregrip slot(s)

However with how I'm reading things for the new system, the RIS Handguard attachment adds a series of attachments to an items possible attachment list, adding slots as needed. This seems to imply that a standardized system of slots is mandatory.

EDIT:
ChrisL, I know you mean well, but I am still seeing a lot of work for all of us, for questionable return.

EDIT2:
Echoing Smeagol, since inclusion of the existing NAS framework into the Beta-MP code, there has been a bit of "buy-in" with it, especially as it has been very stable (not a slight against Warmsteel, really it is a big comliment that I can say that NAS is very stable, and a statement of my waryiness of "New" features over the years), and has been filled out with extra features. Nesting slots adding slots, wasn't even thought possible till later on in the project, now it is a feature. Same actually with multiple grenades.

[Updated on: Tue, 16 November 2010 23:46] by Moderator



Re: New Attachment System Beta[message #266994] Tue, 16 November 2010 23:40 Go to previous messageGo to next message
Logisteric

 
Messages:3471
Registered:December 2008
Location: B
well, i'm just a stupid maccie, but can anyone (probably the one who wants to change the code) tell me what this is supossed to be good for, besides freeing smeagol and wil 473 from boring weekends?

[Updated on: Tue, 16 November 2010 23:43] by Moderator

Re: New Attachment System Beta[message #266995] Wed, 17 November 2010 00:04 Go to previous messageGo to next message
Wil473

 
Messages:2820
Registered:September 2004
Location: Canada
This is probably documented somewhere in this thread, but I am suspecting that Warmsteel was only able to achieve the level of "freedom" with slot possiblilites that Smeagol, myself and others are concerned with, only because the OAS system was kept seperate (ie. not using Attachments.xml).

While your goal ChrisL of being able to maintain commonality between OAS and NAS does have benefits for beginners to JA2 v1.13; some of the old timers (those of us still active here at least) are used to the creative freedom we have right now. Quite frankly, it didn't take that much effort to get a grasp of the current NAS (notwithstanding that little gaff on my part about item control).

[Updated on: Wed, 17 November 2010 00:05] by Moderator



Re: New Attachment System Beta[message #266996] Wed, 17 November 2010 00:14 Go to previous messageGo to next message
smeagol

 
Messages:2714
Registered:June 2008
Location: Bremen, Germany
Well, I can only speak for myself here, but basically AIMNAS abandoned OAS since NAS went beta (same as OIV...). People that play mods usually want the most features available.
In my opinion NIV and NAS highly improve the possibilities of modding, I won't go back to make it OIV/OAS compatible.


Much more important is really the update for the xml editor, not only in regards to the aforementioned default attachments, but maybe even regarding attachment slots (though this probably would be a lot more work, if it is even doable at all).


Re: New Attachment System Beta[message #266997] Wed, 17 November 2010 00:48 Go to previous messageGo to next message
ctiberious

 
Messages:607
Registered:March 2007
Not to talk badly of anything WarmSteel did, but I do like the basics of his code, but the current NAS is overly redundant. As wil said, there are currently two seperate attachment systems in the code. You've got two basially identical IncompatibleAttachments.xml files, each having to be maintained seperately. You have two seperate attachment systems. If you want to add an attachment, you have to either add it to both systems (one place for OAS and potentially dozens of places for NAS) or, like you did, restrict your mod to only a single system. There are seperate functions for each system, because the way we currently look at attachments is completely different.
Yes, for "old timers" it didn't take you too long to setup using the current NAS. But it still took you longer then it should have. You had to adjust the AttachmentSlots.xml and ItemSlotAssign.xml files for each specific weapon. If you add items, you have to go through and make changes to multiple locations unless you choose to ignore one system.
Say I want to add an attachment so the game will allow a Minimi to switch between clips and belts like it should. With the current system I need to add an entry in Items.xml for the item istelf, then I need to add an entry in Attachments.xml so OAS will know which weapons can take this attachment, then I may need to update IncompatibleAttachments.xml if there are any attachments this "adapter" shouldn't go with, then I have to figure out which ItemSlotAssign entries go with the Minimi, make sure those assignments aren't used by any other weapons and possibly create new assignments, then update AttachmentSlots.xml to account for the new "adapter" and update NASIncompatibleAttachments.xml if there are any incompatibilities there. All this could take a significant amount of time, especially if you're a beginner to 1.13.
With the system I'm working on, you simply add the item to Items.xml, then update Attachments.xml and IncompatibleAttachments.xml and you're done. Less then 5 minutes of effort regardless of your experience level.

And that's from a "modders" point of view. From a a developers point of view, any time a change needs to be made to the development system, you have to make twice as many changes. Every change is a risk for a new bug.

And then there's the xml editor which would require significant work to make it compatible with the current version of NAS because we have two completely seperate systems we're trying to work with.

From a modders perspective, the system I'm working on should take less time to setup. Yes, I get it that you guys have already spent the time setting things up but I would hope you aren't the only modders that will every do stuff for 1.13.
From a players perspective, the new system should give more options because modders won't have to choose between OAS, NAS or both when designing their mods. So if a player wants to play UC with OAS, they could. As a player, I don't see why anyone would want to since both NIV and NAS add so much to the game, but the reason we didn't remove OIV (and won't remove OAS) is so that players have an option.
And from a developers standpoint there is less risk of bug fixes causing problems because NAS will sit "on top of" OAS, just like NIV sits "on top of" OIV.
The only real drawback I see so far is that you lose some of the fine control you currently have over how slots appear. I.E., you can't have a completely different layout for every single weapon.

Wil, look at your post. You've got three different "RIS Slots" that "accept all LAMs". Does that mean you'd actually mount 3 LAMs to a gun? Which you actually could do with the system I'm setting up. But other then simply doing it "because you can", would you? I don't think the code would even recognize that you had three attachments that gave the same bonuses.

Anyway, at this point the only thing I can do is finish what I'm doing and let you all look at it. From there I can either "fix" the things you all think are missing or scrap the work I've done and just leave what we currently have in place. Though I would at least hope you'd keep an open mind.

Re: New Attachment System Beta[message #266998] Wed, 17 November 2010 01:05 Go to previous messageGo to next message
Wil473

 
Messages:2820
Registered:September 2004
Location: Canada
Nope, at least for LAM's and bipods. One of the reasons for the nearly identical IncompatibleAttachments.xml files, is that the NAS one has definitions making LAM's incompatible with itself as well as other LAM equipped attachments. With OAS there wasn't any reason to worry abut multiples of the same attachment being attached, however with NAS.

Multiple attachments adding together is a recognized feature of Warmsteel's NAS; one that I have yet to use. I was in on the original discussions, because it related to the very example I've noted (all I wanted was multiple legal slots that one could drop a LAM into).

I've already said I will take a look at what you have to offer Chris. To be honest, I've already rebuilt the mod (now mods) to accomodate NAS changes before; however in that last case we had an idea of its benefits (its documented in the thread somewhere, an entire XML was dropped, it had something to do with adding/removing slots I think). I am sorry, but so far it seems we've only discussed loss of capability today.

[Updated on: Wed, 17 November 2010 01:55] by Moderator



Re: New Attachment System Beta[message #267000] Wed, 17 November 2010 01:57 Go to previous messageGo to next message
Faithless

 
Messages:445
Registered:October 2009
Location: The safe end of the barre...
Quote:
From a a developers point of view, any time a change needs to be made to the development system, you have to make twice as many changes. Every change is a risk for a new bug.
This is something that shouldn't be underestimated, and the main reason I think we should explore this option further.

I also think it fits 1.13 alot more, since it maintains OAS without (too much?) extra effort, ensuring it will always be around.
Your mods have dropped OAS completely, which is fine. But this is unthinkable for 1.13 itself, because it would mean all attachments would have to be defined twice.

I know currently it's a big hassle for the modders that have adapted their mods to NAS, but in the end having a more stable and possibly easier to use system will benefit us all.

It might still not work out the way we had all hoped, but we can always think about merging certain aspect of the two ways Chris and I have tried.

Quote:
The only real drawback I see so far is that you lose some of the fine control you currently have over how slots appear. I.E., you can't have a completely different layout for every single weapon.
I think this is rather a serious restriction, but maybe it can be fixed by having some xml (probably embedded into some other xml file) to be able to define slots with a different layout than the default based on the item ID (usItem).

I'm also a bit concerned about the limitation of these classes, as while only up to something like 10 will go on one separate item, I could understand there was a need to make "similair" classes for different items.

Quote:
Multiple attachments adding together is a recognized feature of Warmsteel's NAS that I have yet to use. Its there, I was in on the original discussions, because it related to the very example I've noted (all I wanted was multiple legal slots that one could go into).
Even though NAS does currently support this, it is not perfect by far, mainly because of the same reason Chris mentioned, the game does not *always* know how to handle multiple attachments of the same type.

The reason for this is:Quote:
I don't think the code would even recognize that you had three attachments that gave the same bonuses.
Some bonuses will take effect, and some won't. It really just depends. This means at the moment it's dangerous to assume everything will work.
I do think this is mainly because the functions that read data from attachments are a bit wacky and are all very specific on how to read certain attachment data.
In this light, they would need an overhaul anyway, but I figured this was another project altogether.

EDIT : one more concern

[Updated on: Wed, 17 November 2010 02:02] by Moderator

Re: New Attachment System Beta[message #267001] Wed, 17 November 2010 02:08 Go to previous messageGo to next message
smeagol

 
Messages:2714
Registered:June 2008
Location: Bremen, Germany
ChrisL
If you add items, you have to go through and make changes to multiple locations unless you choose to ignore one system.


Well... I ignore OAS, but still have to check several different places when I add new items. I like using the XML editor to add new stuff, but I have to add attachments manually atm. Once you get the hang of it, this isn't such a big deal, though.

Quote:
Say I want to add an attachment so the game will allow a Minimi to switch between clips and belts like it should.


Like the idea... now if only more than one default attachment would work with the xml edior ... Wink

Quote:
All this could take a significant amount of time, especially if you're a beginner to 1.13.


Hmm... don't know if the "beginner" argument is really valid. Adding stuff was already difficult when the XML editor was still working properly (item pics spread over three sti files, etc...). For people who want to get into modding it takes quite a bit of time to get used to.

Quote:
Less then 5 minutes of effort regardless of your experience level.


Well, for adding one item maybe... but we're talking here about re-configuiring entire item mods with something around 2500 entries to items.xml. I don't say, I disaprove what you intend to do, but I'd like to explain my thoughts on this (though I actually succeeded in chasing away other people by doing this...).

Quote:
From a a developers point of view, any time a change needs to be made to the development system, you have to make twice as many changes. Every change is a risk for a new bug.


Yeah, I can see that.


Quote:
The only real drawback I see so far is that you lose some of the fine control you currently have over how slots appear. I.E., you can't have a completely different layout for every single weapon.


Exactly. And that fine control was one of the reasons I picked up on NAS rather quickly.


Re: New Attachment System Beta[message #267002] Wed, 17 November 2010 02:17 Go to previous messageGo to next message
Wil473

 
Messages:2820
Registered:September 2004
Location: Canada
Speaking of fine control over attachment slots, and new modders, is ko5ma still active with Truly Customizable Weapons? No new updates since August, though as short as the thread is, it does look into what is possible with a NAS of some kind.

EDIT: by the way, I am finding it somewhat curious that everyone is talking about the FN Minimi dual belt/magazine feed as a new thing. I had this implemented, in a rather cumbersome manner, with OAS. The NAS exploit allows it to almost operate like a button to select mode. Then again my beta testers didn't notice it either...

[Updated on: Wed, 17 November 2010 02:20] by Moderator



Re: New Attachment System Beta[message #267003] Wed, 17 November 2010 02:52 Go to previous messageGo to previous message
Faithless

 
Messages:445
Registered:October 2009
Location: The safe end of the barre...
ko5ma relied heavily on being able to place the slots independently for each item.
I believe though, that if this is fixed, his system would still be possible.
Previous Topic: Experimental Project 7
Next Topic: Code Snippets
Goto Forum:
  


Current Time: Wed Jan 17 03:33:47 EET 2018

Total time taken to generate the page: 0.01975 seconds