phylll / mychs-macro-magic

A simple, sane, and friendly little scripting language for your Roll20 macros.
MIT License
0 stars 0 forks source link

Simplify UX for combat defense #47

Closed phylll closed 2 years ago

phylll commented 2 years ago

Selecting the right token and defense script, at least for the GM, is still more of a hassle than necessary. With MMM 1.26+, a more seamless experience should be possible in which attack scripts would end with notifying the target's player and offering a tailored selection of available (and permissible, in terms of Midgard rules) defense options already tied to the target token.

Better flow:

phylll commented 2 years ago

Roll20 chat buttons with parameters are possible, with brackets HTML-encoded:

[PRESS](!mmm do myFunction("foo",1))

Encapsulating entire script or, perhaps more sensibly, customize blocks is also possible. This code ...

[DEFEND](!mmm customize
!mmm set cOwnID="Yorric MacRathgar"
!mmm end customize
%{MacroSheet|defense})

... produces this to be executed upon a click on the button:

!mmm customize
!mmm set cOwnID="Yorric MacRathgar"
!mmm end customize
%{MacroSheet|defense}
phylll commented 2 years ago

Closed via https://github.com/michael-buschbeck/mychs-macro-magic/pull/188