GithubHelp home page GithubHelp logo

Comments (6)

vegapnk avatar vegapnk commented on July 17, 2024

Hi @callavico , thanks for the report!

I noticed the thought too, it's new from RJW 5.3.4 and Taleirs cleanups, which don't break things, but actually I think it was slightly off before.
In general I like that they get the thought when the gene is added mid-game, but yes I think on birth / spawn they should not have it.

I am not 100% sure if the check for endogene covers all cases. I will have a short check if Pawn.spawned achieves the same behavior, I will drop another message a bit later.

from rjw-genes.

vegapnk avatar vegapnk commented on July 17, 2024

@callavico , can you try this version out?

RJW-Genes-Hotfix-Issue-32.zip

from rjw-genes.

callavico avatar callavico commented on July 17, 2024

I am pretty sure that there's no way other than devmode (which like... fair) to add an endogene after a pawn is generated. That's the point of endogenes. Endogenes are generated at birth and can't be changed, and represent the way the pawn is supposed to have been from birth.

If you want to proceed with this path though, then there are more than just m2f and f2m thoughts. Pawns can spawn as none, trap, or futa, and get corresponding "2f"/"2m" thoughts which should be removed. There's also a set of "was_" hediffs that are used if the pawn is forcibly changed later to determine if they are happy to have "changed back".

I pulled the list of thoughts from RJW itself using Traverse.

dev...callavico:RJW-Genes:genderRestrictionSexThoughts

from rjw-genes.

vegapnk avatar vegapnk commented on July 17, 2024

Good Morning @callavico ,

yes sorry I was a bit unclear. The issue I have with "just" checking for endogenes is that the thoughts also appear for xenogenes when the xenogene was added "before game". E.g. you create a succubus in colony creation and the spawned pawn has the m2f hediff.

So my approach is to check if the pawn was spawned when the gene was added, in the good faith that "fixed gender pawns that spawn on the map are contempt with their gender". That catches the xenogenes and xenotypes too.
That is also a bit more robust, because yes endogenes can only be inherited vanilla but once people use mods it's the wild west.

But you are right, I have to check for the futa and none thoughts too, I just .... first have to check if they appear πŸ˜„

Have you checked the zip ? If the behavior works for you then I just slap the ones for futas in too and close things here.

from rjw-genes.

callavico avatar callavico commented on July 17, 2024

I see what you mean. I was thinking in the other direction, that you were saying there were times that there were endogenes which weren't added at spawn time.

I had originally written a version that added a patch for PawnGenerator.SpawnGenes that removed the thoughts when that method ran. Do you want to take a look at that version?

It is guaranteed to remove the thoughts from any pawn that has the gene added at the time that the Pawn generates. I had originally worked it this way because it feels cleaner to just straight remove them when they are created, and adding the notify method could potentially be re-used elsewhere. It's more invasive, but it also doesn't rely on guessing which situations should have them removed, it just does it if the gene is there at generation-time.

dev...callavico:RJW-Genes:notifyOnPawnGeneration

I didn't try your method, but it would definitely work to catch the cases that are relevant: where the pawn is not yet on the map when the gene is added, or when the pawn is a baby. Those are the two immediately evident cases.

If you extend the list of hediffs you're looking for to remove, your solution would work in all cases, for sure. I'd still recommend removing the "was_" hediffs as well because, as you said, a pawn that spawned as a succubus never "was a boy" so if it is forced male somehow later, it should be a sexchange that it's unhappy with.

from rjw-genes.

vegapnk avatar vegapnk commented on July 17, 2024

I like it!

And I like the notify too. If you prepare a PR I am more than happy to merge it.

from rjw-genes.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.