You need pywikibot, for Python 3, to run all these scripts. You should put the relevant scripts in core/scripts and you should have a blank directory called core/xivapi.
Quests
Making quest pages
You need the scripts xivapi.py and generate_quests_boilmaster.py. You also need files called core/xivapi/linkdict.pkl and core/xivapi/pfixdict.pkl, which are stored on the FFWiki's Google Drive. Admins can get into our Google account using the Secret Admin Lab. For anyone else, ask an admin for access.
Go on XIVAPI's browser API and find the ID of the quest — that is, the 5-digit number that is the last entry in the URL — that you're starting to run at. Then find the ID of the last quest you're running at. Note that there are sometimes "gaps", several IDs in a row that don't refer to anything. If you're truly at the last ID, then trying to look up the next ID will cause XIVAPI to throw an error, not just give you a quest with 0 rewards and a blank name.
Open up core/scripts/generate_quests_boilmaster.py in your text editor and set QUEST_RANGE to the range of IDs you're going to use. Note that range() is not right-inclusive in Python 3, so if your first quest ID is 70780 and your last is 71200 you should write:
QUEST_RANGE = range(70780, 71201)
Also set your USERNAME, the EXPAC and PATCH of the quests you're creating pages for, and update the SUMMARY to have your username. You may want to run the script with
TEST_FLAG = True
first to ensure that everything is working as intended.
Working inside core, run the command
python3 pwb.py generate_quests_boilmaster
and the bot will begin reading quests from XIVAPI. It will periodically ask you where a link should point to, or if a Unicode prefix should be truncated. This information is remembered in core/xivapi/pfixdict.pkl and core/xivapi/linkdict.pkl. When you're done, make sure to upload these to the Google Drive.
There's a lot of commented-out code in core/xivapi/generate_quests_boilmaster.py that could be used to add the game script automatically. However, the way that the script is formatted in-game is really jank and Catuse does not understand it, so none of this code currently works. Instead, we assume that one of our script editors will eventually add the script manually.
Making the quest tree
Next we are going to update Final Fantasy XIV quests and its subpages, and Module:XIVAPI/QuestUnlocks.
Module:XIVAPI/Journal is a list of the top-level journal category, then the second-level journal category, then the quests in that category. These quests are sorted by dependency, with ties broken by ID. This page is used on subpages of Final Fantasy XIV quests. There is a category called "Sephiroth Quests" for quests which don't appear in the journal (don't ask me why) and any Lua code which loops over all entries in Module:XIVAPI/Journal should handle this case.
Module:XIVAPI/QuestUnlocks contains a list, for each quest, what quests are unlocked by completing that quest. This is used by {{infobox quest}} via the p.questUnlocks() function of Module:XIVAPI.
To update these Lua files, you need to have already made the quest pages. So in particular you should have the most updated version of core/xivapi/pfixdict.pkl. If you don't, you are going to get possibly rather subtle bugs caused by the difference between Unicode and ASCII encoding.
If you have a file called core/xivapi/tree_quests.pkl, it has out-of-date information and you should delete them.
In addition, you need the script quest_tree.py.
Now edit code/scripts/quest_tree.py by setting:
QUEST_RANGE = range(65536, (last quest here) + 1)
NEW_QUEST_ID = (first quest here)
where "(last quest here)" is the ID of the last quest currently in the game, and "(first quest here)" is the ID of the first quest which you are adding to the wiki.
Then run:
python3 pwb.py quest_tree
If something goes wrong, you can pick up where you left off, since the bot will read from core/xivapi/tree_quests.pkl.
After a while, the bot will finish and save two files, core/xivapi/xiv_tree.lua and core/xivapi/xiv_succ.lua. You should manually overwrite Module:XIVAPI/Journal with the former and Module:XIVAPI/QuestUnlocks with the latter. The reason we don't have the bot do this is because MediaWiki sometimes complains when a bot uploads a very large amount of plaintext.
Finally, the bot will print to the terminal a list of new quest categories. You should update {{navbox quests FFXIV}} and Final Fantasy XIV quests and its subpages with these new categories, as well as make the relevant pages in the Category namespace. You can use the Lodestone to see which of the six types of quest category (MSQ, sidequests, etc) the new categories are in.
When you are done, you should upload the most up-to-date version of core/xivapi/pfixdict.pkl to the Google Drive.
Achievements
The process is similar to building the quest tree. You need the scripts redirects.py, xivapi.py and generate_achievements_boilmaster.py, as well as core/xivapi/achievement_categories.pkl on the Google Drive.
Using XIVAPI's browser API, find the ID of the achievement that you're starting the run at and the ID of the end of the run. Open up core/scripts/generate_achievements_boilmaster.py and set ACHIEVEMENT_RANGE and NEW_ACHIEVEMENT_ID as before.
Working inside core, run
python3 pwb.py generate_achievements_boilmaster
which will start making redirects to the relevant sections of Final Fantasy XIV achievements and create a Lua file, core/xivapi/xiv_achievements.lua. Manually copy this code into Module:XIVAPI/Achievements. The script will also print a list of new sections of Final Fantasy XIV achievements and you should add these manually, as well as a list of pages that you should manually disambiguate. Then upload the new copy of achievement_categories.pkl to Google Drive.
Items
Is technically more demanding because there's too many of them to fit in one Lua module. Still we should get around to automating this eventually.