16 ms·
Legalizing gay marriage in Crusader Kings III with Ghidra
- mabbo 5y agoIt 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?
- golemiprague 5y agoThere are still big parts of society who are against legalising gay merriage and many are afraid to even admit it because of cancel culture and the power the gay community have especially in the media.
- inshadows 5y agoThen it must be a political issue, right? Or maybe it's just a simulator of dark ages where same-sex marriage just wasn't. Go ahead, point out my wrong usage of "dark ages".
- vmception 5y agoOr they just didn't program that and had too little representation in their company to notice and weigh that against marketability in various markets.
- dudul 5y agoOr they did notice, figured out it would be complex to modify the engine to handle this case, found data indicating that having this feature or not would have zero impact of the marketability/sales of the game, and just decided to use the bandwidth on something more valuable.
- sudosysgen 5y agoHave we read the same post? It's a one-byte modification, and they ban for mentioning the patch.
- COGlory 5y agoThat will introduce game breaking behavior when you can't have kids...
- sudosysgen 5y agoYes, of course. That's the cost of same-sex marriage in such a game, unless you use the House Seniority mechanic you will eventually have a game over. That doesn't make this anymore difficult than switching a false to a true in an optional fun feature, it'll just be very difficult to play the game (but not impossible!)
- PeterisP 5y agoWell, one can have kids from other partners, not only within marriage.
- bregma 5y agoElective 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.
- dudul 5y agoThe author acknowledges themselves: "The patch that I made was only good for the current Steam version of CK3, on my operating system, with my cpu architecture." Not counting the fact that a change like that would need to be more thoroughly QA-ed to make sure it doesn't break something at some point.
- sudosysgen 5y agoThis is because targets have different binaries. The change in the code is removing one if statement.
- p1necone 5y agoPresumably slavish dedication to historical accuracy. Although were there really no cultures in that era that allowed same sex marriage? I personally wouldn't want a seemingly historically accurate (ish) game to present the churches of the age as being okay with same sex marriage when they weren't. Although being able to toggle it on in the settings would be cool.
- chaorace 5y agoCKIII has several "fun" toggles for ahistoric behavior, so I'm not sure if this argument fits. For example: you can flip the default inheritence system to favor women or even make the majority of people homosexual. I'm guessing it's just more or less something they didn't get around to implementing. Perhaps they wanted to tackle it in a future patch or DLC (I can see this happening if turning this on somehow led to buggy behavior in other areas)
- p1necone 5y agoYeah that's exactly what I'd want for marriage. I'm definitely more inclined to think this is just one of many features they didn't get around to adding rather than an intentional omission.
- krapp 5y ago>Although were there really no cultures in that era that allowed same sex marriage? No Christian cultures, obviously.
- deleted 5y ago[deleted]
- kergonath 5y agoWas 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).
- crooked-v 5y agoMy personal guess would be that there's some kind of non-deterministic game-state-exploding bug tangled up with the marriage checks, and that the amount of work to fix it puts it at the bottom of the list after new feature work. This would be entirely consistent with the sorts of weird bugs that have already come up in CK3 change logs.
- jeffchien 5y agoTheir 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 over? [1] https://ck3.paradoxwikis.com/index.php?title=FAQ https://ck3.paradoxwikis.com/index.php?title=FAQ
- p1necone 5y agoIf it were me I'd just let same sex couples impregnate each other, regardless of sex. Sounds like a hoot.
- ttt0 5y agoI'd also add furries and dragonkins while we're at it, because why not, it might as well be a fantasy game
- Rebelgecko 5y agoCK2 let put a horse named Glitterhoof on your council and then have sex with it, so that would be par for the course.
- noicebrewery 5y agoNo guarantees about the personal beliefs of the person/people running the forums, who seems to be the major blocker of this patch / discussing the patch.
- dudul 5y ago> it turns out that the game logic to marry two characters is contained in the game binary, not in the scripting files, and the game engine will unilaterally block same sex marriages. > it became clear from statements both on the forums and off of it that while the concern was noted, fixing the issue would be difficult, and it wasn’t a current priority. Doesn't look like it's that easy.
- sudosysgen 5y agoCrusader Kings III has you live on as your daughter/son when you die. As there is no adoption mechanic, same-sex relationships will lead to a game over unless you are one of the few countries that can use the House Seniority mechanic. So I guess they never got around to implementing adoption. Banning though...? That was weird.
- maxander 5y ago> So I guess they never got around to implementing adoption. If you think about this, it seems pretty obvious the reason they didn’t include adoption was that it’s overpowered. The CK series is all about managing dynasties, so the randomness of reproduction is a major game mechanic, one of the primary sources of problems and challenges. Adoption would totally negate all of that. Like, if Henry VIII could just have adopted a son, his whole story would have been so much more straightforward! :) (None of which really justifies the Paradox response, of course, since adoption isn’t necessary for having same-sex marriages (even player ones) and not losing.)
- busterarm 5y agoIt's the same reason as adoption. You have the ability to arrange marriages as King or Queen. Just as if you could adopt, you could dilute the power of your enemies by arranging same-sex marriages that can have no legal heir.
- fshbbdssbbgdd 5y agoThey could make adoption produce a weaker claim to the title, with greater risk of usurpers leading a rebellion. I think this mechanic could be balanced and would add realism (it happened in history).
- amyjess 5y agoIt's also something that could be restricted by culture. In some cultures, adopting your heir is a normal, everyday thing, but in others, blood is all that matters.
- 5y ago
- josefx 5y agoTake a look at the screenshot of that same sex marriage, do you notice something odd? The gender symbols at the bottom are male/female not male/male. The patch only disables the gender check, it does not fix the game content or any other logic related to marriage. There are probably dozens of follow up bugs waiting, some of which will need new game logic and art to fix.
- flatiron 5y agoI just can’t fathom they couldn’t see this coming.
- meibo 5y agoThat just means someone in charge made a bad choice during planning and either no dev or designer ever dared to speak up against it or many of them supported said bad choice.
- Causality1 5y agoWhy is it a bad choice? A game set in middle age Europe has no more reason to foresee needing the ability to mod gay marriage into it than accommodating modding cell phones into it. It's not an insignificant amount for work just to include an anachronism.
- meibo 5y agoHave you played this game and seen how much you can customize it? What's an anachronism in a sea of many others, if you wish to have them in your personal save games. And if you don't, you stick to whatever is historically accurate. Not having the foresight to be aware of this matter and the issues that come with it(going as far to be be especially exclusive) as a game studio in 2020 is what they should think about the next time they set out to make a game like this.
- xanth 5y agoAnd the game engine is from 2007 which likely built in many of these historically accurate constraints to reduce scope. Remember until recently this much more core functionality was broken; "Fixed looting not making you hostile to looted country if you’re a vassal" https://ck3.paradoxwikis.com/Patch_1.3.X#1.3.1 https://ck3.paradoxwikis.com/Patch_1.3.X#1.3.1
- retrac 5y agoI suspect it has approximately nothing to do with what the patch implemented. And a lot more to do with it being effectively a guide to reverse-engineering the game executable. Paradox makes multiplayer games. They probably saw this as How To Cheat 101. As to not wanting to do the work to make it implementable without a binary patch, well, it's just not in the game. I can imagine hesitance to start modifying the game based on demands of modders for multiple reasons, even if they liked the mod itself.
- geofft 5y agoIt sounds like the thing that was posted on the forums was the binary patch itself, and this article's explanation of how to reverse engineer the game was written after the poster was banned.
- pseudalopex 5y agoThey host How to Cheat 101.[1] [1] https://ck3.paradoxwikis.com/Console_commands https://ck3.paradoxwikis.com/Console_commands
- Google234 5y agoYou can’t use those in multiplayer... unless you reverse engineer the game and patch the cheat checks oout...
- Forge36 5y agoInheritance and adoption was probably cut from the feature set for simplicity. Without an heir you "lose"and I suspect adoption to force an heir would break some lose scenarios
- psychtrauma 5y agoOccam's razor suggests to me that some people in the design process defined marriage as being strictly between a man and a woman, and nobody else cared enough to change this. It doesn't fill me with joy that a 2020 game would make that choice. Also the choice to have characters default to open homophobia, and for that to be used as a positive in promotional material, is not an indicator of a gay-friendly organisation.
- brailsafe 5y agoBut don't forget about Hanlon's razor. I don't play Crusader Kings, was more curious about the technical bit, but it would be a shame to not be able to release what seems like a quazi-historical game with fairly different cultural norms by default.
- psychtrauma 5y agoHanlon's razor: "never attribute to malice that which is adequately explained by stupidity". What's the difference? The outcome is the same.
- deleted 5y ago[deleted]
- kergonath 5y ago> Occam's razor suggests to me that some people in the design process defined marriage as being strictly between a man and a woman, and nobody else cared enough to change this. Occam’s razor suggests they built a historical game and just ended up embedding some in-game cultural background in the game engine. As others pointed out, dealing with same-sex marriages affects several aspects of the game, particularly dynastic rules. > It doesn't fill me with joy that a 2020 game would make that choice. You are working from your assumption, here. We really have no idea how it ended up that way. > Also the choice to have characters default to open homophobia, and for that to be used as a positive in promotional material, is not an indicator of a gay-friendly organisation. I find it interesting that you genuinely feel that. If anything, it tells a lot about how pervasive violence is in our societies. The game is full of back-stabbing, lies, cheating, poisonings, forced marriages, the occasional war, and yes, hate and irrational beliefs. Not much of it is moral, and yet you’re not pained that the developers might be enthusiastic about smothering babies. It is a game set up in Europe in the Middle Ages. Hardly the most progressive environment. If you want to build a tolerant utopia, Cities Skylines is probably a better game. It is also great, but you might also like the occasional opportunity to be a ruthless, amoral, power hungry arsehole every now and then, regardless of your personal situation IRL.
- baud147258 5y agoMaybe Paradox don't want to host mods that are a modified version of the core executable binaries
- bstar77 5y agoYou also cannot disable homosexuality so I don't think their decisions are politically aligned.
- opk 5y agoRichard I of England and Philip II of France were very likely homosexual but still got married off in the hopes of creating an heir. Maybe a suitably bribed pope in the middle ages would have found a way to get a gay marriage passed. That it'd even be considered necessary is doubtful - that "at night their beds did not separate them" was likely good enough for that pair of K̶i̶n̶g̶s̶/Queens. So they could be well-aligned with the relevant historical period and setting. I have zero familiarity with the game so am purely considering the title here.
- Guthur 5y agoBalancing this in a dynasty simulator would be an absolute nightmare. Presumably the AI would have the ability as well, and then you would have to start coding some restrictions to avoid a dynasty simulator spanning 100s of years going off the rails and then you'll be in for all sorts of progressive political wrangling. Frankly if it was me I'd have stayed well away from it as well. Also, Paradox have not a great track record of balancing things or maintaining quality straight out of the gate with their games anyway. I do love their games though.
- Guthur 5y agoI know I shouldn't talk about down votes but I love how it proves my point. It is impossible to have rational discussions about these topics and so it's actually optimal to avoid them entirely. And as an aside the game had homosexuality and so assuming there was some conservative stance on the part of the game developer appears ill founded.
- sharkjacobs 5y agoThis is cool. This is what I imagined it would be like to program computers when I was a kid.
- codezero 5y agoWhen 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.
- phs318u 5y agoBack 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 :)
- 1_player 5y agoWhen 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.
- AndyMcConachie 5y agoI did this exact same thing with this exact same game. Good times.
- cafemachiavelli 5y agoFor a second that title made me remember early SEO tactics of stuffing your H1 tags with as many relevant keywords as possible, except here it's optimizing for my queer nerd interests. I'm a bit surprised by the reaction from Paradox - I assume the standard forum mod has neither the time nor skillset to assess whether any game binary patch is going to be safe, so banning them by default seems like a safe way to go, but removing even the discussion of it feels a bit overkill.
- paxys 5y agoProbably an automated ban. You can't have people distributing patches to game binaries on the official forums. Too much potential for malware, and the company ends up being liable (if not legally then at least PR wise).
- belinder 5y agoWould like to see some statement soon on the ban
- COGlory 5y agoThat's considered SEO stuffing? I thought it was just so I know what the article is about.
- sjburt 5y agoI think the joke was that the words in the headline couldn't possibly be related. Except that they were.
- comagoosie 5y agoI 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 Paradox is sensitive when it comes to people poking around or pushing boundaries.
- ARandomerDude 5y agoGross.
- comagoosie 5y agoIf one is interested in parsing the CK3 scripts / game files (briefly showed in the post) to dissect the wonderful world of PDS games, there's a js library for parsing these files: https://github.com/nickbabcock/jomini.git https://github.com/nickbabcock/jomini.git disclaimer: author
- brailsafe 5y agoCertainly neat, but let's be real. They don't have time to spend on this because they have to finish Cities Skylines 2 amiright?
- busterarm 5y agoThat's Paradox the Publisher, not Paradox the Developer.
- whatsmyusername 5y agoThey're building the hungry hungry hippos for Stellaris Nemesis. Gotta eat them all!
- xanth 5y agoParadox games release early, patch often, and the core engine is nearly 15 years old. I wouldn't be surprised if the gender of a marriage is assumed all over the code-base and enabling full equality would have been a significant development complication. This all being said I wouldn't be surprised if we see full equality options in the next year or so. See: Matrilineal Marriages, Gender Equality, Same-Sex Relations, and Sexuality Distribution https://ck3.paradoxwikis.com/Game_rule#Gameplay_options https://ck3.paradoxwikis.com/Game_rule#Gameplay_options
- amyjess 5y ago> the core engine is nearly 15 years old "The core engine" doesn't do what you think it does. It's actually a running joke on /r/paradoxplaza that every time you mention Clausewitz, Meneth (or one of the other developers) pops up to explain this. It just does what every other game engine does, none of the actual game mechanics are coded into the engine. The reason why all Paradox games have so many things in common—a map-based UI, the scripting language, everything else that makes a GSG a GSG—is that game code gets copied and pasted from game to game as they start new projects. None of this is in the Clausewitz engine itself. Funny thing though, they actually did decide (relatively) recently to centralize a lot of basic GSG functionality in one place so they don't have to keep copying-and-pasting code. The result is a library called Jomini. But this is a recent development; the only games so far that use Jomini are Imperator and CK3. It's a very new library, so it shouldn't have 15 years of legacy cruft in it.
- yjftsjthsd-h 5y ago> It's a very new library, so it shouldn't have 15 years of legacy cruft in it. If they made it by copy-pasting one last time, it certainly could.
- b0rsuk 5y agoEww, equality. If you make it equal, you remove the drama. If you force equality onto history, you falsify it. Case in point: Edward II, king of England. He had affairs with Gaveston and Despenser the Younger, all the while in a marriage with queen Isabella. He wasn't too subtle about what he was doing, showered his lovers with gifts, prestige and land. His nobles pressured him send him away, but he was the KING, and it went back and forth a few times. If it's in game, it should be called "sodomy".
- ashkankiani 5y agoTurning 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!"
- skissane 5y ago> 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/11733546 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 indistinguishable from an unmarried person. But no law against holding a party called a "self-marriage ceremony", if your guests are happy to attend it.
- bregma 5y agoThere is a very big difference between a wedding and a marriage. I don't understand why this confuses so many people, but it does.
- occamrazor 5y agoIn some languages the same word means both, e.g. the Italian “matrimonio”
- valarauko 5y agoCome to think of it, it seems to be the case in at least some Indian languages (ie, "wedding" & "marriage" are referred to by the same term). I can't think of a distinct native term for "marriage" as an entity or a state of being - the closest I can come up with is akin to "married" as a past tense verb.
- pseudalopex 5y agoEnglish has wedlock.
- tonfreed 5y agoCan't you do this by reforming your religion anyway? I haven't played since launch
- xanth 5y agoYou can reform your religion making it accepted, however that only allows characters to perform Seduce and Romance schemes without risk of imprisonment if Criminal or an opinion penalty if its considered shunned.
- headmelted 5y ago“Do ye a marriage” has to be the greatest proposal I’ve ever heard. It’s so matter-of-fact and deadpan. I love it. If you can add an option between Seduce and Romance of “Mine body ages and the offers are few, but my family hath bequeathed land” I’m buying this game right now.
- whatsmyusername 5y agoSingle best incest simulator on the market now, besides maybe Crusader Kings 2.
- Kiro 5y agoI 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?
- imtringued 5y agoThat 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.
- coopierez 5y agoWell 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.
- darick 5y agoThe 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.
- bregma 5y agoThe word for "decompiled C++" is "disassembly".
- rkangel 5y agoCalling it "decompilation" is misleading. That term implies that you can get your compiled binary and turn it back into C++. No automated tool exists that allows you to do that - too much information is lost in the compilation process. Function names are one things that's mentioned, but the very structure of the program (which functions are in which classes, etc.) is lost. You could infer this based on your knowledge of how compilers usually work, and how developers usually develop but it's all guesswork. Instead what we actually do is 'disassembly'. We just perform the minimal processing to get the human readable form of the assembly instructions that make up the binary. This is very hard to directly get you head round, so 'decompilation tools' are then all assistants that help the manual process of understanding the structure of the program. You can see a very basic example of that in the article where the author is looking for references to an address so they can see which functions reference the string. The gold standard tool in the space is IDA Pro. You can see in these screenshots the visual tool it gives that allows you to group chunks of assembly together into functions and keep track of the linkages to codify the person's understanding as the process continues.
- deleted 5y ago[deleted]
- ponow 5y agoGotta admit that the words "legalizing gay marriage" in the title of the Medium piece really tick me off, as they slanderously suggest that that the creators of CK3 are somehow anti-gay.
- chmod775 5y agoDid you read until the point where they would ban the creator of this patch from their forums and aggressively remove any mention of it? Now I don't know what the creator originally wrote on there, or what the people who mentioned the patch have been saying, but it does raise eyebrows... So no reason to get your pitchforks yet, but definitely reason enough to demand some form of explanation from paradox's side.
- HelloNurse 5y agoWhile banning any executable hack on the official forums, without exceptions, is a reasonable policy, not spending a few hours to implement and release a same-sex marriage patch implies not caring about such a feature rather than technical obstacles: that maybe someone at PAradox opposes gay rights is an unavoidable theory.
- mfru 5y agoI read it as "Hey, there is this game trying to depict a historically accurate medieval scenario. I modified it for fun to allow gay marriage". And the first paragraph seems to confirm this interpretation: > Crusader Kings III is a pretty impressive game. It’s impressive not only for its official content, but also for its extensive modding tools. Even before its release, I was drawn in by its promises of an improved modding experience. Relevant to this post, I was also impressed by an apparent dedication towards improved inclusivity.