Author Topic: Chat Emotes Restored v9  (Read 7644 times)

Original Topic (and add-on) by Port

This is a fix and overhaul of the server version of Chat Emotes by Port to work with v21 and be more user friendly.

Firstly, a hacky way to force clients to download the emotes were introduced (and confirmed to work by Mr.Jmorra79 in testing), as decalData is no longer a thing in v21. I've made dummy particles that (shouldn't) show up in the emitter selector. Their only purpose is to force the downloads.
This means everyone who downloads textures will be able to see the emotes.

Second, I've changed the syntaxing. Instead of the weird [](/whatever), you now type :whatever:.
You can type :cookieMonster: with the Blockland Forums pack and it'll work.
Code: [Select]
Thirdly, the way emotes are added to servers have been overhauled. They are now packaged and added to your Add-Ons folder like add-ons.

Lastly, there are now server commands that displays lists of emotes. Type /listEmotes into chat to get started.

This project was started when Original asked me about emote packs. He helped to test in the early stages. (it wasn't going so well)

Emote Packs
These are packs of emotes ready to be used. Place them into your add-ons folder like you would any add-on. Note: They are activated automatically, they do not show up in the custom game gui's add-on list.

(more will be added to this list as I become aware of them and links are given)

In addition to all that, you can use any glass icons and RTB icons as emotes, as long as you have them. Everything inside:
and inside:
is now a usable chat emote. Other players will however also need them to see them.
To use these emotes, you type :glass[imagename]: or :rtb[imagename]:

If you don't want to download RTB or Glass, here are packs of icons from those system add-ons that you must unzip directly into your add-ons folder:
The glass icons may be out of date, and I strongly recommend installing Glass' icons yourself from the most recent Glass version if you very desparately do not want Blockland Glass itself.

At the very least, you can use some blockland default CI and UI as chat emotes.

WARNING: To bypass <bitmap:filepath> stuff being removed from default chat, I had to edit blockland's source code, and not parent. There may be some really bad incompatabilities with other mods that mess with chat. Any suggestions on how to make this mod more compatable are welcome, as well as links to mods that are known to be incompatable.
HOWEVER, this "rebuilt" chat only appears if an emote is used. The mod lets normal chat take over if it detects no emotes, or a link, being sent in the chat message.

Download v9

If you cannot access my website for whatever reason, please check the mirrors below:
View on Blockland Nexus
View on Blockland Glass

View Blockhead Pack on Blockland Glass
View Blockland Forums Pack on Blockland Glass
View Blockland Steam Pack on Blockland Glass

Creating Emote Packs
Grab your favorite .png images, preferably some small ones, and shove them into a .zip folder.
Create a description.txt with anything in it. The server mod will not see it as an emote pack otherwise.
Name the emote pack something like "ChatEmotes_My_Cool_Emote_Pack" and you should be good.
« Last Edit: July 31, 2017, 06:26:38 PM by Crispy_ »

Hah, cool way to force-download textures. :iceCream:

Off topic:
Nexusmods huh? Would be interesting if its BL page got popular enough to show on the front page of the website.

wtf i thought this method no longer worked for forcing downloads

I may have figured out a way to get Blockland Glass icons and Return to Blockland icons as usable chat emotes without using ANY datablocks, however this requires the client to have Blockland Glass and/or Return to Blockland to see them. (or just their icons ;^)) I'll be experimenting with this and putting out an update soon if it's successful.

I've also made a crap load more chat emote packs which need testing and such. I really don't recommend downloading every single pack once I get them all set up and ready for downloads as that'll eat up your datablocks and make players need to download more files. (i'd estimate if you downloaded everything including the new packs im going to release you'd have around 200 to 400 datablocks used)

This means everyone will be able to see the emotes.

everyone who has download textures enabled*

everyone who has download textures enabled*
Forgot that was a thing you could disable.


You can't think of everything on first release, so that's why I'm updating so soon after.

Got that stuff working. Everything inside:
and inside:
is now a usable chat emote, as long as you have them. Other players will however also need them to see them. (blg only users will see glass emotes but rtb emotes will be blank vice versa)

To use these emotes, you type :glass[imagename]: or :rtb[imagename]:

Examples of valid emotes:

For players/server hosts who do not want to use RTB or Glass or even neither of them can download an icon pack that they unzip into their add-ons folder. to effectively give you the icons but none of the code or other things. OP will be updated with this info along with some new emote packs, mostly based on twitch tv related cancer :)
« Last Edit: December 25, 2016, 03:05:39 AM by Crispy_ »

« Last Edit: December 05, 2016, 02:15:07 PM by Swollow »

Wait hold the forget up can we make our own emotes

Oh cool, this is going to be good for my server. Thanks for this!

Wait hold the forget up can we make our own emotes

Yes, it's really easy too. Probably easier than making faces/decals/prints, as you don't need thumbnails.

Only need some .png images and a description.txt.

Edit: The add-on has now been approved on glass, and so have the two emote packs I put on there.
« Last Edit: December 05, 2016, 11:11:51 PM by Crispy_ »

As far as compatibility, why not try packaging messageClient and look for instances of :emotes:?

edit: ohhh because it strips it of bitmaps

where's scenery's emote pack

As far as compatibility, why not try packaging messageClient and look for instances of :emotes:?

edit: ohhh because it strips it of bitmaps

Before you edited, I saw your post and decided to mess around with different functions, using trace to see what is called. I didn't get much success.
messageClient doesn't seem to work for chat messages? It seems to not "get" player-sent messages, looks like is a specific case for that, so doing things with it in the package is useless. Maybe this is set to attempt to prevent abuse by add-on creators or something, to change what people say into some dumb stuff?

I tried chatMessageClient and that doesn't seem to be editable by packages or something. I had a bunch of echos (which worked for messageclient) but I get nothing. Here's the code of that part incase someone can figure something out and tell me I'm an idiot for screwing up such a simple task:
Code: [Select]
function chatMessageClient(%a, %b, %c, %d, %e, %f, %g, %h, %i, %j, %k, %l, %m, %n, %o, %p, %q, %r, %s, %t, %u, %v, %w, %x, %y, %z)

parent::chatMessageClient(%a, %b, %c, %d, %e, %f, %g, %h, %i, %j, %k, %l, %m, %n, %o, %p, %q, %r, %s, %t, %u, %v, %w, %x, %y, %z);
(the above code is inside a package)

Perhaps for now I could add an if check to see if there are any ":" in the chat line, and if so to do the chat rebuilding. That way the chat will work the way chat mods intend as long as you don't use emotes.

It will look bad with any chat mods anyway. Probably even slayer with it's player name color edits for chat. You'll see people talk normally with red and blue names, and then when someone throws out an emote their name changes to yellow. Basically it could be used as a warning for "hey! this mod doesnt work with your chat crap! disable pls."

where's scenery's emote pack
I didn't know about it and thus couldn't port it over. Do you have links to it?

EDIT: If that's the private pack with :egg: and stuff, that's private. I can't do anything about it without knowing the original image sources and/or a list. I could protentially recreate that pack with this info.
« Last Edit: December 07, 2016, 08:31:30 PM by Crispy_ »

Can the .png be any size or is it restricted to a certain size or it will forget up?