Page 1 of 1

[227h] Unreal mySQL interface class

Posted: Mon Aug 22, 2011 8:27 am
by []KAOS[]Casey
I've made a way to interact with MySQL databases natively in unreal through unrealscript in a not-lame manner!

http://www.klankaos.com/USQL.7z

Usage : you must install MySQL 5.5(Only version tested) in 32-bit.

You have to click "Advanced" and change install type to 32bit to have this work at all. Otherwise enjoy trying to figure out how to uninstall 64bit mysql.

Examples/docs to come later. The usage I used to build/test USQLDB interaction is commented out in postbeginplay. The class can be found under Info -> USQLDB. You will need to spawn an instance of USQLDB and call on it to use any functions. The default 5.5 mysql installer should come with the same table/db I used to run the postbeginplay code.


Also, enjoy the src code; windows only etc.

Re: [227h] Unreal mySQL interface class

Posted: Fri Sep 09, 2011 7:32 am
by []KAOS[]Casey
http://www.klankaos.com/GSQLInventoryManager.zip

Arguably simple SQL ID create/delete and inventory managing system.

This will save your inventory upon killing something, or upon level end. GSQLInventoryManager only works with JGrass. {Go to projects under http://udhq.org/ to find JGrass.}
However, I can port it to other gametypes if someone wishes, assuming it's interface is compatible, though I could make a much simpler {and poop} version for simple gametypes.

Your inventory will be restored upon respawning.

Please note I have not done any benchmarks on speed yet, and I still need to write the docs for USQLDB.

Obviously, you need mysql 5.5 and USQLDB installed for this to even work.

Since i'm far too lazy at 12 am to edit the mod again to use an ini system to use the password, enjoy manually editing the password until sometime tomorrow!

Re: [227h] Unreal mySQL interface class

Posted: Fri Sep 09, 2011 2:13 pm
by Qtit
Wait... What? You have successfully created a MMO database for Unreal, right?
If so, I love you.

Re: [227h] Unreal mySQL interface class

Posted: Fri Sep 09, 2011 3:30 pm
by Pcube
Wait... What? You have successfully created a MMO database for Unreal, right?
If so, I love you.
Essentially he has created a mod that will swiftly enable MMO capabilities. He could even tweak it so that multiple servers can point to the same database, thus allowing for creation of a network of servers & shared user accounts. If anyone got the ball rolling I'd be sure to join in such a setup. :)

Re: [227h] Unreal mySQL interface class

Posted: Fri Sep 09, 2011 5:28 pm
by []KAOS[]Casey
Wait... What? You have successfully created a MMO database for Unreal, right?
If so, I love you.
You can store any amount of arbitrary data, using whatever SQL commands known to you. Although there is no SQL injection protection yet, since that's a hefty topic on itself..

But yes, you can store stats, experience, inventory, quest flags, any other sort of flags, and retrieve them.

And as pcube said, if an off-site server allows for connections not from localhost(127.0.0.1) you could indeed have multiple servers from multiple people querying the database.

Oh poop, speaking of that, I forgot to update the USQL.dll package.. oh crap oh poop, crappity smack UTF-8 since it doesnt work with player names


USQL package is now updated. 1.1 includes a fix for storing ASCII character names in a UTF-8 database. Side effects if any are unknown.

Re: [227h] Unreal mySQL interface class

Posted: Fri Sep 09, 2011 8:30 pm
by Qtit
Okay, I know nothing about SQL, so basically I'd need to learn something.

Still, I am deeply interested in that kind of project, mod, whatever. Is it capable to control NPC/AI spawning and behavior in multiple maps? I mean, there is a UT mod (I think) which lets loading of multiple maps on Unreal Server. Having this mod linked with the SQL database you've created and updated to manage more information, we basically could create an Unreal based MMO... Right?

Because, if so, that is freaking awesome, if I may say so. I have no idea how it would work with playercount limit and this multiple map loading on server(s) (I imagine that one server would not be enough to load 10 maps which could work as a part of the mmo-type game world) but still, even basic leveling coop unreal server with cross-level travelling could rule the world.

Damn, if what I've written isn't clear enough I'm sorry... It's been a looooong day of a longer week.

Re: [227h] Unreal mySQL interface class

Posted: Fri Sep 09, 2011 9:15 pm
by []KAOS[]Casey
Well, It could hold spawn positions for an ungodly amount of monsters. The spawn conditions would have to be done through uscript, but there could be a respawn time in the database itself. Multiple map mod {there's also one for 227, thanks to dots} would easily work with such a thing.

I don't know how bandwidth works on a multi-map server at all, so I can't really comment there at all. Though if it's actually seperate handling for each XLevel instance it probably could work.