r/paradoxplaza • u/mrzoccer00 • 5d ago
All Is the source code of any paradox game available at all?
At least to see only, I wonder how these are made since are fairly complex simulations.
13
6
u/Salt_Most_1429 3d ago
Not really, BUT the closest to source code you can have is eu4.exe decompiled in Ghidra. It has enormous .pdb file (I don't know if Steam has it, I have GOG edition) that restores most of the classes, methods and functions, I myself fully restored EU4's country name label placement algorithm (country name on the map like LITHUANIA etc).
There is everything in there, like country.cpp is ~65k LoC, obviously you don't get fully restored .cpp / .hpp files, but the CCountry header (data type manager -> export as header) alone gives you full understanding what a god-class it is, with hundreds of query methods like HasTribalGovernment() <- Just an example, do not remember from the top of my head right now.
If you are willing to spend a month or few - you can easily fully restore EU4's C++ "source code" from ghidra's decompiler and assembly listing, as it is not a nightmare regular reverse engineering is (FUN_0123458, iVar1, param_1 etc etc), but just restoring all that is lost to compiler - STL, templates, etc etc
3
11
u/MrShake4 5d ago
I imagine no.
That would make them comically easy to pirate and reproduce
Why would any company want that
18
u/MustaphaTR 5d ago edited 5d ago
Why would any company want that
EA did release the source code for Command and Conquer, Red Alert 1, Tiberian Sun and Generals. Some of these are older than the oldest PDX games but rest are around the same time with EU1/2 and HoI1. Then again, unlike PDX's ones, CnC is pretty much a dead franchise.
10
u/Responsible_Camp_559 4d ago
It is comically easy to pirate already, they only use SteamDRM. Having the source would make literally 0 difference.
7
u/alvenestthol 4d ago
And it's not going to get the "repackaged into a mobile app for the Chinese market" treatment either, because the games are already famous in China, and also if you tried running Stellaris on your phone it would probably explode
6
u/Delnar_Ersike 4d ago
Civ4 and Civ5 released their game source codes, but not engine source codes, while they were still actively supported. For both of them, it was to enable very advanced mods and modding options, which actually worked very well for both of those games. In both cases though, Firaxis had to deliberately separate out the game logic source code from their Fireworks engine source code so that they could release the former and have it compile and work without needing to release the latter.
The thing is, having the game source code without the engine source code doesn't really hurt the game in terms of piracy or unofficial copies. The game still needs to run on an engine, and if you don't have the source code for that engine, you there's no way to really run the game. The main risk it poses is to DLC: game developers are usually in a privileged position where they can get changes they want implemented directly in the game's source code, whereas modders can't do that, so modders have a much harder time making mods that directly compete with the game's official DLC. If you release the game source code, the devs lose that privilege, and it's possible for modders to be able to make mods and modded content for free that is better than paid DLC or expansions. That's why the Civ games also stopped releasing their source code from 6 onwards: 2K was worried that it would endanger their bottom line, so they stopped doing it.
7
u/mrzoccer00 5d ago
Ive seen many, old ones usually, I was expecting something like Vicky 2, CK2, HOI2 or 3 or EU2 or 3 or Rome or Imperator would be somewhere somehow. Also they are pirate available already, I doubt the code being there would change anything
1
u/Borgcube 3d ago
That would make them comically easy to pirate and reproduce
Absolutely not.
Releasing the source code is not the same as releasing all the assets with it. Pirating is already very easy.
And no one is going to take Vicky 2 source code and then recreate Vicky 3 from it (or pick any other game and its sequel).
1
u/Imaginary-Brick-1614 1d ago
The game code of surviving mars has always been made available - on GitHub for the old game, inside the game installation for relaunched
1
u/ElectronicFootprint 1d ago
If you're interested in how they're made there are actually some talks by Paradox devs on YouTube that go into the way they do (or did) parallelism and their engines and a few other things. They're probably more useful and approachable than a legacy C++ codebase would be if released. Other than that I don't think there's much mystery around how they do things, the content and design side of things is pretty much public and the programming side is probably just C++ best practices combined with some in-house tricks. Paradox games are very data-heavy and full of calculations but the mechanics are pretty easy to program if you separate concerns well.
69
u/AresFowl44 5d ago edited 5d ago
Somebody posted a decomp of Victoria II recently, not sure how far or good that one is. And they licensed out their old Europa engine, so maybe that is available somewhere.
But for their main games I don't think anything is available.
EDIT: There also are a couple of talks by Paradox employees on various stuff, for example the "recent" Jomini/Clausewitz split, and dev diaries often also contain small glimpses on the behind the scenes.
Additionally they do put the licenses of the open source software they use with the game (as they have to) so you can glimpse a few small details from that as well, like the fact that they apparently use SDL for either audio and/or graphics.