Input & Macrolink, is it possible?

Discuss macro implementations, ask for macro help (to share your creations, see User Creations, probably either Campaign Frameworks or Drop-in Resources).

Moderators: dorpond, trevor, Azhrei, giliath, jay, Mr.Ice

Post Reply
Adurna
Cave Troll
Posts: 34
Joined: Thu Jul 07, 2016 7:45 am

Input & Macrolink, is it possible?

Post by Adurna »

Hi!

It's me again. As you might have gathered from my previous thread I'm doing a series of macros for one of my players. His class has polymorph at will so he chose something like two dozen forms to transform into.

So far I managed to create a macro that makes his token change properties, image and size depending on the form. However, this is going to be a bit cumbersome, because in addition to these macros we'll probably have different macros for the attacks.
Spoiler
[I couldn't think of a way to design a macro that will know by itself whether to add full or half strenght bonus to damage, so we'll probably end up with at least one or two macros per form, which will become a bit much]
That's why I decided to move all the forms macros onto a lib token and use Macrolink to call for the macro. I wanted to combine this with the input function but I have a problem.

I don't know how to tell the macro to use the input result as the name of the macro to call. I've tried brackets, quotes, and everything I could thing of to make it work (which isn't much, but still). I think that an eval() might make it work but I'm unsure as to how to write that. When I tried the macro broke up.

Code: Select all

[H: input("Form | Advespa , Asperi , Barbazu , Bezekira , BladeragerTroll , BlueSlaad , Cloaker , Digester , EightHeadedHydra , Firre , Folugub , Girallon , Lupinal , MindFlayer , Nightmare , Palrethee , Ravid , Remorhaz , RustMonster , Succubus , Tojanida , Treant , UmberHulk , WardenArchon , WhiteDragon , WinterWolf , Wyvern | Pick a name | RADIO | orient=v value=string")] 



[r: macroLink("Click on me!", "Form@Lib:Poly", "self", "count=6", "selected")]
It's pretty straightforward, I patched it up from the examples I found on the wiki, but I still have problems when I need to change something with a variable.

User avatar
wolph42
Winter Wolph
Posts: 9999
Joined: Fri Mar 20, 2009 5:40 am
Location: Netherlands
Contact:

Re: Input & Macrolink, is it possible?

Post by wolph42 »

not sure whether you know this, but polymorph or 'disguise' macros have already been made. Aliasmask created some macros for that and I improved them and inserted them into the BoT. You can use either.

to answer your question:

Code: Select all

[r: macroLink("Click on me!", Form+"@Lib:Poly", "self", "count=6", "selected")] 
note that if you want more input then just the radio button you can use multiple lines in the input:

Code: Select all

[h:abort(input("x|0|give me x","y|0|give me y","z|0|give me z"))] 

Adurna
Cave Troll
Posts: 34
Joined: Thu Jul 07, 2016 7:45 am

Re: Input & Macrolink, is it possible?

Post by Adurna »

Thank you! :D :D :D


I did see the those macros, but I'm a bit more comfortable with my own. With no coding experience I get by by trial and error with the help of the wiki and the forums, which means that once I create a macro I have enough understanding to modify it and play around with it; knowing more or less what's what. Unless I get a few snags and I need to ask for help. But then you've all been very kind to help me out so :P

I'm using a bit of downloaded tools, but those are trickier and most I still haven't figured out why they work, so it'd be a bit harder to merge with my system.

As for the second part, I'm not sure what you mean?

Post Reply

Return to “Macros”