Template talk:This is a: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
Line 373: Line 373:
| time = 14:26, 8 Jun 2024
| time = 14:26, 8 Jun 2024
| 1 = I think I created that template back then because there were/are cases where you have the full game name but you need its shortcut in order to get its icon. {{tlc|game icon}} was supposed to separate the name list template and a template that you can use that simply puts that result into template brackets for direct use. Now, if I understood you correctly, the idea is to instead create the templates {{tl2|Half-Life 2}} etc. that have the same effect (or are a redirect to) {{tl2|hl2}}, etc.? Well, I think the idea may be good because it causes less (expensive) template calls, but that's not much that I can tell. The idea doesn't seem bad to me, or would we pollute the existing pages more if we created that number of "duplicates"? I don't know whether that is a problem or not. But what I would appreciate is if we can reduce page load times by getting all those template calls more efficient. (Although I'm not sure to what extent this may be caused by templates related to either games or i18n or...)
| 1 = I think I created that template back then because there were/are cases where you have the full game name but you need its shortcut in order to get its icon. {{tlc|game icon}} was supposed to separate the name list template and a template that you can use that simply puts that result into template brackets for direct use. Now, if I understood you correctly, the idea is to instead create the templates {{tl2|Half-Life 2}} etc. that have the same effect (or are a redirect to) {{tl2|hl2}}, etc.? Well, I think the idea may be good because it causes less (expensive) template calls, but that's not much that I can tell. The idea doesn't seem bad to me, or would we pollute the existing pages more if we created that number of "duplicates"? I don't know whether that is a problem or not. But what I would appreciate is if we can reduce page load times by getting all those template calls more efficient. (Although I'm not sure to what extent this may be caused by templates related to either games or i18n or...)
}}
== game=Alien Swarm Deferred doesn't seem to work? ==
{{Message
| user = Toligon
| time = 19:38, 16 Jun 2024
| 1 = Okay so yeah currently the [[Light_deferred_global]] and [[Light_deferred]] pages booth of their this is a template ends with ""is a point entity available in ."" I know I am the one who is doing something wrong, but I don't know what, as before this template was changed it worked. But now it doesn't...
}}
}}

Revision as of 12:38, 16 June 2024

Icon-message-48px.png
This is the discussion page of Template:This is a. To add a comment, use the Edit button near the headline of the appropriate section. To create a new section, you can use the Add topic button at the top of this page.
Comments on talk pages should be signed with "~~~~", which will be converted into your signature and a timestamp.

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

(using Template:Message)  It seems to be quite redundant now that page translations use / to be the subpage.  --Amicdict (talk) 5:34, 1 Apr 2023 (UTC)


(using Template:Message)  {{{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}}.  --THE OWL (talk) 13:42, 1 Apr 2023 (UTC)

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

(using Template:Message)  See ai_network for example.

(using Template:Message)  +1  --SirYodaJedi (talk) 12:58, 5 Jul 2023 (UTC)  --Lxm6 (talk) 6:10, 5 Jul 2023 (UTC)

Add an option to suppress all cats

(using Template:Message)  See weapon_ak47 for example.  --Lxm6 (talk) 8:18, 8 Jul 2023 (UTC)

3 extra categories out of nowhere with Weapon ak47

(using Template:Message)  I don't see them in my sandbox2, which is what I expect.  --Lxm6 (talk) 0:55, 9 Jul 2023 (UTC)


(using Template:Message)  I seems like BasicCSseriesWeapon is to blame this time.  --Lxm6 (talk) 8:22, 9 Jul 2023 (UTC)

New template name is terrible (resolved)

(using Template:Message)  "Format" is too generic a template name, when literally everything on a wiki consists of formatting.  --SirYodaJedi (talk) 19:18, 16 Aug 2023 (UTC)


(using Template:Message)  I'm somewhat inclined to agree, I think something along the lines of "engine element" would fit better. Any other ideas?  --Pee (talk) 0:01, 17 Aug 2023 (UTC)


(using Template:Message)  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}}}}}}

 --Popcorn (talk) 8:46, 17 Aug 2023 (UTC)


(using Template:Message)  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  --Equalizer5118 (talk) 16:09, 17 Aug 2023 (UTC)


(using Template:Message)  If we went that route, we should probably do {{intro text}} as 2 words, and {{introtext}} as a redirect to the 2 word template  --Pee (talk) 0:44, 18 Aug 2023 (UTC)


(using Template:Message)  "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.  --Theki (talk) 18:36, 4 Sep 2023 (UTC)


(using Template:Message)  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.  --Popcorn (talk) 18:48, 5 Sep 2023 (UTC)


(using Template:Message)  I guess I'll vote for {{this is a}}.  --SirYodaJedi (talk) 13:56, 6 Sep 2023 (UTC)


(using Template:Message)  That name makes more sense, I agree  --Equalizer5118 (talk) 21:23, 6 Sep 2023 (UTC)


(using Template:Message)  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.  --Nescius (talk) 8 Sep 2023 (UTC)


(using Template:Message)  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.  --Popcorn (talk) 10:22, 8 Sep 2023 (UTC)

Recent changes to parameters

(using Template:Message)  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.  --Equalizer5118 (talk) 16:13, 8 Sep 2023 (UTC)


(using Template:Message)  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?  --Popcorn (talk) 22:16, 8 Sep 2023 (UTC)


(using Template:Message)  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  --Equalizer5118 (talk) 1:50, 9 Sep 2023 (UTC)


(using Template:Message)  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}}.  --Popcorn (talk) 2:57, 9 Sep 2023 (UTC)


(using Template:Message) 

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.  --Theki (talk) 20:50, 10 Sep 2023 (UTC)


(using Template:Message) 

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.  --Popcorn (talk) 17:34, 11 Sep 2023 (UTC)


(using Template:Message) 

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.  --Theki (talk) 22:07, 11 Sep 2023 (UTC)

Adding {{{since-engine}}}

(using Template:Message)  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.  --Pee (talk) 23:32, 13 Sep 2023 (UTC)

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

(using Template:Message) For example, weapon_paintgun and emp_info_params are game-specific, but have incorrectly been added to Category:Source base entities. --Trainzack (talk) 3:17, 10 Dec 2023 (UTC)


(using Template:Message) The problem has been solved. --1416006136 (talk) 5:39, 10 Dec 2023 (UTC)

Auto category feature is quite problematic

(using Template:Message) 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. --Wisdurm (talk) 13:28, 7 Jan 2024 (UTC)

Rewrite

(using Template:Message) 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, 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. --Pee (talk) 23:47, 11 Jan 2024 (UTC)

Weird empty element

Resolved. (apparently)

(using Template:Message) 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. --Wisdurm (talk) 20:21, 16 Apr 2024 (UTC)


(using Template:Message) Idk what causes it, it just doesnt want to ig --Equalizer5118 (talk) 5:15, 17 Apr 2024 (UTC)


(using Template:Message) I believe it was caused by an edit to {{code}} --Pee (talk) 23:38, 18 Apr 2024 (UTC)

Updating parameters

(using Template:Message) I've finished updating this template so all parameters that the rewrite accepts work on this version too. This means that after updating the parameters, all that's left for the rewrite to be implemented are a few translations. I wrote a script that I believe does everything required for the parameters to be accepted by the rewrite. The changes it will make so far are as follows:

  • Replace nearly all game shortcuts with the full name of the game (this will fix the category issue, no more pages in Category:tf2 entities). This is how all games will be written from now on. There's no way I got them all, but I'll have to live with it. This is also implemented with engines and the main engine branches.
  • remove internal point, internal brush, etc., replacing them with {{this is a|point|internal=1}}
  • Replace "Half life 2 series" with the game parameters set to hl2, episodes 1 and 2, and hl2 deathmatch separately.
  • Change the type to be the first argument (e.g. instead of {{this is a|name=func_ladder|brush entity}}, we'll have {{this is a|brush entity|name=func_ladder}}. As a side effect of this, everything currently using {{thisis}} will be switched to {{this is a}}. I'm not against the shortcut, this was just the easier thing to implement.
  • Replace the seriescs parameter with the series parameter

This is a pretty big task, so I want to make sure I didn't miss anything. Should I go ahead and make these changes? --Pee (talk) 23:03, 16 May 2024 (UTC)

Minor grammar nitpick

(using Template:Message) Not sure if it's something that should really be bothered with fixing (since it seems quite difficult and not very important) but the line "...is a internal point entity..." is incorrect grammar and should instead be "is an internal point entity" since "internal" starts with a vowel. Again, very minor thing that would be annoying to figure out since only some of the entity types start with vowels.

(using Template:Message) Now that you point that out, it bugs me to. Should be an easy fix; just move the the a/an, so you have "this is" + "a thingy" instead of "this is a" + "thingy". --SirYodaJedi (talk) 0:04, 20 May 2024 (UTC) --Wisdurm (talk) 21:45, 19 May 2024 (UTC)


(using Template:Message) That's a good solution for English rules that I'm not against implementing, but I feel like there should be a more general method for the type having an effect on the other strings; for example, the Spanish strings for "This", "cut", and "internal" all depend on the grammatical gender of the noun. I'd also note that if we can get a version of Wikipedia icon template:delink working, then {{a or an}} could be used. Unfortunately, since Wikipedia switched their delink template to use a module, they deleted Wikipedia icon Template:Delink/phase_1_a, so I have no idea how the template works. However, I bet a version of it is floating around some wiki somewhere. --Pee (talk) 0:27, 20 May 2024 (UTC)


(using Template:Message) The other option I see that I think makes the most sense is to make separate subpages for different clauses in different languages, such as {{this is a/a or an}} or {{this is a/Spanish gender}} that get called in {{this is a/strings|this is a}}. This system should scale for an arbitrary number of languages. --Pee (talk) 1:03, 20 May 2024 (UTC)

Missing features from Template:Shaderparam

(using Template:Message) The parameter indicating what shader a shader parameter is for seems to be completely missing; see $lightmap, which should be saying that it's for Shader-ball.png VertexLitGeneric, but isn't. --SirYodaJedi (talk) 23:51, 21 May 2024 (UTC)


(using Template:Message) i tried implementing a little bit ago. Someone seems to have removed it tho. --Equalizer5118 (talk) 0:41, 22 May 2024 (UTC)


(using Template:Message) Yeah, my bad... To be honest, I forgot about it when rewriting the template. Should be fixed now. --Pee (talk) 0:55, 22 May 2024 (UTC)

Categories

(using Template:Message) Is sorting entities by game AND type really necessary? For instance env_skypaint, which would previously have been in Category:List of Garry's Mod entities, is now added to Category:Garry's Mod point entities. I feel like having a category just for entities for a specific game is much more helpful & practical since most games don't add hundreds of entities, though I guess in theory if you wanted to you could have both. I do realize this was mentioned in #rewrite, so sorry for not saying anything about it back then. Also entity list pages on the wiki are kind of a mess in general right now, they should probably all be redone using the script. --Wisdurm (talk) 17:07, 24 May 2024 (UTC)


(using Template:Message) I decided to split the subcategorization into several different parts. A page with the template {{this is a|point entity|cut=1|internal=1}} will now be in the categories Cut Source base entities, Internal Source base entities, Source base entities, and Source base point entities. I'd assume all but Source base entities would be hidden categories. --Pee (talk) 21:20, 24 May 2024 (UTC)

|game=Strata is broken

Resolved.

(using Template:Message) In previous iterations of this template, specifying |game=Strata used to work, but now it shows nothing. --Equalizer5118 (talk) 18:15, 26 May 2024 (UTC)


(using Template:Message) Fixed --Equalizer5118 (talk) 18:23, 26 May 2024 (UTC)

Possible removal of {{game icon}}

(using Template:Message) I was wondering whether or not keeping {{game icon}} would be a good choice. Ultimately at the end of the day it relies on {{game icon name}}, which is just another template that needs constant updates. In the current form of this template you could remove all instances of {{game icon}} and things would mostly work fine. Of course this would necessitate the creation of templates like Template:Garry's Mod and Template:Left 4 Dead Series, but overall I think it'd just be less of a pain.
This is of course simply a matter of preference and I don't really mind either way, just curious to see other opinions. --Wisdurm (talk) 8:47, 7 Jun 2024 (UTC)

(using Template:Message) I think I created that template back then because there were/are cases where you have the full game name but you need its shortcut in order to get its icon. {{game icon}} was supposed to separate the name list template and a template that you can use that simply puts that result into template brackets for direct use. Now, if I understood you correctly, the idea is to instead create the templates {{Half-Life 2}} etc. that have the same effect (or are a redirect to) {{hl2}}, etc.? Well, I think the idea may be good because it causes less (expensive) template calls, but that's not much that I can tell. The idea doesn't seem bad to me, or would we pollute the existing pages more if we created that number of "duplicates"? I don't know whether that is a problem or not. But what I would appreciate is if we can reduce page load times by getting all those template calls more efficient. (Although I'm not sure to what extent this may be caused by templates related to either games or i18n or...) --Popcorn (talk) 14:26, 8 Jun 2024 (UTC)

game=Alien Swarm Deferred doesn't seem to work?

(using Template:Message) Okay so yeah currently the Light_deferred_global and Light_deferred pages booth of their this is a template ends with ""is a point entity available in ."" I know I am the one who is doing something wrong, but I don't know what, as before this template was changed it worked. But now it doesn't... --Toligon (talk) 19:38, 16 Jun 2024 (UTC)