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

How to add bots or dummy characters? #577

Open
nitoygo opened this issue Jan 9, 2025 · 3 comments
Open

How to add bots or dummy characters? #577

nitoygo opened this issue Jan 9, 2025 · 3 comments
Labels

Comments

@nitoygo
Copy link
Contributor

nitoygo commented Jan 9, 2025

I want to test the performance on client side when there are too many players in a map (with their stores open for example).

Is there an easy way to do that in the server side? Or does it require actual clients to run and connect? The latter could be heavy unless it could be handled by running a script to simultaneously login via command line client with the nuget library)

@sven-n
Copy link
Member

sven-n commented Jan 9, 2025

At the moment, there are no bots implemented on OpenMU yet. I think there are several ways for the different aspects. I try to break them down with the possible options:

  • Account handling:
    • We implement a way to add accounts in bulk. Maybe we can add a function in the setup page to add a defined number X of
      accounts, based on a selectable template account. The server then needs to clone this account X times and saves them.
    • Or, define a new type of account as 'test template', which can log in multiple times at once. The character name could include some kind of placeholder for a number which gets incremented for each new connection. To prevent database chaos, these accounts never actually save their data and are read-only.
  • Joining the game:
    • Obviously the easiest thing would be to connect via network, and implement all the actions on the test client side for different use-cases. It would also be a great test how the server as a whole would handle high load.
    • Or, we add new implementation of the Player class. Basically, atm we only have a RemotePlayer which listens on incoming data packets. A new BotPlayer instead could work without a network connection. However, this would need an additional configuration how the bot should behave.
      • Additionally, we need some kind of component which adds/removes this bot to/from the game, controlled from the admin panel.
      • In a later step, we could also add an implementation of the MuHelper at server side. This way, we could have some kind of an offline leveling feature in the future, for real accounts/players.

What do you think? 😅

@nitoygo
Copy link
Contributor Author

nitoygo commented Jan 9, 2025

Hmm I lean towards what would naturally lead to the implementation of Offline Leveling. But kinda tricky it seems 😂

I'll just park this here for now.

As for my current use case, we can template from the existing test characters, and log them in using CLI. not sure yet how to make them go to one map, and open up stores.

@sven-n
Copy link
Member

sven-n commented Mar 2, 2025

I added template accounts with #579

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

No branches or pull requests

2 participants