Skip to main content

Houndedtarget

Overview

This component tracks and aggregates modifiers affecting an entity's target weight (influence on AI targeting priority) and determines whether the entity qualifies as a "hound thief" target, primarily used by the Hounded event logic in Don't Starve Together.

Dependencies & Tags

  • Depends on SourceModifierList utility class for managing additive and boolean modifiers.
  • Does not add or remove tags on its own.
  • Relies on the host entity (inst) to be a valid component host (e.g.,拥有 inst:AddComponent support).

Properties

PropertyTypeDefault ValueDescription
instEntitynil (injected)Reference to the entity this component is attached to.
target_weight_multSourceModifierListSourceModifierList(inst)Tracks numerical modifiers that scale the entity's base target weight.
hound_thief_sourcesSourceModifierListSourceModifierList(inst, false, SourceModifierList.boolean)Tracks boolean flags indicating if the entity should be treated as a hound thief target.
hound_thiefbooleanfalseDeprecated legacy flag; retained for backward compatibility but should not be used.

Main Functions

GetTargetWeight()

  • Description: Returns the current aggregate target weight modifier applied to the entity. This value is used by targeting AI (e.g., Hounded hounds) to prioritize entities.
  • Parameters: None.

IsHoundThief()

  • Description: Returns true if the entity is considered a hound thief target, either via active hound_thief_sources or the legacy hound_thief flag.
  • Parameters: None.

Events & Listeners

None. This component does not listen for or push events directly.