Home » MODDING HQ 1.13 » v1.13 Coding Talk » New Attachment System Beta
Re: New Attachment System Beta[message #266317] Fri, 05 November 2010 04:59 Go to previous messageGo to next message
Wil473

 
Messages:2815
Registered:September 2004
Location: Canada
The number of grenade slots I have going is largely for aesthetics, different multi-shot launchers have different configurations of slots.

ChrisL, just to clarify what your objective is, as an example, instead of me having a: "RIS scope slot," "Russian Small Arms Scope Slot," "SVD Scope Slot," "Old Fashion Scope Mount Scope Slot," etc... all which occupy the same coordinates in the interface; there is a single "Middle Top Scope Slot," and attachment control by a combination of checking the old Attachments.xml and the new attachment class = scope (for which the scopes are set with, and the slot set to accept only)?

I'm sorry for being a pain about this because while I accept having two systems is not elegant (though I am still arguing there is less data entry once OAS is ignored*), it is a system that seems to be relatively stable (arguably because it is a separate system); and aside from effort already invested in them**, I see nothing wrong with NAS mostly using its own independent set of XML's.*** I want to know what else you have in mind as far as new features for the proposed Integrated New Attachment System?



* Its just not a matter of me being lazy that the OAS Attachments.xml has not been updated. NAS opened up several possibilities with regards to items, which have led to some item definition choices that are incompatible with OAS. You know about the missing ACOG/Reflex Sight combo. I've also dropped most of the "multi-grenade" single items; only one left is the 20mm OICW magazine, where the depletion system works fine as a "pseudo magazine." Also, I have purged most of the stats responsible for "built-in-attachments" in favour of multiple default inseparable attachments (up to three in some cases).

** My projects happen to be using unintended capabilities of the existing NAS framework (see the new Folding Stock system I have going). While Warmsteel has regularly kept me on notice that progress on NAS may well break them, so far they haven't. Also, please keep in mind that changes being discussed here have ramifications for Smeaglo's mod, the ever growing IoV/CosPlay/DBB mod, and possibly others as well.

*** As an aside, adding new flags to existing XML's has been historically risky to existing mod projects. Just recently we had the introduction of the tags to allow mercstartinggear.XML to allow A.I.M. Mercs to have multiple starting gear. In fact the new tag was compulsory for the inventories of any RPC/NPC to show up. While it was not difficult to work in, it was annoying and time consuming. I even made use of it for other projects, but at the time, it interrupted work on the Urban Chaos hybrid/update, where the idea is still to arrive unarmed (and I'm not going to spend a few hours devising multiple sets of LBE kits to outfit A.I.M. mercs with).

[Updated on: Fri, 05 November 2010 05:34] by Moderator

Report message to a moderator

Lieutenant

Re: New Attachment System Beta[message #266318] Fri, 05 November 2010 08:17 Go to previous messageGo to next message
ctiberious is currently offline ctiberious

 
Messages:605
Registered:March 2007
My point is that I don't think we can really "ignore" OAS. That system exists and people will expect it to be fully functional (even if I prefer NAS so far). I also prefer NIV and haven't played OIV since it was integrated into the main source but that doesn't mean I'd suggest "ignoring" OIV either. If we accept that OAS will always exist, at least in the main source code, then the new system should really work with the system we have rather then having two seperate systems. Of course, I may well find that having two seperate systems is the only option and if that's the case, so be it. But as WarmSteel said, if we can keep the features of NAS while building it on OAS, then why not at least try?

And, yes, you're understanding the jist of what I'm looking at. Though I would like to throw in a third set of conditions so that it will be possible to have attachments add attachments (like not allowing grenades without a grenade launcher first, or having RIS rails added to a gun that normally doesn't have them).

And I'm aware of the risks involved in adding new xml flags. I experienced it while writting NIV but that at least means I'm prepared for those sorts of problems.

Anyway, it's a bit early to start worrying about what I'm going to try and do. I've barely begun looking at the code so far. Smile

Report message to a moderator

First Sergeant
Re: New Attachment System Beta[message #266331] Fri, 05 November 2010 14:37 Go to previous messageGo to next message
wolf00 is currently offline wolf00

 
Messages:1148
Registered:September 2006
Location: Czech Republic

ok svn 1247 +nas 0.61b have messed ammo too,like previous svn 1246,so exist any chance to modifing existing nas 0.61 ?

Report message to a moderator

Sergeant Major
Re: New Attachment System Beta[message #266333] Fri, 05 November 2010 15:23 Go to previous messageGo to next message
Wil473

 
Messages:2815
Registered:September 2004
Location: Canada
Oh no, I'm not suggesting dropping OAS from the main JA2 system. Only that once certain design choices are embarked on in an items mod, OAS compatibility for that item mod rapidly becomes untenable. See Original posting on these thoughts. Also, take a look at Alrulco Folding Stock when you have a chance, as I said I've done a few things to mitigate rampant slot expansion, then added additional slots to squeeze more capability out of mergers and attachments than was intended.

As it is just preliminary talk, I'll go back to trying to get my current slate of projects (UC-1.13NAS v2.8, and DL-1.13NAS v2) out before this .exe becomes completely irrelevant. Right now I am designing for 0.61B due to some issues with the later Base Code and attachment combo mergers (oh and the UC Campaign ending bug in the code from two weeks ago that I'm still waiting for new on from Rowan).


Wolf00 - if you are trying to fix a NAS 0.61B install (for an ongoing game); try to obtain an old magazines.xml. One before the new .38SPC ammotypes were added. Otherwise, the Beta SCI already contains an implementation of the NAS feature, along with a bunch of other new stuff that must be tested (Carmen Quest, X-Ray Device mergers, new AI...)

[Updated on: Fri, 05 November 2010 15:32] by Moderator

Report message to a moderator

Lieutenant

Re: New Attachment System Beta[message #266334] Fri, 05 November 2010 17:20 Go to previous messageGo to next message
ctiberious is currently offline ctiberious

 
Messages:605
Registered:March 2007
Wil (or anybody else for that matter), to save me spending a week reviewing all the posts relating to NAS, let me ask a question. In your opinion, what are the features as you see them for NAS? I've started forming my own (favorable) opinion about NAS in the last few days, but before I start tinkering too much, I'd like to get other opinions on exactly what you think are NAS' features.

Report message to a moderator

First Sergeant
Re: New Attachment System Beta[message #266354] Fri, 05 November 2010 21:48 Go to previous messageGo to next message
wolf00 is currently offline wolf00

 
Messages:1148
Registered:September 2006
Location: Czech Republic

wil473: i have dowloaded svn 1241 you want magazines from data or from data 1.13 ?

ok here is http://www.mediafire.com/?qzgvgd2pnpt0fcj

Report message to a moderator

Sergeant Major
Re: New Attachment System Beta[message #266362] Fri, 05 November 2010 23:04 Go to previous messageGo to next message
Wil473

 
Messages:2815
Registered:September 2004
Location: Canada
Wolf00 - it doesn't hurt to copy over both, though since I'm suspecting the addition of new ammo causing your difficulties, Data-1.13 being the important one.


ChrisL - this might take a while, so in no particular order, stuff I remember using:

- option to have no attachment slots
- multiple default attachments
- - creation of item, from a merger/use operation, automatically adds inseparable (and only inseparable) default attachments
- context based attachments adding attachment slots (based on at the very least item being/not being an item index or item class, probably more but I need to open up the XML)
- multiple slots on the same weapon that can take an attachment
- option to allow multiples of same attachments being attached (not just grenades)
- two sizes of attachment slots
- fine control over placement of attachment slots (up to being able to place attachment slots inside the Big Image graphic)
- This one is unintentional on Warmsteel's part, but that didn't stop me from exploiting it, if an attachment is set to merge with the item, the merger will not occur if it is clicked on a slot that takes the attachment. This is how my folding stock system (v2) works:
- - Two attachment slots, one only takes the folded stock, other only takes the unfolded stock
- - Item has one of the two stocks set as default attachment (so it appears with it already attached when supplied to enemy, or bought)
- - Movement of the "stock item" from the slot it can attach to the other slot triggers the merger where the stock item may change (and if it is a Machine Pistol so will the base weapon)
- - Once the "stock item" has transformed it will fit the other slot (reverse slots to change back)
- - I am suspecting that this "feature" is dependent on the having the attachment associated directly to the slot instead of the base item. Moving an attachment to an invalid slot causes the merger, but the merger function does not happen when the slot is valid. You may want to see how it works with one of my more recent releases. Prior to NAS, the folding stock procedure was much more complicated and involved clicking in and out of the attachment screen.
- - Also used for dual ammunition feed system for FN Minimi's (one slot makes the LMG a 30rd magazine feed, other 200rd belt feed), Groza weapon system to change the form of the attachment, STK Compact Personal Weapon to change between three calibres, and once I get around to it an adjustable shotgun choke

EDIT: Better description to that last "feature." Essentially NAS inadvertently created a system for pseudeo "transforming" attachments. Something that up until recently has always been denied. Headrock did suggest that a proper implementation of "transforming" items (something that would change on command) was in the cards for some HAM version after 4.0 (New Chance-to-Hit), but who knows how long it will take to work the bugs out of his parallel CtH system (still in closed Alpha). Headrock wanted a "transform" item feature to allow for variable power scopes that worked with the new CtH system.


Personal observations:
- intuitive attachment assignment, I found it easier to consider not what attachments a weapon could take, but instead what type of attachment mounts a weapon had. This is where I got the examples of RIS Scope Mount, SVD Scope Mount, horizontal(side) non-optic RIS, vertical non-optic RIS (top and bottom), etc... From this, I didn't have to consider what attachments fit what weapon, but instead what attachment mounts a weapon had (ie. does it have a RIS Quad hand guard? If yes = Forward RIS, Side RIS, and a Bottom RIS). This then lead to a large amount of repetition and consequently why it all seemed so easy. All AK's have the same basic set of slots, same with your 21st century RIS everywhere rifle.

[Updated on: Sat, 06 November 2010 00:22] by Moderator

Report message to a moderator

Lieutenant

Re: New Attachment System Beta[message #266365] Sat, 06 November 2010 00:06 Go to previous messageGo to next message
wolf00 is currently offline wolf00

 
Messages:1148
Registered:September 2006
Location: Czech Republic

ok magazines.xml are on my link ... http://www.mediafire.com/?qzgvgd2pnpt0fcj

filename is nas 0.61_c



Report message to a moderator

Sergeant Major
Re: New Attachment System Beta[message #266455] Mon, 08 November 2010 02:52 Go to previous messageGo to next message
rOckz99 is currently offline rOckz99

 
Messages:5
Registered:February 2010
Location: The Netherlands
hey guys,

couple days ago i for a clean install of JA2 and i patched that with: SCI_SVN1241_MPSVN3752_Vanilla113_20101008

so right now i got more attachement slots just as i wanted, but im kinda missing the detailed info on the gun that i had before. like AP costs and silencer thingie. is it gonna work to run nas0.61c over my current version?

[Updated on: Mon, 08 November 2010 03:32] by Moderator

Report message to a moderator

Private
Re: New Attachment System Beta[message #266459] Mon, 08 November 2010 03:19 Go to previous messageGo to next message
smeagol is currently offline smeagol

 
Messages:2705
Registered:June 2008
Location: Bremen, Germany
Hmmm... try checking the in-game options menu for enhanced description box.

Report message to a moderator

Lieutenant

Re: New Attachment System Beta[message #266460] Mon, 08 November 2010 03:33 Go to previous messageGo to next message
rOckz99 is currently offline rOckz99

 
Messages:5
Registered:February 2010
Location: The Netherlands
nice i t was right under my nose the whole time.. i kinda feel like a moron now Razz

well thanks!

Report message to a moderator

Private
Re: New Attachment System Beta[message #266708] Thu, 11 November 2010 18:56 Go to previous messageGo to next message
ctiberious is currently offline ctiberious

 
Messages:605
Registered:March 2007
I should know this but it has been a long while so.... can anyone tell me who has been handling most of the "XML Editor.exe" updates? The changes I'm making for NAS are going to require some updates in that editor. I'm still probably a couple weeks from having a beta ready, but figured I'd try and get in touch with whoever has been developing that editor so this doesn't come as a big suprise.

Report message to a moderator

First Sergeant
Re: New Attachment System Beta[message #266721] Thu, 11 November 2010 22:45 Go to previous messageGo to next message
Marlboro Man

 
Messages:1159
Registered:October 2005
Location: USA
Still Starwalker. Smile I think, or it could be Rowa21 for the editor itself.

[Updated on: Thu, 11 November 2010 22:47] by Moderator

Report message to a moderator

Sergeant Major

Re: New Attachment System Beta[message #266730] Thu, 11 November 2010 23:13 Go to previous messageGo to next message
wanne (aka RoWa21) is currently offline wanne (aka RoWa21)

 
Messages:1961
Registered:October 2005
Location: Austria
ChrisL
I should know this but it has been a long while so.... can anyone tell me who has been handling most of the "XML Editor.exe" updates? The changes I'm making for NAS are going to require some updates in that editor. I'm still probably a couple weeks from having a beta ready, but figured I'd try and get in touch with whoever has been developing that editor so this doesn't come as a big suprise.


Updating the XML Editor to support the new entries (most of them are from Items.xml) would be highest priority. Also the new format of the MercStartingGear.xml is not fully supported by the current version of the XML Editor.
Chris, if you like to update the XML Editor, so we can fully use it agsin, that would be great. I don't have the time to do this in the near future.

The SVN repository of the XML Editor code is located here:
https://81.169.133.124/source/ja2_v1.13_xml_editor

I send Lalien a mail, that he should give you READ and WRITE access to the trunk. Yes, you also need READ access, cause otherwise you can get the source out of SVN.

Report message to a moderator

Sergeant Major

Re: New Attachment System Beta[message #266736] Thu, 11 November 2010 23:46 Go to previous messageGo to next message
Minty is currently offline Minty

 
Messages:110
Registered:July 2009
Location: UK
Oh, and while updates to the XML-editor are being discussed.. Is there any chance of it being made vfs-aware?

Report message to a moderator

Sergeant
Re: New Attachment System Beta[message #266737] Fri, 12 November 2010 00:06 Go to previous messageGo to next message
ctiberious is currently offline ctiberious

 
Messages:605
Registered:March 2007
Ok. I'll pull the repository and take a look at it. But last I remember it used to be written in visual basic and I'm not good with that language.

Report message to a moderator

First Sergeant
Re: New Attachment System Beta[message #266740] Fri, 12 November 2010 00:36 Go to previous messageGo to next message
wanne (aka RoWa21) is currently offline wanne (aka RoWa21)

 
Messages:1961
Registered:October 2005
Location: Austria
ChrisL
Ok. I'll pull the repository and take a look at it. But last I remember it used to be written in visual basic and I'm not good with that language.


You should now have read/write access to the trunk.

@all: Everyone can now access the source code of the XML-Editor without any user/password.

Report message to a moderator

Sergeant Major

Re: New Attachment System Beta[message #266783] Fri, 12 November 2010 22:53 Go to previous messageGo to next message
ctiberious is currently offline ctiberious

 
Messages:605
Registered:March 2007
I'm still a few days from having a working beta ready, but I wanted to update where I was and the changes I've been making.

We will no longer need AlteringAttachments.xml or NASIncompatibleAttachments.xml, and AttachmentSlots.xml will no longer track valid attachments. All it holds now is the coords for the graphic, whether we're needing a big slot, and what class of attachment uses the slot. I'm also adding an attachment class field to Items.xml.

Attachment slots will dynamically change based on not only the weapon/item but also what other attachments are already in place. So, for instance, if you have a weapon that can support a GL, but no GL is attached, you won't see the attachment slot for GL ammo. Once you attach a GL, though, the "grenade" slot automatically appears. This also means that if we add attachments that would alter the kinds of attachments we can normally use, slots will update appropriately. Like, if we added picatiny rails (obviously we'd need an item for this first) to an M1 Garand, we would add the ability to mount whatever the rails could mount, along with the M1's normally attachment possibilities.

As for Wil's list:
- option to have no attachment slots
If an item has no valid attachments, it'll have no attachment slots

- multiple default attachments
I've left the DefaultAttachment field in Items.xml and the code will allow up to 20 of those. Though I still need to test to make sure it works correctly

- - creation of item, from a merger/use operation, automatically adds inseparable (and only inseparable) default attachments
Mergers actually change from one item to another, so the new item (when it's "created") should get whatever DefaultAttachment items it comes with, but I'll have to double check that.

- context based attachments adding attachment slots (based on at the very least item being/not being an item index or item class, probably more but I need to open up the XML)
Done

- multiple slots on the same weapon that can take an attachment
- option to allow multiples of same attachments being attached (not just grenades)
I've got 6 Grenade slots though I'm not positive yet how is the best way to make them work. Everything is based on an attachment class which equates attachments to specific slots. So this capability may not work like it used to. Have to continue testing.

- two sizes of attachment slots
done

- fine control over placement of attachment slots (up to being able to place attachment slots inside the Big Image graphic)
You can still control the coords for the slot graphics, so this is still available.

- This one is unintentional on Warmsteel's part, but that didn't stop me from exploiting it, if an attachment is set to merge with the item, the merger will not occur if it is clicked on a slot that takes the attachment. This is how my folding stock system (v2) works:
Not sure about this one

- - Two attachment slots, one only takes the folded stock, other only takes the unfolded stock
Make the folded and unfolded stocks have different attachment classes, then have a slot for each class.

- - Item has one of the two stocks set as default attachment (so it appears with it already attached when supplied to enemy, or bought)
Should be able to use DefaultAttachment in Items.xml for this

- - Movement of the "stock item" from the slot it can attach to the other slot triggers the merger where the stock item may change (and if it is a Machine Pistol so will the base weapon)
Not sure about this one

- - Once the "stock item" has transformed it will fit the other slot (reverse slots to change back)
Not sure about this one

- - I am suspecting that this "feature" is dependent on the having the attachment associated directly to the slot instead of the base item. Moving an attachment to an invalid slot causes the merger, but the merger function does not happen when the slot is valid. You may want to see how it works with one of my more recent releases. Prior to NAS, the folding stock procedure was much more complicated and involved clicking in and out of the attachment screen.
Not sure about this one

- - Also used for dual ammunition feed system for FN Minimi's (one slot makes the LMG a 30rd magazine feed, other 200rd belt feed), Groza weapon system to change the form of the attachment, STK Compact Personal Weapon to change between three calibres, and once I get around to it an adjustable shotgun choke
I want to make "ammo related attachments" (like the c-mag adapter) no longer inseperable. Instead of being inseperable, you'll simply not be allowed to removed them until you unload the weapon. In this way you'd simply need an adapter for the Minimi to switch it between belt and clip. Could even make a default attachment that makes it belt fed. Then you simply have to unload the weapon, remove the adapter, and you can reload as a clip fed weapon. Still have to work on this, though.

Report message to a moderator

First Sergeant
Re: New Attachment System Beta[message #266787] Fri, 12 November 2010 23:14 Go to previous messageGo to next message
Faithless is currently offline Faithless

 
Messages:439
Registered:October 2009
Location: The safe end of the barre...
About inseperable ammo attachments, they already unload ammo if the gun can't take the right amount of bullets after detaching or attaching.
You shouldn't have to change that at all.

[Updated on: Fri, 12 November 2010 23:14] by Moderator

Report message to a moderator

Master Sergeant
Re: New Attachment System Beta[message #266788] Fri, 12 November 2010 23:32 Go to previous messageGo to next message
Wil473

 
Messages:2815
Registered:September 2004
Location: Canada
Question about the 20 multiple default attachments, do they all use multiples of the same tag (as is done now) or are they enumerated?

The occurances of "Not sure about this one" is somewhat worring as it primarily affects the exploit I've been using to base my alternative to that "stock-is-folded-1/3rd-of-the-time" compromise that Starwalker is using for the main v1.13 items. However, I seem to be reading that attachment classes are user definable (which takes away one worry).

Perhaps I should be lobbying harder for transformable items (instead of just reviving my old request thread once every two years).

Also to clarify, you've got 6 grenade slots defined for your test XML's working, or does the proposed replacement system only have 6 grenade slots possible?

EDIT: oh and I forgot, since it looks like you've been sucessful in making the attachment's possible independent of the attachment slot. Does the adding of attachment slots also include the adding of possible attachments. ie. I don't want RIS attachments to show up in Bobby Ray's ond in-game lists of possible attachments for oldie gun X, until you add attachment Y (RIS Handguard).

EDIT2: now that I think about it, if attachments are no longer bound to slots, do you have a way of displaying what attachments will fit a particular slot based on the weapon attachment list and attachment class limits of the slot? And how many attachment classes can I assign to a slot?

EDIT3: Another idea, related to my whining, if not transforming items, how about a "dead" slot? Basically it takes an attachment like any other slot, but the attachment doesn't do anything to the base item's stats. Hell, might as well go for broke, is it feasible for use of a slot to produce the effect of an attachment (I think I asked about this before when I wanted different behaviour out of a C-Mag adapter when it was attached to specific guns). Instead or cumulative with the stat changes of the attachment, the slot contributes stats when occupied.

[Updated on: Sat, 13 November 2010 01:10] by Moderator

Report message to a moderator

Lieutenant

Re: New Attachment System Beta[message #266796] Sat, 13 November 2010 01:14 Go to previous messageGo to next message
ctiberious is currently offline ctiberious

 
Messages:605
Registered:March 2007
@WarmSteel: Nice. I hadn't gotten far enough to spot that.

@wil472: It's just the value in Items.xml. The INVTYPE structure has UINT16 defaultattachments[MAX_DEFAULT_ATTACHMENTS] as one of it's elements, wehre "MAX_DEFAULT_ATTACHMENTS" is currently hardcoded to 20. So the system will read up to 20 DefaultAttachment values from the xml file. It's going to read them in order but I'm not sure that an issue anyway.

The "Not sure about this one" mostly means I'm not really in a position to test. Most of these were, as you called them, "unintentional exploits". Meaning they were things NAS wasn't originally designed to include. It just included them by chance. The main development branch (which is the code I'm working from) doesn't include things like the stocks you're using, so I don't currently have the ability to test that. And, for the time being, I'm more concerned about updating the developement branch before I look at things like your stock system. That isn't to say I'm against adding the capability. I just want to get the changes I'm doing to work for the current development code before I start "adding features". Smile

I have 6 slots currently setup as "Grenade" slots (though Grenade1 is also used as a mortar slot). I've got a seperate "Rocket" slot which uses the large slot. The values are all in the xml but I haven't had a chance to test their functionality because I don't have any weapons that can use multiple grenade slots. The only "multi-shot" grenade launchers currently use the "HE Cylinder" ammo (like uiIndex 964). To test that, I'm going to have to modify one of the weapons that uses that ammo. I'll get to that once I have the rest of the code working. Smile

I haven't looked at the BR code yet. But when you look at the Item Description Window, the only attachments that display in the tooltips are those that are currently allowed. So if you don't have an RIS attached, you wouldn't see the option for an "RIS Handguard", using your example.
Examlple: Assume that an RIS attachment would allow your weapon to use an ACOG 4x scope, and you've made the RIS a valid attachment for an M1 Garand (which can't use the ACOG). Without the RIS attachment, you'd see options for the Small, No.32 & Battle scopes. Once you added the RIS, you'd see:
Small Scope
No.32 Scope
Battle Scope
ACOG 4x

Report message to a moderator

First Sergeant
Re: New Attachment System Beta[message #266798] Sat, 13 November 2010 01:47 Go to previous messageGo to next message
Wil473

 
Messages:2815
Registered:September 2004
Location: Canada
Oh, I just realized something else, or at least I think I've realized something. For an attachment to add an attachment slot to work, does the base weapon need to have the potential attachments pre-emptively defined?

Or is it still working the way I was thinking adding slots also adds possible attachments to the base weapon's list?

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

Report message to a moderator

Lieutenant

Re: New Attachment System Beta[message #266799] Sat, 13 November 2010 02:01 Go to previous messageGo to next message
ctiberious is currently offline ctiberious

 
Messages:605
Registered:March 2007
The weapon would need the RIS rail as a valid attachment but it wouldn't need the attachments that are specific to the RIS rail, as an example. My example with the M1 Garand and an RIS rail assumes that the only change you make is to allow the M1 Garand to use the "RIS Rail" object that would be created. The code actually looks at the Attachments.xml and Launchables.xml for the weapon AND all items currently attached to the weapon.

Here's an example that I've been playing with in my test game. I have a bunch of AK-103's. Some of those have grenade launchers attached. Without the GL, the AK-103 can't have a rifle grenade as an attachment (it's not a valid item in either Attachments.xml or Launchables.xml for the AK-103). But as soon as you attach the grenade launcher, you immediately have the ability to attach rifle grenades because the GL itself grants the ability.

Report message to a moderator

First Sergeant
Re: New Attachment System Beta[message #266801] Sat, 13 November 2010 03:18 Go to previous messageGo to next message
smeagol is currently offline smeagol

 
Messages:2705
Registered:June 2008
Location: Bremen, Germany
ChrisL
The weapon would need the RIS rail as a valid attachment but it wouldn't need the attachments that are specific to the RIS rail, as an example. My example with the M1 Garand and an RIS rail assumes that the only change you make is to allow the M1 Garand to use the "RIS Rail" object that would be created. The code actually looks at the Attachments.xml and Launchables.xml for the weapon AND all items currently attached to the weapon.


Well, for AIMNAS I decided against using rails as attachments, I rather added aditional items that can be made from conversion kits (like a Garand M1 EBR for example), resulting in a gun that can take a wider range of attachments.

Quote:
Here's an example that I've been playing with in my test game. I have a bunch of AK-103's. Some of those have grenade launchers attached. Without the GL, the AK-103 can't have a rifle grenade as an attachment (it's not a valid item in either Attachments.xml or Launchables.xml for the AK-103). But as soon as you attach the grenade launcher, you immediately have the ability to attach rifle grenades because the GL itself grants the ability.


Uhm... yeah, that's the idea of the tag (or whatever the exakt name of the tag is...). It was even possible to remove the 6-grenade cylinders for the Milkor. The Milkor now accepts 6 regular 40mm grenades (in any combination you like).

Report message to a moderator

Lieutenant

Re: New Attachment System Beta[message #266810] Sat, 13 November 2010 10:14 Go to previous messageGo to next message
ctiberious is currently offline ctiberious

 
Messages:605
Registered:March 2007
@smeagol: What's "AIMNAS"? Only been back about a week so I'm a bit behind the times. Smile Anyway, you could still have conversion kits. Actually, depending on what results you're after, conversion kits will still be a viable option (sometimes the only option). But the system I'm working out for NAS will simply give you that many more options. Why create 20 different conversion kits when you can have a single attachment that does the same work? Assuming I get all the kinks worked out. Smile

And yes, I understand the point of the 6 grenade slots. That's why I left them in the new setup. I just haven't worked out the best way to make them function yet. I've been focusing on getting the basic system working. As soon as I have the kinks worked out, I'll be looking at other capabailities, like getting the 6 grenade slots to work correctly as well as looking into wil's stock system.

My intention isn't to make NAS less functional. I'm simply trying to remove the unneccessary redundant elements from the system.

Report message to a moderator

First Sergeant
Re: New Attachment System Beta[message #266821] Sat, 13 November 2010 17:21 Go to previous messageGo to next message
Wil473

 
Messages:2815
Registered:September 2004
Location: Canada
AIMNAS is one of the other large mods that has quite a bit of time invested in the present NAS infrastructure.

EDIT: by the way, are there any plans to add the capability to flag items (attachments) as being only available in NAS and only available in OAS. This goes back to the discussion concerning my project potentially dropping future support for OAS (officially). If yes this may give me a way to retain OAS support without having to resort to having two different sets of XML's and graphics.

IE:
NAS selected = no 40mm cylinders
OAS selected = 40mm cylinders appear

Oh and it will probably be necessary to double the Milkor launcher to prevent odd ammunition behaviour in OAS (being able to attach both a 40mm cylinder and standard 40mm greanade. Appearance of Milkor(NAS) and Milkor(OAS) controlled the same way. Controlling the appearance of the ACOG/Reflex combo on the otherhand may not be so simple.

[Updated on: Sat, 13 November 2010 17:46] by Moderator

Report message to a moderator

Lieutenant

Re: New Attachment System Beta[message #266823] Sat, 13 November 2010 17:59 Go to previous messageGo to next message
lockie is currently offline lockie

 
Messages:3721
Registered:February 2006
Location: Scotland
http://www.ja-galaxy-forum.com/board/ubbthreads.php?ubb=showflat&Number=266722#Post266722

It's a mod with lots of items and uses the WF maps , with most if not all maps updatad/totally changed .

It's highly recommended by myself and others !

Report message to a moderator

Captain

Re: New Attachment System Beta[message #266824] Sat, 13 November 2010 18:07 Go to previous messageGo to next message
DepressivesBrot is currently offline DepressivesBrot

 
Messages:3658
Registered:July 2009
Quote:
EDIT: by the way, are there any plans to add the capability to flag items (attachments) as being only available in NAS and only available in OAS. This goes back to the discussion concerning my project potentially dropping future support for OAS (officially). If yes this may give me a way to retain OAS support without having to resort to having two different sets of XML's and graphics.

Just keep the existing tag (OAS/NAS/both).

Report message to a moderator

Captain

Re: New Attachment System Beta[message #266827] Sat, 13 November 2010 18:55 Go to previous messageGo to next message
ctiberious is currently offline ctiberious

 
Messages:605
Registered:March 2007
yes, the AttachmentSystem tag is going to be left in place.

I'm actually considering a new xml file to account for NAS and NIV only tags so that the system can try to automatically swap an invalid item with a valid one.

Report message to a moderator

First Sergeant
Re: New Attachment System Beta[message #266828] Sat, 13 November 2010 18:55 Go to previous messageGo to next message
Wil473

 
Messages:2815
Registered:September 2004
Location: Canada
Thanks DepressivesBrot, I overlooked that one... now to figure out how to handle the "fake built-in" vs. multiple default attachment problem.

EDIT: ok well there's ChrisL with a possible solution to that one.

[Updated on: Sat, 13 November 2010 18:57] by Moderator

Report message to a moderator

Lieutenant

Re: New Attachment System Beta[message #266829] Sat, 13 November 2010 19:13 Go to previous messageGo to next message
smeagol is currently offline smeagol

 
Messages:2705
Registered:June 2008
Location: Bremen, Germany
As for multiple default attachments, would it be possible to add tag numbers, like up to something like 4 or 5? To my understanding, the xml editor overwrites default attachments because they use the same tag atm. Now if those tags get different names and the xml editor gets taught to actually read those tags, the problem would be pretty much solved, no?

Only thing in question is, how many default attacvments would be needed. I guess 5 should be enough (obviously only 1 is not enough anymore :/ ).

Report message to a moderator

Lieutenant

Re: New Attachment System Beta[message #266831] Sat, 13 November 2010 19:48 Go to previous messageGo to next message
Wil473

 
Messages:2815
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

Report message to a moderator

Lieutenant

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

 
Messages:605
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.

Report message to a moderator

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

 
Messages:2815
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

Report message to a moderator

Lieutenant

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

 
Messages:605
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.

Report message to a moderator

First Sergeant
Re: New Attachment System Beta[message #266908] Mon, 15 November 2010 12:27 Go to previous messageGo to next message
Bever is currently offline 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.

Report message to a moderator

Private 1st Class
Re: New Attachment System Beta[message #266909] Mon, 15 November 2010 12:31 Go to previous messageGo to next message
Logisteric

 
Messages:3199
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:

Report message to a moderator

Captain
Re: New Attachment System Beta[message #266912] Mon, 15 November 2010 13:22 Go to previous messageGo to next message
smeagol is currently offline smeagol

 
Messages:2705
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.

Report message to a moderator

Lieutenant

Re: New Attachment System Beta[message #266917] Mon, 15 November 2010 14:00 Go to previous messageGo to next message
Bever is currently offline 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.

Report message to a moderator

Private 1st Class
Re: New Attachment System Beta[message #266918] Mon, 15 November 2010 14:14 Go to previous messageGo to previous message
DepressivesBrot is currently offline DepressivesBrot

 
Messages:3658
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

Report message to a moderator

Captain

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


Current Time: Sat Apr 20 08:20:21 GMT+3 2024

Total time taken to generate the page: 0.06732 seconds