Hi there, this is mostly a request to the developers.
Considering the wiki doesn’t provide much of a - full - insight to the game functions, I’ve uncompressed the codeNw.js file, which seems to be the ‘heart’ of the game.
Even though it’s more readable than other minified files I’ve seen, it’s still quite hard to understand some parts (examples would be local variables being renamed to a single char, mass assignment of vars and bools being replaced by !0 etc)
My request is simple, just post the codeNw.js file without minification, or even better, put it on a github repo and update it with every new version.
Also, why is it minified eitherway, some sort of piracy protection? (judging by the ‘Reverse engineering or code re-use prohibited. Please support us by buying our games.’ line in the header)
Cause there are better ways of hiding your code if this was your intention. (but don’t do this please)
TLDR I want the game code, unminified, strictly for reading.
It’s illegal to post the game code anywhere including on GitHub.
You make a solid point.
But then perhaps add a unminified version to the next version of the game?
I still don’t get why it’s minified in the first place.
Coming back to the OP: It really is my primary resource for my modding and I’d just really like a unminfied version some way. (or some really good docs)
@DzjengisKhan Please read the thread as you would’ve seen that I’m requesting a version with the local variables unaltered.
We will see if we can change this. Initially the code was even more obfuscated so this is somewhat an artefact of our build process (it runs through google closure compiler). We should be able to change this though.
In the meantime do you have any specific questions about an area?
Wow it would be great to see a deobfuscated version
That should make our lives a bit easier
Thx Patrick!
@PatrickKlug
I’m wondering if you could send me 1 method deobstugated it’s quite a complicated one.
It’s the Funcion used for calculating the scores when reviewing games.
it’s called “g” in the compressed codeNw.js beneath the method.
Reviews.reviewGame = function (a) {
And it starts like this:
g = function (f) {
var j = [],
h = [],
g = 1,
k = f.currentGame;
GDT.fire(GameManager, GDT.eventKeys.gameplay.beforeGameReview, {
company: f,
game: k
});
k.flags.mmo && (g = 2);
var n = null;
k.sequelTo && (n = f.getGameById(k.sequelTo), n.releaseWeek > f.currentWeek - 40 && (k.flags.sequelsTooClose = !0));
...
...
It’s a large method, would be great if I could get a deobstugated version of it.
Kind Regards
Kristof
I think it’s probably easier to wait for the update - rumor has it that it shouldn’t take long
Nice!
Thx!
Excellent, thanks a lot.
@PatrickKlug, could you explain to me how the Sales.calculateSales
function works. I understand it roughly but some more info would be nice ^^
Okay, we have decided on a slightly different approach. We will provide access to the unobfuscated code via a private github repo.
To get access you will have to fill out this form.
Once approved you get access and we will also have a place to discuss the technical side of advanced modding. This will keep the shipped code more compact, allows us to keep the latest version of the code on a central place and we can have a core group of modders who are serious about advanced modding.
Thanks a lot @PatrickKlug for your trouble.
I’m just wondering, why do we need to fill in our physical address?
giving someone access to the complete unobfuscated code requires trust. we simply want to make sure ppl who do want to get access are serious about it and this excludes anonymous users.
to your question: the address is not currently used (unless we are unable to contact you otherwise) and of course information you provide is subject to our privacy policy. Why do we ask for it? because we want to know who has access.
Btw, you know you can trust me right? ^^