# Autoloot Agent **Referenced Files in This Document** - [AutolootManager.cs](file://ClassicAssist.Shared/Data/Autoloot/AutolootManager.cs) - [AutolootEntry.cs](file://ClassicAssist.Shared/Data/Autoloot/AutolootEntry.cs) - [AutolootConstraintEntry.cs](file://ClassicAssist.Shared/Data/Autoloot/AutolootConstraintEntry.cs) - [AutolootOperator.cs](file://ClassicAssist.Shared/Data/Autoloot/AutolootOperator.cs) - [PropertyEntry.cs](file://ClassicAssist.Shared/Data/Autoloot/PropertyEntry.cs) - [PropertyType.cs](file://ClassicAssist.Shared/Data/Autoloot/PropertyType.cs) - [AutolootHelpers.cs](file://ClassicAssist.Shared/Data/Autoloot/AutolootHelpers.cs) - [AutolootViewModel.cs](file://ClassicAssist.Shared/UI/ViewModels/Agents/AutolootViewModel.cs) - [AutolootTabControl.axaml](file://ClassicAssist.Avalonia/Views/Agents/AutolootTabControl.axaml) - [AutolootTabControl.xaml](file://ClassicAssist/UI/Views/Agents/AutolootTabControl.xaml) - [ClilocSelectionWindow.xaml](file://ClassicAssist/UI/Views/Autoloot/ClilocSelectionWindow.xaml) - [CustomPropertiesWindow.xaml](file://ClassicAssist/UI/Views/Autoloot/CustomPropertiesWindow.xaml) - [PropertySelectionWindow.xaml](file://ClassicAssist/UI/Views/Autoloot/PropertySelectionWindow.xaml) - [ClilocSelectionViewModel.cs](file://ClassicAssist.Shared/UI/ViewModels/Autoloot/ClilocSelectionViewModel.cs) - [CustomPropertiesViewModel.cs](file://ClassicAssist.Shared/UI/ViewModels/Autoloot/CustomPropertiesViewModel.cs) - [PropertySelectionViewModel.cs](file://ClassicAssist.Shared/UI/ViewModels/Autoloot/PropertySelectionViewModel.cs) - [Item.cs](file://ClassicAssist.Shared/UO/Objects/Item.cs) - [IncomingPacketHandlers.cs](file://ClassicAssist.Shared/UO/Network/IncomingPacketHandlers.cs) - [ContainerContentsPacket.cs](file://ClassicAssist.Shared/UO/Network/Packets/ContainerContentsPacket.cs) - [DropItem.cs](file://ClassicAssist.Shared/UO/Network/Packets/DropItem.cs) - [AutolootTests.cs](file://ClassicAssist.Tests/Agents/AutolootTests.cs) ## Table of Contents 1. [Introduction](#introduction) 2. [Project Structure](#project-structure) 3. [Core Components](#core-components) 4. [Architecture Overview](#architecture-overview) 5. [Detailed Component Analysis](#detailed-component-analysis) 6. [Dependency Analysis](#dependency-analysis) 7. [Performance Considerations](#performance-considerations) 8. [Troubleshooting Guide](#troubleshooting-guide) 9. [Conclusion](#conclusion) 10. [Appendices](#appendices) ## Introduction The Autoloot agent automatically picks up items based on user-defined rules and conditions. It evaluates incoming or existing items against a set of constraints, resolves conflicts when multiple rules match, and executes pickup actions through the game client’s targeting system. The feature includes a rule creation interface with property matching, operator-based comparisons, logical grouping, and testing utilities to validate rules before enabling them. ## Project Structure The Autoloot system is implemented across shared data models, UI views/view models, and network integration points: - Data layer: rule definitions, operators, properties, helpers, and manager orchestration - UI layer (Avalonia): tabs and windows for rule management and testing - Integration: item objects and packet handlers that trigger autoloot evaluation - Tests: unit tests validating core logic ```mermaid graph TB subgraph "Data Layer" M["AutolootManager"] E["AutolootEntry"] C["AutolootConstraintEntry"] O["AutolootOperator"] P["PropertyEntry / PropertyType"] H["AutolootHelpers"] end subgraph "UI Layer (Avalonia)" T["AutolootTabControl"] VM["AutolootViewModel"] W1["ClilocSelectionWindow"] W2["CustomPropertiesWindow"] W3["PropertySelectionWindow"] VM1["ClilocSelectionViewModel"] VM2["CustomPropertiesViewModel"] VM3["PropertySelectionViewModel"] end subgraph "Integration" I["Item"] PH["IncomingPacketHandlers"] CCP["ContainerContentsPacket"] DI["DropItem"] end subgraph "Tests" AT["AutolootTests"] end VM --> M T --> VM W1 --> VM1 W2 --> VM2 W3 --> VM3 M --> E E --> C C --> O C --> P M --> H PH --> CCP PH --> DI CCP --> M DI --> M I --> M AT --> M ``` **Diagram sources** - [AutolootManager.cs](file://ClassicAssist.Shared/Data/Autoloot/AutolootManager.cs) - [AutolootEntry.cs](file://ClassicAssist.Shared/Data/Autoloot/AutolootEntry.cs) - [AutolootConstraintEntry.cs](file://ClassicAssist.Shared/Data/Autoloot/AutolootConstraintEntry.cs) - [AutolootOperator.cs](file://ClassicAssist.Shared/Data/Autoloot/AutolootOperator.cs) - [PropertyEntry.cs](file://ClassicAssist.Shared/Data/Autoloot/PropertyEntry.cs) - [PropertyType.cs](file://ClassicAssist.Shared/Data/Autoloot/PropertyType.cs) - [AutolootHelpers.cs](file://ClassicAssist.Shared/Data/Autoloot/AutolootHelpers.cs) - [AutolootTabControl.axaml](file://ClassicAssist.Avalonia/Views/Agents/AutolootTabControl.axaml) - [AutolootViewModel.cs](file://ClassicAssist.Shared/UI/ViewModels/Agents/AutolootViewModel.cs) - [ClilocSelectionWindow.xaml](file://ClassicAssist/UI/Views/Autoloot/ClilocSelectionWindow.xaml) - [CustomPropertiesWindow.xaml](file://ClassicAssist/UI/Views/Autoloot/CustomPropertiesWindow.xaml) - [PropertySelectionWindow.xaml](file://ClassicAssist/UI/Views/Autoloot/PropertySelectionWindow.xaml) - [ClilocSelectionViewModel.cs](file://ClassicAssist.Shared/UI/ViewModels/Autoloot/ClilocSelectionViewModel.cs) - [CustomPropertiesViewModel.cs](file://ClassicAssist.Shared/UI/ViewModels/Autoloot/CustomPropertiesViewModel.cs) - [PropertySelectionViewModel.cs](file://ClassicAssist.Shared/UI/ViewModels/Autoloot/PropertySelectionViewModel.cs) - [Item.cs](file://ClassicAssist.Shared/UO/Objects/Item.cs) - [IncomingPacketHandlers.cs](file://ClassicAssist.Shared/UO/Network/IncomingPacketHandlers.cs) - [ContainerContentsPacket.cs](file://ClassicAssist.Shared/UO/Network/Packets/ContainerContentsPacket.cs) - [DropItem.cs](file://ClassicAssist.Shared/UO/Network/Packets/DropItem.cs) - [AutolootTests.cs](file://ClassicAssist.Tests/Agents/AutolootTests.cs) **Section sources** - [AutolootManager.cs](file://ClassicAssist.Shared/Data/Autoloot/AutolootManager.cs) - [AutolootViewModel.cs](file://ClassicAssist.Shared/UI/ViewModels/Agents/AutolootViewModel.cs) - [AutolootTabControl.axaml](file://ClassicAssist.Avalonia/Views/Agents/AutolootTabControl.axaml) - [IncomingPacketHandlers.cs](file://ClassicAssist.Shared/UO/Network/IncomingPacketHandlers.cs) - [ContainerContentsPacket.cs](file://ClassicAssist.Shared/UO/Network/Packets/ContainerContentsPacket.cs) - [DropItem.cs](file://ClassicAssist.Shared/UO/Network/Packets/DropItem.cs) - [AutolootTests.cs](file://ClassicAssist.Tests/Agents/AutolootTests.cs) ## Core Components - AutolootManager: Central orchestrator that loads, evaluates, and applies autoloot rules. It integrates with item events and packet handlers to decide whether to pick up an item. - AutolootEntry: Represents a single autoloot rule with metadata, enabled state, and associated constraints. - AutolootConstraintEntry: Encapsulates a condition composed of a property, operator, and value(s). Constraints are combined using logical operators within a rule. - AutolootOperator: Enumerates supported comparison operators used by constraints (e.g., equals, contains, greater than). - PropertyEntry and PropertyType: Define available item properties and their types for matching. - AutolootHelpers: Utility functions for normalization, parsing, and common operations used during evaluation. - AutolootViewModel: View model backing the Avalonia tab; exposes commands for creating, editing, testing, and bulk-managing rules. - UI Windows: Cliloc selection, custom properties, and property selection dialogs assist users in building complex rules. Key responsibilities: - Rule lifecycle: create, edit, enable/disable, delete, import/export - Constraint evaluation: property extraction, type conversion, operator application, logical combination - Conflict resolution: priority ordering and first-match semantics - Testing: dry-run evaluation against sample items without performing pickups - Integration: subscribe to item arrival events and container updates **Section sources** - [AutolootManager.cs](file://ClassicAssist.Shared/Data/Autoloot/AutolootManager.cs) - [AutolootEntry.cs](file://ClassicAssist.Shared/Data/Autoloot/AutolootEntry.cs) - [AutolootConstraintEntry.cs](file://ClassicAssist.Shared/Data/Autoloot/AutolootConstraintEntry.cs) - [AutolootOperator.cs](file://ClassicAssist.Shared/Data/Autoloot/AutolootOperator.cs) - [PropertyEntry.cs](file://ClassicAssist.Shared/Data/Autoloot/PropertyEntry.cs) - [PropertyType.cs](file://ClassicAssist.Shared/Data/Autoloot/PropertyType.cs) - [AutolootHelpers.cs](file://ClassicAssist.Shared/Data/Autoloot/AutolootHelpers.cs) - [AutolootViewModel.cs](file://ClassicAssist.Shared/UI/ViewModels/Agents/AutolootViewModel.cs) - [ClilocSelectionWindow.xaml](file://ClassicAssist/UI/Views/Autoloot/ClilocSelectionWindow.xaml) - [CustomPropertiesWindow.xaml](file://ClassicAssist/UI/Views/Autoloot/CustomPropertiesWindow.xaml) - [PropertySelectionWindow.xaml](file://ClassicAssist/UI/Views/Autoloot/PropertySelectionWindow.xaml) ## Architecture Overview The autoloot pipeline subscribes to item-related events and packet handlers. When an item becomes available (dropped or revealed in containers), the manager evaluates it against all active rules. Each rule consists of one or more constraints evaluated with logical operators. If a rule matches, the manager selects the highest-priority rule and triggers a pickup action via the targeting subsystem. ```mermaid sequenceDiagram participant Game as "Game Client" participant Net as "IncomingPacketHandlers" participant Item as "Item" participant Manager as "AutolootManager" participant Rule as "AutolootEntry" participant C as "AutolootConstraintEntry" participant Target as "Targeting System" Game->>Net : "DropItem / ContainerContentsPacket" Net->>Manager : "Notify item event" Manager->>Item : "Read properties" loop For each active rule Manager->>Rule : "Evaluate(rule)" Rule->>C : "Evaluate constraint" C-->>Rule : "Boolean result" Rule-->>Manager : "Matched?" end alt "Multiple matches" Manager->>Manager : "Resolve conflict by priority" end alt "Highest priority matched" Manager->>Target : "Pickup(item)" Target-->>Game : "Pickup command" else "No match" Manager-->>Game : "Ignore" end ``` **Diagram sources** - [IncomingPacketHandlers.cs](file://ClassicAssist.Shared/UO/Network/IncomingPacketHandlers.cs) - [ContainerContentsPacket.cs](file://ClassicAssist.Shared/UO/Network/Packets/ContainerContentsPacket.cs) - [DropItem.cs](file://ClassicAssist.Shared/UO/Network/Packets/DropItem.cs) - [AutolootManager.cs](file://ClassicAssist.Shared/Data/Autoloot/AutolootManager.cs) - [AutolootEntry.cs](file://ClassicAssist.Shared/Data/Autoloot/AutolootEntry.cs) - [AutolootConstraintEntry.cs](file://ClassicAssist.Shared/Data/Autoloot/AutolootConstraintEntry.cs) - [Item.cs](file://ClassicAssist.Shared/UO/Objects/Item.cs) ## Detailed Component Analysis ### Rule Model and Evaluation Engine - AutolootEntry holds rule metadata and a list of constraints. Rules can be enabled/disabled and have a priority field to resolve conflicts. - AutolootConstraintEntry defines a property selector, operator, and value(s). Logical combination within a rule uses AND/OR grouping. - AutolootOperator enumerates supported comparisons. - PropertyEntry and PropertyType define the schema of item attributes available for matching. - AutolootHelpers provides normalization and parsing utilities used during evaluation. ```mermaid classDiagram class AutolootManager { +LoadRules() +Evaluate(item) bool +Pickup(item) void +ResolveConflicts(matches) AutolootEntry } class AutolootEntry { +string name +bool enabled +int priority +AutolootConstraintEntry[] constraints +Matches(item) bool } class AutolootConstraintEntry { +PropertyEntry property +AutolootOperator op +object value +Evaluate(propertyValue) bool } class AutolootOperator { <> } class PropertyEntry { +string name +PropertyType type } class PropertyType { <> } class AutolootHelpers { +Normalize(text) string +Parse(value, type) object } AutolootManager --> AutolootEntry : "manages" AutolootEntry --> AutolootConstraintEntry : "contains" AutolootConstraintEntry --> PropertyEntry : "uses" AutolootConstraintEntry --> AutolootOperator : "applies" AutolootManager --> AutolootHelpers : "uses" ``` **Diagram sources** - [AutolootManager.cs](file://ClassicAssist.Shared/Data/Autoloot/AutolootManager.cs) - [AutolootEntry.cs](file://ClassicAssist.Shared/Data/Autoloot/AutolootEntry.cs) - [AutolootConstraintEntry.cs](file://ClassicAssist.Shared/Data/Autoloot/AutolootConstraintEntry.cs) - [AutolootOperator.cs](file://ClassicAssist.Shared/Data/Autoloot/AutolootOperator.cs) - [PropertyEntry.cs](file://ClassicAssist.Shared/Data/Autoloot/PropertyEntry.cs) - [PropertyType.cs](file://ClassicAssist.Shared/Data/Autoloot/PropertyType.cs) - [AutolootHelpers.cs](file://ClassicAssist.Shared/Data/Autoloot/AutolootHelpers.cs) **Section sources** - [AutolootManager.cs](file://ClassicAssist.Shared/Data/Autoloot/AutolootManager.cs) - [AutolootEntry.cs](file://ClassicAssist.Shared/Data/Autoloot/AutolootEntry.cs) - [AutolootConstraintEntry.cs](file://ClassicAssist.Shared/Data/Autoloot/AutolootConstraintEntry.cs) - [AutolootOperator.cs](file://ClassicAssist.Shared/Data/Autoloot/AutolootOperator.cs) - [PropertyEntry.cs](file://ClassicAssist.Shared/Data/Autoloot/PropertyEntry.cs) - [PropertyType.cs](file://ClassicAssist.Shared/Data/Autoloot/PropertyType.cs) - [AutolootHelpers.cs](file://ClassicAssist.Shared/Data/Autoloot/AutolootHelpers.cs) ### Rule Creation Interface and Property Matching - AutolootTabControl hosts the main rule editor UI. - AutolootViewModel exposes commands for adding/removing rules, toggling enabled state, setting priorities, and running tests. - PropertySelectionWindow and PropertySelectionViewModel help choose from available properties and types. - CustomPropertiesWindow and CustomPropertiesViewModel allow defining or selecting custom properties for advanced matching. - ClilocSelectionWindow and ClilocSelectionViewModel provide localized text selection for cliloc-based matching. Typical workflow: 1. Open the Autoloot tab. 2. Create a new rule and assign a descriptive name. 3. Add constraints by selecting a property, operator, and value. 4. Use logical grouping to combine constraints (AND/OR). 5. Test the rule against sample items using the test function. 6. Save and enable the rule. **Section sources** - [AutolootTabControl.axaml](file://ClassicAssist.Avalonia/Views/Agents/AutolootTabControl.axaml) - [AutolootViewModel.cs](file://ClassicAssist.Shared/UI/ViewModels/Agents/AutolootViewModel.cs) - [PropertySelectionWindow.xaml](file://ClassicAssist/UI/Views/Autoloot/PropertySelectionWindow.xaml) - [PropertySelectionViewModel.cs](file://ClassicAssist.Shared/UI/ViewModels/Autoloot/PropertySelectionViewModel.cs) - [CustomPropertiesWindow.xaml](file://ClassicAssist/UI/Views/Autoloot/CustomPropertiesWindow.xaml) - [CustomPropertiesViewModel.cs](file://ClassicAssist.Shared/UI/ViewModels/Autoloot/CustomPropertiesViewModel.cs) - [ClilocSelectionWindow.xaml](file://ClassicAssist/UI/Views/Autoloot/ClilocSelectionWindow.xaml) - [ClilocSelectionViewModel.cs](file://ClassicAssist.Shared/UI/ViewModels/Autoloot/ClilocSelectionViewModel.cs) ### Constraint Evaluation Flow The evaluation flow normalizes inputs, converts values to the expected property type, applies the operator, and aggregates results per rule. ```mermaid flowchart TD Start(["Start Evaluate"]) --> ReadProps["Read item properties"] ReadProps --> Normalize["Normalize strings if needed"] Normalize --> Convert["Convert values to target type"] Convert --> ApplyOp["Apply operator to compare"] ApplyOp --> Aggregate["Aggregate with logical operators"] Aggregate --> Result{"Rule matched?"} Result --> |Yes| PickCandidate["Add to candidates"] Result --> |No| NextRule["Next rule"] PickCandidate --> Resolve["Resolve conflicts by priority"] Resolve --> Action["Pickup highest priority item"] NextRule --> End(["End"]) Action --> End ``` **Diagram sources** - [AutolootManager.cs](file://ClassicAssist.Shared/Data/Autoloot/AutolootManager.cs) - [AutolootEntry.cs](file://ClassicAssist.Shared/Data/Autoloot/AutolootEntry.cs) - [AutolootConstraintEntry.cs](file://ClassicAssist.Shared/Data/Autoloot/AutolootConstraintEntry.cs) - [AutolootOperator.cs](file://ClassicAssist.Shared/Data/Autoloot/AutolootOperator.cs) - [PropertyEntry.cs](file://ClassicAssist.Shared/Data/Autoloot/PropertyEntry.cs) - [PropertyType.cs](file://ClassicAssist.Shared/Data/Autoloot/PropertyType.cs) - [AutolootHelpers.cs](file://ClassicAssist.Shared/Data/Autoloot/AutolootHelpers.cs) ### Integration with Inventory Management and Pickup Automation - IncomingPacketHandlers routes relevant packets to the autoloot manager. - ContainerContentsPacket and DropItem represent item arrivals that trigger evaluation. - Item provides the property surface used by constraints. - The manager coordinates with the targeting system to perform pickups. ```mermaid sequenceDiagram participant Packet as "IncomingPacketHandlers" participant Event as "ContainerContentsPacket / DropItem" participant Manager as "AutolootManager" participant Item as "Item" participant Target as "Targeting System" Packet->>Event : "Dispatch packet" Event->>Manager : "OnItemArrival(item)" Manager->>Item : "Extract properties" Manager->>Manager : "Evaluate rules" alt "Match found" Manager->>Target : "Pickup(item)" else "No match" Manager-->>Packet : "No action" end ``` **Diagram sources** - [IncomingPacketHandlers.cs](file://ClassicAssist.Shared/UO/Network/IncomingPacketHandlers.cs) - [ContainerContentsPacket.cs](file://ClassicAssist.Shared/UO/Network/Packets/ContainerContentsPacket.cs) - [DropItem.cs](file://ClassicAssist.Shared/UO/Network/Packets/DropItem.cs) - [AutolootManager.cs](file://ClassicAssist.Shared/Data/Autoloot/AutolootManager.cs) - [Item.cs](file://ClassicAssist.Shared/UO/Objects/Item.cs) ### Examples of Complex Rules - Example 1: Pick up any gold with quantity greater than 100 and hue not equal to a specific exclusion hue. - Example 2: Pick up potions whose name contains “Healing” and weight less than or equal to a threshold. - Example 3: Pick up items whose cliloc matches a localized string and has a custom property flag set. - Example 4: Exclude items owned by other players and only pick up items dropped at current location. These examples illustrate combining multiple constraints, using operators like greater-than, contains, and equality, and applying logical grouping to refine behavior. [No sources needed since this section provides conceptual examples] ### Bulk Operations and Rule Testing - Bulk operations include enabling/disabling multiple rules, adjusting priorities, duplicating rules, and importing/exporting configurations. - Rule testing allows evaluating a rule against a selected item or a batch of items without executing pickups. Results indicate which constraints matched and why. **Section sources** - [AutolootViewModel.cs](file://ClassicAssist.Shared/UI/ViewModels/Agents/AutolootViewModel.cs) - [AutolootTabControl.axaml](file://ClassicAssist.Avalonia/Views/Agents/AutolootTabControl.axaml) ## Dependency Analysis - AutolootManager depends on AutolootEntry, AutolootConstraintEntry, AutolootOperator, PropertyEntry, PropertyType, and AutolootHelpers. - UI components depend on AutolootViewModel and related view models for property and cliloc selection. - Network integration depends on IncomingPacketHandlers and specific packet classes to feed item events into the manager. - Tests depend on the manager and rule models to assert correct evaluation and conflict resolution. ```mermaid graph LR VM["AutolootViewModel"] --> M["AutolootManager"] M --> E["AutolootEntry"] E --> C["AutolootConstraintEntry"] C --> O["AutolootOperator"] C --> P["PropertyEntry"] P --> PT["PropertyType"] M --> H["AutolootHelpers"] PH["IncomingPacketHandlers"] --> M CCP["ContainerContentsPacket"] --> PH DI["DropItem"] --> PH IT["Item"] --> M T["AutolootTests"] --> M ``` **Diagram sources** - [AutolootViewModel.cs](file://ClassicAssist.Shared/UI/ViewModels/Agents/AutolootViewModel.cs) - [AutolootManager.cs](file://ClassicAssist.Shared/Data/Autoloot/AutolootManager.cs) - [AutolootEntry.cs](file://ClassicAssist.Shared/Data/Autoloot/AutolootEntry.cs) - [AutolootConstraintEntry.cs](file://ClassicAssist.Shared/Data/Autoloot/AutolootConstraintEntry.cs) - [AutolootOperator.cs](file://ClassicAssist.Shared/Data/Autoloot/AutolootOperator.cs) - [PropertyEntry.cs](file://ClassicAssist.Shared/Data/Autoloot/PropertyEntry.cs) - [PropertyType.cs](file://ClassicAssist.Shared/Data/Autoloot/PropertyType.cs) - [AutolootHelpers.cs](file://ClassicAssist.Shared/Data/Autoloot/AutolootHelpers.cs) - [IncomingPacketHandlers.cs](file://ClassicAssist.Shared/UO/Network/IncomingPacketHandlers.cs) - [ContainerContentsPacket.cs](file://ClassicAssist.Shared/UO/Network/Packets/ContainerContentsPacket.cs) - [DropItem.cs](file://ClassicAssist.Shared/UO/Network/Packets/DropItem.cs) - [Item.cs](file://ClassicAssist.Shared/UO/Objects/Item.cs) - [AutolootTests.cs](file://ClassicAssist.Tests/Agents/AutolootTests.cs) **Section sources** - [AutolootViewModel.cs](file://ClassicAssist.Shared/UI/ViewModels/Agents/AutolootViewModel.cs) - [AutolootManager.cs](file://ClassicAssist.Shared/Data/Autoloot/AutolootManager.cs) - [IncomingPacketHandlers.cs](file://ClassicAssist.Shared/UO/Network/IncomingPacketHandlers.cs) - [AutolootTests.cs](file://ClassicAssist.Tests/Agents/AutolootTests.cs) ## Performance Considerations - Rule evaluation complexity scales with the number of active rules and constraints. Prefer fewer high-precision rules over many broad ones. - Normalize and cache frequently accessed properties where possible to avoid repeated conversions. - Use short-circuit evaluation in logical expressions to fail fast on non-matching constraints. - Limit heavy operations (like regex or deep string processing) to necessary cases; prefer exact matches when feasible. - Batch testing should avoid triggering actual pickups; use dry-run mode for large sets. - Monitor memory usage by avoiding retaining references to large item collections after evaluation. [No sources needed since this section provides general guidance] ## Troubleshooting Guide - No items picked up: Verify rules are enabled and have higher priority than conflicting rules. Check that constraints match actual item properties. - Wrong items picked up: Inspect operator choices and value types; ensure proper normalization and case sensitivity settings. - Performance issues: Reduce rule count, simplify constraints, and disable unused rules. - Conflicting rules: Adjust priorities so the most specific rule wins. Use exclusions to prevent unintended matches. - Testing discrepancies: Ensure test input items reflect real-world properties and formats. Validate cliloc selections and custom properties. **Section sources** - [AutolootTests.cs](file://ClassicAssist.Tests/Agents/AutolootTests.cs) - [AutolootViewModel.cs](file://ClassicAssist.Shared/UI/ViewModels/Agents/AutolootViewModel.cs) ## Conclusion The Autoloot agent provides a flexible, rule-driven system for automatic item pickup. By combining property-based constraints, operators, and logical grouping, users can craft precise behaviors while managing performance and conflicts through prioritization and testing tools. The UI facilitates rule creation and validation, and integration with packet handlers ensures timely evaluation upon item arrival. [No sources needed since this section summarizes without analyzing specific files] ## Appendices - Best practices: - Keep rules specific and ordered by priority. - Use exclusions to handle edge cases. - Regularly review and prune unused rules. - Leverage testing features before deploying changes. [No sources needed since this section provides general guidance]