Draft: Slave id and seed changes
Closes #3647 (closed)
- Randomized slave features should be that of clone/parent if available.
- If not, rely on slaveID -> only generate slaveID when importing a slave if really needed.
Merge request reports
Activity
@svornost Pinging you to check my code on this
I'm not totally sold on using mother/father in general, for that matter. It's good for twins, I guess, but it'll get broken for, say, clones of twins. Just seems a bit sketchy, even if it's better than totally random.
I wouldn't mind having a permanent
geneticSeed
or similar stored with the slave. That'd give us a path forward to having a CK-style hash mutation setup in the future too.Let's say we have a mother and father, IDs 1 and 2, who have twins, IDs 3 and 4.
Both twins are using ID 1, their mother's. So far so good.
Clone the first twin, and she's ID 5. The clone is using ID 3 as her seed, but the slave with ID 3 is still using ID 1 (her mother's) as her seed.
The problem is that ID5 and ID4 (her aunt) actually need to be using the same seed...they're both identical to ID3.
Edited by svornostWelp we can just split it into 2 PRs: add
geneticSeed
now (add it all to slaves, make a generator, connect to webgl, make it editable via cheats) and inheritance later. I think it will be the best to make it as a string with numbers: it will allow up to 10 variations of each body part (can be easily boosted later by adding letters to the list too) and will support any future expansions (just add more numbers to the end of it).As for inheritance I don't think it will be a big problem tbh. All u need to do it cycle through each number and roll rng (40% to take it from father, 40% from mother and 20% just random). It needs to be done just once per pregnancy (since all twins will have the same geneticSeed) and it can be done basically any time: during the birth, conception or even a week later after the conception.
I would do this PR myself, but there really is no time rn. I can try in a few months if no one picks it up before.
@Pregmodder Do you have an example save where big pregnancies are causing a performance problem? I'd be happy to take a look at that sometime (next week maybe).
Odds are high that I do, but low that I could find one in the pile of saves I've accumulated.
Either way, just giving a look over wombJS.js for any optimizations would be helpful. It feels like it's a matter of running through the womb array each week to update growth on hyperpregnant slaves just bogging things down.
mentioned in merge request !10890 (merged)
mentioned in merge request !11168 (merged)
mentioned in merge request !11278 (merged)
mentioned in merge request !11276 (merged)
@Pregmodder pretty sure this can be closed