Extract map Actor properties and store them in a database
-
- Godlike
- Posts: 2644
- Joined: Fri Sep 25, 2015 9:01 pm
- Location: moved without proper hashing
Extract map Actor properties and store them in a database
The topic already tells it: I'l looking for a possibility to extract all properties of all Actors in a map (for a lot of maps) and store them in a database in order to filter certain things. I guess DestinationUnreal must have such because of the detailed map information on their web site (see example screenshot).
You do not have the required permissions to view the files attached to this post.
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
-
- Godlike
- Posts: 5486
- Joined: Wed Feb 27, 2008 6:24 pm
- Personal rank: Work In Progress
- Location: Liandri
Re: Extract map Actor properties and store them in a database
Well, probably @Shrimp has something like that, given his work on UnrealArchive (coincidentally, he's also the author of that map in your screenshot).
There may be other stuff: I know at least there's some stuff written in Delphi I believe, not sure if there is much stuff around in other languages that you could use for that effect.
I have also built a PHP package to do that, since at the time I wanted to do exactly what you're aiming to do now and what Shrimp is also doing currently with UnrealArchive, and it should work in general, but it's incredibly old, it's incomplete (you cannot get everything) and the code quality isn't great, to put it mildly, so it's likely for there to be bugs and/or maps/packages that it may not be able to open correctly, but you can check it if you want:
viewtopic.php?f=15&t=4796&p=50728
There may be other stuff: I know at least there's some stuff written in Delphi I believe, not sure if there is much stuff around in other languages that you could use for that effect.
I have also built a PHP package to do that, since at the time I wanted to do exactly what you're aiming to do now and what Shrimp is also doing currently with UnrealArchive, and it should work in general, but it's incredibly old, it's incomplete (you cannot get everything) and the code quality isn't great, to put it mildly, so it's likely for there to be bugs and/or maps/packages that it may not be able to open correctly, but you can check it if you want:
viewtopic.php?f=15&t=4796&p=50728
-
- Godlike
- Posts: 2338
- Joined: Sat Mar 21, 2020 5:32 am
Re: Extract map Actor properties and store them in a database
Any external solution which not use UT engine is always lead to info loss. Just because Unreal package highly depends from Actor tree and not store properties which is same in superclass.
So you need work with UCC.
Here you can in automated way convert any map (which able to load OFC), to t3d.
t3d is really simple text format. now you need only parse it and store it in some DB.
It is easy task, which can be done in any lang what good for you with any DBMS what you know.
For example it can be PHP + MySQL. Or VBA + Access.
So you need work with UCC.
Code: Select all
>system\ucc batchexport dm-deck16][ level t3d ..\export_tmp
=======================================
ucc.exe: UnrealOS execution environment
Copyright 1999 Epic Games Inc
=======================================
Loading package dm-deck16][...
Exported Level dm-deck16][.MyLevel to ..\export_tmp\MyLevel.t3d
Success - 0 error(s), 0 warnings
t3d is really simple text format. now you need only parse it and store it in some DB.
It is easy task, which can be done in any lang what good for you with any DBMS what you know.
For example it can be PHP + MySQL. Or VBA + Access.

-
- Godlike
- Posts: 2644
- Joined: Fri Sep 25, 2015 9:01 pm
- Location: moved without proper hashing
Re: Extract map Actor properties and store them in a database
Thanks for hints, exporting to t3d in first step and then analysing the text file with such as perl was in my mind, too.
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
-
- Godlike
- Posts: 5486
- Joined: Wed Feb 27, 2008 6:24 pm
- Personal rank: Work In Progress
- Location: Liandri
Re: Extract map Actor properties and store them in a database
Not necessarily.
While using UCC is indeed much easier and can be used when possible (which isn't always), as long as you have all the package dependencies, you can simply load them as well, and from there doing the necessary inheritance logic of data.
It's actually not that complicated at all.
The hardest part is only to load and parse a single package correctly, because there's barely any documentation around it at all.
But once you get that part done, everything else is a walk in the park.
-
- Adept
- Posts: 253
- Joined: Wed Oct 10, 2018 11:15 am
- Location: Australia
Re: Extract map Actor properties and store them in a database
My
You can get access to all actors and their properties within any package. As Firalidragon mentioned, this is what Unreal Archive uses to parse maps and things. It has some limitations like it doesn't let you export inline code, for example, because it's just not something I've needed yet so it hasn't been implemented.
unreal-package-lib
will let you do this, if you use Java. See https://github.com/shrimpza/unreal-package-libYou can get access to all actors and their properties within any package. As Firalidragon mentioned, this is what Unreal Archive uses to parse maps and things. It has some limitations like it doesn't let you export inline code, for example, because it's just not something I've needed yet so it hasn't been implemented.
ShrimpWorks
Unreal Archive - preserving over 25 years of user-created content for the Unreal series!
Unreal Archive - preserving over 25 years of user-created content for the Unreal series!