Shadowgate Forum Index Shadowgate
You can't fudge your dice rolls here...
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Color Code Preview/Generation Flash application
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Shadowgate Forum Index -> General discussion
View previous topic :: View next topic  
Author Message
Trillet



Joined: 27 Oct 2013
Posts: 8
Location: i have a cat

PostPosted: Sat Apr 05, 2014 6:16 am    Post subject: Color Code Preview/Generation Flash application Reply with quote

I know I'm not exactly playing this game right now, but I promised to eventually make a more fleshed out version of the color program for the good people of Shiny Body Parts: The Game, and while it's taken me longer than I anticipated, I'm finally ready to release the first version of this rewrite. This application is slightly larger in scope than the last one, so there are probably a few bugs or rough edges remaining.



Download:https://www.dropbox.com/s/zby5hsb62tyvnrt/SGColors12-15-15.swf?dl=0

Updates:

(12-16-15) New update! Rearranged the buttons on the side panel to make accidentally clearing all text a bit more difficult, and fixed a couple issues with overlapping buttons."Undo Clear" is back, as is the ability to view the rendered output in a toggled window. Most notably, added in a limited "autosave" feature - click on the label in the bottom right corner to activate it. This should make anything in the text field persistent after the application is closed, and should save every time the "Character Count" field updates. Keep in mind that this data is probably being saved as a kind of cookie (if you're running this in a browser), and shouldn't be relied on to keep your work safe indefinitely, since clearing your browser data will reset everything.

(11-26-15) 30 seconds later: After a good deal of soul searching, I decided to make the color code generator work properly - now it shouldn't add superfluous color tags when going from an unbolded color to a bold one.

Notes:

-The application comes with a proper, shiny instructions screen now, which should cover how to use it and what the various buttons do.

-Support for multiple lines added. ("Added", in this case, being code for "actually remembered to turn it on".)

-Text copied normally from the text field (with ctrl-c, etc) retains its formatting data on the clipboard. Useful for copying/duplicating painted text quickly.

-You can now import color-coded text - just paste it straight into the text field, press the "Convert Color Tags" button (or hit ctrl-i), and the text will be automatically formatted.

-Multiple options for copying painted text into color-coded text: copy selection, copy paragraph, or copy all.

-Added the option to set adjacent colors. These allow the application to determine which colors are presumed to come before and after your text, when it generates a span of color-code (if you use "copy all", it will apply this to all paragraphs). By default both the "previous" and "following" colors are set to unbold white, which means a RESET tag will be added to the end of your text if necessary.

The "previous" setting is probably the most useful - set it to bold green for a character adjective, or unbold green (I think?) for a character description, and you won't need to worry about adjusting the color codes after they've been generated. "Following" is a bit less versatile, but setting both options to the same color could be handy if you need to insert some colored text into some other, previously colored text.

-Keyboard shortcuts for the palatte in Coloring Mode. Check the instructions screen for more details.

-Character count now displays a grand total, and is also further broken up by paragraph. These take into account the adjacent colors when calculating the string length. It also no longer updates automatically - that function was causing a lot of latency and it turns out that I accidentally programmed the counter to feel hate. It should still update at certain points, however, and you can click on the counter to refresh it.

-For the same reason, and because it didn't actually do anything, the "output" text field is gone. - Fixed!

-The "undo clear" feature is also gone, for now, making any clears permanent. - Fixed!

Less Important Notes:

I think I've gotten rid of -most- of the latency issues plaguing the application, but it still start to slow down a bit (at least on my machine) after the count hits 6000-ish base characters. This is probably just a result of me abusing the text field API in so many awful and unspeakable ways to make it do what I wanted, so I'm not sure if I can do anything about it. Either way, it should be fine editing an item set, or a song, or a few character descriptions, but I'd advise against trying to cram an entire novel into the program at once.

The import feature is still a bit weird. It should (should!) work as expected, provided you're using it in a non-insane manner, but sometimes it leaves single color tags or carets behind - in particular it seems to adore WHITE and RESET tags so much that it wants to keep them and hug them forever, and I'm not 100% sure why yet. That being said, these artifacts should be minor enough that editing them out manually is trivial, if they occur.

The other thing about the import feature is that it doesn't actually care about the formatting of the text -prior- to the import. If you type %^GREEN%^ into the middle of some painted text and convert it, for example, you'll see everything between it and the end of the paragraph (or the start of another color code) turn green, regardless of what color the text is. This isn't likely to be an issue for most people, but if you want to keep the color tag from infecting the entire paragraph, type a special %^STOP%^ tag at the end of what parts you want the import function to convert. (You can press F2 to insert a %^STOP%^ tag at the caret position in the text field)

Similarly, the behavior of any "junk" tag (%^FISH%^, %^SHINY%^, %^ORCFART%^) is to treat itself as the color of the preceding character. For instance, type in %^FISH%^ after a red "A", and the import function will act as if you typed in %^RED%^. It will also recognize when to use the previous adjacent color. This means you can "extend" an import backwards by placing a junk tag where you want the function to start (press F1 to insert %^START%^ at the caret position), if for some reason you actually need to do that. Weirdo.

Even Less Important Notes:

I'll probably take at least one more pass at this program before I'm done with it, though it may be some months off. There's still some more optimization to do with importing, and I'm not fully sold on some of the feature implementation. Any feedback would be appreciated - I'm most interested in hearing about major bugs, or features that seem confusing or unintuitive to use.


Last edited by Trillet on Wed Dec 16, 2015 7:20 pm; edited 4 times in total
Back to top
View user's profile Send private message
Zathery



Joined: 30 Sep 2013
Posts: 38
Location: Sweden

PostPosted: Sat Apr 05, 2014 7:59 pm    Post subject: Reply with quote

Trillet wrote:
and will fight anyone who says otherwise


Name a time and place bud.

On a more serious note, verry nice, now if someone could tell me the max number of characters allowed in a describe on SG.

Also, fire your cat, clearly not QA material, have you tried a dog? Or badger?
_________________
Intelligence is knowing a tomato is a fruit,
Wisdom is knowing not to put it into a fruit salad.

Horrible at SG since 1998
Back to top
View user's profile Send private message
Nienne
Immortal


Joined: 17 Nov 2006
Posts: 2609
Location: Aussieland

PostPosted: Sat Apr 05, 2014 11:40 pm    Post subject: Re: Color Code Preview/Generation Flash application Reply with quote

Trillet wrote:
...and/or leads to the creation of a sentient cyber-race fixated on human extinction.


But at least they'll be rainbow painted when they do!

Nice job Smile
Back to top
View user's profile Send private message Visit poster's website
diego



Joined: 30 Jul 2011
Posts: 14

PostPosted: Mon Apr 07, 2014 3:44 pm    Post subject: Reply with quote

I really like this little app and think it will save me alot of time and testing since it lets me see what it will look like without logging on. I agree with you on the name, but I do not really have much soul left and what I do have is a crusty piece is charred walnut. Perhaps a good name is Diego's Input Time Saver. Alright, so take the credit, Trillet's Input Time Saver or TITS for short.
_________________
All dogs go to heaven
Cats sneak in
Back to top
View user's profile Send private message
Verbannon



Joined: 30 Sep 2013
Posts: 398

PostPosted: Wed Apr 09, 2014 10:08 am    Post subject: Reply with quote

Just nickname it Shadowgate Color.
_________________
PM me in the forum here when you want me on to RP or dungeon dive. The forum will automatically notify me by e-mail. Then my e-mail will send me a text message. Then I will get on likely within minutes.
Back to top
View user's profile Send private message
Zathery



Joined: 30 Sep 2013
Posts: 38
Location: Sweden

PostPosted: Wed Apr 09, 2014 12:53 pm    Post subject: Reply with quote

I prefer TITS
_________________
Intelligence is knowing a tomato is a fruit,
Wisdom is knowing not to put it into a fruit salad.

Horrible at SG since 1998
Back to top
View user's profile Send private message
Loki
Immortal


Joined: 31 Jan 2008
Posts: 404

PostPosted: Sun May 04, 2014 4:22 pm    Post subject: Reply with quote

That installer is packed with more spyware, adware and crap then I have ever seen in a single .exe

I recommend no one downloads this unless you are extremely careful with what you are agreeing to and watch what gets installed on your system.
_________________
Back to top
View user's profile Send private message Send e-mail
Trillet



Joined: 27 Oct 2013
Posts: 8
Location: i have a cat

PostPosted: Sun May 04, 2014 5:45 pm    Post subject: Reply with quote

Updated the main post to give clearer instructions (the installer isn't necessary to get the app). I downloaded the file itself a couple times to be safe - they're identical to the .swf I originally built and Avast seems to think they're okay, so I'm not particularly worried for the file itself. Your browser might throw a warning anyway due to the file type, though.

That said, if anyone can think of a better hosting option, please feel free to suggest it.
Back to top
View user's profile Send private message
Loki
Immortal


Joined: 31 Jan 2008
Posts: 404

PostPosted: Sun May 04, 2014 7:01 pm    Post subject: Reply with quote

Thanks for adding the clarification.

App rocks btw. Runs especially well in firefox
_________________
Back to top
View user's profile Send private message Send e-mail
Zathery



Joined: 30 Sep 2013
Posts: 38
Location: Sweden

PostPosted: Sun May 04, 2014 8:45 pm    Post subject: Reply with quote

Found a slight issue bud. When i tried to go from bold black back to reset white, it only added the reset command, no white.
_________________
Intelligence is knowing a tomato is a fruit,
Wisdom is knowing not to put it into a fruit salad.

Horrible at SG since 1998
Back to top
View user's profile Send private message
Nienne
Immortal


Joined: 17 Nov 2006
Posts: 2609
Location: Aussieland

PostPosted: Sun May 04, 2014 9:47 pm    Post subject: Reply with quote

Reset by itself on the mud goes straight to white, so that shouldn't cause issues Smile
Back to top
View user's profile Send private message Visit poster's website
Zathery



Joined: 30 Sep 2013
Posts: 38
Location: Sweden

PostPosted: Mon May 05, 2014 7:14 am    Post subject: Reply with quote

Guess im old school
_________________
Intelligence is knowing a tomato is a fruit,
Wisdom is knowing not to put it into a fruit salad.

Horrible at SG since 1998
Back to top
View user's profile Send private message
Trillet



Joined: 27 Oct 2013
Posts: 8
Location: i have a cat

PostPosted: Thu Nov 26, 2015 9:46 pm    Post subject: Reply with quote

Just so people can still read this if they want (and because editing a post doesn't bump a thread, apparently), I'll put this here...

--

You know what's annoying? When you're looking for a program that you're certain exists but cannot for the life of you locate, even when you've gone twenty pages into a Google search. I'm 100% sure I've used this in the past, and will fight anyone who says otherwise, but since reality itself seems to disagree with me I made my own. It does things. I've decided to share it here, in case anybody wants it to do things for them, too.

ShadowGate Contextual Color Code Generator with Preview (SCCCGwP) allows the user to easily add or edit the color of any supplied text string and apply that text in-game with efficient, accurate color codes without needing to worry about superfluous "%^BOLD%^"s or missing carets throwing off the result.

It works like this!



The application screen lookes like this by default, with instructions in the main (black) text field.



Here, I've cleared the default text and entered a simple adjective describing what I probably look l- my character looks like.



I've switched into Paint Mode and painted over the text with my mouse, switching the active color using the palatte at the top. Note the generated text in the field to the right, and the character count below, which tells me the string is 353 characters long, color codes and all.

Instructions for using the application appear by default in the black text field (but here they are, anyway).

Features
    The black text field can toggle between "Edit" and "Paint" modes using the button to the upper right.

    Edit Mode - Enter, copy, cut or paste text normally. The field is set to "Edit" by default. It will also be set to "Edit" after clearing the text field.

    Paint Mode - Freezes the text box and prevents it from being edited. Click and drag over the text to add the active color to the string.

    Color Palatte - Top left corner. Click on one of the color swatches to change the active color, which you will use in "Paint" mode. You can also hold the "Ctrl" key down while clicking on a color to set everything in the black text field to that color.


Buttons
    Things on the screen you can press with your mouse cursor to do stuff. (Stop me if this is getting too technical)

    Mode: Edit/Paint Text - (Keyboard Shortcut: ESC) Toggles between "Edit" and "Paint" modes (see above)

    Clear Text - Clears the contents of the black text field. If you click this accidentally, you can restore the cleared content by clicking again (button will have changed to "Undo Clear") until something else is entered into the black text field.

    Copy Text to Clipboard - (Keyboard Shortcut: F1) Copies the text with generated color codes to your clipboard, which you can proceed to paste wherever you please (yes, even there).


Notes
    This application requires a working Flash player.

    The colors provided are the MushClient defaults, with a size 16 Fixedsys font. Displayed text might look different when rendered in your client.

    While we're on the subject, this application displays a preview of the entered string's color, not its formatting. The word wrapping is not guarunteed to (and probably won't) line up perfectly with what you'll ultimately see in your client.

    The generated text (with color codes) assumes a color of unbolded white at the beginning, and only places a color code if the first character is something besides that. If this leads to strange results, you may need to manually enter a "%^RESET%^" code at the beginning.

    Likewise, the generated text doesn't place a "%^RESET%^" code at the end of the string, so be sure to manually place one when needed to ensure the color doesn't bleed into other text (adjectives, crafted item longdescs, etc).

    If anyone can think of a catchier name than "ShadowGate Contextual Color Code Generator with Preview", please feel free to share because I can literally feel a small portion of my soul being eroded away every time I'm forced to read or write that name. Seriously, did any of you not die a little inside when you saw the topic title?


Feedback is appreciated, since the QA for this was limited to my cat and I have the hardest time getting him to apply himself. Please let me know if the application fails to run and/or leads to the creation of a sentient cyber-race fixated on human extinction.
Back to top
View user's profile Send private message
Nienne
Immortal


Joined: 17 Nov 2006
Posts: 2609
Location: Aussieland

PostPosted: Thu Nov 26, 2015 9:58 pm    Post subject: Reply with quote

Pinned for easier finding in future Smile

I still think TITS was the catchiest name for it Razz
Back to top
View user's profile Send private message Visit poster's website
circe
Immortal


Joined: 21 May 2007
Posts: 322

PostPosted: Sat Nov 28, 2015 9:35 pm    Post subject: Reply with quote

That's seriously awesome Smile I am terrible with names so no help from me there, but I can see the color coder saving a lot of time and annoyance.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Shadowgate Forum Index -> General discussion All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group. Hosted by phpBB.BizHat.com