A downloadable asset pack

A Lightweight GML String Parser

Icoso is a powerful and flexible string parser for GameMaker Studio 2, designed to evaluate mathematical expressions, function calls, and variables within strings. It features a full recursive descent parser.

Created by 13eryllium Studios


icoso_parse(expression)

Evaluates a mathematical or functional expression string, supporting numbers, strings, operators, and function calls.

icoso_parse("2 + 2")  // Returns 4
icoso_parse("concat('hello', '2')")  // Returns "hello2"

icoso_reveal(internal_name, function_ref, args_count)

Registers a function to be used within ICOSO expressions.

function add(a, b) { return a + b; }
icoso_reveal("add", add, 2)

icoso_reveal_global(var_name, var_to_read)

Exposes a global variable to be read in ICOSO expressions.

global.health = 100
icoso_reveal_global("health", "global.health")

icoso_add_variable(var_name, expression)

Creates a variable that evaluates to an expression result.

icoso_add_variable("double_health", "health * 2")

Github

Published 3 days ago
StatusReleased
CategoryAssets
Author13eryllium Studios
TagsGameMaker

Download

Download
icoso.gml 9.8 kB

Leave a comment

Log in with itch.io to leave a comment.