Help ig idk
So how do I use the actual NormCore (MULTIPLAYER THING) stuff, like add cosmetics to the dlc, give people stuff, ban people, etc.
3 Replies
Hi @π π‘ π π π π π 2 <3. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
To use Normcore for multiplayer features like adding cosmetics, giving items, or banning users, hereβs what the knowledge sources provide:
1. Adding Cosmetics (e.g., DLC Items)
To add cosmetics or DLC items and synchronize them across players, youβll need to:
- Model the cosmetic data (e.g., which hat, skin, etc.) using custom models or properties.
- Synchronize this data using Normcoreβs datastore and Realtime API. For example, you can create a custom model (like you would for a drawing app) to store which cosmetics a player has equipped, and sync it across all clients. See the multiplayer drawing app example for how to structure and sync custom data models [Creating a Multiplayer Drawing App].
2. Giving People Stuff (Granting Items)
- You can update a playerβs model in the datastore to reflect new items or cosmetics. This is similar to how youβd update the state for a playerβs position or drawing data.
- Use ownership to ensure only the server or the correct client can modify their inventory [Ownership + Lifetime Flags].
3. Banning People
- For advanced moderation (like banning users), youβll likely need custom server-side logic.
- Normcore Private allows you to run server plugins in Unity, where you can implement logic to check user IDs and disconnect or block banned users [Server Plugins].
- Thereβs no built-in ban system in the public docs, so youβd need to implement this yourself using server plugins or by managing a ban list in your backend and preventing banned users from joining rooms.
General Steps to Use Normcore Multiplayer
1. Import Normcore into your Unity project and set up your App Key [Getting Started].
2. Use Realtime Components (like RealtimeView, RealtimeTransform) to sync objects and player data.
3. Create and sync custom models for any additional data (cosmetics, inventory, etc.).
4. Use ownership and lifetime flags to control who can modify what data.
5. For advanced features (like banning), consider using Normcore Private and server plugins.
If you need more specific code examples or step-by-step guides for a particular feature, let me know! The knowledge sources do not provide full code for these features, but they outline the architecture and tools youβll use.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
<@1358599189336031263> Kapa.ai is still learning and improving, please let me know how I did by reacting below.
No through the website. Normcore.io