Pattern Creation Guide

This guide explains how to create custom gathering patterns for the Fuzzy Macro.


What are Patterns?

Patterns define the movement your character performs while gathering in fields. They determine how efficiently you collect pollen from flowers. Patterns are Python scripts located in settings/patterns/.

When gathering is active, the macro:

  1. Navigates to your selected field

  2. Positions at the start location

  3. Executes your pattern repeatedly

  4. Collects pollen while moving


Pattern File Structure

Patterns are .py files that execute within the macro's gather function context. Basic structure:

# Size conversion (standard for all patterns)
if sizeword.lower() == "xs":
    size = 0.5
elif sizeword.lower() == "s":
    size = 1
elif sizeword.lower() == "l":
    size = 2
elif sizeword. lower() == "xl":
    size = 2.5
else:
    size = 1.5  # Default:  M

# Pattern movement logic
self.keyboard.walk(tcfbkey, 0.5 * size)
for _ in range(width):
    self.keyboard.walk(tclrkey, 0.17)
    self.keyboard.walk(afcfbkey, 0.5 * size)

File Naming:

  • Use lowercase with underscores: my_pattern.py

  • Avoid spaces or special characters

  • Name should be descriptive: zigzag_tight.py, circle_large.py


Available Variables

When your pattern executes, these variables are available in the namespace:

Movement Keys

Why use inverted keys?

  • Using tcfbkey instead of fwdkey respects user's "Invert Forward/Back" setting

  • Using tclrkey instead of leftkey respects user's "Invert Left/Right" setting

  • This makes your pattern work correctly regardless of user preferences

Camera Controls

Pattern Settings

Macro Methods

Walk Method Details:


Pattern Examples

Example 1: Simple E Pattern (e_lol. py)

This pattern traces an "E" shape, ideal for rectangular fields.

How it works:

  1. Moves back slightly to position

  2. Walks right to form top of "E"

  3. Zigzags down and back to form top section

  4. Walks right to form middle of "E"

  5. Zigzags down and back to form bottom section


Example 2: Bambe Pattern (bambe.py)

A complex pattern with tight movements, good for dense fields.

How it works:

  1. Positions character at specific start point

  2. Performs serpentine pattern moving left

  3. Performs serpentine pattern moving right

  4. Repeats for each width increment


Example 3: Bowl Pattern with Camera Rotation (bowl.py)

Advanced pattern using camera rotation and diagonal movements.

Advanced features:

  • Camera rotation to change perspective

  • Diagonal walking with multiWalk()

  • Digital Bee compatibility with sleep delays

  • Custom drift compensation

  • Complex multi-directional sweeps


Best Practices

1. Always Include Size Handling

Every pattern must convert the size setting:

You can customize the multipliers for your pattern's needs:

2. Scale All Movements by Size

3. Use Width for Repetitions

4. Use Inverted Keys for Pattern Logic

5. Test Multiple Sizes

Always test your pattern with different size settings:

  • XS: Very tight, small areas

  • S: Small fields or dense gathering

  • M: Default, balanced coverage

  • L: Large fields, spread out

  • XL: Very large fields, maximum coverage

6. Add Clear Comments

7. Handle Special Cases

8. Keep Patterns Efficient

9. Consider Field Coverage

Good patterns should:

  • Cover most of the field area

  • Avoid revisiting the same spots too much

  • Work in fields of different shapes

  • Adapt to size/width settings

10. Document Pattern Behavior

Add a header comment explaining your pattern:


Testing & Debugging

Testing Patterns

1. Enable a Test Field

In the macro GUI:

  • Select a field to use your pattern

  • Set gathering time to 1-2 minutes (quick tests)

  • Enable only that field

  • Disable other tasks

2. Watch the Pattern Execute

  • Start the macro

  • Observe if the pattern covers the field well

  • Look for:

    • Missed areas

    • Overlapping paths

    • Drift over time

    • Getting stuck

3. Adjust Size Scaling

If pattern is too large/small, adjust size multipliers:

4. Test All Size Settings

Test each size from the GUI:

5. Test All Width Settings

Test width values 1-8:

Check Pattern Output

View Logs

Pattern errors appear in:

  • Terminal/console output

  • Discord webhook (if enabled): "Incompatible pattern"

Common Errors

Debug with Print Statements

Test in Different Fields

Your pattern should work reasonably well in:

  • Small fields (Sunflower, Dandelion, Mushroom)

  • Medium fields (Blue Flower, Bamboo, Rose)

  • Large fields (Pepper, Pumpkin, Cactus)

Record and Review

  • Enable screen recording in macro settings

  • Record a full pattern cycle

  • Review footage to identify issues

  • Make adjustments based on observations


Converting AHK Patterns

The macro includes an automatic AHK-to-Python converter for Natro Macro patterns.

Automatic Conversion

Place .ahk pattern files in settings/patterns/. On macro startup:

circle-exclamation

Not all AHK patterns can be converted properly, manual conversion may be needed to fix some bugs.

Manual Conversion

If automatic conversion fails, convert manually using these equivalents:

Basic Movement

AHK:

Python:

Loops

AHK:

Python:

Natro's nm_Walk Function

AHK:

Python:

Common Replacements

AHK
Python

reps

width

a_index

i

&&

and

`

; (comment)

# (comment)

:=

=

sqrt

math.sqrt

Sleep 500

sleep(0.5)

Full Conversion Example

Before (AHK):

After (Python):

Better (Python with proper keys):


Additional Resources


Contributing Patterns

If you create useful patterns:

  1. Test thoroughly across different fields and scenarios

  2. Add clear comments explaining the pattern logic

  3. Include size handling and width support

  4. Test all size/width combinations

  5. Share in Discord community

  6. Consider submitting a PR to the repository

Pattern Template


Credits


Happy pattern making! 🐝

Last updated