Question|Headedtomexico|mqemulator@gmail.com|1274907381|headedtomexico|xx|0|166.205.9.35|Kirsle,<br /><br />I have a question for you. I'm setting up an online game. The game server is in c++, but game characters tap into .pl files for their chat scripts. For example. A merchant named &quot;bob&quot; would have a bob.pl file which would consist of basically a single function that will get called by the c++. it will pass it the text said by the player and return the response text. I've written these files before but it's mostly cut and paste since I don't know perl. An example would be:<br /><br />bob.pl<br />[code]<br />sub CHAT &#123;<br /> &nbsp;If ($text=~/hello/i) &#123;<br /> &nbsp; &nbsp;Game::say(&quot;hello youself&quot;);<br /> &nbsp;&#125;<br />&#125;[/code]<br /><br />the c++ knows the merchants name so it just looks for his pl file, sets $text and then calls the Standard named CHAT function.<br /><br />From reading about your tool here it seems like this would be a fantastic place to implement and highlight your software. Others who have setup identical servers rather quickly gather up a poplation of about 300players at a time, and interacting with the game AI is central to gameplay. I would love to implement a unique chat system like this to give me an edge over others.<br /><br />1, with the current setup I described how easy would it be to implement.<br />2, how difficult would it be to script a basic role playing personality, with somewhat limited responses, 100-200 perhaps in the character of a goblin let's say.<br />3, could I implement multiple personalities for different races of characters simulataniously. Ie say hi to an ogre and he<br />grumbles, say hi to an elf and he laughs at you. It would also be important for me to code specific personalities for pivotal characters. For example... You ask the king where his daughter is , or what happened to your daughter, or where is your child, etc and he has a specific response that is important to gameflow that he blurts out, &quot;my daughter is in the dungeon&quot;<br /><br /><br />Does this sous possible with your software?<br />||||
Re: Question|Kirsle|casey@cuvou.net|1274907830|Kirsle|xx|0|72.37.252.50|All of that should be possible. The only tricky bit is the way your C++ interacts with your Perl script in the first place.<br /><br />If the Perl script gets loaded and executed each time the C++ wants to call this function, you'll have to write your code in a &quot;stateless&quot; way (similar to if you were making a CGI script for the web for users to chat with your bot). If your RiveScript set is very small you could simply load the *.rs files each time your script is called, i.e.<br /><br />[code]use RiveScript;<br /><br />sub CHAT &#123;<br /> my $rs = new RiveScript();<br /> $rs-&gt;loadDirectory(&quot;./replies/common&quot;); # common replies?<br /> $rs-&gt;loadDirectory(&quot;./replies/goblin&quot;); # goblin-specific replies?<br /> $rs-&gt;sortReplies();<br /> my $reply = $rs-&gt;reply(&quot;username&quot;, $text);<br /> Game::say($reply);<br />&#125;[/code]<br /><br />You could use the setUservar/getUservars functions to save and load variables to and from disk as well (so your bot could remember peoples names, for example).<br /><br />You mentioned the script gets $text from the C++; does it get any other variables? A unique name for the user who sent the message maybe? If so the bot could keep track of variables for different users by their username.<br /><br />You could make personalities specific to each bot by just having each bot's .pl load replies from different files or directories; the example code I posted above loads from a directory called &quot;common&quot; first (where you'd put replies in that are common between all bots, like maybe a &quot;/version&quot; command or something like that), and then a &quot;goblin&quot; folder for goblin-specific replies.||1274907964|Kirsle|
Re: Question|Headedtomexico|mqemulator@gmail.com|1274908439|headedtomexico|xx|0|166.205.9.35|I was about to shoot you a private message, I wasn't sure how frequently. You checked your boards. That was fast.<br /><br />And yes it sends a host of variables. Player Name, race, class(warrior, wizard), etc. <br /><br />I'm a ways out from getting it setup. It's a mmo emulator server and I was going to custom populate the db in a way that felt like a sequal hopefully. I just got the server built and I'm wrestling with ubuntu and the on board raid controller. <br /><br />Once I get the server up and running and if I don't end up with loads of questions I'll shoot you a link to look at it if you like.<br /><br />I imagine with the AI stuff you just get a bunch of people installing chat bots but maybe bot alot of implementations with a more defined purpose.||||
Re: Question|Kirsle|casey@cuvou.net|1274908758|Kirsle|xx|0|72.37.252.50|I subscribe to all the boards on this forum so I get e-mail notifications when anything happens... because this forum isn't posted to very often and I'd miss things otherwise. ;)<br /><br />It'll be cool to see what you come up with though. So far I've seen RiveScript used for instant messenger chatterbots (which is what I wrote it for originally and used it for myself) and for the A.I. behind the Libby bot at [url]http://purpletree.org/[/url] which fetches replies from the Internet to spoken questions.||||
Re: Question|Headedtomexico|mqemulator@gmail.com|1274916236|headedtomexico|xx|0|70.164.207.169|I'll be sure to shoot you the info. I dunno if by chance you ever played everquest, but the servers use a bastard everquest client. Play is free, but the client is like 20$ so I dunno if youll really be able to see it in action. Perhaps I can just toss screencaps your way. Unless that is, if you turn into a fanatic about 11 year old games between now and proof-of-concept. &nbsp;:)||||
Re: Question|laseriv|laseriv13@gmail.com|1318588918|laseriv13|xx|0|180.210.216.68|Thank..you..for..sharing..this..information.||||
