Hello, I would like to know if its possible to export all text players in game type to a text document?
Like a log of the players chat text?
If so how would I go about doing this?
also if this is possible, could I do it so that the log is emailed to me or uploaded to a website or something like a database of player text?
Why I ask is for a side project I have made a AI that talks to players when they ask it questions,
However it doesn't always know what the player is talking about and if I had a list of frequently asked questions and terms players typed I could add those to the AI so that it would "learn" in a way.
Also it would be useful to know if I made an MMO in the future.
I'm sure others would also benefit from reading your answers and learning to do so as well. :)
Thank you for your time,
Bloodocean7.
Thanks! I added that var and then made it so when players use the talk verb it exports their text via the << operator to the file and It works like a charm! :)
That will be very helpful. :) and I guess if a database is possible, like if someone else hosts the game on another computer and I still get the chat log on my computer, I would like to do that. Do you know of a library or tutorial that would get me started on that? Thanks again! Bloodocean7 |
Here are developer resources and Nadrew's post on MySQL.
|
Once you have created the variable for the log, like above, you must output text to the log file. To output the text just use the << operator as you would when sending a message to the world. You can create a database with the native MySQL system that was added awhile ago. There's documentation and libraries all around the website.