Go implementation of PolUtils and ResourceExtractor
  • Lua 78.9%
  • Go 21.1%
Find a file
meliora ac42214269
All checks were successful
Sync Game Data Migration / sync (push) Successful in 20s
Feat: Added synth recipes
2026-06-16 01:29:37 +02:00
.forgejo/workflows Clean up folders 2026-06-15 22:54:04 +02:00
abilities Rewritten go client 2026-06-13 12:30:16 +02:00
cmd Clean up folders 2026-06-15 22:54:04 +02:00
dat Rewritten go client 2026-06-13 12:30:16 +02:00
encoding Rewritten go client 2026-06-13 12:30:16 +02:00
flyway Added flyway for vanaportal 2026-06-13 22:56:31 +02:00
image Rewritten go client 2026-06-13 12:30:16 +02:00
items Updated migration 2026-06-15 22:51:17 +02:00
lsb Feat: Added more currency sources 2026-06-16 01:02:37 +02:00
maps Rewritten go client 2026-06-13 12:30:16 +02:00
migrations Feat: Added synth recipes 2026-06-16 01:29:37 +02:00
render Rewritten go client 2026-06-13 12:30:16 +02:00
spells Rewritten go client 2026-06-13 12:30:16 +02:00
types Rewritten go client 2026-06-13 12:30:16 +02:00
.gitignore modified: .gitignore 2026-06-13 12:35:30 +02:00
currencyshops.go Feat: Added more currency sources 2026-06-16 01:02:37 +02:00
go.mod Rewritten go client 2026-06-13 12:30:16 +02:00
go.sum Rewritten go client 2026-06-13 12:30:16 +02:00
init.sql Rewritten go client 2026-06-13 12:30:16 +02:00
landsandboat.go Feat: Added synth recipes 2026-06-16 01:29:37 +02:00
landsandboat_test.go Rewritten go client 2026-06-13 12:30:16 +02:00
main.go Added LSB for some datapoints 2026-06-14 12:03:38 +02:00
npcshops.go Added npc vendor data 2026-06-16 00:17:25 +02:00
README.md Feat: Updated README 2026-06-13 12:33:56 +02:00
serializers.go Rewritten go client 2026-06-13 12:30:16 +02:00
serializers_test.go Rewritten go client 2026-06-13 12:30:16 +02:00

PolExtract

Build

go build ./...

Extract

go run . \
  -ffxi "/path/to/ffxi" \
  -out output \
  -maps

The default extraction writes:

  • output/resources/json/*.json
  • output/resources/lua/*.lua
  • output/resources/xml/*.xml
  • output/resources/manifest.json
  • output/resources/manifest.xml
  • output/icons/*.png

Useful options:

-icons=false              Skip icon output
-items=false              Skip item DATs
-spells=false             Skip spell data
-abilities=false          Skip ability data
-strings=false            Skip DAT string tables
-maps                     Extract maps

Item Cards

Verdana font is required. Point the renderer at installed Verdana TTF:

go run ./cmd/card \
  -items output/resources/json/items.json \
  -icons output/icons \
  -font "/path/to/verdana.ttf" \
  -id 23734 \
  -out output/malignance_gloves.png

Render all Weapon and Armor cards:


go run ./cmd/card \
  -items output/resources/json/items.json \
  -icons output/icons \
  -font "/path/to/verdana.ttf" \
  -all \
  -out-dir output/cards

Use -all -out-dir output/cards to render every non-placeholder Weapon and Armor item. Other item categories are skipped.

PostgreSQL Import

Import all JSON resources:

go run ./cmd/postgres

The importer reads output/resources/json/*.json, records existing icons from output/icons, and records existing cards from output/cards. It upserts all records and removes records that are no longer present by default. Database asset paths are stored relative to the published asset root, such as icons/10253.png and cards/10253.png.

The schema has:

  • game_resources: every extracted resource record, stored as jsonb
  • game_items: searchable item columns, the merged English description, detected weapon type, decoded job/race/flag/slot text, relative icon/card paths, and the complete untouched item record as jsonb
  • resource_imports: one summary row for each successful import

Override it for another PostgreSQL server:

DATABASE_URL="postgres://user:password@host:5432/database" \
  go run ./cmd/postgres

References & Inspiration

  • ResourceExtractor: extraction, parsing, fixes, filtering, post-processing, manifests, and resource serialization.
  • Vanalytics: item-card content, layout, styling, icons, and wrapping.