More Intelligent Macros (Macro QoL) #28
jumpsplat120
started this conversation in
Bugs / Features / Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Macros are neat, but limited in scope, which makes them only usable in minimal situations. This is sort of a collation of a few different ideas I have for macros that I think would increase their functionality.
{0}, you'd instead do${0}. This would differentiate the replacement from regular paired brackets, which are pretty much always used in hackmud, and therefore always need escaping.#up my_script public shift, for example. It also means I can't macromy_script { arg:true }. but instead must macromy_user.my_script { arg:true }. These restrictions seem wholly unnecessary, and only limit the power of a macro./my_macro += my_user.my_script { arg:true }. The+=syntax should be familiar to script writers, and so should be relatively easy to understand and use for players./vol = gui.vol { bgm:${0=5}, sfx:${1=${0=5}} }. If I ran/vol, it sets both parameters to 5, and if I ran/vol 10, it'd set both to 10. If I run/vol 0 10, then it sets the background music to 0, and the sound effects to 10. Being able to set the value of 1 match as the value of another could be really powerful./macro my_user.my_script { arg1:${0="foo"}, arg2:${1="bar"}, arg3:${2="baz"}, arg4:${3="quux"} }and I want to set justarg4, I'm forced to also set args 1, 2, and 3. I can't use the default values, which means I have to type them in manually, which makes them useless. While I could change the order of the matches to have the most likely one be 0, and the second most likely be 1 and so on, this is still not helpful if there's no clear "most likely" to have first (and changing the order can be confusing as well, if you interpret your k/v pairs always in the same order). Instead, having the ability to name a pattern;/macro = my_user.my_script { my_long_arg_name:${long="foo"}, other_arg:${other="bar"} }, to be called like/macro other="baz". They can also be used in conjunction with indexed patterns, where/macro "foo" arg=1 "bar"would set 0 to"foo"and 1 to"bar", and arg to1. Effectively, each unnamed value passed gets sent to it's corresponding numerical pattern.I know that's a lot of stuff; it's my thoughts over nearly the entire time I've been playing! Even if you could only do 1 or 2 of these, I still think there'd be a lot of value in them. Thanks for taking the time to read the request!
Beta Was this translation helpful? Give feedback.
All reactions