Skip to content

Modules

Pival edited this page Jul 17, 2021 · 12 revisions

PersonalData.py

A module that is necessary but not provided, as they required personal information specific to each. It is use to get informations such as the location of the Fire Emblem Heroes files, or the user who will be use to perform posts.

For sensitiv information, such as password, it is recommand to store them on your environnement, and get them with os.environ.

The following globals are needed in order to use any other modules:

  • USER: The Gamepedia/Fandom user name.
  • BOT: The name of the bot. See Special:BotPasswords for more information about bot creation.
  • PASSWD: The password of the bot.
  • JSON_ASSETS_DIR_PATH: The absolute path to the feh-assets-json/files/assets folder on your device.
  • BINLZ_ASSETS_DIR_PATH: The absolute path to the assets folder containing the unaltered binaries of the Fire Emblem Heroes assets on your device. You can follow the instructions on this page in order to get these.

The following variables are also recommended, as they may be needed at a later date:

  • WEBP_ASSETS_DIR_PATH: The absolute path to the assets folder containing the unaltered files of the Fire Emblem Heroes assets on your device. If you extract data yourselves, it will be the same as BINLZ_ASSETS_DIR_PATH.
  • APK_ASSETS_DIR_PATH: The absolute path to the assets folder of the Fire Emblem Heroes APK on your device. You can follow the same steps as above to get them, while navigating to folder app instead of data.

An example of this file can be:

#! /usr/bin/env python3

from os import environ
from os.path import realpath, dirname

USER = environ["FEH_WIKI_USERNAME"]
BOT = environ["FEH_WIKI_BOT"]
PASSWD = environ["FEH_WIKI_BOT_PASSWD"]
BINLZ_ASSETS_DIR_PATH = environ["EMULATOR_ROOT"] + "/data/com.nintendo.zaba/files/assets/"
WEBP_ASSETS_DIR_PATH = BINLZ_ASSETS_DIR_PATH
JSON_ASSETS_DIR_PATH = dirname(realpath(__file__)) + "/feh-assets-json/files/assets/"
APK_ASSETS_DIR_PATH = environ["EMULATOR_ROOT"] + "/app/com.nintendo.zaba-1/base.apk/assets/"

Bot scripts

A script which generate pages of given map's ids and update's tags.

A script which will create redirect pages for uploaded files.

A script which add category on latest uploaded weapon sprites.

plistSplitter.py

A script which read each .plist files passed as parameters, look for the associated .png file, and split this one according to the plist.

Save each files on the directory ../Cropped/, and fail when it cannot save files.

python3 plistSplitter.py [plist [...]]

wepMgSplitter.py

A script which split each images passed as parameter into two image (56x64 and 128x64+48+0) corresponding to the part of tome sprites.

Save each files on the directory ../Cropped/, and fail in case of error.

python3 wepMgSplitter.py [wep_mgXXX.webp [...]]

Utils

Define several constants, globals variables and functions which are used by most (if not all) other files.

Define several functions which will perform requests to the Wiki's API.

Define several functions which generate wikicode used on most pages.

Define a single function, parseReward and several constants used for reward generation.

Define some functions for the scenario part of pages.

Maps

Define functions to create Story and Paralogue map pages, and their different sections.

Define functions to create Tactics Drills pages and its sections.

Define a function to create Heroic Ordeals pages.

Define functions to create Squad Assault and Chain Challenge pages.

Define several functions to create Grand Hero Battle, Bound Hero Battle, Legendary Hero Battle and Mythic Hero Battle.

Define also functions to add Limited Hero Battle to an existing Hero Battle, as well as add revivals.

Define functions to create Rival Domains pages, querying the associated Grand Conquests map.

Define functions to create Event maps, as well as a function to dump a JSON file following Event map's creation's rules.

Events

Add scores to existing Voting Gauntlet event pages.

Define functions to create Tempest Trials event pages and its different sections.

Define functions to create Forging Bonds event pages, and add a revival to an existing one.

Define functions to create Røkkr Sieges event pages. Some informations are still missing and need to be completed.

Define functions to create Lost Lore event pages and its different sections.

Define functions to create Hall of Forms event pages.

Define functions to create Mjölnir's Strike event pages, and add result to an existing one.

Define functions to create Frontline Phalanx event pages.

Define functions to create Pawns of Loki event pages.

Others

Define functions to create Accessory pages.

Define functions to create Quests objects, which are use to generate Quests on the wiki.

Define functions to update Heroes and Heroes' Quotes pages with informations about their Resplendent version.

  • REUtil.py
  • Reverse.py
  • Events
    • RevVG.py
    • RevTT.py
    • RevTB.py
    • RevGC.py
    • RevFB.py
    • RevRS.py
    • RevLL.py
    • RevHoF.py
    • RevMS.py
    • RevFP.py
    • RevPoL.py
  • Others
    • RevData.py
    • RevMap.py
    • RevQuests.py
    • RevSound.py
    • RevUnit.py
Clone this wiki locally