Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only one FakePlayer spawned? #15

Open
SOF3 opened this issue Oct 1, 2021 · 3 comments
Open

Only one FakePlayer spawned? #15

SOF3 opened this issue Oct 1, 2021 · 3 comments
Labels
question Further information is requested

Comments

@SOF3
Copy link

SOF3 commented Oct 1, 2021

If I understand correctly, FakePlayer only spawns one fake player by default. Shouldn't this be customizable like Specter?

@Muqsit Muqsit added the question Further information is requested label Oct 1, 2021
@Muqsit
Copy link
Owner

Muqsit commented Oct 1, 2021

FakePlayer used to spawn in one, but now spawns two fake players by default. plugin_data/FakePlayer/players.json contains a list of players to spawn in, users can modify the list to spawn in more (or remove existing) fake players, or use Loader::addPlayer() to spawn a player during runtime.

@SOF3
Copy link
Author

SOF3 commented Oct 2, 2021

I am kind of confused about the orientation of this plugin. If it is supposed to be controlled from other code like puppeteer, it should not do something by itself. If it is supposed to be user-friendly without code, it should provide commands for spawning fake players.

@Muqsit
Copy link
Owner

Muqsit commented Oct 2, 2021

It's the latter, a player is spawned in with properties specified in players.json and (to a user) is indifferentiable from an actual player on the server.

The plugin does lack commands, I do intend to work on them. At the moment, the plugin is pretty useful in cases such as testing pvp mechanisms without needing another device or an emulator (like bluestacks).

It is sort of complicated to work on a /spawnplayer command because of how much data is associated with a player (see data associated with every entry in players.json).
F.e., the user would at minimum have to specify xuid, uuid and gamertag for each player they choose to spawn in, and using random values for xuid and/or uuid or making a typo may cause inconsistency in plugins that use these properties to index player data.
Though if an advanced user would still like to go overboard despite all of that, there's always an addPlayer() method to spawn fake players during runtime.
For the rest of us, I feel like fake players are better managed when player data is pre-configured in players.json (which is currently the case) so the room for such issues is reduced (though definitely possible). Perhaps users can have the option to spawn in a selected set of players from players.json rather than the plugin spawning in all entries within players.json.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants