Armageddon General Discussion Board

General => Code Discussion => Topic started by: Morgenes on August 07, 2006, 01:46:44 PM

Title: Request For Comment (RFC): Sing allows newlines in output:
Post by: Morgenes on August 07, 2006, 01:46:44 PM
We are looking at adding formatting ability for the sing command. The idea is that it's hard for those playing bards to emphasize the lyrical flow of a song when they must either spew out an entire stanza in one long line or break it up into several short ones that are disrupted by other things happening.

Right now, what we see is:

> sing Love, love me do.  You know I'll love you.  I'll always be true. So, please - love me do
You sing, in sirihish:
  'Love, love me do. You know I'll love you. I'll always be true. So, please - love me do.'


What we propose is:

> sing Love, love me do.\nYou know I'll love you.\nI'll always be true.\nSo, please - love me do
You sing, in sirihish:
  'Love, love me do.
   You know I love you.
   I'll always be true.
   So, please - love me do.'


In doing this, we are talking about adding a 'brief songs' option that will allow you to compact this back down as it was before.

> brief songs
Turning brief 'songs' on.

The bard sings, in sirihish:
  'Love, love me do. You know I'll love you. I'll always be true. So, please - love me do.'


Thoughts/Ideas/Complaints?

What else can we do to help bards and those listening to them?
Title: Request For Comment (RFC): Sing allows newlines in output:
Post by: Marauder Moe on August 07, 2006, 02:03:52 PM
*thumbs up*  Awesome.

Other than escape character tradition, though, is there any way you don't just have it as '\' instead of '\n'?  There's really no reason people would use characters other than standard punctuation in says/sings anyway.
Title: Request For Comment (RFC): Sing allows newlines in output:
Post by: Eternal on August 07, 2006, 02:27:07 PM
I'm really fond of this idea.  Most songs that you read in prose come off in a poetic styling (i.e. Tolkien)... and I can only see this as an enhancement to that.

The ability to turn it off, for people who prefer singing to look the same... brilliant.

For bards, I'd like to see the play command used a bit more... something other than the seemingly canned response issuing forth, though this is easily handled by emotes... but as a player dream (possible coder nightmare) to be able to play a well-known song using the command and then add emotes throughout... perhaps even loading a song one verse at a time (and here's why I'm not a coder) and thus belt out each line with the play...

Lord Templar Hard Nose rambles on about bards, showing his novice coding and lack of bardic understanding.
Title: Request For Comment (RFC): Sing allows newlines in output:
Post by: Northlander on August 07, 2006, 02:38:10 PM
Yeah, this would help us all. Great idea.
Title: Request For Comment (RFC): Sing allows newlines in output:
Post by: mansa on August 07, 2006, 02:53:34 PM
I think there may need to be a better command to initate the new line, despite the \n being the obvious one for any programmers :).  How about |, \, or : ?
Title: Request For Comment (RFC): Sing allows newlines in output:
Post by: Medena on August 07, 2006, 02:55:16 PM
Quote from: "Eternal"For bards, I'd like to see the play command used a bit more... something other than the seemingly canned response issuing forth, though this is easily handled by emotes... but as a player dream (possible coder nightmare) to be able to play a well-known song using the command and then add emotes throughout... perhaps even loading a song one verse at a time (and here's why I'm not a coder) and thus belt out each line with the play...

What play command? I'm afraid you really lost me here. :)

As for Morgenes... YAY! I love you! This will really help a lot!  It will make songs easier to read for everyone and it will really make them feel more like a song instead of just a bunch of scrolling lines.  I've used something similar in another mud and it really does help a lot on both counts.
Title: Request For Comment (RFC): Sing allows newlines in output:
Post by: MoosesRock on August 07, 2006, 03:24:06 PM
Like Medena, I've used something similar elsewhere and it really does help the bard's song to seem more like a performance. It also makes it much easier to follow the song. I'd love to see this implemented. Maybe something similar could be done for those who don't sing, but like to recite poetry?
Title: Request For Comment (RFC): Sing allows newlines in output:
Post by: bardbard#4 on August 07, 2006, 03:29:13 PM
Man.  I would have loved this.
Title: Request For Comment (RFC): Sing allows newlines in output:
Post by: Intrepid on August 07, 2006, 03:30:53 PM
I like the reformatting.  I would suggest allowing semicolons to end a line in the formatting as well--assuming you haven't already done that. ;)

Edit: Strike that.  It's perfect the way it is.  I'm really sleepy and misread your post, Morg.  Sorry.
Title: Request For Comment (RFC): Sing allows newlines in output:
Post by: spawnloser on August 07, 2006, 03:54:17 PM
I'm fine with the '\n' because I'm familiar with how to use 'prompt' and my prompts are always two lines, so include this.
Title: Request For Comment (RFC): Sing allows newlines in output:
Post by: Cyrian20 on August 07, 2006, 04:11:30 PM
I want to have your children...
Title: Request For Comment (RFC): Sing allows newlines in output:
Post by: Delirium on August 07, 2006, 04:26:34 PM
Love it, Morg.
Title: Request For Comment (RFC): Sing allows newlines in output:
Post by: Gimfalisette on August 07, 2006, 04:44:14 PM
I love you, Morgenes.

I mean, I love this idea. Yeah, that's what I meant. I just got carried away in the moment.

This will be hugely helpful. My only question/comment would be: Are the lines separated with \n going to be length-restricted as a unit, or separately? Because a lot of multi-line songs or poems aren't as short and sweet as "Love, Love Me Do," but have individual lines that are much longer.
Title: Request For Comment (RFC): Sing allows newlines in output:
Post by: Yokunama on August 07, 2006, 04:52:46 PM
Love it, Morgenes, is there a chance there could be a small addition to the idea, allowing the singer to carry their voice longer distances (a singing version of shout)?
Title: Request For Comment (RFC): Sing allows newlines in output:
Post by: Seeker on August 07, 2006, 05:10:00 PM
I favor the idea also.  Couplets.... all kinds of options.  And more interesting to read.


Seeker
Title: Request For Comment (RFC): Sing allows newlines in output:
Post by: jcarter on August 07, 2006, 05:33:30 PM
Quote from: "Morgenes"
What else can we do to help bards and those listening to them?

Add an ignore function.

But seriously though, brief songs would definitely help. Crowded taverns have lines moving by fast. Having 5+ lines in one surge go by would be absolutely brutal.
Title: Request For Comment (RFC): Sing allows newlines in output:
Post by: EonBlueApocalypse on August 07, 2006, 09:08:11 PM
I can see this definitely making someone singing easier to follow, rhythmically.  Would be a great addition.
Title: Request For Comment (RFC): Sing allows newlines in output:
Post by: Cale_Knight on August 07, 2006, 09:10:34 PM
Geez. If you're going to add the brief command, there's absolutely no downside to this code. Go for it.
Title: Request For Comment (RFC): Sing allows newlines in output:
Post by: rishenko on August 08, 2006, 05:10:27 PM
Please....Please, oh please..oh please please please pleeeaaase add this in.

I could rattle on about the pluses to having it this way, but I think we all recognize them.  Please..please add it.
Title: Request For Comment (RFC): Sing allows newlines in output:
Post by: LauraMars on August 08, 2006, 10:35:06 PM
You know I love you.

This idea is so fantastic, wonderful, and amazing that it deserves a whole new word in the english language.  Fantaswazing.
Title: Request For Comment (RFC): Sing allows newlines in output:
Post by: Morgenes on August 08, 2006, 10:56:56 PM
For the record, this idea was originally proposed by Naiona on the staff boards.  Serious props to her for the great idea.
Title: Request For Comment (RFC): Sing allows newlines in output:
Post by: Naiona on August 09, 2006, 12:28:13 AM
Aw, shucks.


Crooning like a gizhat with a head-cold, you sing, in sirihish:
    "I'm all out of sid, I'm so lost without it.
     I knew it was right, raiding for so long.
     I'm all out of sid, what am I without it?
     It can't be too late, strip the corpse and then I'm gone..."
Title: Request For Comment (RFC): Sing allows newlines in output:
Post by: The7DeadlyVenomz on August 09, 2006, 02:05:32 AM
Use the | character, that you obtain by hitting the shift+\ key.
Title: Request For Comment (RFC): Sing allows newlines in output:
Post by: spawnloser on August 09, 2006, 02:07:08 AM
Why, V?  I mean, like I said earlier, we already use \n as a line return for other things.  Why NOT use it for this?
Title: Request For Comment (RFC): Sing allows newlines in output:
Post by: jstorrie on August 09, 2006, 02:12:54 AM
\ seems like a fine symbol for this sort of thing, since it's a keystroke that has no other mud use. \n is two keystrokes that are not necessarily apparent to noncoders.
Title: Request For Comment (RFC): Sing allows newlines in output:
Post by: The7DeadlyVenomz on August 09, 2006, 02:18:17 AM
The \n thing is not very fluid, but neither, in that case, is |. Per jstorrie, \ would work just fine.
Title: Request For Comment (RFC): Sing allows newlines in output:
Post by: spawnloser on August 09, 2006, 02:20:42 AM
Quote from: "jstorrie"\n is two keystrokes that are not necessarily apparent to noncoders.
...but I maintain is apparent to anyone that uses 'prompt' to its full potential.
Title: Request For Comment (RFC): Sing allows newlines in output:
Post by: Morgenes on August 09, 2006, 10:11:00 AM
Thanks for the comments on the proposal.  The code has now gone live.  

http://www.zalanthas.org/phpBB2/viewtopic.php?t=21437

Your comments were all incorporated in the design of this code.  You can choose to use '|', '\' or '/' to signify a line of your song.  Feel free to use this topic to continue any discussions on this new change.

And yes, we're looking at the possibility of a 'recite' or 'orate' command to allow you to the same thing but with stories.
Title: Request For Comment (RFC): Sing allows newlines in output:
Post by: Marauder Moe on August 09, 2006, 10:52:06 AM
Is the whitespace before and/or after the deliminator manditory?
Title: Request For Comment (RFC): Sing allows newlines in output:
Post by: Morgenes on August 09, 2006, 10:57:51 AM
No, you don't have to have whitespace before or after the delimiter.  As a matter of fact, any white space AFTER the delimiter will be eaten up to the first word of your next line.

Do be aware though that those with 'brief songs' on will see your original 'sing' without the delimiters turned into newlines.  It will not add any extra spacing either, so it'd likely be best to leave a space around the delimiter for them.  But no, it's not necessary.  If it's enough of an issue for the brief songs people, we can look at automatically adding a 1 space buffer around the delimiter.
Title: Request For Comment (RFC): Sing allows newlines in output:
Post by: Gimfalisette on August 09, 2006, 02:32:03 PM
Tested, works well. Longer lines can only go two at once, so it's not PERFECT :P  but it's a huge and wonderful improvement.

I would really like to see a "recite" command, would be very useful for poetry. Keep them stanzas together.
Title: Request For Comment (RFC): Sing allows newlines in output:
Post by: Morgenes on August 09, 2006, 02:41:03 PM
Quote from: "Gimfalisette"Longer lines can only go two at once, so it's not PERFECT

Can you post an example of what you mean by this?  Providing the exact command you're typing and the output formatting using a code block?
Title: Request For Comment (RFC): Sing allows newlines in output:
Post by: moab on August 09, 2006, 02:43:45 PM
Morg - this is just awesome and makes me want to try a bard again.
Nice work.
Title: Request For Comment (RFC): Sing allows newlines in output:
Post by: Gimfalisette on August 09, 2006, 02:51:36 PM
Quote from: "Morgenes"
Quote from: "Gimfalisette"Longer lines can only go two at once, so it's not PERFECT

Can you post an example of what you mean by this?  Providing the exact command you're typing and the output formatting using a code block?

sing (tapping ^me foot in time to the music) The legend lives on from the Chippewa on down of the big lake they call Gitche Gumee \ The lake, it is said, never gives up her dead when the skies of November turn gloomy. \ With a load of iron ore - 26,000 tons more than the Edmund Fitzgerald weighed empty \ That good ship and true was a bone to be chewed when the gales of November came early

Comes out as:

Line too long. Truncated to:
sing (tapping ^me foot in time to the music) The legend lives on from the Chippewa on down of the big lake they call Gitche Gumee \ The lake, it is said, never gives up her dead when the skies of November turn gloomy. \ With a load of iron ore -...
Tapping your foot in time to the music, you sing, in sirihish:
    "The legend lives on from the Chippewa on down of the big lake they call Gitche Gumee
     The lake, it is said, never gives up her dead when the skies of November turn gloomy.
     With a load of iron ore -..."


As I said, it's not a huge huge deal. I'd like it to allow more longer lines, but no biggie if it doesn't, because two lines at a time is still workable.
Title: Request For Comment (RFC): Sing allows newlines in output:
Post by: Morgenes on August 09, 2006, 02:58:21 PM
Ah...I see, thanks for the reply.  Ya, not seeing us budge on that anytime soon, line length is there to make sure things don't get flooded.
Title: Request For Comment (RFC): Sing allows newlines in output:
Post by: Northlander on August 09, 2006, 03:16:00 PM
This is very, very terrific.
Title: Request For Comment (RFC): Sing allows newlines in output:
Post by: Angela Christine on August 09, 2006, 03:17:09 PM
Quote from: "Morgenes"

And yes, we're looking at the possibility of a 'recite' or 'orate' command to allow you to the same thing but with stories.


That would be cool.  5 lines is the perfect length for naughty limericks.
Title: Request For Comment (RFC): Sing allows newlines in output:
Post by: EvilRoeSlade on August 09, 2006, 03:58:06 PM
Would it be possible to have the code reset the character limit on commands each time you enter a / to break your song?
Title: Request For Comment (RFC): Sing allows newlines in output:
Post by: Morgenes on August 09, 2006, 04:30:23 PM
no, the character limit is enforced well before the code to break it into lines comes into play.  And it could also be abused to have REALLY long lines.
Title: Request For Comment (RFC): Sing allows newlines in output:
Post by: moab on August 09, 2006, 06:30:00 PM
What kind of abuse issues do you see with really long lines?
Title: Request For Comment (RFC): Sing allows newlines in output:
Post by: Intrepid on August 09, 2006, 07:02:10 PM
Quote from: "moab"What kind of abuse issues do you see with really long lines?

You could spam someone's screen into not seeing an action or even, if the buffer can't stand it, killing the link.