Villager Chat

 Villager Chat [Paid] 2.1.4

✅ This widget has passed review and has been verified to follow the Widget Gallery Guidelines.

notwiss
he/him

New member
hi hi! not sure if it has been asked before but I am trying to achieve a mix of some users with custom avatars and the rest without them, so I was wondering is there any way to "Hide Villagers" for ALL viewers except for the ones with a permanent exclusive one set up?
 
OP
OP
Zaytri

Zaytri
she/her

Glitch Witch
Admin
Developer
Streamer
hi hi! not sure if it has been asked before but I am trying to achieve a mix of some users with custom avatars and the rest without them, so I was wondering is there any way to "Hide Villagers" for ALL viewers except for the ones with a permanent exclusive one set up?
It will require you to change some of the code, but I think I've made this as simple as possible

  1. Open up script-villager-chat either in a text editor like Notepad or a code editor like Visual Studio Code
  2. Scroll down until you see code like this:
    JavaScript:
    // set emote size  const emoteSize = calculateEmoteSize(parts)
      messageClone.find('.content').addClass(`emote-${emoteSize}`)
    
      // add message type as a class
      messageClone.find('.message').addClass(`message-${message.type}`)
    
      // add villager colors
      messageClone.find('.message').css({
        '--villagerTextColor': villager.color.text,
        '--villagerBackgroundColor': villager.color.background,
      })
    
      const parentClasses = []
  3. Here is the new code you'll be inserting in there:
    JavaScript:
      // hides avatars of users who don't have a permanent villager assignment 
    if (!permanentVillagerMap.get(user.userName)) {
        messageClone.find('.message').addClass('hide-villagers')
      }
  4. The result should look something like this:
    JavaScript:
    // set emote size  const emoteSize = calculateEmoteSize(parts)
      messageClone.find('.content').addClass(`emote-${emoteSize}`)
    
      // add message type as a class
      messageClone.find('.message').addClass(`message-${message.type}`)
    
      // add villager colors
      messageClone.find('.message').css({
        '--villagerTextColor': villager.color.text,
        '--villagerBackgroundColor': villager.color.background,
      })
    
      // hides avatars of users who don't have a permanent villager assignment
      if (!permanentVillagerMap.get(user.userName)) {
        messageClone.find('.message').addClass('hide-villagers')
      }
    
      const parentClasses = []
  5. Save the file
 

notwiss
he/him

New member
It will require you to change some of the code, but I think I've made this as simple as possible

  1. Open up script-villager-chat either in a text editor like Notepad or a code editor like Visual Studio Code
  2. Scroll down until you see code like this:
    JavaScript:
    // set emote size  const emoteSize = calculateEmoteSize(parts)
      messageClone.find('.content').addClass(`emote-${emoteSize}`)
    
      // add message type as a class
      messageClone.find('.message').addClass(`message-${message.type}`)
    
      // add villager colors
      messageClone.find('.message').css({
        '--villagerTextColor': villager.color.text,
        '--villagerBackgroundColor': villager.color.background,
      })
    
      const parentClasses = []
  3. Here is the new code you'll be inserting in there:
    JavaScript:
      // hides avatars of users who don't have a permanent villager assignment
    if (!permanentVillagerMap.get(user.userName)) {
        messageClone.find('.message').addClass('hide-villagers')
      }
  4. The result should look something like this:
    JavaScript:
    // set emote size  const emoteSize = calculateEmoteSize(parts)
      messageClone.find('.content').addClass(`emote-${emoteSize}`)
    
      // add message type as a class
      messageClone.find('.message').addClass(`message-${message.type}`)
    
      // add villager colors
      messageClone.find('.message').css({
        '--villagerTextColor': villager.color.text,
        '--villagerBackgroundColor': villager.color.background,
      })
    
      // hides avatars of users who don't have a permanent villager assignment
      if (!permanentVillagerMap.get(user.userName)) {
        messageClone.find('.message').addClass('hide-villagers')
      }
    
      const parentClasses = []
  5. Save the file
thank you so much! it worked perfectly
 

yubyuns
she/her

New member
Hi so i just bought this today and im having trouble. Whenever i type a message, it shows up on browser source and the widget. But whenever my mod or anyone else types, the chat bubble doesn't show up. i included a pic that could maybe id the problem?
 

Attachments

  • sdfsdfs.PNG
    sdfsdfs.PNG
    80.2 KB · Views: 4
OP
OP
Zaytri

Zaytri
she/her

Glitch Witch
Admin
Developer
Streamer
Hi so i just bought this today and im having trouble. Whenever i type a message, it shows up on browser source and the widget. But whenever my mod or anyone else types, the chat bubble doesn't show up. i included a pic that could maybe id the problem?
did you set it so that you have an exclusive villager image? because when you do that and it's the only custom image, it breaks because there's no other image available for anyone else
 

yubyuns
she/her

New member
did you set it so that you have an exclusive villager image? because when you do that and it's the only custom image, it breaks because there's no other image available for anyone else
HI thank you so much for the response! Yes i did have an exclusive image for me and that was the problem! thank you! (also is there any way i can have an image for me? I wanted Celeste as my villager but i think that doesnt count? :') Is there any way to bypass that?) AGAIN THANK YOU!! i love the Villager chat so much <3
 
OP
OP
Zaytri

Zaytri
she/her

Glitch Witch
Admin
Developer
Streamer
HI thank you so much for the response! Yes i did have an exclusive image for me and that was the problem! thank you! (also is there any way i can have an image for me? I wanted Celeste as my villager but i think that doesnt count? :') Is there any way to bypass that?) AGAIN THANK YOU!! i love the Villager chat so much <3
If you open up villagers-villager-chat.js in a text editor, you can manually add a villager in to the default villager list
 

Kindabananas

New member
Im stuck on Widget Settings when trying to setup the chat. The tools tab is blank so I am unable to move forward
 

Attachments

  • widget.png
    widget.png
    111.8 KB · Views: 2
OP
OP
Zaytri

Zaytri
she/her

Glitch Witch
Admin
Developer
Streamer
Im stuck on Widget Settings when trying to setup the chat. The tools tab is blank so I am unable to move forward
you're opening it from within the zip file, you gotta fully unzip it all because when you open a file from a compressed folder, it only opens that one file and has no access to the other files
 
Back
Top