Anonymous edits have been disabled on the wiki. If you want to contribute please login or create an account.

Topic on User talk:Garrett

Trying to make lists of D3D versions

5
Blackbird (talkcontribs)

It's something I wanted to do for the fun of it since it'd be nice to put all that data we have to good use. (would be much better than those manually edited wikipedia lists for sure).
Since the direct3d versions = is nothing but a text entry and thus semantic search doesn't work on it I tried transplanting #arraytemplate from Template:Input settings to API table with Template:Prompts copy listing all available versions.

User:Blackbird/Template - Transplated #arraytemplate to API table (direct3d versions)
User:Blackbird/Template2 - Transplated Template:Prompts to use as list of available D3D versions
User:Blackbird/Grand_Theft_Auto:_San_Andreas_(Windows_Store)#Other_information - Working result (stupid commas)

Is there some better way to do this? I've tried making it work with current entries as much as possible.

Garrett (talkcontribs)

You were on the right track. The separator should be set in #arraymaptemplate to avoid the issue with trailing/empty commas (see the documentation for details).

The #switch can have multiple values use the same result by leaving them blank as needed (see Template:API/switch). Once the invalid category has populated a bit more there may be some other valid values to be added.

Invalid values are shown on the page normally and Category:Invalid template usage (API) is applied (I experimented with having it fall back to the unknown symbol, but this looks messy if multiple values have been used).

Blackbird (talkcontribs)

Ah I see. Looking at your code it seems bit more complicated than I thought. Also not sure why you set 10.1 as unknown. It's legit D3D version unlike 8.1 and other stuff.
Just tested it and it works indeed. Thanks man! This is gonna be hella useful for me! :)

Garrett (talkcontribs)

10.1 looks to be working correctly on Assassin's Creed; is there a page where it isn't working?

The template ended up much more complex than intended due to some technical issues regarding how .0 decimals work. This way the version numbers match up how you'd expect (e.g. pages might specify 9.0 or 9, both of which turn into 9 on the property).

Blackbird (talkcontribs)

Yeah I can see that, homewer the way 10.1 was set up before absorbed it into D3D10 as far as I can tell which wasn't my intention. I added it as separate thing as can be seen on User:Blackbird/Test

By clicking "Reply", you agree to the terms of use for this wiki.