Skip to content

Add missing item fields from wiki: slot and basepower #1

Description

@Heckfer

Ported from Heckfer/almanac-tibia#157.

What

The wiki's Infobox_Object template documents item facts the generated DB has no column/attribute for. Of the four fields in the original issue, two are already covered in the current codebase (v8.0.1+):

  • secondarytype — already stored as the type_secondary column on item and parsed by ItemParser.
  • regenseconds — already stored as the food_time entry in item_attribute.

Remaining to add (both verified present in live wiki articles):

  • slot — equipment slot for wearables (e.g. Neck on Ruby Necklace, Finger, Body).
  • basepower — rune base power (e.g. 150 on Sudden Death Rune). Note: upstream's unreleased base_power is for spells (Infobox_Spell); this one is the rune item field.

How

Follow the existing pattern for scalar per-item facts (same as vocation/elemental_bond, commit fa928e5): add entries to ItemParser.item_attributes in tibiawikisql/parsers/item.py so they land in the item_attribute table:

  • "slot": "slot"
  • "base_power": "basepower"

Acceptance

  • slot and base_power rows appear in item_attribute after generate.
  • Parser tests cover both fields with real wiki fixtures.
  • CHANGELOG updated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions