Mar 21, 2019, 6:13 PM

Greetings coders. After a fifteen year hiatus I've been plugging away at someone's project with pretty good success.

Working in: PennMUSH version 1.8.7 patchlevel 0 [08/10/2018]

My next task is to code a +roll/+check system that will call functions in the +sheet to grab and calculate skills. This part seems manageable but I did have a question about arguments.

The system in question is 5e based so I anticipate players doing things like:
+check strength
+check ranged+1
+check melee-1

QUESTION 1:
Is there a way to code a command so it evaluates the formatting without having to switch everything?

And what I mean is my knee-jerk is to do: "$+check *:" Then have it look for + and -. Evaluate as appropriate but is there a way to do a command like that is basically: $+check *[maybe +/-][and if one of those *]? To not have to take a single argument apart and re-assemble it?

QUESTION 2:
Optimally I'd like to be able to do something more complex like:
+roll 2d8+5+1d4+2-3

Where people can roll dice and chain dice rolls and integers together to infinity. Is there an easy way to do that without having to take a huge string and trying to chop it up since there's not a standard delimiter?

Thanks.