Open KiloPetraGames opened 7 months ago
Thanks for the request. At the moment there are no real "Player" NPCs for performance reasons. A "Player" NPC would need nearly the same resources as a normal player to make sure it's compatibly with player specific mods.
This means if you spawn 2-3 "Player" NPCs it would be maybe no issue, but if you spawn 10-20 on a server it will cause a lot of additional load.
For simplicity, the current NPCs are using around 50% - 90% of the resources compare to a normal villager. A "Player" NPC instead is using around 150% - 400% of the resources of a normal villager would do + the resources needed by the player specific mods.
Such "Player" NPC could be only used very rare and has limited use-case, mostly for boss fights or so. Could you please list some of your use-cases to better understand the need for this ?
For sure! In general, I feel that it's use case would be very broad. Improving the visual quality and range of these NPCs.
It would give mods like animation overhaul, serious animations, or not enough animations, the compatibility to make the NPCs feel more alive and expressive!
While better combat would help any hostile encounter feel more immersive and intense, but still keep that vanilla feel when compared to epic fight.
I totally understand the performance concerns, but if there was a way to toggle or change the NPC Player type in the UI or config, it would still allow players with more server/processing power to get the best looking results without compromising the experience for those that want something simpler!
The best of both worlds!
Regardless of what you decide, thanks for taking the time to hear me out!
Oops, closed this on accident!
To provide additional technical context, the Player Model itself isn't the focal point of concern; I've already implemented its usage for the majority of NPCs.
The crux of the matter lies in the fact that many player-animation functionalities rely on a live player instance that communicates through network data transmission, while also storing player-specific data.
Consequently, in order to replicate these features for non-player entities, the simulated player must emulate these behaviors comprehensively. As a result, it's not feasible to toggle or switch the entity type post-initialization due to the nature of these emulated functionalities.
Maybe, it would be good idea to implement vanila vilagers entity model and beheviour, assuming that it would be less resource intense, and there are a lot of mods for overhauling the basic vilager. Maybe even the villager entity with the player model/skin. As for right now, there are mods that changes the player/villager to be non-human entity, and the custom easy-npc npcs are just sticking out. As for the pose, you can have those in default npc, sure, but if it's to much for player models, you can still have a model without it. Maybe, if the npc could mimic to the mob/player model, it would be great. What I'm saying, if there will be a easy way to just take the entity info from other vanila/mod enity, without the need of writing additional mod to implement it, like with your easy-npc-epic-fight, it would be very great.
Maybe it would be great for implementation of disguiselib?
Unfortunately, it seems that the disguiselib library has dropped support for Forge, and the latest version available on CurseForge is 1.19.3 from 2 years ago. This limitation means that disguiselib is not a viable option. See: https://github.com/NucleoidMC/DisguiseLib/commit/09677ca55b1e7f19b20e57017b054de46690d440
Other NPC mods have attempted to address this issue by either integrating disguiselib, creating fake player entities for all NPCs, or adjusting network packages to simulate another entity on the client side. However, these solutions are not ideal for long-term maintenance. They require additional computing resources to display NPCs and can lead to other unforeseen issues down the line.
Given these challenges and limitations, it's important to prioritize finding a solution that is both maintainable and efficient in the long term. This may require investing more time and effort upfront to implement a solution that meets the needs without introducing unnecessary complexity or resource overhead.
Is there any way to set the player NPCs to just read as player entities when spawned? That way they could utilize custom animation mods like animation overhaul or better combat?
I know the posing wouldn't be compatible with it, but if there was a toggle or option in the config, that would be amazing!