Extracting full source code
How can I get the full source code for certain game .cpp files? I want to learn more about the mechanics of saving blueprints by the blueprint designer and for that I want to see the full source code of FGBuildableBlueprintDesigner. I may also need to extract source code of other files.
Solution:Jump to solution
That's the neat part. You don't.
CPP compilation is a one way process to turn human readable code into machine instructions. Using the headers, pdb files, and a decompiler like ADA or Ghidra you can figure out what those machine instructions are and attempt to map them onto human readable variables and functions. But you don't ever get the actual .cpp unless someone gives it to you....
11 Replies
Solution
That's the neat part. You don't.
CPP compilation is a one way process to turn human readable code into machine instructions. Using the headers, pdb files, and a decompiler like ADA or Ghidra you can figure out what those machine instructions are and attempt to map them onto human readable variables and functions. But you don't ever get the actual .cpp unless someone gives it to you.
Okay, the main topic of the question can be closed. But maybe you know how I can generate and add such blueprints to the player?
You want to pre-roll blueprints with your mod? Apart from making the files yourself and then copying them out of the mod and into the right folder for the level I'm not sure. I haven't dealt much with that level of blueprinting
Blueprints are serialized with a format similar to the save game with the unreal serialization system. That's documented decently well on the wiki. Are you looking to do something with blueprints while the game is running or with external software?
The SBS mod can download them at runtime and make the game re-scan for them
>mod sbs
>mod blueprint store
Fred Mod Searchβ’
Satisfactory Blueprint Store
Satisfactory Blueprint Store is a blueprint website to share blueprints with other players. https://sbs.kyrium.space/
EA: :no_entry_sign:
Note: Broken by 1.0
EXP: :no_entry_sign:
Note: Broken by 1.0
Last Updated <t:1705775921:R>
Created by Kyrium
If this isn't the mod you were looking for, try a different spelling.
I think it was open source
What I meant was that I want to generate a blueprint (by blueprint I mean the blueprints that the player can create using the blueprint designer building in the game) and then write it to the in-game object store for the player to place later. I knew there would be such problems with defining the blueprint. I should have defined it earlier.
Yeah that looks like something where i can explore the source code and find a solution.
(nit: the disassembler/decompiler is called IDA, not ADA :wonke:)
If you want to try decompiling, remember that:
- CSS provides .pdb files for the game's DLLs
- you don't need to reverse engineer UE's code, you should have the source code shipped with your engine install (the release you downloaded from https://github.com/satisfactorymodding/UnrealEngine contains the source code once installed)
Ok, thanks for the clarification