#skill-tree #capstone #expansion #complexity #configuration-complexity

capability-grower-configuration

A Rust crate to configure skill tree growth with capabilities for complexity management, tree expansion policies, capstone node handling, and error management

1 unstable release

Uses new Rust 2024

0.1.0 Jul 13, 2025

#3 in #skill-tree

Download history 30/week @ 2025-09-18 42/week @ 2025-09-25 22/week @ 2025-10-02 18/week @ 2025-10-09 80/week @ 2025-10-16 45/week @ 2025-10-23 37/week @ 2025-10-30 26/week @ 2025-11-06 22/week @ 2025-11-13 27/week @ 2025-11-20 30/week @ 2025-11-27 25/week @ 2025-12-04 23/week @ 2025-12-11 30/week @ 2025-12-18 22/week @ 2025-12-25 24/week @ 2026-01-01

106 downloads per month
Used in 14 crates (9 directly)

GPL-3.0-only

260KB
5K SLoC

capability-grower-configuration

The capability-grower-configuration crate provides a versatile system for configuring the growth and expansion policies of skill trees. This is particularly useful for applications involving hierarchical layouts of skills, abilities, or knowledge concepts. The crate essentially allows the user to describe how a skill tree ought to be expanded and sorted, featuring granular configurability options and error handling mechanisms.

Features

  • Capstone Nodes: Control the generation of capstone nodes using CapstoneMode, which can be Off, Single, or Probabilistic.
  • Complexity Management: Set the desired tree complexity via ConfigurationComplexity to handle simple to complex configurations.
  • Tree Expansion Policies: Choose from multiple tree expansion strategies including Simple, Weighted, DepthBased, AlwaysAggregate, and custom scripting support.
  • Level-Specific Configuration: Specify overrides for tree level breadth and density.
  • Ordering Policies: Control the sorting of sub-branches with various SubBranchOrdering options.

Structs & Enums

  • CapstoneMode: Determines how capstone nodes are handled, ranging from none to probabilistic modes.
  • ConfigurationComplexity: Manages complexity versus usability, offering Simple, Balanced, and Complex variants.
  • TreeExpansionPolicy: Indicates strategy for node type selection in tree growth.
  • WeightedNodeVariantPolicy: Uses weights for random node variant selection.

Configuration & Errors

The crate provides structures for error handling, such as GrowerTreeConfigurationError for validating configurations. Errors include validation constraints like depth, breadth, or density violations.

Usage

The configuration allows for complex tree-structural settings, aiding in dynamic layout generation for various application domains. Utilize the builder pattern to craft configurations and leverage the rich suite of validation functions to ensure correctness.

Example

use capability_grower_configuration::{GrowerTreeConfiguration, CapstoneMode};

let config = GrowerTreeConfiguration::base_config(3, 5, 2)
    .with_level_specific(vec![3, 4, 5], vec![2, 2, 2])
    .with_capstone(CapstoneMode::Single, 0.1);

// Validate and utilize configuration
match config.validate() {
    Ok(_) => println!("Configuration is valid."),
    Err(e) => println!("Configuration error: {:?}", e),
}

Note: This README.md was generated by an AI model and may not be 100% accurate, however, it should be pretty good.

Dependencies

~48–91MB
~1.5M SLoC