View Full Version : Suggestion: Automation Code Auto-Fill
Hyperventilator
November 18th, 2020, 10:07
Instead of memorizing or constantly looking up exact syntax for automation, how about having an auto-fill / context-based list of key words appear dynamically when you're typing automation code?
Trenloe
November 18th, 2020, 10:10
Can you give a couple of examples?
I just feel that this might help with auto completing "at" to "ATK", but it won't help with the details of the effect syntax which come after...
Also, most rulesets will link directly to the FG Wiki effects page if you click the ? in the top right of the Effects/Conditions window - means you don't have to memorize everything! :)
Hyperventilator
November 18th, 2020, 10:51
Can you give a couple of examples?
I just feel that this might help with auto completing "at" to "ATK", but it won't help with the details of the effect syntax which come after...
Also, most rulesets will link directly to the FG Wiki effects page if you click the ? in the top right of the Effects/Conditions window - means you don't have to memorize everything! :)
Having the app suggest ATK to me would be helpful, so I don't have to remember whether it was atk, ATK, Attack, attack, ATTACK, or if the upper case / lower case even matters. Something like GRANTADVATK is even harder to get right without looking it up.
And what comes after that? Right now, I couldn't tell off the top of my head if it was a colon or a semicolon. Maybe neither. I'd have to check the documentation (just checked, it's a colon).
How do I type fire resistance? If I'd start typing "fir" perhaps the auto-fill could suggest both RESIST:fire and IMMUNE: fire
Perhaps, down the line, this could lead to new innovations, like drag & droppable keywords, or pre-made code structures with keywords in dropdown menus and modifiers typed into small, separate text fields (like in Google Analytics' Segment builder).
Having documentation is great. Having to leave the app, scroll through, re-read, and cross-reference the docs whenever I try to automate even the simplest thing can get a bit tedious.
However, the biggest benefit in my opinion, would be a more contemporary, streamlined user experience. It's no secret that Fantasy Grounds has a somewhat outdated UI and UX which competitors like Foundry are quickly taking advantage of. Fantasy Grounds still has the upper hand in automation, so I'd love to see that feature get some more attention.
LordEntrails
November 18th, 2020, 18:13
Please put enhancement requests on the Wish List; https://fg2app.idea.informer.com/
If they need detail discussion, then start a thread on the forums and link the Wish List item and the thread to each other.
Trenloe
November 18th, 2020, 18:25
How do I type fire resistance? If I'd start typing "fir" perhaps the auto-fill could suggest both RESIST:fire and IMMUNE: fire
Interesting idea. I can see where you're coming from.
However, from an FG perspective - "fire" could be used in so many different effects (exact number will depend on the ruleset - at least 10 in PF2) so I'm thinking how the code would be done, how it would be displayed and if in practice it could provide reliable and intelligible usage. Don't get me wrong, it's a good idea and could have some merit - just depends on how efficiently it could be implemented. I know I wouldn't want to code it! ;)
damned
November 18th, 2020, 20:55
I think that there is an opportunity for an Effects builder - a GUI interface that presents the various options available in that ruleset.
Not a trivial task but I think its do-able.
LordEntrails
November 18th, 2020, 23:02
I think that there is an opportunity for an Effects builder - a GUI interface that presents the various options available in that ruleset.
Not a trivial task but I think its do-able.
Didn't somebody (Celestian?) already do that somewhere (2E)?
Hyperventilator
November 19th, 2020, 14:09
Interesting idea. I can see where you're coming from.
However, from an FG perspective - "fire" could be used in so many different effects (exact number will depend on the ruleset - at least 10 in PF2) so I'm thinking how the code would be done, how it would be displayed and if in practice it could provide reliable and intelligible usage. Don't get me wrong, it's a good idea and could have some merit - just depends on how efficiently it could be implemented. I know I wouldn't want to code it! ;)
You know how some IDEs/code editors suggest a whole list of keywords/methods based on what you've already typed? That would be one way to do it.
Here's an example from MS Excel's VBA code editor: 41306
Trenloe
November 19th, 2020, 14:44
You know how some IDEs/code editors suggest a whole list of keywords/methods based on what you've already typed? That would be one way to do it.
Here's an example from MS Excel's VBA code editor: 41306
This is based off starting to type something that is the beginning of an object name that would be inserted at exactly that point in the code. This is much simpler to use and implement than the "start typing fire" example that you provided above - "fire" is not at the beginning of the code like these object names are, for example, and could also be used in so many different ways - it could be part of the RESIST effect, it could also be an exception to a RESIST effect (just one basic example). I'm sure it's possible (at least to the 80/20 level of covering possible options), but it's not a simple task and would be pretty much custom for every single ruleset and, as I mentioned, I'd be interested in seeing whoever does this (if someone does) what they come up with that provides something intelligible and usable - because even with matching stuff being typed the options are still going to be code type stuff and would still need things to be added - like the level of fire resistance, for example...
Like I said - interesting, but very complex to implement and maintain and provide a usable interface. That doesn't mean it shouldn't be done. But it's very complex and involved. As has been mentioned there was an attempt made on a GUI effects builder that didn't get into mainstream use, because it's not a simple process to implement something that provides a significant improvement over what we have now.
Hyperventilator
November 19th, 2020, 18:25
This is based off starting to type something that is the beginning of an object name that would be inserted at exactly that point in the code. This is much simpler to use and implement than the "start typing fire" example that you provided above - "fire" is not at the beginning of the code like these object names are, for example, and could also be used in so many different ways - it could be part of the RESIST effect, it could also be an exception to a RESIST effect (just one basic example). I'm sure it's possible (at least to the 80/20 level of covering possible options), but it's not a simple task and would be pretty much custom for every single ruleset and, as I mentioned, I'd be interested in seeing whoever does this (if someone does) what they come up with that provides something intelligible and usable - because even with matching stuff being typed the options are still going to be code type stuff and would still need things to be added - like the level of fire resistance, for example...
Like I said - interesting, but very complex to implement and maintain and provide a usable interface. That doesn't mean it shouldn't be done. But it's very complex and involved. As has been mentioned there was an attempt made on a GUI effects builder that didn't get into mainstream use, because it's not a simple process to implement something that provides a significant improvement over what we have now.
Sorry, for some reason I thought you were looking for a UI solution.
As for how the "fire" example would actually work, I don't know. I'd imagine that by the press of a key combination (e.g. ctrl+space) what the user has typed so far would be stored inside a variable. The variable would then be used as a parameter in a "contains" method which, in turn, would be used inside a keyword database loop that would place matching keywords into an array. The contents of the array would be presented to the user.
Yes, my understanding of programming is very limited, and I'm sure I'm overlooking many obvious issues here.
bmos
November 19th, 2020, 18:40
Didn't somebody (Celestian?) already do that somewhere (2E)?Celestian, yes.
In this extension (https://www.fantasygrounds.com/forums/showthread.php?40833-5E-Advanced-Effects-(items-npcs-characters))(and originally from 2E as you say).
Trenloe
November 19th, 2020, 19:01
Sorry, for some reason I thought you were looking for a UI solution.
I'm not looking for any particular solution, I'm just acting as a sounding board. You'd need some UI involvement - there's no way you could do anything like this with anything other than super, super basic functionality without some UI portion.
As for how the "fire" example would actually work, I don't know. I'd imagine that by the press of a key combination (e.g. ctrl+space) what the user has typed so far would be stored inside a variable. The variable would then be used as a parameter in a "contains" method which, in turn, would be used inside a keyword database loop that would place matching keywords into an array. The contents of the array would be presented to the user.
Yes, my understanding of programming is very limited, and I'm sure I'm overlooking many obvious issues here.
I'm not saying it can't be done. What I'm saying is that it isn't simple and can get pretty complex. And would need to be customised for each individual ruleset.
Anyway, as I wont be developing anything like this anytime soon, I'll drop out and leave any further discussion to those who might want to take this on.
Trenloe
November 19th, 2020, 19:04
Celestian, yes.
In this extension (https://www.fantasygrounds.com/forums/showthread.php?40833-5E-Advanced-Effects-(items-npcs-characters))(and originally from 2E as you say).
That's really expanding on effects and making them available in other places - it's a very cool extension, but it's not really a way of helping a user who isn't familiar with effects to build them from scratch.
I believe this is the Effect Wizard eluded to earlier in the thread: https://www.fantasygrounds.com/forums/showthread.php?35301-New-Extensions-Effect-Wizard-for-v3-2-x
celestian
November 19th, 2020, 19:27
That's really expanding on effects and making them available in other places - it's a very cool extension, but it's not really a way of helping a user who isn't familiar with effects to build them from scratch.
Actually what they are probably referring to is that is does give you the ability to add effects using selection boxes. Which, is at least partially what this thread is about.
https://i.imgur.com/pPdKnFc.gif
Trenloe
November 19th, 2020, 19:29
Actually what they are probably referring to is that is does give you the ability to add effects using selection boxes. Which, is at least partially what this thread is about.
Thanks for the info. Sorry for underestimating the functionality of your extension! :)
Powered by vBulletin® Version 4.2.1 Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.