User:RingTailBot

From Lotro-Wiki.com
Jump to navigation Jump to search

I am a bot. See User:RingTailCat or User talk:RingTailCat

Below are some of my tasks.

PlayerName

Many quest dialogs are customize for you by inserting your character's name, class or race at appropriate places in the text. This bot standardizes the place holders used in place of that customized text.

  • <name> - your character's name
    So, <name>, you have returned.
  • <class> - your character's class: Burglar, hunter, etc.
    I am glad a <class> like you has helped us.
  • <race> - your character's race: Dwarf, hobbit, elf, man, woman.
    Thank you, my good <race>.

Contents of user-fixes.py.

fixes['PlayerName'] = {
    'regex': False,
    'msg': {
        'en':u'Robot: standardize player name',
    },
    'replacements': [
        (ur'[your name]',   u'<name>'),
        (ur'(your name)',   u'<name>'),
        (ur'[player name]', u'<name>'),
        (ur'[Player Name]', u'<name>'),
        (ur'<player name>', u'<name>'),
        (ur'<player>',      u'<name>'),
        (ur'<Player>',      u'<name>'),
        (ur'<Player name>', u'<name>'),
        (ur'<Name>',        u'<name>'),
        (ur'[your race]',   u'<race>'),
        (ur'(your race)',   u'<race>'),
        (ur'[Player race]', u'<race>'),
        (ur'[player race]', u'<race>'),
        (ur'<Player race>', u'<race>'),
        (ur'<player race>', u'<race>'),
        (ur'<Race>',        u'<race>'),
        (ur'[your class]',   u'<class>'),
        (ur'(your class)',   u'<class>'),
        (ur'[Player class]', u'<class>'),
        (ur'[player class]', u'<class>'),
        (ur'<Player class>', u'<class>'),
        (ur'<player class>', u'<class>'),
        (ur'<Class>', u'<class>'),
    ]
}

Example command lines.

python replace_lotro.py -nopreload -fix:PlayerName "-page:Quests:Top Dog"
python replace_lotro.py -nopreload -fix:PlayerName "-cat:Quests: Level 75"

table2Questbox

The collapsible boxes in quest articles were originally constructed using wiki tables. Later, the Template:Questbox template was developed to provide a less verbose and more reliable implementation.

This bot converts the old style (table) quest boxes to the new style (template) quest boxes.

Contents of user-fixes.py.

fixes['table2Questbox'] = {
    'regex': True,
    'msg': {
        'en':u'Robot: convert table to Questbox',
    },
    'replacements': 
      [
        ( ur'''\{\| class="stocktable collapsible(?P<colsp>(?: )?)(?P<coled>(?:collapsed)?)" width=\d+px *\r?
 !style="[^"]+"\| (?P<title>(?:Walkthrough & Notes)|(?:Rewards)|(?:Quest Text)|(?:Quest Chain)|(?:Daily Base Rewards)|(?:Related Quests)|(?:Quest Arc)) *\r?
\|- *\r?
\|\|?(?P<tocr>(?: \{\{toc-right}})?) *\r?
(?P<body>.*?)
\|}'''
        , u'''{{Questbox| \\g<title> |\\g<colsp>\\g<coled>\\g<colsp>|\\g<tocr>
\\g<body>
}}''')
      ,
    ]
}

Example command lines.

python replace_lotro.py -nopreload -dotall -fix:table2Questbox "-cat:Quests: Level 24"

Rewards

  • The list of selectable rewards in quest articles were originally introduced with a header line. Now, we believe this line should contain non-header markup only.
  • This bot converts the old style selectable reward introducer line to the new style.
  • The rewards in quest articles were originally coded using verbose techniques. Now, they are encoded using more convenient templates.
  • This bot converts the old style rewards to the new style.

Contents of user-fixes.py.

fixes['SelectableRewards'] = {
    'regex': True,
    'msg': {
        'en':u'Robot: convert rewards',
    },
    'replacements': 
      [
        ( ur'^=== *Selectable +[Rr]ewards?:? *===\r?$'
        , u"'''Selectable Rewards:'''")
      ,
        ( ur'^Choose +[Oo]ne: *\r?$'
        , u"'''Selectable Rewards:'''")
      ,
        ( ur'^Selectable +[Rr]ewards?:? *\r?$'
        , u"'''Selectable Rewards:'''")
      ,
        ( ur"^''' *Selectable +[Rr]ewards?:? *''' *\r?$"
        , u"'''Selectable Rewards:'''")
      ,
        ( ur"\{\{IXP *\| *(?P<ixp1>\d+)(?P<ixp2>\d\d\d) *}}"
        , u"{{IXP|\\g<ixp1>,\\g<ixp2>}}")
      ,
        ( ur"\{\{Quest Rep *\| *(?P<faction>[^|]+?) *\| *(?P<rep1>\d+)(?P<rep2>\d\d\d) *}}"
        , u"{{Quest Rep|\\g<faction>|\\g<rep1>,\\g<rep2>}}")
      ,
        ( ur'^\* *\[\[(?:(?:[Ff]ile)|(?:[Ii]mage)):Legendary Item Experience-icon\.png]] Legendary Item Experience *\r?$'
        , u"* {{IXP}}")
      ,
        ( ur'^\* (?P<count>\d+) \[\[[Ii]tem:(?P<item>.+?)\|.+?]]\r?$'
        , u"* {{Reward|\\g<item>|\\g<count>}}")
      ,
        ( ur'^\* *\[\[(?:(?:[Ff]ile)|(?:[Ii]mage)):(?P<icon>.+?)-icon\.png]] *\[\[[Ii]tem:(?P<item>.+?)\|[^]]+?]] *\r?$'
        , u"* {{Reward|\\g<item>}}")
      ,
        ( ur'^\* *\[\[(?:(?:[Ff]ile)|(?:[Ii]mage)):(?P<icon>.+?)-icon\.png]] +(?P<cnt2>\d+) +\[\[[Ii]tem:(?P<item>.+?)\|[^]]+?]] *\r?$'
        , u"* {{Reward|\\g<item>|\\g<cnt2>}}")
      ,
        ( ur'^\* *\[\[(?:(?:[Ff]ile)|(?:[Ii]mage)):(?P<icon>.+?)-icon\.png]] *\[\[[Ii]tem:(?P<item>.+?)\|[^]]+?]] *\((?P<cnt>\d+)x\) *\r?$'
        , u"* {{Reward|\\g<item>|\\g<cnt>}}")
      ,
    ]
}

Example command lines.

python replace_lotro.py -nopreload -multiline -fix:Rewards "-page:Quest:Armies of the South"
python replace_lotro.py -nopreload -multiline -fix:Rewards "-cat:Tasks" -ns:102

Quest Chains

  • Early quest chains were coded using tables.
  • Later quest chains (and those converted by this bot) use Template:Questbox.
  • The Template:Infobox Quests has a questchain parameter for easy reference to quest chain categories.
  • This bot converts the old style quest chains to the new style.
  • This bot does not convert explicit quest lists in a quest chain questbox into a category.
  • This bot does not convert Quest Chain:<quest chain> (yet).
  • This bot does not convert <quest chain> Quest Arc (yet).

Contents of user-fixes.py.

fixes['QuestChain1'] = {
    'regex': True,
    'msg': {
        'en':u'Robot: Quest Chain to questchain',
    },
    'replacements': 
      [
        ( ur'}}[ \r\n]*\{\{Questbox\| *Quest Chain *\| *collapsed *\|[ \r\n]*\{\{:?Category: *(?P<chain>[^}]+?) Quests *}}[ \r\n]*}}[ \r]*'
        , u" | questchain        = \\g<chain>\\n}}")
      ,
    ]
}

Example command lines.

python replace_lotro.py -nopreload -multiline -fix:QuestChain1 "-cat:Quests: Level 60"

Newline between Template and header

  • Header lines must start at the beginning a line.
  • Some deeds were created with a header line following the closing }} of a template reference.
  • Insert a newline between the end of the template and the header.

Contents of user-fixes.py.

fixes['QuestChain1'] = {
    'regex': False,
    'msg': {
        'en':u'Robot: fix brace equal',
    },
    'replacements': 
      [
        ( ur'}}=='
        , u"}}\\n==")
      ,
    ]
}

Example command lines.

python replace_lotro.py -nopreload -fix:BraceEqual "-catr:Deeds"

Quest Comments

  • Some quests were created using the commented copy instead of the clean copy boilerplate.
  • Remove the comment text.

Contents of user-fixes.py.

fixes['QuestComments'] = {
    'regex': True,
    'msg': {
        'en':u'Robot: fix quest comments',
    },
    'replacements': 
      [
        ( ur' +<!--Override for infobox title--> *'
        , u" ")
      ,
        ( ur' +<!-- 1-\d+/<blank> --> *'
        , u" ")
      ,
        ( ur' +<!-- Solo/Fellowship/Small Fellowship/Raid/Solo only \(defaults to solo--> *'
        , u" ")
      ,
        ( ur' +<!-- Yes; or blank for No--> *'
        , u" ")
      ,
        ( ur' +<!-- if ender == starter these can be removed --> *'
        , u" ")
      ,
        ( ur' +<!-- quest group name in quest log \(e\.g\., region, class, introduction, prolog, book #\) --> *'
        , u" ")
      ,
        ( ur' +<!-- Class \(lvl 15/30/50(?:/58)? class quests only\) --> *'
        , u" ")
      ,
        ( ur' +<!-- Profession \(crafting  advancement quests only\) --> *'
        , u" ")
      ,
        ( ur' +<!-- Race-specific quests \(Elf, Hobbit, Race of Man or Dwarf\) --> *'
        , u" ")
      ,
        ( ur' +<!-- Name of the quest chain \(usually the name of the last quest of the chain\) --> *'
        , u" ")
      ,
        ( ur'=  +$'
        , u"= ")
      ,
    ]
}

Example command lines.

python replace_lotro.py -nopreload -fix:QuestComments -cat:"Quests: Level 60"

Item Craft Information

  • Change crafted items to link to [[<profession> <tier> Recipe Index]] page.

Contents of user-fixes.py.

fixes['CraftLevel'] = {
    'regex': False,
    'msg': {
        'en':u'Robot: link item to recipe index',
    },
    'replacements': 
      [
        ( ur'''Profession: \[\[(?P<pname>[^]|]+)\]\]

Crafting Level: \[\[:Crafting\#Crafting levels\|(?P<tname>[A-za-z]+) \(Tier (?P<tnum>\d+)\)\]\]'''
        , u'''Profession: [[\\g<pname>]]

Crafting Level: [[\\g<pname> \\g<tname> Recipe Index|\\g<tname> (Tier \\g<tnum>)]]''')
      ,
    ]
}

Example command lines.

python replace_lotro.py -nopreload -multiline -fix:CraftLevel -page:"Item:Crafted Buckler"
python replace_lotro.py -nopreload -multiline -fix:CraftLevel -ns:100 -ref:Crafting

Update 80 Level Cap

I have converted a large number of quests and quest references from a hard coded level cap number to use the Template:Level Cap. You insert the level cap value by using {{Level Cap}}, e.g. 150. You can insert a level cap relative value by using {{Level Cap|+1}} or {{Level Cap|-2}}, e.g. 151 or 148.

The affected pages include:

There remain many tasks related to the Level Cap change.

  • NPC and Creature stats, including morale and power, must be adjusted.
  • NPC and Creature stats for creatures with Level Cap relative levels, or with level ranges.
  • Normal quests which scale with the level cap. Any quest which was previously level 75 and is now level 85 should have the hard coded level number replaced with the template reference.
  • Level Cap skirmishes, and the maximum level for scaled skirmishes.
  • Other pages which currently reference the current or previous level cap values.