STRINGWrangler
Introduction
String Wrangler is a lightweight but powerful editor plugin for the Godot Engine that helps you eliminate string-related bugs by turning plain String and Array[String] properties into dropdowns in the Inspector.
In many systems — like ability tools, attribute components, registries, item databases, and gameplay logic — it's common to reference dynamic data using string names. These strings are often stored in exported variables, dictionaries, or custom resources and accessed with lookup functions like getbyname("Speed") or data["Health"].
But plain strings are fragile. They’re easy to mistype, hard to refactor, and prone to silent failures.
✅ String Wrangler solves this
Using variable prefixing, String Wrangler detects your string-based fields and replaces them with dropdowns populated from your own datasets — such as:
- Registry resources
- Arrays inside custom resources
- Script-exposed functions or variables
The result is a typo-free, self-documenting, editor-integrated selection tool for any string-referenced system.
Use Cases
String Wrangler is ideal for systems that cannot use Enums due to dynamic data. Or extremely large data sets. While Enums work well for fixed constants, this plugin excels when your data is:
- Defined in resources, not code
- Grows or changes during development
- Lives in registries or configuration assets
- Driven by content creators, not programmers
Common Uses
- Attributes (e.g., "Health", "Stamina")
- Effects and modifiers
- Inventory items and crafting parts
- Gameplay tag references
- Ability targeting or lookup systems
- Dynamic dictionaries and tables
Features
- ✅ Dropdowns for String/Array[String] fields
- 🔁 Supports duplicates if needed
- 📦 Handles raw arrays, script calls, or property bindings
- 🧠 Editor-friendly: no runtime cost
- ⚙️ Prefix-based mapping with full UI panel for configuration
- 🧱 Modular and non-intrusive – use only where you need it
How It Works
Add a variable to your script using a prefix, e.g.:
@export var SWSamp_tags: Array[String] = []Register the prefix in the built-in String Wrangler Prefix Editor, including:
- A label (e.g., "Sample Tags")
- A dataset (via raw list, script function, or variable)
- Whether duplicates are allowed
- Whether a “None” option is shown
The plugin automatically replaces any matching
StringorArray[String]field with a dropdown using your configuration.
No more mistyped names. No more manual typing. Just click and go.
UI & Editor Integration
String Wrangler includes a dedicated Prefix Configuration Panel accessible from the Godot Editor. From here, you can:
- Add, edit, or remove prefix handlers
- Connect a prefix to a dataset (resource, function, or variable)
- Configure duplicate behavior and display options
- Instantly see changes reflected in your Inspector
Requirements
- Godot 4.4+ tested in 4.5.beta3
- Works with all projects and platforms
- Purely editor-side — no runtime performance impact
License
MIT License. Free for commercial and non-commercial use.
Changelog for version v4.4-godot
No changelog provided for this version.