Development Forum |
|
Script Idea: Creatures carry baby | |
|
cyborg
|
11/20/2021 | |
I've been thinking that real life animal parents hold their babies. That thing is that I have no idea how to implement it.
Here's why I want to implement such a script. It should allow for more possible behaviours. When in danger, the creature could pick up the baby, then flee. Or as many marsupial parents do... drop* the baby as to distract the predator and flee. Or move the baby towards food.
I'll have to adjust the BHVR for baby creatures, then revert it when they hit childhood. Add a force drop script in case the baby ages while being held. Account for fast-agers.
Probably needs integration with the Sensorimotor script for creatures to recognise ages. It may be still be confusing as the creature has to figure out that they can only pick up baby creatures. Then probably make a demo genome to test it out.
Potential bugs:
- what if the baby needs to eat or play?
- doors, teleporters, elevators incompatibility
- swimming agent incompatibility
Bonus feature:
- carrier can share body heat with baby
* They don't throw the baby. That's a myth. |
Peppery One
Papriko
|
11/20/2021 | 1 |
Doors, teleporters and elevators shouldn't be much of a problem. Well, the elevators maybe. If the parent drops the child mid-ride, it will most likely end up outside the cabin and drop wherever it currently is.
Swimming agents..... hmmmm, maybe. Swimmer agents work by creating what is effectively an invisible elevator cabin around the creature. Potential problems I see here is if A) creatures can be snatched out of said cabin without problem and B) are the swimmer agents smart enough not to try and re-bubble a creature that's already held by something?
Now, the first potential bug that you listed is the one that worries me most: what if the baby needs to eat or play?
I had some rudimentary experiments in this direction at some point. Just mess around with the ATTR to make creatures carryable by other creatures. The thing is: the carried creature is completely helpless. I had Norn A starve to death because Norn B picked it up and fell asleep. Same thing can happen if Norn B just kinda "feels like" holding onto Norn A. You know that completely paralyzed state that creatures fall into when picked up by the hand? Yeah, exactly the same happens when they pick up each other.
I mean, you could call that a feature... If a parent animal IRL picked up it's cub and fell asleep, arguably the little one couldn't struggle free either, but that seems.... dissatisfying. The better option would probably be some sort of failsafe mechanism that makes sure that the little ones aren't carried to death.
Lets play plants! Photosynthesis... Photosynthesis... Photosynthesis... |
FlyingEttiNorn
|
11/21/2021 | 1 |
Creatures can't consciously recognize the age of other creatures but they CAN recognize their relatives
Probably altering the general "I'm being held" script would have to be done, though there is probably a good reason why held norns can't do anything |
cyborg
|
11/22/2021 | |
I'm thinking maybe implementing something akin to the empathetic vendor when the baby cries, it forces the creature holding them to wake up.
Offspring solicitations like human babies waking their human parents at night, or kittens meowing to get their mother's attention, or chicks chirping at their parents for more food. Ok I somehow need to link a baby's begging call to baby needs food in the parent's brain. |
FlyingEttiNorn
|
11/23/2021 | 1 |
I'd just force the norn to drop the baby tbh but not sure what level of helplessness you are going for. Could tack it onto the monotremes dragoler invented since those already need to be touching the parent to feed |
Vermidia
|
11/23/2021 | 1 |
When to drop a norn will be the biggest issue yeah. Simply modifying who a creature can pickup by making stuff as scrp 4 0 0 38 so it's universal would be a start(and 4 0 0 39 for dropping), from there you can easily get cage and _It_. Since the babies would be in a ZOMB state, I'm not 100% sure how well they could express really, and the empathetic vendor I assume works off the assumption that it can understand creature speech(or maybe it just reads their minds idk).
It's going to look a little awkward but it might sort of work?(maybe?)
You know...wait...nevermind... wait...no...umm...maybe later... |
cyborg
|
11/24/2021 | |
I got a script working. Currently a bodge implementation of an agent that enumerates through baby creatures and alters the BHVR to be pickup-able.
It does work, creatures can pick up and drop babies. So far no babies have died due to this,* but I have only tested it with like 2 babies. I'll add a water world to my agent test world to try out some aquatic breeds with the swimming agent.
I have observed an interesting behaviour where a mother is carrying the child while she is being hit.
Vermidia, I have checked the DS cos files and I can't find any file with scrp 4 0 0 38 or 4 0 0 39.
I don't have a failsafe mechanism yet. My idea is to add a new word "cry" to teach to creatures on birth. And the agent would parse creature speech world-wide.
Like I have no idea how to add a new word. I have made an extravocab catalogue file because that seems to be a thing that game vocab have.
* other reasons not withstanding
Edit 1:
Creatures don't have any natural instinct to pickup other norns. They have to be instructed to do so. |
Vermidia
|
11/24/2021 | 1 |
The scripts don't normally exist in the game, but the script numbers for them would be valid and would work as a creatureOncreature action.
Not sure if new words (that aren't object related) would even work though. New categories can be added, but other things are more specialized.
You know...wait...nevermind... wait...no...umm...maybe later... |
cyborg
|
11/25/2021 | |
I neglected to mention that I did try it with monotremes. The monotreme mum seemed to have a habit of picking up her children after I first instructed her to do it. The other creatures don't seem to pick up their babies unless I tell them to, and they often drop them soon after.
I extended the pickup script to also apply to children.
Testing with swimming breeds has shown that swimming creatures can pickup other creatures (non-swimming, and swimming?*). When the swimming baby is dropped, it fell straight down. The swimming agent wasn't fast enough to catch it.
I decided to add 4 0 0 39 as per Vermidia's suggestion to fetch and run some of the swimming agent code when the baby norn was dropped. This might have fixed the issue? It's hard to tell because I can't seem to get a creature to 1) get the baby, and 2) drop it in the middle of the sea again.
*I think? Unless the swimming agent decided to kill its instance beforehand and I didn't notice. |
cyborg
|
12/29/2021 | |
If I remember it right, I think someone said that the navigation script suggests creatures push or pull elevator when the corresponding up or down drives are high.
So maybe as a more sensible to program option, I should do something like that and strongly suggest to the carrier norn that they should drop their kid when they're sleepy, or when their kid is hungry. I want the norns to learn that they need to drop the kid, not just force them to do it.
Glad I took a break from creatures modding, then came back to this failsafe issue with a fresh pair of eyes.
I have no idea where that kind of navigation script is (I wanna see how it's coded), or I could be misremembering things and that script doesn't exist. |