Guild Wars 2 Wiki talk:Projects/Semantic MediaWiki/Weapons

From Guild Wars 2 Wiki
Jump to navigationJump to search

attributes[edit]

That's something I've been struggling with for skill facts, because there are different ways to do it:

  • Use a record property to record the type of fact or attribute and the value together. This approach is inflexible to unusual situations.
  • Use separate properties for each type of fact or attribute that simply records the value. This is more flexible, but requires a lot of individual properties.
  • Use a subobject/internal object to group a few properties together, that individually record the type and value. This is the most flexible, but also the most complex to handle in queries.

What do you think? —Dr Ishmael User Dr ishmael Diablo the chicken.png 13:25, 14 November 2012 (UTC)

And what's wrong with the Quantity type in all of this? It does exactly what we need, natively. It stores a value and a type and can display different types at will. At least, that's what I've gathered from their site... Eearslya 14:13, 14 November 2012 (UTC)
Quantity is used where you would want conversion between different units of measurement, e.g. different units of length/distance. The key is that all values of the property describe the same type of measurement, e.g. distance. There's no conversion between different attributes - each attribute is a distinct type of measurement - so we can't make valid definitions for the "Corresponds to" special property. —Dr Ishmael User Dr ishmael Diablo the chicken.png 16:20, 14 November 2012 (UTC)
Well, then we don't use the "Corresponds to" property. We don't have to use Quantity for converting units of measurement, it could just be an easier way to do things. Eearslya 16:56, 14 November 2012 (UTC)
No, it still won't work. When you return a quantity property in a query, it displays in the default unit that you set with Corresponds to:: 1 X (for distance, X = meters) unless you tell it to convert to a different unit that you have defined with a different Corresponds to:: n Y (e.g. 3.28 feet). The conversion applies to all results of the query - it would be impossible to differentiate the different attributes on a single item, because SMW automatically converts them all to the default unit (meters) to store the value, and you can't tell which unit it was originally populated with.
Quantities are not associative properties that record both the value and the unit - the value is converted to the defined default and the unit is discarded. In order to associate the value with the unit/descriptor, we have to use one of my solutions above. —Dr Ishmael User Dr ishmael Diablo the chicken.png 19:09, 14 November 2012 (UTC)
Oh. That I was not aware of. Well, in that case, I would say the record type, but what do you mean that it is inflexible? Eearslya 20:56, 14 November 2012 (UTC)
Records are defined by defining the types of each entry in the record. So you can have, say, a record consisting of (number, page), which then requires every value in that property to consist of a number and a page, and nothing else. This is generally sufficient for item stats, since they boost a specific attribute (page) by a specific amount (number). The problem is more with skill facts, since they can have a lot of ancillary data points around each fact. For those, I'm thinking sub/internal objects will work better, since you can group any arbitrary properties you want into those objects. —Dr Ishmael User Dr ishmael Diablo the chicken.png 21:39, 14 November 2012 (UTC)
Based purely on the "cups of flour" example on SMW, I'd say that internal objects sound ok. But having said that, I know ~0 about SMW. I appreciate that a SMW-ignorant wiki isn't the greatest sounding board to help you get constructive SMW advice. (I'm guessing you have a gut feeling by now) --Chieftain Alex 21:57, 14 November 2012 (UTC)

(Reset indent) It's actually a good thing to have someone who isn't SMW savvy, so we can see how easy it might be for the common wiki editor. And perhaps for attributes, we can have 2 Records. Has gear attribute and Has skill attribute. The difference being that the skill property has an extra String value for extra data. The gear attribute is easy, and if you agree with that name or suggest a new one, I could start implementing it. Eearslya 00:45, 15 November 2012 (UTC)

Ignoring skills for now (they don't have attributes), "gear" isn't a term in the GW jargon, it's "equipment". Still, Has equipment attribute doesn't sound good, as the item doesn't have this attribute, it gives it to the character that equips it. Maybe Gives attribute bonus is better. —Dr Ishmael User Dr ishmael Diablo the chicken.png 02:15, 15 November 2012 (UTC)
Equipment, right. My bad. I'll see what I can do with Gives attribute bonus for now, hopefully there's a general template I can put it in to make things easier.. Eearslya 02:18, 15 November 2012 (UTC)
Interesting. I haven't worked with records much, and when I did was a long time ago on SMW 1.6. In 1.7, they changed them from being defined by a list of types to a list of properties. I've updated the property to match this with the best names I could come up quickly. —Dr Ishmael User Dr ishmael Diablo the chicken.png 02:42, 15 November 2012 (UTC)
Ah, it did give me red links, but when I hovered over them it told me it was a special property, so I thought it might still work. This'll work just as well, thanks. Eearslya 02:48, 15 November 2012 (UTC)
EDIT: Wow, just a few lines added to the Item stat template, and now the {{Property:Gives attribute bonus}} page is immediately populated. I love templates. (Also, if it's still showing red links to "Critical Damge", I fixed that, it just needs to refresh.) Eearslya 03:06, 15 November 2012 (UTC)
Possibly an important thing to note: "major" and "minor" attribute increases to tie in with it all? Per example, when searching for a list of, say, axes which increase the power attribute the most, to see which combinations are readily available. I don't know, really, but it sounds exactly like the kind of thing people would want to see on the wiki (or a database. We can be more important if we listen to the community and their complaints/opinions, though, because we document more and differently). Infinite - talk 10:14, 19 February 2013
To interject: although gear isn't a term in GW, it definitely is a term popular in Guild Wars 2; amongst fans/players; as well as amongst developers and their official statements. That said, though, I prefer equipment by far. - Infinite - talk 10:14, 19 February 2013 (UTC)
Whether it's a popular or common term is not relevant to whether it's an appropriate property name ^^--Relyk ~ talk > 10:17, 19 February 2013 (UTC)
I was referring to "official" in-game jargon, anyway. The hints mention "equipment" three times but never "gear", the first tab of the Hero panel is called "Equipment", etc. —Dr Ishmael User Dr ishmael Diablo the chicken.png 13:24, 19 February 2013 (UTC)
I'm 99.9% sure I've seen gear in-prose, in-game, though. But yes, equipment is the one we should be using. :P - Infinite - talk 13:33, 19 February 2013 (UTC)