I have a random name generator for elements in my game. Apparently these now have to be filtered. The documentation for FilterStringForBroadcast says that a player is required in order to filter text. This generator runs when the server first inits, when no clients have connected yet. How am I supposed to filter this if I can't run the method?
How to filter text with no players connected?
1 answer
If players never see it at all then a filter is not needed. Also if you know all of the names in the random list or whatever, then you don't need a filter either. But I assume players are supposed to see this. I recommend doing this calculation on each client. Or a re-roll option. I doubt it is really that obstructive!
1 comment
The issue is that a re-roll will not work. The generator uses a Markov Chain to recombine pieces of other words into something believable. The issue is that this needs to be consistent. This data is used to name things such as planets or elements in my game. If a player logs out with an element in their inventory, they would be really confused if they logged back in and it was named different
This discussion is preserved as it was. New answers, comments, and votes are closed.

4 comments
Also, this is real annoying, as it potentially adds a tremendous amount of processing time to the generation of names. If a name gets filtered, it has to start over from scratch repeatedly until it finds one which works. Not only this, but if they change the generator to be any more/less restrictive, the final output of the generator will change and no longer be consistent.
As long as you know that the names are not 'bad' then there is no problem. If you are randomly putting a name together then this should be filtered just in case.
Also you need a client to create the server
This is true, but at the moment the server starts and scripts begin executing, there aren't any clients connected. I need to be able to start running the generator the moment the server starts, not the moment the first client connects.