User:LunaBot/sandbox-code2

Old code as reference:

Old Coding Rules (not all in format yet) for all templates
If you see a logical mistake please let me know!
 * delete comments in templates
 * add warning to not add comments
 * change old size parameter to new if blank or 1
 * World Rule: (\D is any letter) IF |\Dorld = replace with |farm =
 * Move number of *_type to end
 * Don't delete old harvest param for Seed, Animal & Tree
 * Don' delete old cost param for Seed
 * All infoboxes should now use first_available and last_available for the dates.
 * all infoboxes should have dates & farms
 * all old params without =\d or =? get deleted
 * xp1_gain_type is universal for all
 * space between = is a cosmetical detail, probably changed later or never by the bot

Infoboxes:
Then Subrules for each template (individual because not all are updated yet) For 1st type: For 2nd type: For 3rd type:
 * If contains (seperate for all) e.g. {{ Building\n
 * Subrule 1: If contains for each e.g. Gained\s*?=\s*?\d
 * Subrule 2: IfNOT contains xp1_gain_type
 * Subrule 3: e.g. find \|\s*?XP Gained\s*?= replace with | xp1_gain_type = Player | xp1_gain_amt =
 * Subrule 1: If contains for each e.g. Gained\s*?=\s*?\d
 * Subrule 2: If contains xp1_gain_type
 * Subrule 2: IfNOT contains xp2_gain_type
 * Subrule 3: e.g. find \|\s*?XP Gained\s*?= replace with | xp2_gain_type = Player | xp2_gain_amt =
 * Subrule 1: If contains for each e.g. Gained\s*?=\s*?\d
 * Subrule 2: If contains xp1_gain_type
 * Subrule 2: If contains xp2_gain_type
 * Subrule 2: IfNOT contains xp3_gain_type
 * Subrule 3: e.g. find \|\s*?XP Gained\s*?= replace with | xp3_gain_type = Player | xp3_gain_amt =