The Gamer Corner
This isn't the brand of crazy koolaid that I usually pour
chaoscat
Lost your password?

Game Command Language

Game Command Language – July 22, 2010 1:56 PM (edited 7/23/10 9:04 AM)
Talraen (2373 posts) Doesn't Play with Others
Rating: Not Rated
Tozzi pointed out that a powerful language for making commands would be a good idea, and I agree. So let's define it! What sorts of chat slash-commands do you want to see? I'll start with the basics.

Slash Commands
/roll
Alias: /r
This would take an arbitrary number of parameters separated by +'s or -'s, plus any number of text-based general modifiers. It would interpret things like 1d6, +5, -2, etc. It would also support numeric lookups (see below). The command would report the total die roll as well as every individual component, with multiple dice tied together (so 1d8+2d6 could come up as "7+[3+4]" for instance). You would also be allowed a text string preceded by "for" that gets added to the roll. Thus, "/roll 1d20+1 for initiative" would display as "Talraen rolls 17 on 1d20 for initiative (16+1)" Especially large rolls would not be fully displayed, to conserve space.

Roll would also allow a "hidden" parameter (alias: "/hroll"). For GMs, this makes the roll in the "GM chat" box, sharing it with other GMs. Players have no such box, but their hidden rolls will still be reported in the main chat window. You can also specify a roll "style" by indicating the name of the style as a parameter (see below).

/rollstyle
This sets the default roll style. Normally the roll adds up the total, and gives you the individual die rolls if there is space. However, you may want a success-driven roll a la White Wolf. These styles would be available for use, either as a parameter (see above) or by setting the default style. This would even allow for special systems like exploding rolls.

/coin
This command flips a coin, giving heads or tails. It would also accept the "hidden" parameter.

/emote
Alias: /em
This sends an emote to the chat, which is basically a line that does not use a colon after your name, and is displayed in a different background color. The "/emote" is replaced with your name, so "/em cries." would come out as "Talraen cries."

/tell
Alias: /t
This sends a private message to the user whose name is specified as the first thing after the command (e.g., "/tell chaoscat Hi there"). This would be identical to sending chat through a private user window without the /tell command. Usernames with spaces would need to be in quotes (single or double).

Stat Lookups
Format: [[CharacterName(StatName)]
As suggested by Tozzi, we need a generalized way to handle stats. The stats block will have the format Stat [value], and the "Stat" portion will serve as the identifier. So Talraen(Str) would look up the number next to "Str" in Talraen's stat block. I don't think it's worth restricting which stats are numeric, so if what it gets back is not a number but is part of a /roll command, for instance, it will simply return an error. Any command can use these, so "/em wishes he had chaoscat(Dex) dexterity" is perfectly legal. "my" will be used as an alias for your character (for players only). "all" will be used as an alias for every player (for GM use only), providing multiple rolls at once.

Markup Language
We also need a general markup language for creating text and dealing with formatting. I'm not keen on allowing users to write HTML, since I'm going to have to clean it anyway and it won't really be HTML, so a tag language similar to the one used here (which is in turn based on UBB codes) seems like the best solution. I won't list tags already in use here, but we will need new ones, such as the following.

[[stat]
When creating a stat block, there will probably be some halfway decent UI for just plopping down a series of stats, but the block should allow some formatting for spacing or other purposes. Plus, there are at least two kinds of stats: normal stats and current/max stats like hp. I'm thinking something like [stat=Str] Gives a "Str #" stat with a single number, while [stat=HP max] will give HP #/#. As seen in the first chat mockup, I have it so players can only edit current HP, so there will be a way to specify that as well. I'm not sure if the GM should decide which stats are editable in the markup or separately, though. Suggestions?

--
There is no Mythril Sword in Elfheim
Re: Chat Command Language – July 22, 2010 2:11 PM (edited 7/22/10 10:11 AM)
chaoscat (452 posts) Ambassador of Good Will
Rating: Not Rated
roll should take a param 'hidden' which would cause the result of the roll to only be displayed to that person, or 'visible' which would result in the roll being displayed in the main chat. Players should default to visible and GMs probably should default to hidden. Obviously it's pretty pointless for players to make hidden rolls, but it's probably pretty cheap to implement, and gives you a safe way to tinker with the syntax without spamming everyone else.

Also, for the stat lookups, it'd be a nice bit of syntactic sugar if "my(...)" were an alias for your character's name. This would also make it easy for folks to publish macros that work for anyone without needing to be modified.

Something to think about, but probably low priority - maybe a card drawing command would be fun. Also a few other simple randoms would be fun to have - /rps could randomly show rock, paper or scissors. You could even make that one target another player (or the GM!) and show a quick little contest:

chaoscat challenges Talraen to RPS: chaoscat shows paper, Talraen shows scissors - Talraen wins.
Likewise, even though a coin flip is the same as a d2 roll, it might be cool as it's own emote:

chaoscat flips a coin and catches it on the back of his hand - Heads!

_________________________________________________
Syllabic (4:14 PM): tozzi are you like dowd's jiminy cricket
Re: Game Command Language – July 23, 2010 11:53 AM (edited 7/23/10 7:53 AM)
Cuzzdog (1522 posts) Head of Gamer Corner R&D
Rating: Not Rated
There are a few dice mechanics for other RPG systems that should be incorporated as commands. For instance, you should be able to display "success" like the Exalted system uses. That mechanic should also let the user define which numbers count as successes (9 and 0 in exalted on a d10, 6 on a d6 for Shadowrun), and if any number counts as a double success (like a 0 in Exalted) or negative success (like a 1 in Vampire). I know you can figure this out manually by picking through the results, but who wants to see a typical Exalted roll (25d10) displayed on the chat?

Some systems also have an exploding mechanic. That's when if the die you're rolling comes up as the highest possible number on the die, you roll the same die again. So it would be like:
/roll exploding 1d6 -> 5 = 5
/roll exploding 1d6 -> 6 + 6 + 3 = 15


I'm also not sure how useful the [stat] commands are going to be. If you have a good gui interface to edit/display stats, I can't see too many people opting to type in the commands to see one specific stat and then have those results get mixed in with the chat log when they could just, say, click the players name and bring up a pop-up window/sticky note that has all of the information right there.

Re: Game Command Language – July 23, 2010 12:42 PM (edited 7/23/10 8:42 AM)
chaoscat (452 posts) Ambassador of Good Will
Rating: Not Rated
I like the exploding keyword, that's a great mechanic. Shadowrun actually uses that. The display would be a little cramped for multiple exploding dice tho:

/roll exploding 3d6 -> (6+6+3) + (4) +(6+1) = (15) + (4) + (7) = 26

You could leave out the intermediate calculation, but you need it for exploding success systems like shadowrun:

/roll exploding success(target=7) 3d6 -> (6+6+3), (4), (6+1) = (15), (4), (7) = 2 successes

I believe the idea of the stats is that you can incorporate them into other macros, not that they are macros in and of themselves:

/roll 1d20+[chaoscat(initiative)] -> 1d20+4

_________________________________________________
Syllabic (4:14 PM): tozzi are you like dowd's jiminy cricket
Re: Game Command Language – July 23, 2010 12:46 PM (edited 7/23/10 8:46 AM)
Cuzzdog (1522 posts) Head of Gamer Corner R&D
Rating: Not Rated
chaoscat wrote...
I believe the idea of the stats is that you can incorporate them into other macros, not that they are macros in and of themselves:

/roll 1d20+[chaoscat(initiative)] -> 1d20+4

Ah, I see. Ok, I take it back. That would be cool. The way it was pitched sounded more like it was going to be used to look up other player's stats, but being able to punch them in as variables in your macros would be really helpful.

Re: Game Command Language – July 23, 2010 12:46 PM (edited 7/23/10 8:46 AM)
chaoscat (452 posts) Ambassador of Good Will
Rating: Not Rated
Probably worth including a few control structures. For the GM, the ability to apply a command to each player seems very useful (for example, for forcing the party to roll hidden spot checks). I'm thinking something like:

/foreach player<p> roll hidden 1d20+[p(spot)]

an if might also be nice:

/if roll 1d20+[chaoscat(base_attack)] > 16 em cheers else em cries

Actually, the if might be overkill, but I guess it's at least worth mentioning.

_________________________________________________
Syllabic (4:14 PM): tozzi are you like dowd's jiminy cricket
Re: Game Command Language – July 23, 2010 12:48 PM (edited 7/23/10 8:48 AM)
chaoscat (452 posts) Ambassador of Good Will
Rating: Not Rated
Presumably you could punch other player's stats into your macros, but other than for humor, I don't know why you'd want to. The GM might want to do that tho, so it's useful functionality on that end.

_________________________________________________
Syllabic (4:14 PM): tozzi are you like dowd's jiminy cricket
Re: Game Command Language – July 23, 2010 1:02 PM (edited 7/23/10 9:02 AM)
Talraen (2373 posts) Doesn't Play with Others
Rating: Not Rated
The basic rule of thumb I'm going with here is that I'll implement anything that's either very useful, or very easy. For instance, Steve mentioned (but was too lazy to post) that he wanted a way to add stat modifiers, like a new box that said "Str+5" which would then affect things like my(Str). Personally I think this is too complicated and not useful enough to implement (let me know if you disagree).

Things like /foreach seem a bit too complicated from the UI end, where I doubt anyone will ever use them. Remember that OpenRPG supported full stats, macros, etc. and no one ever used that, because it was archaic. I'm much more in favor of doing such things less code-wise and more implication-wise. For instance, "/roll hidden 1d20+all(spot)" - "all" in this case meaning a keyword that is interpreted as multiple players and brings up multiple results. There's also the question of how this will be archived and stored in the database, since generally there's an assumption of one input -> one output unless I make the chat table very complicated (which would be bad for performance). But I could just have it automatically make one chat line per person, for instance.

Finally, there's the White Wolf, Shadowrun, and other die-rolling styles. Having a language for them is just too complicated for people to want to do on the fly. For instance, what would the command look like for exalted? /roll 5d10 success=7 double=10 botch=6(1)? And you'd have to do that every time. So ugh.

Therefore, I think a much nicer way to do it, which I mentioned... somewhere, is "rollstyles." So the preceding would be "/roll exalted 5d10". But even that is more typing than a player would want to do in an Exalted game, so I'd also have a "/rollstyle exalted" that sets the default. Specifying during the roll would be useful for rolls that don't use the default style. There are two issues I see with this. One is that if I haven't coded the style, you can't use it - that's what feedback and maintenance are for, I think. And the second is that it doesn't give a great way to do exploding rolls as an option. I don't know if shadowrun only uses exploding rolls, but if we call that "exploding" style and there's another, different one (additive as opposed to success-driven) you can't call them both the same thing. Unless the system considers which style is the default when processing "exploding" anyway...

--
There is no Mythril Sword in Elfheim
Re: Game Command Language – July 23, 2010 1:31 PM (edited 7/23/10 9:31 AM)
chaoscat (452 posts) Ambassador of Good Will
Rating: Not Rated
Re: Modifiers box - I agree that the concept would be handy, but that suggested implementation is coarse. Maybe one of the options in the markup language for stats could be "allow_modifiers" or something, which would have a little +/- icon next to it that you could use to temporally raise or lower a stat.

Re: foreach - I think your all(stat) notation works fine. I was more suggesting the functionality than that specific implementation; I'm bad at UI, as I've said before, so I'm happy to defer to your greater experience in that regard.

Re: rollsytles - Why not make them user definineable? If you only need to set up that complex set of keywords once or twice per game system, I don't see it being such a big deal, especially if you make them all public, so you can just check if someone has added your system yet. Worst case, that degenerates to you doing them all, but might be better if some folks want to take a stab at it.

For reference, the only thing I can remember in shadowrun which isn't exploding d6s vs a target number and count successes is initiative, which is a straight up added roll, and they might have changed that in 4th ed, I don't recall.

_________________________________________________
Syllabic (4:14 PM): tozzi are you like dowd's jiminy cricket
Re: Game Command Language – July 23, 2010 1:34 PM (edited 7/23/10 9:34 AM)
Talraen (2373 posts) Doesn't Play with Others
Rating: Not Rated
Honestly I wouldn't make them user definable because I'm not sure how. Take Exalted rolls. I can see some way to specify successes and whatnot, but botches? At that point I'm basically hardcoding the entire ruleset anyway.

--
There is no Mythril Sword in Elfheim
Re: Game Command Language – July 23, 2010 1:55 PM (edited 7/23/10 9:55 AM)
chaoscat (452 posts) Ambassador of Good Will
Rating: Not Rated
I'm not sure how much of that is strictly needed. I mean, to a degree, all this roll style business is just syntactic sugar anyway - you could just do it manually if you wanted to. But yeah, I do see what you mean; there's just too many different mechanics to make it really viable.

One random thought on the multiple die rolling - while the parenthetic groups for different dice are neat, you could also have each die show up in a different color, at least within reason. You know, die color being such a major issue in table top games Wink


_________________________________________________
Syllabic (4:14 PM): tozzi are you like dowd's jiminy cricket
Re: Game Command Language – July 23, 2010 1:58 PM (edited 7/23/10 9:58 AM)
Balerion (1224 posts) Elite Powergamer
Rating: Not Rated
I don't think you need to go so far as defining botches or anything like that. I use a couple of different dice rolling apps now and none of them bother. The simplest implementation has been to show number of successes if 10s are doubled and number of successes if they aren't. If the number I'm looking at is 0 then it's on me to check through the dice for a botch. And at some level I kind of assume that you still want to see the individual dice, it would take something away to not even see the numbers rolled.

_________________________________________________
I really think the three “!”s really captures the exuberance that Clair must have been feeling when he almost said it. -Cuzzo
Active Users: (none)
no users viewing | Refresh