The Sims Wiki talk:Development Portal: Difference between revisions

Jump to navigation Jump to search
Content added Content deleted
imported>EarthlingnAkumi
imported>LostInRiverview
No edit summary
Line 32: Line 32:


::Hmm, that's fair. --<span style="color: purple; font-weight:bold; font-family:Tahoma;">[[User:EarthlingnAkumi|<span style="color: purple; font-weight:bold;">'''akumi'''</span>]] [[User talk:EarthlingnAkumi|<span style="color: purple; font-weight:bold;">(talk)</span>]]</span> 18:49, June 8, 2019 (UTC)
::Hmm, that's fair. --<span style="color: purple; font-weight:bold; font-family:Tahoma;">[[User:EarthlingnAkumi|<span style="color: purple; font-weight:bold;">'''akumi'''</span>]] [[User talk:EarthlingnAkumi|<span style="color: purple; font-weight:bold;">(talk)</span>]]</span> 18:49, June 8, 2019 (UTC)

==TS4 neighborhood categorizing bug==
For awhile now, we've had an issue where TS4 neighborhood pages (not ''world'' pages, but the pages about the neighborhoods within the worlds) were getting categorized into [[:Category:Neighborhoods in]], which is a glitch category. I am happy to say that, with a single exception, that is no longer a problem and all TS4 neighborhood pages should now be automatically categorizing properly.

The issue was in the way that {{t|Infobox neighborhood}} assigned categories. The infobox would take the input name of the neighborhood, and cross-check it against {{t|Checkgame}}; the purpose of that template is to simply say which base game a particular world/neighborhood belongs to. The problem is that Checkgame only included the TS4 worlds, but did not include the TS4 neighborhoods. When I thought about it a bit, I realized that having a template to check which game a neighborhood/world appears in is unnecessary. So I reworked Infobox Neighborhood so that it looks for the game parameter instead of the neighborhood's name, and then checks to see if the game is on the {{t|MGL}}. The MGL outputs a code for the base game, even if the name that is input is an expansion/game/stuff pack, and then I plug that output into {{t|Vgcode}} to spit out the full name of the base game. I did it this way because our current operating principle has been to categorize all neighborhoods/worlds within a given game together, even if some were introduced in expansions (for instance, we don't have a category [[:Category:Neighborhoods in The Sims 2: Seasons]], even though that expansion introduced [[Riverblossom Hills]]).

The end result of all these workings is that neighborhood pages for TS4 no longer need to be manually categorized into "Category:Neighborhoods from The Sims 4" or "Category:<world> neighborhoods"; the template will do both automatically. When I get a chance, I'll take a look at {{t|Infobox world}} as well and try to prevent similar problems on that front. My goal is to make it so that {{t|Checkgame}} isn't used on any templates and can be deleted.

I tested the changes out before I implemented them. While I cannot see any errors in what I've done at this point, if you encounter any problems with the change, please let me know so I can address it. -- '''[[User:LostInRiverview|<span style="color:navy;">LostInRiverview</span>]]<sup> [[User_talk:LostInRiverview|<font color="green">talk</font>]] · [[User_blog:LostInRiverview|<font color="green">blog</font>]] · [[Special:Contributions/LostInRiverview|<font color="green">contribs</font>]]</sup>''' 04:25, June 16, 2019 (UTC)