Home » MODDING HQ 1.13 » v1.13 Coding Talk » (New) Common Attachment Framework (new title; was The NAS Receiver)
Re: The NAS Receiver[message #303929] Thu, 26 April 2012 09:44 Go to previous messageGo to previous message
Madd_Mugsy

 
Messages:634
Registered:July 2005
Location: Canada
Interesting.... What would an assault rifle's tags look like using this approach?

I must admit I'm not exactly thrilled by the ever extending list. The big reason it's so long is that it includes all the possible OR combinations, as they need to be added to the list in order for them to show up in a dropdown in the XML editor.

I've now implemented my 1st list from above as a proof of concept, and I'm working on a new approach to the list, simplifying and extending where needed. I'm adding default attachments along the way -- they really are critical to keeping this approach simple! As a side perk, default inseparable attachments show you a visual overview of the weapon's abilities at a quick glance in the EDB.

One way to cut down on the list of values and OR'd values would be to display all the tags in checkboxes... you could select the valid checkboxes for each item in its detail form. This becomes more difficult and time consuming to implement, however, as the checkboxes need to be created dynamically to correspond to the list. It is also slower to edit the data, since you could no longer do it in the grid. Making it editable in the grid is one of the things I was shooting for, since it dramatically cuts down the time required to apply the concept to an existing set of data.

The idea of using three fields instead of one gave me pause. I like the idea of shortening the list, but why not use five fields? One each for the top, side, bottom, barrel, and magwell. Why not add one more for the stock to make six? Things could get messy quick... Once I go down the road of having more than one field, I find myself anticipating the need to add a whole new child table. And a child table in this case again means that you won't be able to edit the data quickly in the grid.

Quote:

Also, you seem to be mostly describing the gun for the attachment (pistol small, nato pistol large, ak sniper, etc) but finding yourself aometimes describing the attachment for the gun (40mm gl, RIS bottom, etc). I would probably switch it to trying to describe the attachment for the gun in all cases. It will make it less confusing and you may find allow you to shrink your list because it will make the bit mapping more usable.


Actually, I'm trying to describe all the available receivers on the gun, and then which receiver the attachments fits on. The issue I see with taking the reverse approach is that the guns have so many more attributes to consider than the attachments do. The guns ARE the receivers, so it makes sense to describe them in detail, since they will almost always need to hold more than one type of attachment.

For instance, say a rifle LAM only fits on a large RIS side mount. So in its nasAcceptedReceiver tag it should say, in English for clarity, "RIS Side Mount Large". It doesn't fit anywhere else, so it doesn't need any other values.

However, an assault rifle probably has multiple receivers on it, so it can hold more than one thing. It may contain that large RIS side mount, and it may also contain a large RIS top mount, and a bottom mount for GLs, and it may be able to mount other NATO scopes too. So it would need a nasReceiver tag that looked like "RIS Side Mount Large OR RIS Top Mount Large OR RIS Bottom Mount OR NATO Top Mount Large". We could then condense this tag combination to the more readable "RIS NATO Assault Rifle" value to use in the dropdown in the editor.

And it's combinations like that which are making the list crazy large. So now that I've had a first go at this, I have a better idea of which values can be cut from my list and how to minimize the number of values in the next list.


EDIT: Just had a thought... Question to all .NET devs: I wonder if I could put a combobox in the datagridview that has working checkboxes in it? And then somehow I could combine the resulting text to display it in the grid, and the values back into a bitmask for storage.... This would eliminate the need to store any OR'd values in the lookup table.

Report message to a moderator

First Sergeant

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: New Stealth Mechanics
Next Topic: [IDEA] New Magazine System
Goto Forum:
  


Current Time: Fri Jan 10 10:39:18 GMT+2 2025

Total time taken to generate the page: 0.01427 seconds