Do you think I could just leave this part blank and it'd be okay? We're just going to replace the whole thing with a header image anyway, right?
You are not logged in.
Pages: 1
If creating a rpg bot of some sort what should i use to keep track of items such as weapons that players have and also, what would be best way to save stats/weapons for characters on a file and best way to load them back into the game once i restart bot so players don't lose their stuff
For my latest, discontinued project: EEArena, I used .json database files for each user that has ever joined the world. Here is the source code for it, if you want to take a few crucial elements from it.
The file consisted of the whole player class, which contained all the information about the player in the game, and in the bot system. I worked with the Newtonsoft.Json library.
Offline
Thanks for the information, to store the information did you use arrays? Or dictionaries of some sort? If so, what's better and why?
I used a player array. I initialized it at startup with zero elements, then would resize it when a player joined. I'd then easily access the player object with Player[id].
That was written long ago, and I consider lists better to work with than arrays.
Offline
How much do you already know?
Do we need to start from the basics or have you already had programming / EE botting experience before?
I already know a lot of the basics; I just want to get familiarized with what's better for storing information - like I've seen players use dictionaries for storing things that i'd put in arrays. So i was just trying to come to a conclusion on what's best for what.
I used a player array. I initialized it at startup with zero elements, then would resize it when a player joined. I'd then easily access the player object with Player[id].
That was written long ago, and I consider lists better to work with than arrays.
Appreciate it!
What programming language are you using / going to use?
Currently using C# is there another one you would suggest - I do believe c++ doesn't have player.io library, if it does please correct me on this.
There is a C++ PlayerIO library by Atilla, but it only works for managed C++, which is not recommended to use.
Offline
C# and JavaScript are the easiest to use IMO, C# is generally better for bots you just want to run yourself, and JavaScript is better for web based (and non Windows) bots as it can be run in your browser.
For C#, I prefer using a dictionary with integer (player ID) keys, as it allows you to remove players after they have left making it easier to iterate over, while with lists you would have to use some sort of null / disconnected check which might be a bit messy...
Offline
Pages: 1
[ Started around 1732196728.6282 - Generated in 0.050 seconds, 10 queries executed - Memory usage: 1.44 MiB (Peak: 1.57 MiB) ]