Module talk:CR: Difference between revisions

From MTG Wiki
Jump to navigation Jump to search
>Hanmac
>Jerodast
m (→‎Bug Reports: case correction to avoid redirect)
 
(31 intermediate revisions by 9 users not shown)
Line 1: Line 1:
'''Please use the module indirectly via [[Template:CRTemp]], or [[Template:CR]] if the latter has been converted (see below).'''
'''Please use the module indirectly via [[Template:CR]].'''
 
Using the module directly is more likely to break in the future.
Using the module directly is more likely to break in the future.


= Work to be done (Article editing) =
== Bug Reports ==
The first two bullet points need to be completed in order. Afterwords, work can continue in any order.
* Replace uses of [[Template:CR]] with [[Template:CRTemp]].
* When the above step is done, copy the contents of [[Template:CRTemp]] to [[Template:CR]], and then leave a redirect on CRTemp.
* Replace uses of [[Template:Rules]] and [[Template:Comprehensive Rules]] with the new [[Template:CR]].
* Check [[UserWiki:RuleUpdateBot]] for any further pages that need to be converted.
 
 
= Bug Reports =
* '''lookup=Effects''' returns the heading "6. Spells, Abilities, and Effects" rather than rule 609, "Effects". Affected page: [[Effects]]
* '''lookup=Effects''' returns the heading "6. Spells, Abilities, and Effects" rather than rule 609, "Effects". Affected page: [[Effects]]
* '''lookup=Prevention Effects''' extends to the next heading (same bug as above). Affected page: [[Prevention effect]]


 
== To-do list (coding changes to the module) ==
= To-do list (coding changes to the module) =
* Allow title-based lookups to be case independent. At the moment, '''lookup=Creatures''' works, but '''lookup=creatures''' does not.
* Allow title-based lookups to be case independent. At the moment, '''lookup=Creatures''' works, but '''lookup=creatures''' does not.
* Create glossary lookups for terminology not in the rules. This would utilize the glossary provided at the bottom of the CR.
** For example, "interrupt", and possibly ability words.
* Build a list of common names for rules that are not titled as such in the CR, but which would be accepted by the module.
* Build a list of common names for rules that are not titled as such in the CR, but which would be accepted by the module.
** For example, the module might allow '''<nowiki>{{CR|lookup=Legend Rule}}</nowiki>''', despite no title in the CR named "Legend Rule", and use an internal list of such faux-titles to equate that lookup with the correct index (in this case, at the moment, 704.5k).
** For example, the module might allow '''<nowiki>{{CR|lookup=Legend Rule}}</nowiki>''', despite no title in the CR named "Legend Rule", and use an internal list of such faux-titles to equate that lookup with the correct index (in this case, at the moment, 704.5k).
* Look into a means of allowing lookups for the General titles without using indices. The TOC output appends the title of the section, but this doesn't currently work on input.
* Look into a means of allowing lookups for the General titles without using indices. The TOC output appends the title of the section, but this doesn't currently work on input.
=== External rule references ("see rule...") ===
Have references to other rules ("see rule DDD.Da") link to the other rule, or provide a tooltip summary of it, for ease of understanding. For example, the [[Emperor]] rules are 809, but references 801, 804 and 104, and no easy way to navigate in the wiki to those pages. <small>—The preceding unsigned comment was added by [[User:MidnightLightning|MidnightLightning]] ([[User talk:MidnightLightning|talk]] • [[Special:Contributions/MidnightLightning|contribs]]){{#if:|&#32;{{{2}}}|}}.</small><!-- Template:Unsigned -->
: It's something I've thought about in the past. I don't think it can be as simple as linking to another page, because there's no guarantee such a page exists. Even if we built redirects for every numeric codepoint in the CR, that would be very heavy maintenance (and very silly in a lot of cases). Tooltips, though, are a maybe, via <code>CR.only</code>. I'll give others a chance to weigh in first, but I expect we can have this running in short order. --[[User:Corveroth|Corveroth]] ([[User talk:Corveroth|talk]]) 23:31, 6 September 2017 (UTC)


== Visual styling requests ==
''Feel free to use this heading to contribute and debate any suggestions or requests for alterations to the visual style of output from the module.''


= Visual Styling =
== 701.5 Counter ==
Feel free to use this heading to contribute and debate any suggestions or requests for alterations to the visual style of output from the module. [[User:Corveroth|Corveroth]] ([[User talk:Corveroth|talk]]) 05:00, 5 August 2015 (UTC)
I just found this: I think on [[Keyword action#Rules]] the "701.5. Counter" part should link to [[Counter (keyword action)]] instead of [[Counter]]. --[[User:Psion1C|Psion1C]] ([[User talk:Psion1C|talk]]) 15:22, 26 September 2018 (UTC)
== Requests ==
: Good point. I will see if I can dig through the code and find how these links are created. - [[User:Yanderesliver|Yandere Sliver]] [[File:H09 symbol.png|16px|link=User talk:Yanderesliver]] 23:27, 26 September 2018 (UTC)
* ''Your ad here''
:: The module just guesses that any line in the rules that's shorter than five words is actually a title, rather than meaningful rules text, and it attempts to turn that line into a link to an article of the same name. (This works out just fine on the article in question, because a self-referential link gets bolded instead.) There's not a really ''good'' way to code the module to identify the difference from context, aside from shoving a one-time exception into mostly unrelated code specifically for this.
== Under Consideration ==
:: However, I have an alternate proposal. In the CR, the subjects in question appear as: <code>121. Counters</code> (the markers), <code>"701.5. Counter"</code> (the keyword action). Should the article for the markers be pluralized, sacrificing some consistency with general wiki practices in exchange for consistency with the CR and within Module:CR? --[[User:Corveroth|Corveroth]] ([[User talk:Corveroth|talk]]) 00:22, 27 September 2018 (UTC)
* Re-implement the leading bullet point on the zeroth level of indentation (i.e. on the first line). It looks a little odd like this, even if the bullet point is unnecessary.
::: I just noticed that [[counters]] links to [[counter (marker)]]. We could make counter the article for the keyword action and create an article named [[counter (disambiguation)]] for the disambiguation page. We did that in other cases as well so that would be consistent with our wiki practices.  
::: This way the CR would actually always link to the proper page and we would not need to change much. - [[User:Yanderesliver|Yandere Sliver]] [[File:H09 symbol.png|16px|link=User talk:Yanderesliver]] 01:43, 27 September 2018 (UTC)
:::: I moved the respective pages. [[Counter]] is now about counterspells, [[Counters]] links to [[Counter (marker)]], and [[Counter (disambiguation)]] is the disambiguation page. The CR links are now looking always at the correct article. - [[User:Yanderesliver|Yandere Sliver]] [[File:H09 symbol.png|16px|link=User talk:Yanderesliver]] 17:35, 10 October 2018 (UTC)
 
== Under consideration ==
* Linking key phrases within the transcluded text - key words like "trample" and rules titles like "end step".
* Linking key phrases within the transcluded text - key words like "trample" and rules titles like "end step".
* Replacing {W}, {1}, {S}, etc with their symbols
* Replacing {W}, {1}, {S}, etc with their symbols
** ''Why'': Looks pretty.
** ''Why'': Looks pretty.
** ''Why not'': The official CR documents use the text representations of those symbols. I want both an honest quote and to reinforce that those representations are canonical.
** ''Why not'': The official CR documents use the text representations of those symbols. I want both an honest quote and to reinforce that those representations are canonical.
== To-Do List ==
* Adding a way to specify multiple rules that are printed in the same rulebox for use-cases like [[Untap#Untap_symbol]] --[[User:Hanmac|Hanmac]] ([[User talk:Hanmac|talk]]) 15:23, 5 August 2015 (UTC)
* Adding a way to specify multiple rules that are printed in the same rulebox for use-cases like [[Untap#Untap_symbol]] --[[User:Hanmac|Hanmac]] ([[User talk:Hanmac|talk]]) 15:23, 5 August 2015 (UTC)
* ''Your ad here''
** Why should two separate rules occupy the same box, rather than be separate quotes? Is it simply due to the space taken by the extra title, padding, margin? [[User:Corveroth|Corveroth]] ([[User talk:Corveroth|talk]]) 18:42, 5 August 2015 (UTC)
 
== Mobile update ==
At long long last, the rules modules are now readable on mobile. In the process, other things may have broken or look odd. Please keep an eye out for any issues, and check out the new hotness on your phone or tablet! --[[User:Corveroth|Corveroth]] ([[User talk:Corveroth|talk]]) 07:30, 14 January 2017 (UTC)
 
== Pre-release content ==
I'm open to ideas on how to handle, if at all, rules text for mechanics for which the CR has not yet been updated. I don't really want to lean on educated guesses from the community, but I wish there was something we could offer for the pre-release. --[[User:Corveroth|Corveroth]] ([[User talk:Corveroth|talk]]) 07:36, 14 January 2017 (UTC)


== Not Happening ==
== Glossary Glitches==
* ''No suggestions have yet been rejected by consensus''
For the following 3 terms the Glossary glitches out:
*[[Mana]]
*[[Object]]
*[[Damage]]
- [[User:Yanderesliver|Yandere Sliver]] [[File:H09 symbol.png|16px|link=User talk:Yanderesliver]] 01:52, 27 September 2018 (UTC)


== Ikoria Companion Update ==


= Prepare for Launch =
The Comprehensive Rules were updated on Wizards' website to include the new rules for Companion, due to them being functionally changed. Despite that, the Comp Rules here on MTG Wiki still seem to be outdated and not include this new update. How do we get it in sync? --[[User:GoldenSandslash15|GoldenSandslash15]] ([[User talk:GoldenSandslash15|talk]]) 04:37, 3 June 2020 (UTC)
I think the module is good enough that further work on the code is largely stalling on my part. Here are my goals for the implementation of the module:
*I've updated the module. That should have done it. --[[User:Hunterofsalvation|Hunter]] ([[User talk:Hunterofsalvation|talk]]) 05:32, 3 June 2020 (UTC)
* Affect all pages currently using [[Template:Rules]], [[Template:Comprehensive Rules]], [[Template:CR]], and those explicitly listed on [[UserWiki:RuleUpdateBot]].
* '''Avoid directly using [[Module:CR]] in the article namespace.'''
* '''Implement invocation of [[Module:CR]] within [[Template:CR]].'''
:* Later editors should be able to utilize the template without worrying about changes to the underlying module or how the template generates the correct wikitext.
* Retire [[Template:Rules]] and [[Template:Comprehensive Rules]] entirely, either via deletion or redirect to [[Template:CR]] (currently, CR redirects to Comprehensive Rules).
* Accomplish all of this transparently from the visitor's perspective - no broken pages at any point during the process.
I'll be sleeping on it and get started tomorrow morning. [[User:Corveroth|Corveroth]] ([[User talk:Corveroth|talk]]) 04:25, 24 July 2015 (UTC)
: Good luck! I'll lend a hand where needed. --[[User:LegacymtgsalvationUser620|Hunter]] ([[User talk:LegacymtgsalvationUser620|talk]]) 05:56, 24 July 2015 (UTC)
:: Update: Pages currently using [[Template:CR]] will be rewritten to use [[Template:CRTemp]] so as not to break them when the former template is updated. Afterwards, the new template will redirect back to the updated version of CR, and any pages using CRTemp can optionally be converted to use CR directly at leisure. Pages using [[Template:CR]] are top priority for conversion so as to open up that template for editing. Other templates can wait. For now though, I'm off to FNM to play some janky Standard Izzet ETB thing. [[User:Corveroth|Corveroth]] ([[User talk:Corveroth|talk]]) 00:42, 25 July 2015 (UTC)
::: First 50 down, 200+ [[Template:CR]] uses to go! One small issue I noticed along the way is that the module is dropping the examples that should be in the transcluded text. That's easy enough to address in a later update. [[User:Corveroth|Corveroth]] ([[User talk:Corveroth|talk]]) 08:09, 25 July 2015 (UTC)
: Another hiccup. This doesn't show the complete text (apart from the example) The sentence about the evasion ability is missing --[[User:LegacymtgsalvationUser620|Hunter]] ([[User talk:LegacymtgsalvationUser620|talk]]) 18:20, 4 August 2015 (UTC)
{{#invoke:CR|full|509.1b}}
:: Think I've got both those issues nailed, plus I nixed the superfluous bullet before 0th-level indentation. Should propagate shortly! (and, for what it's worth, examples are indented at a fixed indent, independent of their depth in the rules. In terms of layout, they match the style used in the PDF version of the CR) [[User:Corveroth|Corveroth]] ([[User talk:Corveroth|talk]]) 02:35, 5 August 2015 (UTC)
:: Continuing in this thread - that's a batch of another ~100 articles converted. About 150 left to go! [[User:Corveroth|Corveroth]] ([[User talk:Corveroth|talk]]) 06:06, 5 August 2015 (UTC)

Latest revision as of 19:45, 15 January 2021

Please use the module indirectly via Template:CR. Using the module directly is more likely to break in the future.

Bug Reports

  • lookup=Effects returns the heading "6. Spells, Abilities, and Effects" rather than rule 609, "Effects". Affected page: Effects
  • lookup=Prevention Effects extends to the next heading (same bug as above). Affected page: Prevention effect

To-do list (coding changes to the module)

  • Allow title-based lookups to be case independent. At the moment, lookup=Creatures works, but lookup=creatures does not.
  • Build a list of common names for rules that are not titled as such in the CR, but which would be accepted by the module.
    • For example, the module might allow {{CR|lookup=Legend Rule}}, despite no title in the CR named "Legend Rule", and use an internal list of such faux-titles to equate that lookup with the correct index (in this case, at the moment, 704.5k).
  • Look into a means of allowing lookups for the General titles without using indices. The TOC output appends the title of the section, but this doesn't currently work on input.

External rule references ("see rule...")

Have references to other rules ("see rule DDD.Da") link to the other rule, or provide a tooltip summary of it, for ease of understanding. For example, the Emperor rules are 809, but references 801, 804 and 104, and no easy way to navigate in the wiki to those pages. —The preceding unsigned comment was added by MidnightLightning (talkcontribs).

It's something I've thought about in the past. I don't think it can be as simple as linking to another page, because there's no guarantee such a page exists. Even if we built redirects for every numeric codepoint in the CR, that would be very heavy maintenance (and very silly in a lot of cases). Tooltips, though, are a maybe, via CR.only. I'll give others a chance to weigh in first, but I expect we can have this running in short order. --Corveroth (talk) 23:31, 6 September 2017 (UTC)

Visual styling requests

Feel free to use this heading to contribute and debate any suggestions or requests for alterations to the visual style of output from the module.

701.5 Counter

I just found this: I think on Keyword action#Rules the "701.5. Counter" part should link to Counter (keyword action) instead of Counter. --Psion1C (talk) 15:22, 26 September 2018 (UTC)

Good point. I will see if I can dig through the code and find how these links are created. - Yandere Sliver 23:27, 26 September 2018 (UTC)
The module just guesses that any line in the rules that's shorter than five words is actually a title, rather than meaningful rules text, and it attempts to turn that line into a link to an article of the same name. (This works out just fine on the article in question, because a self-referential link gets bolded instead.) There's not a really good way to code the module to identify the difference from context, aside from shoving a one-time exception into mostly unrelated code specifically for this.
However, I have an alternate proposal. In the CR, the subjects in question appear as: 121. Counters (the markers), "701.5. Counter" (the keyword action). Should the article for the markers be pluralized, sacrificing some consistency with general wiki practices in exchange for consistency with the CR and within Module:CR? --Corveroth (talk) 00:22, 27 September 2018 (UTC)
I just noticed that counters links to counter (marker). We could make counter the article for the keyword action and create an article named counter (disambiguation) for the disambiguation page. We did that in other cases as well so that would be consistent with our wiki practices.
This way the CR would actually always link to the proper page and we would not need to change much. - Yandere Sliver 01:43, 27 September 2018 (UTC)
I moved the respective pages. Counter is now about counterspells, Counters links to Counter (marker), and Counter (disambiguation) is the disambiguation page. The CR links are now looking always at the correct article. - Yandere Sliver 17:35, 10 October 2018 (UTC)

Under consideration

  • Linking key phrases within the transcluded text - key words like "trample" and rules titles like "end step".
  • Replacing {W}, {1}, {S}, etc with their symbols
    • Why: Looks pretty.
    • Why not: The official CR documents use the text representations of those symbols. I want both an honest quote and to reinforce that those representations are canonical.
  • Adding a way to specify multiple rules that are printed in the same rulebox for use-cases like Untap#Untap_symbol --Hanmac (talk) 15:23, 5 August 2015 (UTC)
    • Why should two separate rules occupy the same box, rather than be separate quotes? Is it simply due to the space taken by the extra title, padding, margin? Corveroth (talk) 18:42, 5 August 2015 (UTC)

Mobile update

At long long last, the rules modules are now readable on mobile. In the process, other things may have broken or look odd. Please keep an eye out for any issues, and check out the new hotness on your phone or tablet! --Corveroth (talk) 07:30, 14 January 2017 (UTC)

Pre-release content

I'm open to ideas on how to handle, if at all, rules text for mechanics for which the CR has not yet been updated. I don't really want to lean on educated guesses from the community, but I wish there was something we could offer for the pre-release. --Corveroth (talk) 07:36, 14 January 2017 (UTC)

Glossary Glitches

For the following 3 terms the Glossary glitches out:

- Yandere Sliver 01:52, 27 September 2018 (UTC)

Ikoria Companion Update

The Comprehensive Rules were updated on Wizards' website to include the new rules for Companion, due to them being functionally changed. Despite that, the Comp Rules here on MTG Wiki still seem to be outdated and not include this new update. How do we get it in sync? --GoldenSandslash15 (talk) 04:37, 3 June 2020 (UTC)

  • I've updated the module. That should have done it. --Hunter (talk) 05:32, 3 June 2020 (UTC)