advice

package
v0.7.46 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2026 License: MIT Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package advice ranks what a captured character should do next. Every step names its source; a fact neither the capture nor the dataset holds is reported as unknown, never guessed. The rules are in docs/advice.md.

Index

Constants

View Source
const (
	KindTurnIn     = "turn_in"
	KindQuest      = "quest"
	KindTalent     = "talent"
	KindProfession = "profession"
	KindGear       = "gear"
)

Step kinds.

View Source
const (
	MaxBelow = 5 // a quest more than this far below is grey and skipped
	MaxAbove = 3 // a quest more than this far above is too hard and skipped
)

Quest level window around the character's level.

View Source
const (
	AvailBelow = 2
	AvailAbove = 2
	// MaxAvailable caps how many "Pick up" steps WhatsNext adds.
	MaxAvailable = 3
)

Level band for a quest the character has not picked up: the character's level -2 to +2.

View Source
const (
	ClassQuestPrefix = "Class quest: pick up "
	ClassQuestNote   = "Class quests often teach a core ability."
	// MaxClassQuests caps how many class quests lead the list (the prompt budget).
	MaxClassQuests = 3
)

Class quest wording. A class quest is a pick-up limited to the player's class (or a few classes).

View Source
const AbandonPrefix = "Abandon "

AbandonPrefix starts the title of the step for a failed quest.

View Source
const MaxLocated = 5

MaxLocated is how many quests in the log get a location from Questie (the prompt budget).

View Source
const PickUpPrefix = "Pick up: "

PickUpPrefix starts the title of a step for a quest that is not yet in the log.

View Source
const TalentAsk = `ask "What talents should I get?"`

TalentAsk is the question that gets the player's talent picks.

Variables

This section is empty.

Functions

func IsClassQuest added in v0.7.0

func IsClassQuest(s Step) bool

IsClassQuest reports whether the step is a class quest pick-up.

func Render

func Render(c character.Character, steps []Step, total int) string

Render is the plain-text rendering; total is the count before any limit.

func WhoOf added in v0.6.0

func WhoOf(c character.Character) questie.Who

WhoOf is the eligibility facts of c for the player's QuestieDB (the same band as the pick-up steps).

Types

type Available added in v0.4.0

type Available struct {
	Quests    []Step
	Unchecked []string
}

Available is the quests a character could pick up now. Unchecked names each rule the dataset could not support, so an empty list is never read as "nothing to pick up".

func AvailableQuests added in v0.4.0

func AvailableQuests(c character.Character, ds store.DataStore) Available

AvailableQuests finds quests the character has not picked up but could: level within the band, class and race allowed, the previous step of its quest line completed, not completed, not in the log, not a DNT or deprecated placeholder, and in a zone the log already has quests in (the last-saved zone, or else the zones of the log's quests, is "nearby"). Ranked by level fit, then a shared quest line, then a shared zone. ds may be nil.

type Step

type Step struct {
	Kind   string `json:"kind"`
	Title  string `json:"title"`
	Reason string `json:"reason"`
	Zone   string `json:"zone,omitempty"`
	// Progress is the quest's objective progress, such as "Crab Season: 3/8 Crab Claws".
	Progress string `json:"progress,omitempty"`
	QuestID  int    `json:"quest_id,omitempty"`
	// Location is where to go (an NPC or objective and its map percent), when the player's own
	// Questie could place it.
	Location string   `json:"location,omitempty"`
	Sources  []string `json:"sources"`

	// The structured parts of the step, for the digest; never part of the JSON the tools print.
	Name   string `json:"-"` // the quest's bare title
	Level  int    `json:"-"` // the quest's level, 0 when unknown
	NPC    string `json:"-"` // the giver of a pick-up, or the turn-in NPC
	Elite  bool   `json:"-"` // an elite or group quest
	Points int    `json:"-"` // unspent talent points, for a talent step
}

Step is one piece of advice.

func Limit

func Limit(steps []Step, n int) []Step

Limit keeps the first n steps; n <= 0 keeps all.

func WhatsNext

func WhatsNext(c character.Character, ds store.DataStore) []Step

WhatsNext returns every step for the character, best first. ds may be nil (no dataset).

func WhatsNextWith added in v0.5.0

func WhatsNextWith(c character.Character, ds store.DataStore, qx *questie.Index) []Step

WhatsNextWith is WhatsNext with the player's own QuestieDB, when they have one (nil otherwise): it supplies the pick-ups and the locations of the quests in the log.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL