Live data from Hacker News

Legalizing gay marriage in Crusader Kings III with Ghidra

waffleironer.medium.com

131–140 of 183 posts

Re: Legalizing gay marriage in Crusader Kings III with Ghidra

#131
post #92

Earlier quoted context omitted.

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.

Back in the earliest part of my career (late 80's), I had a love for single-byte hex hacks, especially for apps that were timed to stop working after the trial period. Changing the date-check comparison branch instruction so that the apps would only work _after_ the trial period ended. Used this on various C64, Amiga, and VAX/VMS(!) apps. I thought I was so clever :)

When I was 16 I helped my father and his friends by cracking a laser scanning software they got their hands on which required a hardware key.

Thanks to Ollydbg, I just had to open the executable, find the error message and change a JZ to a JNZ *. Incredibly easy if you know how to, but you look like a cool HACKERMAN to everybody else.

Sadly, my professional life nowadays as a full stack engineer is much less glamorous than cracking software for street cred.

* A NOP would have been preferrable in retrospect, though I like the idea that with my patch you'd get locked out iff you have the hardware key.

Re: Legalizing gay marriage in Crusader Kings III with Ghidra

#132

Turning the JZ into a nop to fallthrough to the next line is easier, right? That might be what he did in the quickfix area anyway. The self-marriage part was pretty hilarious. "Do I take myself? I do!"

> The self-marriage part was pretty hilarious. "Do I take myself? I do!" People are doing that in real life: https://www.abc.net.au/everyday/why-women-marry-themselves/1... Of course, it isn't legally recognised anywhere. And I doubt it will be – marriage as a legal relationship between two distinct people has various legal consequences on property law, taxation law, etc – a self-married person is legally indistingui…

There is a very big difference between a wedding and a marriage. I don't understand why this confuses so many people, but it does.

Re: Legalizing gay marriage in Crusader Kings III with Ghidra

#134
post #2

It seems odd to me. Paradox is a Swedish company, and Sweden is a fairly liberal country. Same-sex marriage was legalized in 2009, and even the Church of Sweden gave the go-ahead on performing same-sex marriages the same year. The game logic around this is simple enough that changing two byes fixes it, so it's not a technical issue. What gives?

Their official stance [1] is: > You can make same-sex relations acceptable, but marriage will still only be opposite due to historical constraints. Other than their official stance, I wonder if it's because they'd need to script in the in-game church's (presumably negative) reaction to this. Also there doesn't seem to be adoption in the base game, so maybe they didn't want to hand the player a quick path to a game ov…

The game simulates historic reality, and that reality was that marriage between nobles was mostly political and about consolidating land and power rather than about sex, love, or attraction although breeding was also intrinsic to marriage for the same reason. Marriage is a major game mechanic with much of the UI and playflow dedicated to finding the right spouse based on a wide range of conditions (family status, demesne extent, breeding traits). Doing same-sex marriage would require a massive overhaul to much of the game mechanic, not just a simple gender swap for the intended spouse.

Because the love/sex/reproduction angle was separate from the marriage angle, the game already has very deep support for all variants of human relationship when it comes to lovers, concubines, and uh, other special situations and it's very historically accurate. Homosexuality among nobles was not uncommon in the middle ages and the game supports this directly, but marriage had nothing to do with love or sex.

I went to Glitterhoof's chambers and gave him a good tumble. It is good to be the king.

Re: Legalizing gay marriage in Crusader Kings III with Ghidra

#135
post #41

Earlier quoted context omitted.

Have we read the same post? It's a one-byte modification, and they ban for mentioning the patch.

That will introduce game breaking behavior when you can't have kids...

Elective succession and tanistry were rather common historically and an option in the game, so having kids shouldn't be significant. The key is the heir has to be in your dynasty, not that it be the fruit of your loins.

Re: Legalizing gay marriage in Crusader Kings III with Ghidra

#136
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…

> 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.

I have minted a few very active video game scenes with a good culture, open codebases and devs that are happy to help and introduced many people to reverse engineering that wouldn't otherwise have gotten into it, and it's really not as hard as you make it seem. Good resources are easy to write when you're passionate.

You just don't have to be so bitter all the time :)

> Kinda like claiming Win 10 code is open knowledge.

It arguably is and you can plop any Windows binary into Ghidra or IDA and learn from it. There's a huge amount of books and free information on NT internals on the internet.

It's the same with games, just that you might be more invested in your favorite game than in NT internals.

Re: Legalizing gay marriage in Crusader Kings III with Ghidra

#137

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.

My first foray into the world of programming was as a kid, trying to learn how to make games in C. My first debugging experience though, was a few years later using a GameShark for the N64. That was a lot of fun!

Re: Legalizing gay marriage in Crusader Kings III with Ghidra

#138

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.

Same here. First use pctools, get tired of firing your hex editor every time (and make mistakes) then automate the procedure by writing a program which patches your save files!

I also discovered signed/unsigned integers at this time : give yourself too much money in the save file, it overflows, and you end up with negative money in the game...

Re: Legalizing gay marriage in Crusader Kings III with Ghidra

#139

Turning the JZ into a nop to fallthrough to the next line is easier, right? That might be what he did in the quickfix area anyway. The self-marriage part was pretty hilarious. "Do I take myself? I do!"

This technique is known as a NOP sled. You have to change all the bytes in the jump to NOPs (opcode 0x90). https://en.wikipedia.org/wiki/NOP_slide

A NOP slide is a slightly different thing.

The NOPs as suggested by GP are meant to replace unwanted instructions. The purpose of a NOP slide is to serve as target area for jumps and to guide the flow of execution to a particular adress at the end of the slide, independent of where in the NOPed range a jump was actually executed to.

Re: Legalizing gay marriage in Crusader Kings III with Ghidra

#140
post #136
post #113

Earlier quoted context omitted.

> 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…

> 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. I have minted a few very active video game scenes with a good culture, open codebases and devs that are happy to help and introduced many people to reverse engineering that wouldn't otherwise have gotten into it, and it's really not as hard as you make it seem. Good resources are easy to…

> I have minted a few very active video game scenes with a good culture,

Sure. Nice of you to assume I haven't made any games, and put words in my mouth.

So to repay the kindness, I'm going to assume your games weren't on scale of Paradox games. Because those games shave man decades. That means collaborative effort on a longer timescale. That means people sacrificed their time to make this. And people need to eat.

> It arguably is...

Arguably you could open a beer bottle with your eye. That doesn't make your eye a bottle opener.

In same vein, just because you can reverse engineer something doesn't make it open source.

I'm not bitter, just realistic. Poking a sleeping lion isn't guaranteed to kill you, it's just a stupid thing to do. Especially when you are way weaker than a lion and within his claw's reach.

Post reply on HN