Files
..
2026-11-16 14:47:43 +08:00
2026-11-16 14:47:43 +08:00
2026-11-16 14:47:43 +08:00
2026-11-16 14:47:43 +08:00
2026-11-16 14:47:43 +08:00
2026-11-16 14:47:43 +08:00
2026-11-16 14:47:43 +08:00
2026-11-16 14:47:43 +08:00
2026-11-16 14:47:43 +08:00
2026-11-16 14:47:43 +08:00
2026-11-16 14:47:43 +08:00
2026-11-16 14:47:43 +08:00
2026-11-16 14:47:43 +08:00
2026-11-16 14:47:43 +08:00
2026-11-16 14:47:43 +08:00
2026-11-16 14:47:43 +08:00
2026-11-16 14:47:43 +08:00
2026-11-16 14:47:43 +08:00
2026-11-16 14:47:43 +08:00
2026-11-16 14:47:43 +08:00
2026-11-16 14:47:43 +08:00
2026-11-16 14:47:43 +08:00

pfQuest xpGuide headless test harness

Runs the addon outside the game under texlua (LuaTeX's Lua 5.3, installed with TeX Live), in strict Lua 5.0 mode:

  • Lua 5.1+ functions (string.match, gmatch, select, table.unpack, math.fmod, ...) are removed.
  • ipairs behaves exactly like Lua 5.0's.
  • xpcall with extra arguments is refused.

Set LAX=1 to turn strict mode off. Set PFQ=1 to emulate pfQuest (pfDatabase, pfDB, pfMap). Set ZONE="..." to start in a given zone.

Run from the repository root with the addon dir `.`, e.g. `texlua tests/run.lua . Human WARRIOR 1 casual`.

texlua play2.lua  <addon dir> <Race> <CLASS> <level> <casual|medium|hard> [iterations]  # play the guide 1-60
texlua switch.lua <addon dir> <Race> <CLASS> 1 casual <fastIters> <casualIters>          # Fast route, then Casual via the menu
texlua fuzz.lua   <addon dir> <Race> <CLASS> <level> <mode> <playIters>                  # every /xpg command, every button
texlua run.lua    <addon dir> <Race> <CLASS> 1 <mode>                                    # step through every visit + /xpg selftest
texlua datacheck.lua <addon dir>                                                         # Data/Route.lua consistency
texlua guidewin.lua <addon dir> <Race> <CLASS> 1 casual   # guide window: footer icons, unskip, list follow/hold, text size, Help pages
texlua theme.lua / closecheck.lua <addon dir> ...         # pfUI look (set PFUI=1) and close buttons
texlua pfarrow.lua (PFQ=brues) / smartarrow.lua (SA=dir)  # pfQuest arrow hand-off, SmartArrow routing
texlua plates.lua <addon dir> <Race> <CLASS> 1 casual     # nameplate markers: gold skull, or pfUI pin with PFUI=1

Races are the game's race tokens: Human Dwarf Gnome NightElf HighElf Orc Troll Tauren Scourge Goblin.

job.sh runs one line of a job list. For example:

cat jobs | ADDON=/path/to/pfQuest_xpGuide xargs -P 3 -I{} ./job.sh {}

A job line looks like 0 play2.lua Human WARRIOR 1 casual 4000. The first field is 1 to emulate pfQuest.

Also: hints.lua and routeplaces.lua expect NightElf DRUID (Teldrassil); bethink.lua, vanillaguide.lua, levelreached.lua, chainmix.lua and chainmarks.lua check the Bethink / VanillaGuide guides and the chain markers (any race of the right faction). smartarrow.lua needs a checkout of pfQuest-SmartArrow: SA=/path/to/pfQuest-SmartArrow.

The converters in ../tools: build_bethink.py (Guidelime to Data/Bethink.lua), build_vanillaguide.py (VanillaGuide tables to Data/VanillaGuide.lua; point it at a copy of VanillaGuide's en folder) and icons.py + tga.py (the textures in Media).