Skip to content

Add Vana'Dial: Vana'diel clock, moon, weather, and transport timers#376

Draft
ferrisaj87 wants to merge 4 commits into
tirem:mainfrom
ferrisaj87:pr/vanadial
Draft

Add Vana'Dial: Vana'diel clock, moon, weather, and transport timers#376
ferrisaj87 wants to merge 4 commits into
tirem:mainfrom
ferrisaj87:pr/vanadial

Conversation

@ferrisaj87

@ferrisaj87 ferrisaj87 commented Jun 3, 2026

Copy link
Copy Markdown

Summary

Adds Vana'Dial, a new XIUI module: a draggable overlay for Vana'diel time (VT), the elemental week, moon phase, zone weather, and transport timers (airships, boats, RSE, lunar). Wired like other XIUI widgets (module registry, profile settings, config tab, color tab, windowPositions, optional hide on menu focus).

Update: Fixed RSE location alignment — dungeon rotation (Shakrami Maze / Ordelle Caves / Gusgen Mines) now follows the absolute Vana'diel week counter instead of the race slot index. Race and countdown were already correct; only the location pairing was off. Matches standalone VanaDial v1.3.5.

What it does

Main window

  • VT clock from VANA_EPOCH (integer-second stepping)
  • Optional local time (LT)
  • Eight day columns (element icons or plain fills); optional yesterday/tomorrow with opacity
  • Moon phase % with wax/wane arrows; full/new moon glow colors
  • Element weakness badge on day icons
  • Optional VT tint from current day element
  • Gear icon opens XIUI → Vana'Dial config
  • Plain / Window1 themes (scale/opacity)
  • Position persisted as windowPositions.VanaDial

Tooltips: per-control toggles (VT, LT, TOD tab, weather tab); day column Fenrir / Selene's Bow details (above/below)

Floating popups

  • Time of Day: day / night / dead of night; side + align; optional countdown; custom icon scale
  • Weather: zone icon; elemental sizing; hide non-elemental; test placement; custom scale
  • Timers: airships, boats (grouped), RSE by nation, lunar phases; expand/collapse; optional auto-close

Commands: /xiui vdships | vdboats | vdrse | vdlunar — open that timers section; repeat closes the panel

Configuration: XIUI → Vana'Dial tab + Colors tab (background, border, text, eight element colors, moon glow, TOD timer color)

Data sources

  • Time / moon: Lua math from os.time() (no game memory reads)
  • Weather: single byte from client memory via FFXiMain.dll signature scan (read-only); packet 0x057 triggers re-read; zone-in uses deferred read

Security note

Read-only weather byte after a validated DLL scan; clock from os.time(); no execution of untrusted input (settings are typed fields; commands only toggle UI sections).

Files

  • XIUI/modules/vanadial/init, data, display, popups, timers
  • XIUI/config/vanadial.lua
  • XIUI/assets/VanaDial/
  • Wiring in XIUI/XIUI.lua, XIUI/config.lua, XIUI/modules/init.lua, XIUI/core/settings/user.lua, XIUI/core/settings/colors.lua

Test plan

  • Enable module; VT advances each second; LT matches system clock when enabled
  • Day columns, moon %, weakness badge, past/future opacity
  • Drag window; relog — position restored
  • TOD popup: all sides + align; countdown when enabled
  • Weather popup: elemental / non-elemental / hide non-elemental; updates on zone change
  • Timers via clock icon and /xiui vd*; repeat command closes
  • RSE timers: current race matches Guttrix; location cycles Shakrami → Ordelle → Gusgen each Vana'diel week
  • Gear opens config; color changes apply
  • Hide on menu focus when enabled

ferrisaj87 and others added 2 commits June 3, 2026 18:08
New XIUI module with main window (VT/LT, elemental week, moon phase),
floating TOD and weather tabs, transport timers panel, config and color
tabs, and /xiui vdships|vdboats|vdrse|vdlunar shortcuts.

Co-authored-by: Cursor <cursoragent@cursor.com>
Airships: dual-line display (soonest leg + full return countdown),
correct route labels, AWAITING styling, Returns in prefix; all four hubs.
Ferries: boarding vs transit VT windows. TOD/day tooltips show time-of-day name.

Co-authored-by: Cursor <cursoragent@cursor.com>
@ferrisaj87

Copy link
Copy Markdown
Author

Update (follow-up commit)

Fixes since the initial PR:

Airships (all four Jeuno routes)

  • Dual-line display: top line = leg arriving/boarding soonest; bottom line = opposite leg IN-TRANSIT with full return countdown (2× transit + boarding to next Jeuno arrival).
  • Route labels corrected (inbound vs outbound naming).
  • AWAITING ARRIVAL uses highlight color on the label only; countdown stays default text color.
  • Second line prefixed with Returns in: before the countdown.
  • Removed overlapping single-line boarding window that hid the second line on some routes (e.g. Kazham).

Ferries

  • Boarding vs in-transit VT windows aligned with observed schedule (dock → board → sail).

Tooltips

  • TOD tab/popup: Time of Day: Day / Night / Dead of Night (no layout change).
  • Main window day columns: weekday name on hover.

No other XIUI files changed in this commit.

Guard imgui.End() when Begin fails; move timer updates into the timers
popup with NeedsUpdate and pre-allocated row tables; unified day-column
tooltips (weekday + moon + Fenrir/Selene); moon pulse throttle;
ClearTintCache on module reset; Day Columns tooltip config toggle.

Co-authored-by: Cursor <cursoragent@cursor.com>
@ferrisaj87

Copy link
Copy Markdown
Author

Update — standalone v1.3.4 port

Ports stability/performance/tooltip work from the standalone Vana'Dial addon:

  • ImGui stack safety: only call imgui.End() when Begin() returned true (main window + all three popups).
  • Timer performance: NeedsUpdate() + pre-allocated Fill* row tables (no per-second table churn); schedule refresh runs inside the timers popup, not every main-window frame.
  • Day-column tooltips: unified overlay — weekday name, moon phase %, optional Fenrir/Selene rows; new Day Columns config toggle (vanaDialShowTooltip).
  • Moon pulse / weather test blink: throttled to ~8 Hz instead of per-frame sin().
  • windowbackground.ClearTintCache() on module reset/cleanup.

No hotbar or unrelated XIUI changes in this commit.

Derive dungeon location from the absolute Vana'diel week counter instead of race slot index so race/countdown stay correct while Shakrami/Ordelle/Gusgen rotate properly.

Co-authored-by: Cursor <cursoragent@cursor.com>

@jquick jquick left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ferrisaj87 !

A few issues I noticed with this:
Weather Tab -> Individual Scaling does not seem to work correctly

Timers error on me when clicking on the timer icon:

[15:07:51] [XIUI] Module 'vanaDial' error: C:\Games\Ashita\\addons\xiui\modules\vanadial\popups.lua:593: attempt to call field 'SetWindowFontScale' (a nil value)

@NerfOnline NerfOnline marked this pull request as draft July 5, 2026 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants