Live data from Hacker News

Legalizing gay marriage in Crusader Kings III with Ghidra

waffleironer.medium.com

111–120 of 183 posts

Re: Legalizing gay marriage in Crusader Kings III with Ghidra

#111
post #108

I don't know anything about reverse engineering but why can't you just change the IF in the decompiled C++? Why do you need to mess around with the assembly instructions?

Well it's already been compiled. If the `if` is changed and the entire codebase is recompiled it might rearrange large sections of code, significantly changing the resulting binary. The patch will then be potentially quite complex.

So the resulting patch will be significantly smaller if only a few bytes need to be changed.

Re: Legalizing gay marriage in Crusader Kings III with Ghidra

#113
post #57

Earlier quoted context omitted.

I reverse engineered Paradox's binary format for their save files. Part of this process is extracting a table of 16 bit ids to text representations. I asked Paradox if I could open source this table, but they replied that I was already breaking the ToS. The solution I've come up with is to open source the logic but commit the table as a gpg encrypted payload (for which only I have the key). So you could say that Para…

ToS are irrelevant and you should have published it anyways, under a name different from the one you use on the forums and in-game. Open knowledge is important, especially in video game scenes where elitism is a real issue, stopping people from getting into great hobbies that I'm sure many only got into due to that one person that didn't give in to elitism and bothered to listen and to answer questions.

> ToS are irrelevant

That's some bad advice. ToS are irrelevant only if you don't expect retaliation from ToS owner, or the costs are trivial.

> Open knowledge is important, especially in video game scenes where elitism is a real issue

Open knowledge? This is reverse engineering someone's cash cow. Kinda like claiming Win 10 code is open knowledge.

Video game scenes? Elitist? It's just a silly option in some medieval sim. There are other games that allow these kinds of things. Massive chalice for example.

By that stretch, why not complain Hearts of Iron don't allow you to create a third Furry side in WW2?

Or if you really want to be part of video game scene make your own. But I doubt you'd open source it. It takes monumental effort.

Did you see indie games? It's veritable farmers market of small games.

Re: Legalizing gay marriage in Crusader Kings III with Ghidra

#114
post #108

I don't know anything about reverse engineering but why can't you just change the IF in the decompiled C++? Why do you need to mess around with the assembly instructions?

The decompiled code is just a best guess at what the assembly is doing, it's likely not completely correct or close to compilable, changing the asm is the easiest way to make changes.

Re: Legalizing gay marriage in Crusader Kings III with Ghidra

#115

Earlier quoted context omitted.

Was there any historical culture in which same-sex marriage was common or accepted? I can’t think of one, Christian or otherwise (though I can think of a couple of examples of same-sex people got married by subterfuge).

No there were not. The other reply confuses acceptance of homosexual activity with acceptance of homosexual marriage. The latter is a new concept, the former was common in many cultures (notably Ancient Rome / Greece). Homosexual activity cannot result in biological children so there was really never any society that considered anything like homosexual marriage until our own. The main reason for marriage was to contr…

This is what people don't get. Marriage is a concept with a unique purpose. Marriage is an institution that straight male humans and straight female humans invented to solve their coordination problem around heterosexual life-partnerships.

Gay people should be entitled to the full rights of monogamous cohabitation (tax, adoption rights, inheritance etc) via civil partnerships.

But not marriage.

Re: Legalizing gay marriage in Crusader Kings III with Ghidra

#116
post #113
post #57

Earlier quoted context omitted.

ToS are irrelevant and you should have published it anyways, under a name different from the one you use on the forums and in-game. Open knowledge is important, especially in video game scenes where elitism is a real issue, stopping people from getting into great hobbies that I'm sure many only got into due to that one person that didn't give in to elitism and bothered to listen and to answer questions.

> ToS are irrelevant That's some bad advice. ToS are irrelevant only if you don't expect retaliation from ToS owner, or the costs are trivial. > Open knowledge is important, especially in video game scenes where elitism is a real issue Open knowledge? This is reverse engineering someone's cash cow. Kinda like claiming Win 10 code is open knowledge. Video game scenes? Elitist? It's just a silly option in some medieval…

The code runs on your machine. You do not own the game, the idea behind the game or the logic, but you do own the copy of the game on your machine.

You can read and change your copy, regardless of what the ToS says. The owner of the game can retaliate, this is not law after all.

Re: Legalizing gay marriage in Crusader Kings III with Ghidra

#117

Earlier quoted context omitted.

So we are back where we started, no?

Code is not people.

But the time and effort put into writing that code was a significant part of their lives, and that code was only shared with those who agreed with their rules.

Re: Legalizing gay marriage in Crusader Kings III with Ghidra

#118
post #108

I don't know anything about reverse engineering but why can't you just change the IF in the decompiled C++? Why do you need to mess around with the assembly instructions?

That would require you know which C++ compiler and which exact version the code was compiled with. Your decompiler would also need to be built for this specific version of the C++ compiler to allow for round tripping. After you have done that, the risk of the patch being unnecessarily large still exists and now you have to mess around with the source code hoping you find a way to rewrite it such that only one byte has changed. That's a lot of effort compared to just changing the instructions directly which for an inexperienced engineer merely requires frequent lookup of a reference sheet.

There is absolutely no need to do any of that, even in cases where you write a lot of new code yourself. 99% of the time it is enough to find the code location, insert a call to a DLL (which can be created in any language of your choice) you injected and be done with it.

Re: Legalizing gay marriage in Crusader Kings III with Ghidra

#119

This is cool. This is what I imagined it would be like to program computers when I was a kid.

When I was a kid, this is the first thing I did that I'd call programming, but it was to use a hex editor on my Warcraft (the original game, yeah) save files to give myself more gold and wood. I had a friend teach me how to convert to hex, learned about LSB/MSB then away I went. It's amazing how cheating or tweaking a game can spark a lot of interest professionally.

I did this exact same thing with this exact same game. Good times.

Re: Legalizing gay marriage in Crusader Kings III with Ghidra

#120

Earlier quoted context omitted.

So we are back where we started, no?

Code is not people.

There's a philosophical discussion here longer than a comment can afford but the bottom line isn't "code is not people". While I took GP's "wife" remark as a joke, I feel like you're implying that as long as it's "not people" it's a free for all. Like someone "exploring" how it feels like to spend your money, wear your watch, and drive your car.

Since this is a digital world, hacking doesn't have to lead to a loss for the creator. It can be done for your own intellectual pleasure and exploration. But making it available online to the general public is no longer exploration. So depending on the case you no longer have the moral cover of "I was just exploring".

Post reply on HN