Items Module
The items module defines items, weapons, tools, and consumables.
Base Item
Weapon
Tool
Consumable
- class simulation_framework.src.items.consumable.Consumable(**kwargs)[source]
Bases:
Item
- classmethod create_food(name: str = 'Bread') Consumable [source]
- classmethod create_health_potion() Consumable [source]
- classmethod create_magic_potion() Consumable [source]
- classmethod create_poison() Consumable [source]
- classmethod create_stamina_potion() Consumable [source]
- classmethod create_strength_elixir() Consumable [source]
Loot Table
- class simulation_framework.src.items.loot_table.LootEntry(item: Item, probability: float, min_quantity: int = 1, max_quantity: int = 1)[source]
Bases:
object
Starting Equipment
Starting equipment helper functions for agents. Provides appropriate tools and items based on agent goals and character class.
- simulation_framework.src.items.starting_equipment.create_basic_tool_set() List[Tool] [source]
Create a basic set of tools for testing.
- Returns:
List containing one of each basic tool type
- simulation_framework.src.items.starting_equipment.equip_agent_for_task(agent: Agent, task: str) bool [source]
Equip an agent with the appropriate tool for a specific task.
- Parameters:
agent – The agent to equip
task – The task type (e.g., “woodcutting”, “mining”, “fishing”)
- Returns:
True if the agent was successfully equipped, False otherwise
- simulation_framework.src.items.starting_equipment.get_class_equipment(class_name: str) List[Item] [source]
Get starting equipment based on character class.
- Parameters:
class_name – Name of the character class
- Returns:
List of starting items for the class