Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Profanity FE and Quality of Life

  1. #1

    Default Profanity FE and Quality of Life

    All right, Newsby is settling in with Profanity on my new Mac. It's been rock solid. I love it!

    I'm wondering how to add a tad bit of functionality into the stream of text, though.

    1. The main defined classes, whisper, speech, roomName, monsterbold, familiar, thoughts, voln ... did not colorize as much of the incoming text as I had hoped for!

    So 'speech' only colors
    You say
    ... and the rest of the line/s default back to the same color as all the rest of the text.

    Is there a way to get this to colorize the entire spoken line instead? (and the other relevant classes)


    2. Is it possible to bring the Speech Window concept into Profanity? (whispers, all spoken words, yelling, group whispers, ooc whispers, and group ooc whispers). I keep mine in Stormfront just above the input line. It's extremely handy for conversations in busy rooms.

    3. Editing on the input line is making me slightly nuts. What are the rules here? It seems a little bit slow to use the cursor back key to go back ALL those characters when I see an error that needs correcting at the beginning. The cmd/option left arrow key does not take me back to the beginning of the line, and once there to correct the error, cmd/option right arrow does not return me to the end. I do a fair amount of on the spot editing during live events and all. (cmd arrow is how my text editor works, option arrow is how my shell works)

    4. Is there any way to put a line/barrier between the thoughts window area and the main area?


    Thanks to everyone in advance.

    ~L
    Luxie's adventures (because I must write) plus some guests from the past at my blog:
    http://www.thebardess.com

  2. Default

    1. The speech preset highlights everything inside the preset tag, for example:

    <preset id='speech'>You <a exist="-10439655" coord="2524,1836" noun="help">say</a></preset>, "All hope is lost."

    The game only puts the preset tag around "You say", so that's all that gets highlighted. You could create your own highlight to highlight the entire line. Something like this would likely highlight all speech, but might also highlight some non-speech if it includes a comma/space/quote and ends with a quote:

    Code:
    <highlight fg='whatever bg='whatever'>^[A-z][a-z]+ .*?, ".*?"$</highlight>
    To avoid highlighting non-speech, you could go through the list of speech verbs and add all the first and third person versions, which sounds like a very annoying task. Here's a start to that:

    Code:
    <highlight fg='whatever bg='whatever'>^[A-z][a-z]+ .*?(?:say|says|whisper|whispers|accuse|accuses|etc), ".*?"$</highlight>
    Keep in mind that if the speech preset is set to a different color, "You say" will still show up as that color. Each bit of text can only have one foreground color and one background color. If two highlights match like in this case, the highlight affecting less text takes precedence. However, foreground and background are considered separately, so if no background is set the for the shorter highlight, the background for the longer highlight will still be in effect.

    Whisper is part of the speech preset.

    roomName highlights the entire roomName. Maybe you're looking for the roomDesc preset?

    monsterBold highlights as much as other frontends do.

    familiar, thoughts, and voln only highlights those things if they're in the main window, and they should highlight the whole line when that's the case.


    2. To add a speech window, you just need to edit the layout. If you wanted the speech window to be three lines tall and above the input line, you first need to shorten the height of the main window by three lines.

    Here's part of my config; yours might be different:
    Code:
    		<window class='text' top='6' left='12' width='cols-12' height='lines-7' value='main' buffer-size='3000' />
    You can tell this is the main window because of the value='main'. This causes all the main game text to be sent to this window.

    When dealing with the top, left, width, and height of the windows, "cols" and "lines" are the only two variables. They refer the the total number of columns and lines in the terminal. These are needed for a layout to resize windows when the terminal changes sizes. As you might expect, making the main window three lines shorter would look like this:

    Code:
    		<window class='text' top='6' left='12' width='cols-12' height='lines-10' value='main' buffer-size='3000' />
    Now to put in the new window, we'll copy the left and width values. The top will simply be the top of the main window plus its height. And the height will of course be 3. Value will be speech, so that the speech stream gets sent there.

    Code:
    		<window class='text' top='lines-4' left='12' width='cols-12' height='3' value='speech' buffer-size='3000' />
    Another option is to just add the speech stream to your thought window, since windows can have more than one stream:

    Code:
    		<window class='text' top='0' left='0' height='6' width='cols' value='lnet,thoughts,voln,speech' buffer-size='1000' />
    I'm not sure if that's a good idea, but hey, you can do it.


    3. For me, hitting the home or end keys sends me to the front or end of the line. ctrl+left and ctrl+right sends me one word to the left or right. However, different terminals use different key codes for these things. The relevant lines from the config file are:
    Code:
    	<key id='home' action='cursor_home'/>
    	<key id='end' action='cursor_end'/>
    	<key id='545' action='cursor_word_left'/>
    	<key id='560' action='cursor_word_right'/>
    If these aren't working because your terminal uses different keycodes, or if you'd just rather have it use that weird cmd/option key like you're used to, type ".keycode" into the frontend (and hit enter), and then hit the key combination you want. It might tell you the correct key code you need to stick into the "id" attribute to map it to the action you want. It's also possible that the cmd/option key works as its own key, and not a modifier that will give you a single key code for a cmd/option+other_key combination. In that case, you would need to do something like:

    Code:
    	<key id='keycode_for_cmd/option'>
    		<key id='second_keycode' action='cursor_home'/>
    		<key id='third_keycode' action='cursor_end'/>
    	</key>
    It's also possible that the terminal will not send that keycode to profanity at all, and it simply can't be used with that terminal.


    4. Sure, add 1 to the top of the main window, and subtract 1 from its height.
    Get Lich - Vote for Gemstone (topmudsites.com)

  3. #3

    Default

    <3 Tillmen!

    Thanks so much. I will play with it tonight when I get home from work.
    Luxie's adventures (because I must write) plus some guests from the past at my blog:
    http://www.thebardess.com

  4. #4

    Default

    Quote Originally Posted by Luxelle View Post
    <3 Tillmen!

    Thanks so much. I will play with it tonight when I get home from work.

    Looking for: krodera items, the gleaming krodera long knife, oldstyle katanas


    August 20, 2006
    >just ban
    You are currently banished from Wehnimer's Landing.

    >ask clerk about citizen
    The clerk says, "Hrrrm, Mogonis, you do seem to be eligible for full citizenship. Just WRITE your name in the book if you wish to make it official."

    >write book
    You sign your name into the citizenship registration book, fully agreeing to the duties and privileges full citizenship provides you.

  5. #5

    Default

    As long as Tillmen is answering....wow every question with awesome detail about Profanity.

    The number one thing I miss is whatever underlines things in rooms I can interact with? This would probably hit items in my inventory that aren't from the year 2000 as well, but it looks like ncurses can underline so we can keep it to that markup possibly, since highlighting sounds pretty ugly.

  6. #6

    Default

    Oh, underlines! Yes, I second that, pretty please.
    Luxie's adventures (because I must write) plus some guests from the past at my blog:
    http://www.thebardess.com

  7. #7
    Join Date
    Jul 2003
    Location
    St. Louis, MO
    Posts
    4,271

    Default

    .keycode doesn't work for me. Complains that

    --- Lich: could not find script 'keycode' in directory ...

    I checked in the repo and there is not keycode script available.
    Quote Originally Posted by Patrick McGoohan
    I am not a number, I am a free man!

  8. #8

    Default

    Quote Originally Posted by Kaldonis View Post
    As long as Tillmen is answering....wow every question with awesome detail about Profanity.

    The number one thing I miss is whatever underlines things in rooms I can interact with? This would probably hit items in my inventory that aren't from the year 2000 as well, but it looks like ncurses can underline so we can keep it to that markup possibly, since highlighting sounds pretty ugly.
    I have a patch that does this (with colors; I'll look into ncurses underlines instead) and also cleans up the death window for the new death messages. I snuck a crasher in the death messages part, though, that I need to fix up before I submit a pull request. Just haven't had the time; life's a little busy.

    edit: On that note, if anyone knows and can write up a quick overview of how the data for the SF popup menus work, I'd be thrilled to read it. Even when I try to log everything that gets sent to/from stormfront, it only seems to send coordinate data and stuff like 'menu item 1,3'; I can't seem to find the actual menu contents anywhere. Maybe this deserves its own thread.
    Last edited by Gnomad; 09-04-2016 at 09:00 AM.

  9. #9

    Default

    So ... er neverthemind. NOW it works. I swear, it did not work last night.
    Luxie's adventures (because I must write) plus some guests from the past at my blog:
    http://www.thebardess.com

  10. #10

    Default

    So, the configs for the THOUGHTS, even the person's name at the beginning, is not coloring anything, anytime. It shows up as the same color of text as everything else.

    Svardin: "Da Drakes Vanguard will Muster at our Headquarters in about twenty minutes fer fleet an squadron maneuvers.... (and more...)

    Is the most recent thought. Here's what my config file says:

    Code:
        <preset id='thoughts' bg='66ccff' fg='000000'/>
    and I tried making it a highlight, too ... but that's also failed:
    Code:
        <highlight bg='66ccff' fg='000000'>^[A-Z][a-z]+: "$</highlight>
    So where did I go wrong with all of these, Please?

    **
    Last edited by Luxelle; 09-04-2016 at 08:16 PM.
    Luxie's adventures (because I must write) plus some guests from the past at my blog:
    http://www.thebardess.com

Similar Threads

  1. Profanity FE and highlighting
    By POWPOW in forum The Lich Project
    Replies: 1
    Last Post: 07-07-2020, 01:10 AM
  2. Profanity... a terminal frontend
    By Tillmen in forum The Lich Project
    Replies: 134
    Last Post: 01-20-2020, 08:31 PM
  3. Some Profanity-related Questions
    By Samire in forum The Lich Project
    Replies: 5
    Last Post: 07-14-2018, 08:39 PM
  4. ;narost quality of life fix
    By horibu in forum The Lich Project
    Replies: 2
    Last Post: 05-13-2017, 12:41 AM
  5. Profanity in Happy Meals?
    By ClydeR in forum Politics
    Replies: 8
    Last Post: 06-27-2010, 12:19 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •