Local database, sql?

Is it possible to have a database which contains only text and implement it in my game? I want to be able to query it in real time. I can’t seem to find anything constructive on this subject with google searching. This database will contain item data, spell and ability data, etc.

I can do this in basic java or c++ code, write a simple SQLite database query program. Is SQLite or SQL in general able to be used in the engine? I can deal with a simple text database with csv, and parse that. i just know that SQL is more efficient, so either or would work.

Anything can be used with engine as everythign can be coded and any library can be used. There is SQLite module in UE4 but it seems to be forgotten and halt in devlopment, also it seems it does not build by default, you might try to investigate that (i think if you add module to depency in build script it might build that module too… if it still builds)

https://github.com/EpicGames/UnrealEngine/tree/e607ba4d978c08a26e8e8e629dec0884bb161770/Engine/Source/Runtime/SQLiteSupport

If not you can use to learn how to access SQLite ThirdParty library that is in UE4

You also mentioned csv… did you tried DataTables?

Also SQL is name of query language, and every database that use that name, only uses it but they have there own database implementation, but there is no SQL database, other known are open MySQL or commercial Oracle, but they are server databases. SQLite is server-less, so it’s only one i know that is good to be used in end-user applications.

your first link is broken.

It’s not broken, you just need to gain access to UE4 GitHub:

Don’t worry it’s free and as you code in C++ you will find it useful

how do i go about adding it to the build script? I just investigated my source files and it is still a part of the 4.9 build source files.

do i just add “SQLiteSupport” to the public dependency list?

yes :slight_smile: keep in mind it might be broken, i gived you github so you could study how SQLite is attached to it

i included the SQLiteSupport in the build.cs and I also created the sqlite/sqlite directory as described on the page u linked. i downloaded the SQLite source files and put them in that directory. But when I go to “Refresh Visual Studio Project” I am getting this error.

Running F:/Unreal Engine/Epic Games/4.9/Engine/Binaries/DotNET/UnrealBuildTool.exe -projectfiles -project=“E:/Unreal Projects/UntitledRPG/UntitledRPG.uproject” -game -rocket -progress
Discovering modules, targets and source code for game…
ERROR: Unable to instantiate instance of ‘SQLiteSupport’ object type from compiled assembly ‘UntitledRPGModuleRules’. Unreal Build Tool creates an instance of your module’s ‘Rules’ object in order to find out about your module’s requirements. The CLR exception details may provide more information: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. —> UnrealBuildTool.BuildException: ERROR: This module requires a source code build of the engine from Github. Please refer to the Engine/Source/ThirdParty/sqlite/README.txt file prior to enabling this module.
at UnrealBuildTool.Rules.SQLiteSupport…ctor(TargetInfo Target) in f:\Unreal Engine\Epic Games\4.9\Engine\Source\Runtime\SQLiteSupport\SQLiteSupport.Build.cs:line 56

i couldn’t include the entire error log in the previous comment.

— End of inner exception stack trace —
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark)
at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
at System.Activator.CreateInstance(Type type, Object[] args)
at UnrealBuildTool.RulesCompiler.RulesAssembly.CreateModuleRules(String ModuleName, TargetInfo Target, String& ModuleFileName)

Derby from Apache is also serverless, and it’s pure java, so can be built into any of the configs from Epic, so long as the target platform has Java as well. This database was given to Apache by IBM, and is very robust. There are others out there serverless. Actually one of the first Databases that utilized Codd and Date’s (74, of IBM fame, both were Fellows) definition of SQL was called Sql/Ds for VM (where VM stood for Virtual Machine, and operating system sold by IBM for decades, first implementation was completed in 1967, and called CP67, and yes, it did everything that VMWare does, and much more, just 30 years earlier, lol).

Looks like this module, SQLiteSupport, isn’t working at the moment; Bronken since 4.7:

Epic abandoned ?!?

We hope this plugin can help you.

HiSQLite3 (SQLite3 For UE4)