Changing the emoticons

From VbGORE Visual Basic Online RPG Engine

Contents

[edit] What Are Emoticons?

Emoticon showing love
Emoticon showing love

An emoticon is a representation of emotions through characters or icons, such as :) and :(. In vbGORE, emoticons are used to display a graphical animation of emotion above the character's head who used the emoticon. These emoticons can be used on NPCs, too, to bring life to them.

[edit] Displaying Emoticons

Emoticons can be displayed, by default, by using the a combination of Control (Ctrl) + a number 0~9, not using the numpad.

[edit] Adding Emoticon Graphics

Adding emoticon graphics is just the same as adding any other graphic to the engine. Please refer to adding graphics for more information.

Current emoticons are: 1- ... | 2- ! | 3- ? | 4- Red ! | 5- Heart |6- Cluster of hearts | 7- Broken heart | 8- Spoon & Fork | 9- Turkey Leg | 0- !? | 12/16/07

[edit] Programming In Emoticons

The packet ID is handled by User_Emote. Do not get this confused with Comm_Emote, which is typing an emote. The packet sent to the server is filled simply by the ID of the emoticon. The server recieves it, and dishes out a packet to every PC in visible range the emoticon by sending the Emoticon ID and the Character's Index (CharIndex).

First you must assign an Emoticon ID (EmoID) to the emoticon. Just like SkillIDs, StatIDs and PacketIDs, these should be the exact same values on both the server and client. Make sure you also update NumEmotes to the highest value of the EmoIDs. The EmoIDs are set in the InitDataPackets sub, along with the PacketIDs, StatIDs, etc.

The Emoticon ID has the GrhID set in the Data_User_Emote sub on the client. Find the EmoID you want, and apply the appropriate GrhIndex.

That is about all there is to do. In shorter, more organized terms:

  • Create the GrhIndex(s) for the emoticon
  • Update the Grh.Dat file on the client
  • Add a new variable in EmoID on both client and server
  • Set the EmoID value to an unused value on both the server/client
  • Update NumEmoticons to the highest EmoID used
  • On Data_User_Emote on the client, find Select Case EmoticonIndex and follow the same format already used and set the GrhIndex to the appropriate value
Personal tools