-
Notifications
You must be signed in to change notification settings - Fork 276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: eggs from friendly wildlife critters spawn friendly offspring #4289
Conversation
It's tedious to require the player to keep taming offspring of the animals they have already tamed in the first place so this change addresses that, especially for chickens who multiply aggressively! Mostly meant as QoL change for farm players.
also cc @KheirFerrum, |
Should ask Kenan and @chaosvolt, since both of them touch stuff like this. |
One minor complication I'd like to note: the slaughter command was only added to the pet menu, not the friend menu (main reason is this would allow player ferals to execute friendly ferals just by examining, when they're really just supposed to be tolerating a player feral's presence and are only marked as friendly for not-breaking-gameplay reasons). These changes spawn offspring as friendly far as I can tell, not as full-on pets. I'd need to check it out and compile-test to be 100% sure however, currently out and about on wifi so can't test just yet. Given that will block off access to all the other functions like milking, making sure they correctly spawn as full-on pets and not just generic friendlies might be good to double-check for. |
@chaosvolt that's a good point. They actually spawn as friendly, not full-blown pets. Thanks for pointing that out. Do you think this needs to get handled as part of this PR? I think the current change is still useful as is since as a chicken farmer you will no longer have to be careful to avoid auto-attacking your flock while going through the chicken coop. Lemme know what you think. |
Since it'll also affect the other PR that got merged, it can probably wait to be implemented in a follow-up PR. If you feel it'd be easy enough to fit into this PR then go for it, but it's not urgent. Implementation-wise it should be mostly just checking if the parent monster has the |
@chaosvolt I'm looking at it now and it seems that it's doable but it would have to be a more invasive change as the existing For mammals as far as I can tell we'd have to extend that API. For eggs, simply changing this flag's behavior or adding a new flag seems like it'd work ok. Personally I'd rather make iterative progress and get this in as it improves things and followup with another PR for full-blown-pet-conversion of spawns for both types of spawning. I was looking into fixing issue #3966 but I can context switch to this instead. |
For the record, I did just test that you can turn a friendly spawned creature into a pet the regular way so it doesn't seem like this introduces a regression. I'll update the PR test plan. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, that's a good way around it so. :>
It's tedious to require the player to keep taming offspring of the animals they have already tamed in the first place so this change addresses that, especially for chickens who multiply aggressively! Mostly meant as QoL change for farm players.
Purpose of change
This change is meant as a simple QoL improvement, mostly aimed at farm players. It's a continuation of the work in 729b2b5 and addresses the tamed wildlife that reproduces by laying eggs.
This change works well alongside generic culling process that already exists for pets: 8c42631
Describe the solution
Solution works by introducing a new flag that gets attached to the egg on the condition that the parent is friendly to the player + is wildlife creature. When it's time to spawn a monster from the egg, we check whether the flag is present and if so, we spawn the new monster as a friend of the player.
Describe alternatives you've considered
Just like with previous commit, I think it's safe to constrain this behavior to tamed wildlife for the time being.
Testing
Testing is tricky as you need to wait until the friendly critter (e.g. chicken) lays an egg and then wait until the egg 'rots' which has a chance to produce an offspring.
I'm using this hackish commit to facilitate testing by:
With the above hack commit in place:
Make chicken. Don't tame chicken. Walk away and back (~e.g. 120 tiles). Submap gets reloaded and chicken lays egg. Wait ~100 turns and see that spawned chicklet is neutral to the player.
Make chicken. Tame chicken. Walk away and back (~e.g. 120 tiles). Submap gets reloaded and chicken lays egg. Wait ~100 turns and see that spawned chicklet is friendly to the player.
Also test that friendly spawned creature can be turned into proper pet the typical way by the use of appropriate food.
Additional context
Checklist