Template talk:This is a

From Valve Developer Community
Jump to: navigation, search
Icon-message-48px.png
Welcome to Template talk:This is a!
This is the start of the This is a discussion page.

To add a new message, click on "Add Topic/Reply" button below, and set the "Subject".
To add a Reply, do the same as above, but leave the "Subject" blank.

Is the suffix really neccessary since {{autolang}} ekzists?

Icon-user.png
Empty.png
Amicdict5:34, 1 April 2023 (UTC)(edited)
It seems to be quite redundant now that page translations use / to be the subpage.
ERR
UserAvatarFrame-THE OWL.png
THE OWL20:42, 1 April 2023 (UTC+7)(edited)
{{{suf}}} should be removed from all templates and replaced with {{Autolang}}, but not now. Now such deletion can cause mixing of languages, which not everyone may like. Actually, this is not such a problem, but in some templates it's better to leave {{{suf}}} until {{Lang}} is completely replaced by {{MultiPage}}.

Parameter nocat=1 should prevent any categories

I want to use it in the See also sections and along the text. Lxm6 (talk) 11:35, 9 April 2023 (PDT)

The text available in all games can be misleading

Icon-user.png
Empty.png
Lxm66:10, 5 July 2023 (UTC)
See ai_network for example.
ERR
224
SirYodaJedi12:58, 5 July 2023 (UTC)
+1

Add an option to suppress all cats

Icon-user.png
Empty.png
Lxm68:18, 8 July 2023 (UTC)
See weapon_ak47 for example.

3 extra categories out of nowhere with Weapon ak47

Icon-user.png
Empty.png
Lxm60:55, 9 July 2023 (UTC)
I don't see them in my sandbox2, which is what I expect.
Icon-user.png
Empty.png
Lxm68:22, 9 July 2023 (UTC)
I seems like BasicCSseriesWeapon is to blame this time.

New template name is terrible (resolved)

ERR
224
SirYodaJedi19:18, 16 August 2023 (UTC)
"Format" is too generic a template name, when literally everything on a wiki consists of formatting.
ERR
Empty.png
Pee0:01, 17 August 2023 (UTC)(edited)
I'm somewhat inclined to agree, I think something along the lines of "engine element" would fit better. Any other ideas?
Icon-user.png
Empty.png
Popcorn8:46, 17 August 2023 (UTC)
How about {{this is a}}. In my utopia, I'm thinking of readable wikitext such as {{this is a|convar}}, {{this is a|point ent}} and so forth. This would require parameters to be swapped (but maybe this can be done when this page is moved once again):
  • {{{1}}}{{{name|{{PAGENAME}}}}}
  • {{{type}}}{{{1|{{{type}}}}}}
ERR
UserAvatarFrame-Equalizer5118.png
Equalizer9:09, 17 August 2023 (UTC−7)
I like that idea. I also am thinking of maybe something like {{introtext}} or similar, as that is more accurate to what it is. Its the introtext for entity, shader, convar, etc. articles
ERR
Empty.png
Pee0:44, 18 August 2023 (UTC)
If we went that route, we should probably do {{intro text}} as 2 words, and {{introtext}} as a redirect to the 2 word template
Icon-user.png
Empty.png
Theki18:36, 4 September 2023 (UTC)
"Intro text" as a name sounds far too general. I'm aware that most of the introductory paragraphs on this wiki are just explanations of what an entity is, but there are other articles here that don't conform to that, and naming the template like that's not the case and every introductory paragraph follows that one specific format seems far too broad to me. {{This is a}} makes more sense, IMO.
Icon-user.png
Empty.png
Popcorn18:48, 5 September 2023 (UTC)
I agree. {{This is a}} speaks much more for itself as opposed to {{intro text}}. Apart from that, it is a sentence, not a text.
ERR
224
SirYodaJedi13:56, 6 September 2023 (UTC)
I guess I'll vote for {{this is a}}.
ERR
UserAvatarFrame-Equalizer5118.png
Equalizer14:23, 6 September 2023 (UTC−7)
That name makes more sense, I agree
ERR
Empty.png
Nescius0:00, 8 September 2023 (UTC)
What's the point of this ? Since entity template has been made there are still a lot of entity pages with old "point ent" and "brush ent" with shining deprecated text at the top and you already want to change that to "this is a" ? I vote against this unless someone is actually willing to replace all the entity templates fast and not just hope others will do it for them.
Icon-user.png
Empty.png
Popcorn10:22, 8 September 2023 (UTC)
Thanks for the reminder. I removed the deprecated texts on the entity pages for that matter since they only serve the purpose of informing a handful of wiki editors. For everyone else it is probably just irritating because in fact those pages aren't broken at all. We can still find "deprecated" templates being used anyway using What Links Here, we don't need that notice.
I don't see a big problem due to this template replacement. We could take our time and replace occurrencies whereever we see them and maybe, maybe, we'll find no more pages using point ent at some point. To be honest, it may not be the smartest idea and I'm unsure of whether this will happen at all (currently 656 pages with no namespace must be using point ent) but at least the creation of a newer point ent template, {{this is a}}, can be a silent process and new pages should use it. At least if I'm not missing something while typing this.

Recent changes to parameters

ERR
UserAvatarFrame-Equalizer5118.png
Equalizer9:13, 8 September 2023 (UTC−7)
Look, there is improving the template and then there is entirely reworking it! Backwards compatibility with old pages is something we should focus on, and not just randomly changing what parameters do what. We shouldn't have to create "template redirect" pages that are just pages that just use the template. We should be able to just redirect to the root template page. I don't fully understand the changes made (type being moved to 1, moving the name to name) had to be made. The parameters were fine.
Icon-user.png
Empty.png
Popcorn22:16, 8 September 2023 (UTC)
I find this a bit irritating. A few messages above, you liked that idea, didn't you? I don't quite understand what you mean by those template redirects and what the aim of those should be; I don't think there should be template redirects in the first place. Surely you cannot simply replace every occurrence of "Format" with "This is a" if the intention was to have {{This is a|point|name=info_player_start}} instead of {{Format|info_player_start|type=point}}. But surely it would have been nice if it was that simple. Should the parameter change be reverted?
ERR
UserAvatarFrame-Equalizer5118.png
Equalizer18:50, 8 September 2023 (UTC−7)
I agreed to having the template name changed, not the parameters. I just don't understand why the type parameter was exchanged for 1 and why 1 was moved to name. It didnt seem to make sense to me. The template name change I agree with, but it's the parameter changes, which have remained the same for years, that I don't really get
Icon-user.png
Empty.png
Popcorn2:57, 9 September 2023 (UTC)
For the readability, I described the parameter swapping above. {{This is a}} wouldn't make that much sense if you still had to type {{This is a|type=point|info_player_start}} or {{This is a|info_player_start|type=point}}.
Icon-user.png
Empty.png
Theki20:50, 10 September 2023 (UTC)
Backwards compatibility with old pages is something we should focus on, and not just randomly changing what parameters do what.
I agree with this for the most part. Ideally it should be something similar to how the move from {{Lang}} to {{MultiPage}} was handled. Those are two very different implementations of the same feature that can't just be swapped over but the way they're handled at least doesn't break things; and I haven't seen the full scale of what the change to {{This is a}} has done, but ideally it should break as few things as possible – same functionality across Entity, Format, and This is a at the least, and a deprecation notice at the most. This wouldn't really be a problem if there was no change to this in the first place. The old Entity template name and format was fine. It was confusing and required me to reference the documentation frequently, but it wasn't even close to inconvenient. The two different name changes are what have made this whole situation really convoluted, and right now we're kind of seeing the consequences of our indecisiveness with all of this.

The template displays fine on webpages when using both previous syntaxes and namings. I think this should be handled in a similar manner to the Lang to Multipage conversion where a deprecation notice is placed but at the same time that doesn't seem highly necessary because whereas Lang was inferior to Multipage in terms of functionality, at this point in time, with the way most pages use the old template versions there's no difference in how they operate so they're all basically identical.

In my opinion the best thing to do is to just let it be and notify editors to replace usages of Entity and usages of Format with {{This is a}}. It's going to be a lot of cleanup but it's not something that's immediately detrimental to readers or – from my experience, at least – editors.

Edit: I've looked at the code for the old versions and it is very, very bad. Looking back I didn't actually envision that the new syntax would mess things up this much, and I think this is far too egregious. Probably would have been better to just go back to using {{Entity}} but we're past that point already. In this case the amount of hurdles the old code needs to jump through just to get it to look identical to the new version is really not great and a deprecation notice is necessary, I feel. This is going to impact page load times even if it's not very noticeable.

Icon-user.png
Empty.png
Popcorn17:34, 11 September 2023 (UTC)
It's going to be a lot of cleanup but it's not something that's immediately detrimental to readers or – from my experience, at least – editors.

Absolutely. As long as no one gets the great idea to redirect a different template to this, then there's no need to worry.

The parameter change that I proposed is described just a bit further up in this discussion page. The actual change is the following:

  • {{{1}}}{{{name}}}
  • {{{type}}}{{{1}}}

Nothing else (should have) changed, the functionality is identical. So I'm unsure of what you mean by saying that it is "very, very bad". Aren't we talking about the replacement from {{Entity|info_player_start|type=point}} to {{This is a|point|name=info_player_start}} per page? Yes, it is work but 1. it is work that can wait (as you said) and 2. the readability due to the previous template names would finally be fixed, I guess.

I don't want anyone to get mad about this change because in the above, we were discussing about a more fitting template name, a new name was proposed along with the parameter change and no one protested, instead everyone who answered seemed to agree.

Icon-user.png
Empty.png
Theki22:07, 11 September 2023 (UTC)
Nothing else (should have) changed, the functionality is identical. So I'm unsure of what you mean by saying that it is "very, very bad"

I might have overreacted a bit just from the initial reaction to seeing the template code for {{Entity}} and {{Format}}.

In reality, this isn't that bad, yes, and I think this new name is perfectly serviceable as a replacement even if it has its downsides (again, nothing that can't be fixed— kind of repeating myself here, but you get the point). I was concerned about how much work was required to get the old template syntaxes to work with the new one; it doesn't seem to be a problem with how the two parameters have been switched around, rather, it seems to be an issue with how not specifying {{{series}}} or {{{engine}}} in the template causes things to break. I'm not sure when this was introduced and if this is an issue with the new syntax but the amount of extra work required to get it working properly does still seem particularly egregious in my eyes, and I think something should be done to remedy that. Page load time impact isn't noticeable on my end but if a small group of users are on lower-end connections or PCs, which is very well possible, it might have a large difference. I believe it's something worth evaluating.

Other than that, if all that gets worked out, everything should be fine. I'm not even sure if a deprecation notice on {{Entity}} or {{Format}} would be necessary as those and {{This is a}} should be able to work in harmony with no hiccups (minus the parameter issues), but right now at this point it doesn't seem to be that big of a deal regardless.

Adding {{{since-engine}}}

ERR
Empty.png
Pee23:32, 13 September 2023 (UTC)
I believe it makes sense to add a parameter for when something like a convar exists in multiple engines. For example:
{{this is a|convar|since-engine=1}}

would yield:

This is a console variable available in all engines since GoldSrc GoldSrc.

or, for the Quake engine:

This is a console variable available in all engines since the Quake Quake engine.

This would be useful for console commands/cvars that don't change between current and old engines, and entities that exist in Source and Source 2.

The descriptions of brush entities are f**ked up

I have noticed that a lot of brush entities (especially func_ entities) have "* is a cut brush entity available in all Source games" despite them not being cut such as func_monitor, func_breakable, func_lod ect. Anyone else notice this and is this intentional? edit. I am planning on reverting these but I fear these were intentional so I don't want to change them until I know

My mistake. Thanks for your message! It should be fixed now.
I had changed the cut parameter such that cut=0 should be the default and everything else would count as a cut entity. However, I missed that there are templates where {{{cut}}} is set to the empty string by default, yielding cut entities if {{{cut}}} is not specified when calling that other template. Now, both cut="" and cut=0 do what one would expect. --popcorn (talk) 16:31, 18 September 2023 (PDT)
Thanks for notifiying me, I am quite new to contributing to this website so I wanted to check. --User:CodingAintFun 16:21, 19 September 2023 (GMT)

Pages for game-specific entities are being added to Category:Base Source Entities

Icon-user.png
Empty.png
Trainzack3:17, 10 December 2023 (UTC)
For example, weapon_paintgun and emp_info_params are game-specific, but have incorrectly been added to Category:Source base entities.
ERR
Empty.png
DaKang23313:39, 10 December 2023 (UTC+8)
The problem has been solved.

Auto category feature is quite problematic

ERR
Empty.png
Wisdurm15:28, 7 January 2024 (UTC+2)
This template automatically adds pages to categories based on the "game" parameter, however if you set the game parameter as tf2, it won't try to add it to "Team Fortress 2 entities", it'll try to add it to "tf2 entities"! Surely there's someway the acronyms could be converted to the full names? Isn't that pretty simple template stuff? There's also some other quite big problems, which I mentioned here.

Rewrite

ERR
Empty.png
Pee23:47, 11 January 2024 (UTC)
I just finished what I believe to be a fully functional rewrite of this template. You can find it at User:Pee/Sandbox/this is a. This is more or less the exact same template, with the following changes:
  1. The entire template was rewritten to use strings subpage and be very navigable
  2. {{{1}}} has to be the exact name that the text will show in English (so e0 or point no longer work, it has to be point entity). This could be changed, but it nicely follows the idea of readability, and bots can be used to update current use of the template to this standard.
  3. {{{type=int point}}} and {{{type=int brush}}} have been removed in favor of {{{internal=1}}} (which already exists).
  4. {{{seriescs}}} has been removed in favor of {{{series}}} and {{{since}}}.
  5. Parameters such as {{{game}}} now have to spell out the entire name (e.g. Team Fortress 2 instead of tf2)
  6. Further subcategorization. What would have previously been in Category:Portal entities will now go in Category:Portal brush entities, Category:Portal point entities, etc.
  7. Very minor grammar edits, such as when something is in several games (mostly as a result of the template being made more simple)
  8. Any boolean parameters no longer require values of only 0 or 1. Any boolean in {{yesno}} now works.

The main issue is that there's a higher expansion depth at up to 32 (out of 40) rather than 25. This could prove to be an issue. I have noticed, however, that just {{source}} is already at 16, so that might be more important to reduce than this.

Also, setting an engine parameter to "source2" will place it in the wrong category. I may eventually get a bot to periodically look through every page using this template and fix any issues such as this one.

I'd also appreciate if people added translations to its strings subpage as well as this page for translations, because I don't think I'll be able to accurately get them from this template. If the language needs special support, please tell me so I can add a method to make it work.

Please let me know if this rewrite should go forward to replace the current version of this template, or if it needs tweaking.

Weird empty element

Resolved (apparently)

ERR
Empty.png
Wisdurm22:21, 16 April 2024 (UTC+2)
If the {{this is a}} is on the same line as {{multipage}}, it will add an empty dark element to the second line, as seen on Weapon_pistol. I could swear this wasn't a thing before but I'm not sure and Equalizers edit didn't seem to change anything so idk what is what.
ERR
UserAvatarFrame-Equalizer5118.png
Equalizer22:15, 16 April 2024 (UTC−7)
Idk what causes it, it just doesnt want to ig
ERR
Empty.png
Pee23:38, 18 April 2024 (UTC)
I believe it was caused by an edit to {{code}}