Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Guacamole Programming Language #2

Open
AsherGlick opened this issue Aug 13, 2021 · 3 comments
Open

Guacamole Programming Language #2

AsherGlick opened this issue Aug 13, 2021 · 3 comments
Labels
discussion A discussion around a feature or fix enhancement New feature or request

Comments

@AsherGlick
Copy link
Owner

AsherGlick commented Aug 13, 2021

Guac will be an event-driven programing language used to control triggers in-game and representable in a taco marker file. It will probably be included as either a compiled AST and or a full text representation that gets compiled to an AST on load.

Maybe this is overkill, but it would allow the creation of more complex markers and guides such as Dungeon, Fractal, and Raid boss instructions.

Example Proposed Syntax

# The set of one or more triggers that would cause this action
triggers {
	player_enters_area()
	player_leaves_area()
	player_enters_radius()
	player_leaves_radius()
	timer_expires()
	timer_reaches_count(count)
	player_enters_combat()
	player_leaves_combat()
}

# The list of zero or more conditions that must all be true for this action to be executed
conditions {
	or (true(), false())
	not(false())
	and(true(), true())

	player_in_area("area_name")
	timer_has_not_reached("timer", count)
	timer_has_passed("timer", count)

	flag_value("flag_name", "value")

	true()
	false()
}

# A series of one or more actions to be executed in order if all the conditions are true
actions {
	set_ui_image("image_path")
	clear_ui_image()

	start_timer(length)
	pause_timer()
	clear_timer()

	show_area("area_name")
	hide_area("area_name")

	show_icon("icon_name")
	hide_icon("icon_name")

	show_path("path_name")
	hide_path("path_name")

	display_message("message") # Future

	set_flag("flag_name", "value")
}

This concept is inspired by the old Warcraft III trigger system but much more simplified and in text-form instead of a more complex GUI.

@AsherGlick AsherGlick added discussion A discussion around a feature or fix enhancement New feature or request labels Aug 13, 2021
@coderedart
Copy link
Contributor

I don't think it's a good idea to make a new DSL. Better to use existing plugin languages like lua and expose the functions required as a module. Also, would be better to coordinate such market format extensions with other overlays like blish to try to maintain compatibility where possible IMO.

@AsherGlick
Copy link
Owner Author

Lua was considered, but it comes with being a large and complex language with numerous safety issues to be cautions of. While all of them are surmountable, this design, as-is, is not turing complete and lends itself nicely to future iterations having a graphical interface for non-programmers.

If you champion this by implementing Lua integration in a safe manner then I would be happy to use it instead of a custom DSL.

This was referenced Aug 14, 2021
@AsherGlick
Copy link
Owner Author

adding player_enters_radius() and player_leaves_radius() stemming from conversation in #10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion A discussion around a feature or fix enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants