zarqon
Well-known member
There remains no way of knowing in ASH whether or not you have non-item goals set, like autostops, choiceadvs, flyer ML, or insults. A method for checking if there are item goals exists, but requires a foreach over monsters or items.
Since goals can't easily fit into an existing ASH type (given special goals, wildcards, etc), my previous request of having all goals available in a function ran into a format roadblock. So I have a new approach. Instead I'd like to request a boolean function called goals_exist() or somesuch. This would simply return true if there are any goals set (including special goals).
For additional power and usefulness, it could have a string parameter, which would accept "item|choiceadv|insult|autostop|flyer ml" and allow us to easily check whether any goals are set of the specified type. This could speed some existing scripts up since they could check goals_exist("item") before foreaching items to figure out what those goals are. Likewise a mood script could check goals_exist("choiceadv") before deciding to take action to boost noncombats. The same mood script could boost combats in the Castle to benefit farmers, but only if there were no choiceadv goals. Currently, handling +/- combats intelligently in a mood script is impossible due to lack of this information.
Since the return value is a primitive type, and the burden is on the scripters to specify the correct string, I believe this overcomes the formatting problem my previous request had.
It would be a function I would immediately have uses for. Thank you for your consideration!
Since goals can't easily fit into an existing ASH type (given special goals, wildcards, etc), my previous request of having all goals available in a function ran into a format roadblock. So I have a new approach. Instead I'd like to request a boolean function called goals_exist() or somesuch. This would simply return true if there are any goals set (including special goals).
For additional power and usefulness, it could have a string parameter, which would accept "item|choiceadv|insult|autostop|flyer ml" and allow us to easily check whether any goals are set of the specified type. This could speed some existing scripts up since they could check goals_exist("item") before foreaching items to figure out what those goals are. Likewise a mood script could check goals_exist("choiceadv") before deciding to take action to boost noncombats. The same mood script could boost combats in the Castle to benefit farmers, but only if there were no choiceadv goals. Currently, handling +/- combats intelligently in a mood script is impossible due to lack of this information.
Since the return value is a primitive type, and the burden is on the scripters to specify the correct string, I believe this overcomes the formatting problem my previous request had.
It would be a function I would immediately have uses for. Thank you for your consideration!