Invisibility

Discussion in 'The Suggestion Box' started by DryAgedBeefJerky, Jan 12, 2022.

  1. This is a pretty good idea however i think (and do not quote me on this cause even i am unsure of it myself) That something like that (where players are visible but to mobs, they are invis.) could need a plugin to work.

    But if it wasn't, hell yeah that is a good idea
    ChespinLover77 likes this.
  2. It will come out soon in like 5 years
  3. Instead of your change, I think the use of an invisibility potion should alert nearby players.

    "Player used an invisibility potion near you."
    "Player is invisible and is near you."

    ...Or just enable them - without changes - so EMC can be more like vanilla MC.
    StgbtL likes this.
  4. That would be nice. It could also specify who used it.
    (ex. UltiPig used an invisibility potion near you)
    (ex2. StgbtL is invisible and near you)
  5. I like the thinking, Ulti. :)
    UltiPig likes this.
  6. That's what I meant to say. :p
  7. Wait a second. That message would make me stop in my tracks with fear of the unknown. Why would someone need to be invisible near me? Am I being watched, tracked?

    For someone to be invisible near me just sends the message that someone is up to no good or tricks. It's like sensing someone is in a shrub while you get the house key from inside the flower pot near the door.
    StgbtL and Merek_Shadower like this.
  8. What if it reveals the location? like it could say "farmerguyson is invisible and is very close to you."
  9. OhMiku and SkeleTin007 like this.
  10. This is weird. :confused:

    There's a discussion thread about this that hasn't got the red text yet. It was also active on several days. Did everyone here miss that somehow?

    Have you checked Egeau's implementation?
  11. I don't know what you are talking about. Egeau hasn't sent me anything

    Edit. If you are referring to the scoreboard thing. I have my doubts that would work without conflicting with our existing uses of scoreboard teams
    SkeleTin007 likes this.
  12. As best as I can figure... Without requiring a mod, there does not appear to be any way to accomplish the "Friendly Invisibility" scoreboard solution without us losing colored names above our heads - as that is tied to the Scoreboard team. Which each person can only be in one.

    Guess we could do a poll at some point making people choose between the two. This wouldn't be something for 1.18 though.

    There "could" be a solution that doesn't involve scoreboards. But I do not know about it and isn't a priority to me to investigate something that probably doesn't exist. ¯\_(ツ)_/¯

    (I acknowledge this could be wrong - but I was unable to locate contrary information. Would likely need someone to look in the CLIENT code to identify how the player nametag is calculated)

    Edit: No poll is likely on that question - it is probably a trade-off we would be willing to take. As there are some other benefits to having the "Teams" freed up from being per-person. Other advantages could be special coloring for team based things with PVP environments - and other options controlled by scoreboard teams.
    SkeleTin007, 607 and Unoski like this.
  13. net/minecraft/client/renderer/entity/player/PlayerRenderer#renderNameTag in Mojmap. The only contents of the method check the scoreboard and whether the nametag text is deadmau5...
    UltiPig likes this.
  14. Perhaps one could use entity tags? they're applied and removed with /tag, and one can have as many as they want at a time. They're a lot less permanent than teams and more easy to apply, and just as easy to check when running other effects. If one has the "SeeInvisible" tag, they're made translucent to others. Otherwise, they're not.
    Considering that it's just a binary toggle, and multiple tags can be made for different circumstances, one could set up multiple situations where players and admins can be invisible to very specific other players at the same time.
    That is if I understood the situation correctly and the see friendly invisible toggle was the main issue here. If not, I biffed it.

    edit note: entity tags are not in any way related to name tags and the nameplates above players head, rather internal "info" or a "description" of something relating to said entity, and would allow information relating to who should see a certain type of invisible player to be known on a player-by-player basis
    An example of such would be, in my own work, whether the custom crossbow they just fired was in their mainhand or offhand, and whether they should have a loaded variant of it replace their mainhand or offhand
  15. Okay. A consolidation of prior replies and sorta final statement on this suggestion.

    To enable Invisibility potions in a desirable way, we must remove the custom player nametags (see images)
    ->

    Clarifying the "desired" implementation, as we are not a PVP server, we want players to be able to see other invisible players. In general, this is why invisibility potions are currently disabled (from even before I joined on EMC - general concerns of PVP and griefing in an undetectable manner). As far as I know, invisibility potions have never been enabled on EMC - so saying re-enabled is technically incorrect.

    The technical issue that makes this regression necessary is that both require manipulating the "scoreboard team". The client can only use one scoreboard at a time, and can only recognize each player to be in one team in that scoreboard. The scoreboard Team is what controls how NameTag prefix/color/suffix are displayed and also the SeeFriendlyInvisibles property (which is how to accomplish the suggestion). Since each player can only be in one Team, there is no vanilla way for different Teams to control those different properties. Maybe later we could find a way to simulate the individualized nametags - but will lose out on things like colored glowing effects per person (Later in those post I will comment on alternatives to accomplish the suggestion that doesn't have this trade-off and why this approach is not reasonable imo)

    Are there any advantages to doing this beyond invisibility potions? Not really, although would simplify things for doing custom colors and scoreboard stuff for vanilla teams of people in PVP games and stuff.

    When is this happening? Not now. Despite how easy it sounds there are other consequences enabling Invisibility could cause which will just take time to investigate and fix. Frankly, I haven't the foggiest idea how invisibility would interact with custom Survival aspects of EMC. Avoiding aggro is one thing - but to prevent boss guardians from targeting you - or the bosses themselves - is problematic. These are problems that would have code solutions, but requires time which I am extremely limited on. Choosing this one thing to prioritize, is a hard thing.

    Is there another way? Not any reasonable ones. There is no way to trick the client about the scoreboard team stuff mentioned earlier. In theory one could do packet or entity manipulation to visibly show something representing an invisible player (say a named armorstand with the player's head). This isn't "better" necessarily as I still have the custom survival concerns that needs time to work on. Not to mention that the translucent player model is the superior solution. There was a suggestion about using Disguises, and it should be noted that Disguies are bad for performance in regular use which we have had issues in the past with... Not something we want to rely on often...
    In theory, there is another more hacky way to accomplish the objective that I have not thought of. But at this point I have no reason to believe such hackiness to be a valid option to consider.
  16. Thanks for looking into this properly, chickeneer.
    To be honest, I think that most people would prefer coloured names above invisibility potions, but I guess we won't know if a poll is out of the question. ;)
  17. It's not really about whether a poll is an option - I just don't see it affecting the decision long term. Ideally, people want both. Assuming it wouldn't be a unanimous poll result, someone will be disappointed, and It is difficult to quantify how much something is missed till it is removed and someone could be quite upset by a removal. In general, that is the reason why we try our hardest to never remove features unless a good enough reason is found for dropping it.
    I would rather hold the status quo than start dropping things.

    Not saying polls are always useless. I am specifically talking about this specific situation which is unique enough, to not be a common conundrum.
    607 likes this.
  18. If it's just about the achievment, maybe a work around could be done there. Outside of not being noticed by mobs (which has been mentioned as not something wanted especially vs. the boss mobs), is there really any reason to have this? Even in SP I don't think I have ever used this potion personally.
    Obwangottemm and SkeleTin007 like this.