@Cobaltasaurus said in TinyMUX: How to set default player attributes?:
Create a character parent, and then in the server set the player_parent to that dbref. So all players are automatically parented to it.
That'd honestly be the best solution, but barring that like you mentioned something in the starting room when they do ACCEPT or maybe the master room when a player connects check the existence of the attribute, if it doesn't exist, set it.
Times like this makes me kinda wish MUX had some more features from (shudder) TinyMUSH3 or RhostMUSH.
Basically a global_clone_<type> so when a new type of that type is created, all attributes are copied from the clone to the target. I think Penn has work arounds with their action lists and other methods, but with MUX you're more limited by options.
So off the top of my head with MUX you're limited to:
- Set the attribute via global master room code.
- Set the attribute based on the player starting room
- Set the attribute via a $command or exit movement or some other method of trigger
- Set up a parent like mentioned above via @Cobaltasaurus
- @hook on @pcreate and enforce pcreating new players (ugly and not suggested)
And with MUX2 (the latest) that... would be about it.