Yeap, but since i mostly work with c# in my job, im very happy about itzgrssd wrote: Tue Mar 08, 2022 6:59 pmWith "C++" we have to differentiate with what I call "native C++" (involves naked pointers, arrays without bounds checks and all the other funny ways to get speed and mess up) and "C++ .NET".Deathawaits4 wrote: Tue Mar 08, 2022 6:01 pmYes! Exactly. And you know what is best? It seems like the game is written fully in c# as the underlying engine seems to be stride or xenko engine which is fully developed in c#. Maybe there are some parts using c++ (maybe the connection between the graphics engine and the drivers), but most of it will be c#, which brings vast posibilities on what is possible!brucethemoose wrote: Tue Mar 08, 2022 7:07 am All of this ^.
Typically, in Cities:Skylines, Kerbal Space Program, Oxygen Not Included, Rimworld, Stardew Valley and many other games, modders mess with game mechanics implemented in C# via Harmony without having to touch, say, Unity's C++ functions. This has the added benefit of letting all these code modifications play nice with each other, via patching and transpiling, among other things.
It sounds like DW2 may be structured differently than a typical Unity game, with many of the game mechanics implemented in C++ code? Obviously this would be great to access, and I echo Deathawaits4's suggestion above, but modders will gratefully take absolutely anything and everything we can get. We have zero expectations. If you have to obfuscate all of the C++ and part of the C# while leaving some C# open, so be it, that would be far superior than being limited to basic scripting. On the other hand, I suspect modders will do amazing things with anything and everything you choose to leave unobfuscated.
Just to expand on Stellaris some, its problems are manyfold. A big one is the scripting language, which could be worse, but is extremely limited in terms of what it exposes and what it allows you to do. As Death said, some basic operations are ridiculously convoluted and slow, and what modders have done already is nothing short of a miracle.
Another is the primitive conflict resolution. Some fundamental files and functions have to be overwritten entirely, which is an absolute nightmare when more than one mod needs to touch that same file or function. Again, Harmony (as well as xml patching in Rimworld's case) takes care of this.
And yes. Frustrated modders from many communities would jump right into DW2 modding, and drag plenty of their fans and Patreons in with them. DW2 is a perfect storm of what they've been craving: complexity, performance, competent AI, and highly automated systems.
If it is the later, it realy makes 0 difference. MSIL is MSIL, regardless of the source langauge.
Please dont run obfuscation over the code!
Moderator: MOD_DW2
-
Deathawaits4
- Posts: 20
- Joined: Mon Mar 01, 2021 9:26 pm
Re: Please dont run obfuscation over the code!
-
Deathawaits4
- Posts: 20
- Joined: Mon Mar 01, 2021 9:26 pm
Re: Please dont run obfuscation over the code!
Hello, sorry for the bump!
Just asking if there are any news on this topic as the release is just around the corner!
would love to hear the decission which has been made
Just asking if there are any news on this topic as the release is just around the corner!
would love to hear the decission which has been made
Re: Please dont run obfuscation over the code!
https://www.reddit.com/r/pcgaming/comme ... &context=3
We'll be posting a bit of a modding roadmap and some modding docs on release day as well to help explain where we are and where we're going modding-wise. DW2 is at least as moddable as Universe was (a bit more really) at release.
-
Deathawaits4
- Posts: 20
- Joined: Mon Mar 01, 2021 9:26 pm
Re: Please dont run obfuscation over the code!
Thanks for the link!Buio wrote: Wed Mar 09, 2022 8:06 pm https://www.reddit.com/r/pcgaming/comme ... &context=3
We'll be posting a bit of a modding roadmap and some modding docs on release day as well to help explain where we are and where we're going modding-wise. DW2 is at least as moddable as Universe was (a bit more really) at release.
Sadly this still does not answer the question, but it definetly gives me a hint that modding is atleast very much supported.
-
brucethemoose
- Posts: 46
- Joined: Fri Feb 18, 2022 6:14 pm
Re: Please dont run obfuscation over the code!
So just poking through the game directory for a few minutes before I even open the game, it looks like we have enough access to the Xenko engine to get in trouble... I'm having trouble finding where the actual game mechanics are in the code though. I think I need more coffee.
Also, I'm happy to see lots of data formatted as xml (as opposed to plain text in DW1). XPath patching alone will be a huge boost to modding some day, assuming it isn't already enabled.
Also, I'm happy to see lots of data formatted as xml (as opposed to plain text in DW1). XPath patching alone will be a huge boost to modding some day, assuming it isn't already enabled.
-
Deathawaits4
- Posts: 20
- Joined: Mon Mar 01, 2021 9:26 pm
Re: Please dont run obfuscation over the code!
Eyo, havent had time to check the game out as im currently out of town. Did you check if you could access the game data via ilspy? Do you think harmony modding is viable? Ill check it out as soon as i get the time.brucethemoose wrote: Thu Mar 10, 2022 5:00 pm So just poking through the game directory for a few minutes before I even open the game, it looks like we have enough access to the Xenko engine to get in trouble... I'm having trouble finding where the actual game mechanics are in the code though. I think I need more coffee.
Also, I'm happy to see lots of data formatted as xml (as opposed to plain text in DW1). XPath patching alone will be a huge boost to modding some day, assuming it isn't already enabled.
also theres atleast the xpath dlls available, so im confident that xpath is possible.
-
brucethemoose
- Posts: 46
- Joined: Fri Feb 18, 2022 6:14 pm
Re: Please dont run obfuscation over the code!
Not sure, TBH I haven't set up a C# environment since refreshing my PC. This is what I briefly saw with dotPeek:Deathawaits4 wrote: Thu Mar 10, 2022 6:31 pmEyo, havent had time to check the game out as im currently out of town. Did you check if you could access the game data via ilspy? Do you think harmony modding is viable? Ill check it out as soon as i get the time.brucethemoose wrote: Thu Mar 10, 2022 5:00 pm So just poking through the game directory for a few minutes before I even open the game, it looks like we have enough access to the Xenko engine to get in trouble... I'm having trouble finding where the actual game mechanics are in the code though. I think I need more coffee.
Also, I'm happy to see lots of data formatted as xml (as opposed to plain text in DW1). XPath patching alone will be a huge boost to modding some day, assuming it isn't already enabled.
also theres atleast the xpath dlls available, so im confident that xpath is possible.

I'm also busy atm, but I will set up VS and take a closer look soon(TM).
-
Deathawaits4
- Posts: 20
- Joined: Mon Mar 01, 2021 9:26 pm
Re: Please dont run obfuscation over the code!
i have also done some deeper investigation into the code now since i have time. First i was extremely optimistic as we got full access to the xenko engine dlls, but after delving a bit deeper, i think we are at a maybe worst case scenario but i cant tell yet. Basically none of the xenko dlls seem to be gameplay relevant, they just provide the backbone but nothing gameplay relevant. I searched everything and everywhere until i checked the .exe. And my fear is, that the whole game logic has been compiled into the exe. It makes sense, as the .exe is pretty big. It can be read with dotpeek and ilspy, but it is insanely obfuscated, so much that reading it is near impossible (honestly id rather try to read assembly). Half of the code in the .exe looks like dummy code to make reading it harder but i found some values that might also point to gameplay specific code.. its hard to tell tho. If you find anything related to real gameplay code, please tell me. I hope this is not a sad turn of eventsbrucethemoose wrote: Thu Mar 10, 2022 7:48 pmNot sure, TBH I haven't set up a C# environment since refreshing my PC. This is what I briefly saw with dotPeek:Deathawaits4 wrote: Thu Mar 10, 2022 6:31 pmEyo, havent had time to check the game out as im currently out of town. Did you check if you could access the game data via ilspy? Do you think harmony modding is viable? Ill check it out as soon as i get the time.brucethemoose wrote: Thu Mar 10, 2022 5:00 pm So just poking through the game directory for a few minutes before I even open the game, it looks like we have enough access to the Xenko engine to get in trouble... I'm having trouble finding where the actual game mechanics are in the code though. I think I need more coffee.
Also, I'm happy to see lots of data formatted as xml (as opposed to plain text in DW1). XPath patching alone will be a huge boost to modding some day, assuming it isn't already enabled.
also theres atleast the xpath dlls available, so im confident that xpath is possible.
I'm also busy atm, but I will set up VS and take a closer look soon(TM).
-
brucethemoose
- Posts: 46
- Joined: Fri Feb 18, 2022 6:14 pm
Re: Please dont run obfuscation over the code!
This is what I was afraid of, as I couldn't find any gameplay logic either. Just engine/rendering stuff, mostly. And yeah, the main exe looks like assembly and/or nonsense to me.Deathawaits4 wrote: Thu Mar 10, 2022 8:08 pmi have also done some deeper investigation into the code now since i have time. First i was extremely optimistic as we got full access to the xenko engine dlls, but after delving a bit deeper, i think we are at a maybe worst case scenario but i cant tell yet. Basically none of the xenko dlls seem to be gameplay relevant, they just provide the backbone but nothing gameplay relevant. I searched everything and everywhere until i checked the .exe. And my fear is, that the whole game logic has been compiled into the exe. It makes sense, as the .exe is pretty big. It can be read with dotpeek and ilspy, but it is insanely obfuscated, so much that reading it is near impossible (honestly id rather try to read assembly). Half of the code in the .exe looks like dummy code to make reading it harder but i found some values that might also point to gameplay specific code.. its hard to tell tho. If you find anything related to real gameplay code, please tell me. I hope this is not a sad turn of eventsbrucethemoose wrote: Thu Mar 10, 2022 7:48 pmNot sure, TBH I haven't set up a C# environment since refreshing my PC. This is what I briefly saw with dotPeek:Deathawaits4 wrote: Thu Mar 10, 2022 6:31 pm
Eyo, havent had time to check the game out as im currently out of town. Did you check if you could access the game data via ilspy? Do you think harmony modding is viable? Ill check it out as soon as i get the time.
also theres atleast the xpath dlls available, so im confident that xpath is possible.
I'm also busy atm, but I will set up VS and take a closer look soon(TM).![]()
I'm hoping its all hidden under some non-obvious name.
Last edited by brucethemoose on Thu Mar 10, 2022 8:23 pm, edited 1 time in total.
- Erik Rutins
- Posts: 39759
- Joined: Tue Mar 28, 2000 4:00 pm
- Location: Vermont, USA
- Contact:
Re: Please dont run obfuscation over the code!
Erik Rutins
CEO, Matrix Games LLC

For official support, please use our Help Desk: http://www.matrixgames.com/helpdesk/
Freedom is not Free.
CEO, Matrix Games LLC

For official support, please use our Help Desk: http://www.matrixgames.com/helpdesk/
Freedom is not Free.
-
Deathawaits4
- Posts: 20
- Joined: Mon Mar 01, 2021 9:26 pm
Re: Please dont run obfuscation over the code!
Got some official news!brucethemoose wrote: Thu Mar 10, 2022 8:20 pmThis is what I was afraid of, as I couldn't find any gameplay logic either. Just engine/rendering stuff, mostly. And yeah, the main exe looks like nonsense to me.Deathawaits4 wrote: Thu Mar 10, 2022 8:08 pmi have also done some deeper investigation into the code now since i have time. First i was extremely optimistic as we got full access to the xenko engine dlls, but after delving a bit deeper, i think we are at a maybe worst case scenario but i cant tell yet. Basically none of the xenko dlls seem to be gameplay relevant, they just provide the backbone but nothing gameplay relevant. I searched everything and everywhere until i checked the .exe. And my fear is, that the whole game logic has been compiled into the exe. It makes sense, as the .exe is pretty big. It can be read with dotpeek and ilspy, but it is insanely obfuscated, so much that reading it is near impossible (honestly id rather try to read assembly). Half of the code in the .exe looks like dummy code to make reading it harder but i found some values that might also point to gameplay specific code.. its hard to tell tho. If you find anything related to real gameplay code, please tell me. I hope this is not a sad turn of eventsbrucethemoose wrote: Thu Mar 10, 2022 7:48 pm
Not sure, TBH I haven't set up a C# environment since refreshing my PC. This is what I briefly saw with dotPeek:
I'm also busy atm, but I will set up VS and take a closer look soon(TM).![]()
I'm hoping its all hidden under some non-obvious name.
We can turn off our alarm bells.
Erik answered on steam and they said that most of the code will be made readable:
https://steamcommunity.com/app/1531540/ ... 331888185/
So i guess its just a patience thing
-
swizzlewizzle
- Posts: 182
- Joined: Sun Mar 16, 2014 4:38 am
Re: Please dont run obfuscation over the code!
Things are definitely looking up.
XPatching for the XML and full Harmony-based access would be perfect.
Hoping Harmony is integrated into an official mod-loader so we don't have to get people to download external programs to inject it into the game. Bleh.
XPatching for the XML and full Harmony-based access would be perfect.
Hoping Harmony is integrated into an official mod-loader so we don't have to get people to download external programs to inject it into the game. Bleh.
-
brucethemoose
- Posts: 46
- Joined: Fri Feb 18, 2022 6:14 pm
Re: Please dont run obfuscation over the code!
Yes, also this ^.swizzlewizzle wrote: Fri Mar 11, 2022 1:26 am Things are definitely looking up.
XPatching for the XML and full Harmony-based access would be perfect.
Hoping Harmony is integrated into an official mod-loader so we don't have to get people to download external programs to inject it into the game. Bleh.
A number of games have had issues related to externally supplied Harmony.
