Hey everyone,
With the recent new trigger action, it gave Gameplay Modifications more purpose than before.
However, we lack a proper way of splitting a string-value in a variable, which may be important in cases like this, where you may want to input a list of String (perhaps something like god-lowGravity-noPSI-grass-night.)
Note: I know you can test if a specific string-value given a String variable for the above example. However, this is just an scenario and is not applicable in a general where you cannot predict the input.
Here are the two trigger actions I proposed.
---
Set string value of variable 'A' to a part of string-value of variable 'A' ending with character 'B'
Example: After passing the variable containing String value 'noob-pro' to parameter A, and passing the value '-' to parameter B, the resulting string-value of variable should be 'noob'
Remove string-value from variable 'A' with string-value of variable 'B'
Example: After passing the variable containing String value 'noob-pro' to parameter A, and passing the variable containing String value 'noob' to parameter B, the resulting string-value of variable should be '-pro'.
(From there you can remove the seperator character '-')
In the situation where variable B contains character that variable A does not have, there could be two possible scenarios.
1. Throw an exception (error code) and stop the rest of the trigger execution.
2. Ignore the additional character and carry on with string deduction.
---
I believe these two trigger actions are addition to the ALE not only because it achieve the ability to split a string and store them into a list of variables [accomplishing a niche specific task], they also have their own generic purposes.
Best regards,
Nyove