Command Parameter Parsing Tool
Blueprint Console Command Parser - Usage Guide
Overview
BlueprintConsoleCommandParser is a powerful parameter parsing utility that helps you easily parse and convert console command parameters into various data types.
Features
✅ Multiple Data Type Support: Int, Float, Bool, String, Vector, Rotator ✅ Smart Type Conversion: Automatic validation and type conversion ✅ Named Parameters: Support for key=value format ✅ Quote Support: Properly handles strings with spaces ✅ Default Values: All functions support default values ✅ Batch Parsing: Parse multiple parameters at once
Basic Usage
1. Parse Single Parameter
Get String Parameter
Blueprint Node Flow:
Parameters (String) → Get Parameter (Index: 0) → Result (String)
Example:
Input: "hello world test"
Index: 0 → "hello"
Index: 1 → "world"
Index: 2 → "test"Get Integer Parameter
Parameters → Get Parameter As Int (Index: 0, Default: 0) → Result (Int)
Example:
Input: "123 456 789"
Index: 0 → 123
Index: 1 → 456
Index: 2 → 789Get Float Parameter
Parameters → Get Parameter As Float (Index: 0, Default: 0.0) → Result (Float)
Example:
Input: "3.14 2.5 100.5"
Index: 0 → 3.14
Index: 1 → 2.5
Index: 2 → 100.5Get Boolean Parameter
Parameters → Get Parameter As Bool (Index: 0, Default: false) → Result (Bool)
Supported Formats:
true/false → True/False
1/0 → True/False
yes/no → True/False
on/off → True/False
Example:
Input: "true yes 1 on"
Index: 0 → true
Index: 1 → true
Index: 2 → true
Index: 3 → trueAdvanced Usage
2. Parse Vectors and Rotators
Vector - Comma Separated Format
Parameters → Get Parameter As Vector (Start Index: 0) → Result (Vector)
Example:
Input: "100,200,300"
Result: Vector(100, 200, 300)Vector - Space Separated Format
Example:
Input: "100 200 300"
Result: Vector(100, 200, 300)Rotator
Parameters → Get Parameter As Rotator (Start Index: 0) → Result (Rotator)
Example:
Input: "90,45,0"
Result: Rotator(Pitch=90, Yaw=45, Roll=0)
Input: "90 45 0"
Result: Rotator(Pitch=90, Yaw=45, Roll=0)3. Batch Parsing
Get All Integer Parameters
Parameters → Get All Parameters As Int → Result (Array<Int>)
Example:
Input: "10 20 30 40 50"
Result: [10, 20, 30, 40, 50]Get All Float Parameters
Parameters → Get All Parameters As Float → Result (Array<Float>)
Example:
Input: "1.5 2.5 3.5"
Result: [1.5, 2.5, 3.5]4. Named Parameters
Parse Named Parameters
Parameters → Parse Named Parameters → Result (Map<String, String>)
Example:
Input: "name=Player health=100 speed=5.5 active=true"
Result:
{
"name": "Player",
"health": "100",
"speed": "5.5",
"active": "true"
}Get Named Parameter Value
Named Parameters → Get Named Parameter (Key: "name") → Result (String)
Example:
Input Parameters: name=Player health=100
Key: "name" → "Player"
Key: "health" → "100"Get Named Parameter as Integer
Named Parameters → Get Named Parameter As Int (Key: "health", Default: 100) → Result (Int)
Example:
Input Parameters: health=150 level=5
Key: "health" → 150
Key: "level" → 5Complete Blueprint Examples
Example 1: Teleport Player Command
Command Format: teleport x y z
Example: teleport 100 200 300
Blueprint Flow:
[Event] Callback_BPCommandSystem (Parameters)
↓
[Get Parameter As Vector] (Parameters, Start Index: 0)
↓
[Get Player Character]
↓
[Set Actor Location] (Target: Player, New Location: Vector)Example 2: Set Player Properties Command
Command Format: setprop health=100 speed=5.5 name="John Doe"
Example: setprop health=150 speed=6.0 name=Player1
Blueprint Flow:
[Event] Callback_BPCommandSystem (Parameters)
↓
[Parse Named Parameters] (Parameters)
↓
├─ [Get Named Parameter As Int] (Key: "health") → Set Health
├─ [Get Named Parameter As Float] (Key: "speed") → Set Speed
└─ [Get Named Parameter] (Key: "name") → Set NameExample 3: Spawn Item Command
Command Format: spawn item_name count x y z
Example: spawn Sword 5 100 200 300
Blueprint Flow:
[Event] Callback_BPCommandSystem (Parameters)
↓
├─ [Get Parameter] (Index: 0) → Item Name (String)
├─ [Get Parameter As Int] (Index: 1, Default: 1) → Count (Int)
└─ [Get Parameter As Vector] (Start Index: 2) → Location (Vector)
↓
[Spawn Item] (Item Name, Count, Location)Example 4: Multiple Parameter Validation
Command Format: 111 10 20 30 40 50
Process multiple integer parameters
Blueprint Flow:
[Event] Callback_BPCommandSystem (CommandName: "111", Parameters)
↓
[Get All Parameters As Int] (Parameters)
↓
[For Each Loop]
↓
[Print String] (Array Element)
Result: Prints 10, 20, 30, 40, 50 in sequenceUtility Functions
Parameter Count
Get Parameter Count (Parameters) → Count (Int)
Example:
Input: "one two three"
Result: 3Split Parameters
Split Parameters (Parameters, Delimiter: " ") → Array (Array<String>)
Example:
Input: "param1 param2 param3"
Result: ["param1", "param2", "param3"]Remove Quotes
Remove Quotes (Parameter) → Result (String)
Example:
Input: '"Hello World"'
Result: "Hello World"Validation Functions
Is Valid Int (Parameter) → Result (Bool)
Is Valid Float (Parameter) → Result (Bool)
Is Valid Bool (Parameter) → Result (Bool)
Examples:
"123" → IsValidInt = true
"abc" → IsValidInt = false
"3.14" → IsValidFloat = true
"true" → IsValidBool = trueError Handling
All parsing functions support default values. When parameters are invalid or don't exist, the default value is returned:
Get Parameter As Int (Index: 999, Default: -1) → -1
Get Parameter As Float (Index: 999, Default: 0.0) → 0.0
Get Parameter As Bool (Index: 999, Default: false) → falsePerformance Optimization Tips
Cache Parsed Results: If you need to use the same parameter multiple times, parse and store it
Use Batch Functions: When you need all parameters, use
Get All Parameters As Int/FloatValidate Parameters: Use
Is Validfunctions to validate before parsing
Common Use Cases
Scenario 1: GM Command - Give Item
Command: giveitem ItemID Count
Console: giveitem 1001 50
Blueprint:
- Get Parameter As Int (Index: 0) → Item ID
- Get Parameter As Int (Index: 1, Default: 1) → Count
- GiveItem(ItemID, Count)Scenario 2: Debug Command - Set Time
Command: settime hour minute
Console: settime 12 30
Blueprint:
- Get Parameter As Int (Index: 0, Default: 12) → Hour
- Get Parameter As Int (Index: 1, Default: 0) → Minute
- SetTime(Hour, Minute)Scenario 3: Test Command - Batch Spawn
Command: spawnmultiple count x,y,z
Console: spawnmultiple 10 100,200,300
Blueprint:
- Get Parameter As Int (Index: 0) → Count
- Get Parameter As Vector (Start Index: 1) → Location
- For Loop (Count times) → SpawnActor(Location)API Quick Reference
Get Parameter
Index, Default
String
Get string parameter
Get Parameter As Int
Index, Default
Int
Get integer parameter
Get Parameter As Float
Index, Default
Float
Get float parameter
Get Parameter As Bool
Index, Default
Bool
Get boolean parameter
Get Parameter As Vector
Start Index, Default
Vector
Get vector parameter
Get Parameter As Rotator
Start Index, Default
Rotator
Get rotator parameter
Get All Parameters As Int
-
Array
Get all integers
Get All Parameters As Float
-
Array
Get all floats
Parse Named Parameters
-
Map<String,String>
Parse named parameters
Get Named Parameter
Key, Default
String
Get named parameter value
Split Parameters
Delimiter
Array
Split parameters
Get Parameter Count
-
Int
Get parameter count
Summary
Using BlueprintConsoleCommandParser allows you to:
✅ Greatly simplify parameter parsing code ✅ Automatically handle type conversion ✅ Support complex parameter formats ✅ Provide comprehensive error handling ✅ Improve development efficiency and code readability
Now you can focus on implementing command logic instead of dealing with tedious string parsing! 🎉
Last updated