
[Suggestion] Ability to define entities that are always "glowing"
TerdyTheTerd opened this issue ยท 5 comments
Adding this will allow for modpacks to create a unique system, similar to many recent games, where players can see other players outlines if they are nearby. With the current settings, I can only somewhat achieve this, setting it so players can see targeted players, but I want the ability to define entities that will always be set as glowing, which I can then set the player keyword, letting all nearby players always show their outlines.
If this does not fit within this mods scope I wonder if its possible for you to strip out the highlighting code to a small addon mod for Fantastic-Lib, for only player highlighting. If that't not possible due to time constraints, I wonder how permissible you would be in letting me create such addon (borrowing your code for highlighting).
I will eventually be making a party system, and this would fit well into it, but I'm not yet sure if the party system will be its own mod, or part of an indev RPG mod I'm working on. It also may not be finished very soon, so...
A temporary / alternative solution is reasonable. DS already has a system (via command) that allows you to make yourself always visible to another player (not sure if you found that or not), but as you said it does not highlight them when not focused. I could probably add a config that highlights these players in white if enabled, without too much trouble
Hmm, although it might be nice to just get the party mod backend working without doing any fancy GUI or HUD yet, and do the highlighting via that...
But it sounds like for your application, you'd rather just automatically have all players see each other, instead of needing them to make themselves visible to each other via commands or party GUIs, right?
It sounds like as a temporary solution I can just blacklist all entities except players, then set players to always glow (I forgot the config option, whatever says "adding the player keyword will let them see everything"). I can then run that command for all players and update the settings for targeted hud so it's much wider (as close to FOV as possible).
Currently I am running a small test server for an upcoming public server-pack, so this temporary solution will be a good indicator of feedback for how much players find this feature useful. I would assume IF this is created as a standalone or addon, there would be ftb teams support, or similar?
To clarify a bit, I haven't played/modded/hosted since 1.7.10, and I didn't realize the "glowing" was a vanilla attribute until after my OP, I had only seen it on a trailer for the Windows 10 version, and assumed it was never ported over. Adding this feature to my fork of FTB Utilities should be well within my skill set, and the temporary solution outlined should serve us until then, thanks for all the info!
Alright, though it may not work as you expect; I'm not sure what you're trying to accomplish is doable with the current features of DS.
If you use the actual glow effect server-side, it will cause those who are glowing to be fully visible to all players, and if DS is installed, all mobs as well, so be careful with that one.
The "glow highlighting" I'm using is a client-side hack which doesn't actually use the glow potion effect.
The code for the client-side glow hack is in this class:
https://github.com/Laike-Endaril/Dynamic-Stealth/blob/1.12.2/src/main/java/com/fantasticsource/dynamicstealth/client/RenderAlterer.java
I have a feeling you'll need some new code based on that to get it working.
Ya I think I will leave it as a todo for the eventual public release. Essentially I ultimately want players that are part of a FTB team to be able to toggle their team-mates glow (team owners can config colors for ranks within the team, or just one color for all team members).
I certainly don't plan on stealing the code you linked, but it should prove useful for me getting this setup on my FTB Utilities fork, thanks much for the response. Without getting into the details, I basically just need a list of players synced from FTB Utilities on the client, then on RenderLivingEvent I just need to call "livingBase.setGlowing(true);" on those players?
That code open source (and I wrote it ofc), and you're free to "steal" as much of it as you please. It's like stealing a balloon on free balloon day.
IIRC, the glow was a bit strange, and actually needed to be activated in post-render, and deactivated in pre-render. Probably something to do with glow happening on a different render pass, after normal rendering...but it's been a while and I can't remember.
Looks like my code does support that thought though; it's activating glow in post- and deactivating in pre-.
Some other odd stuff in there too; I'd suggest copying the whole class, removing the section labeled "Entity opacity based on visibility" and the method "replaceLayers", and then tinkering to suit your needs.
Just a heads-up, I also remember client-side-only glow not working right with optifine shaders. Just something to be aware of