Skip to content

Conversation

@asru
Copy link

@asru asru commented Oct 24, 2025

Summary

Refines the Absor function in init.lua to safely complete the Tutorial weapon upgrade task while avoiding unintended hand-ins and handling common edge cases. Change is scoped to a single function (Absor) in init.lua; no other files are modified.

What's added/improved

  • Only hands in recognized starter weapons: Dagger*, Club*, Short Sword*, Dull Axe* (protects twink/custom weapon).
  • If a non-starter (twink) weapon is equipped, looks for a starter weapon in inventory and hands that in instead (uses exact-match prefix = to support names with *) to complete Task.
  • Handles "no weapon equipped" by attempting the starter-from-inventory path.
  • Computes the expected upgraded starter weapon precisely:
    • Clubs -> Polished {base}
    • Dagger/Short Sword/Axe -> Sharpened {base}
    • Axe drops leading Dull (e.g., Dull Axe* -> Sharpened Axe).
  • Attempts to auto-equip the returned upgraded starter weapon (if no twink weapon); if not possible, shows a clear Note.Info message.
  • Special-cases Monk (MNK) who doesn't get a starter—closes the dialog to complete the Task and continues.

Implementation notes

  • Uses existing helpers: navHail, closeDialog, grabItem, PrintDebugMessage, Note.Info.
  • Matches items with asterisks reliably using exact-match queries (e.g., =Dagger*).
  • Scoped change: only the Absor function in init.lua.

Testing

  • Verified in-game across classes and scenarios:
    • Starter equipped -> upgrade/equip flow works.
    • Twink equipped -> twink remains; starter from inventory is used when present.
    • Starter only in inventory -> hands in and completes.
    • No starter anywhere -> logs a helpful Note.Info.
    • Monk -> gracefully skips as expected.

If you'd like this split into smaller commits or prefer different messaging, I'm happy to adjust.

…arter cases; exact-match queries for asterisked names; auto-equip upgraded weapon when possible
@asru
Copy link
Author

asru commented Oct 24, 2025

First time I am attempting to do something like this using Git / Github.

Please let me know if you would like these changes in a different manner.

@asru asru closed this Oct 24, 2025
@asru asru reopened this Oct 24, 2025
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.

1 participant