Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Babies dying of thirst in their mother's arms (DFusion Help)  (Read 790 times)

Captain Ford

  • Bay Watcher
  • Eating dragons has some side effects...
    • View Profile

I've been having trouble with a custom race that has multiple castes. For some reason, mothers aren't feeding their babies. They carry them around, but the babies get thirsty and hungry and eventually die.

I know I've seen it mentioned before, but I never saw a solution to it. Could it be because the base creature doesn't have the baby tag?

Anyways, I'd like to know how to fix it. Part of me thinks the only solution might be through using a DFusion script, unless someone else can point me in another direction.

I'm having the HARDEST time wrapping my head around the lua scripting though.
The questions I most need answered are:
1) How do I create a new vector?
2) How do I add an element to a vector?
3) How do I get the current game year and time? (in fortress mode)

Because I think what I need to do is add entries to the vectors in the baby's eat_history, but since they've never eaten before, the vectors are uninitialized.
Logged
...Holy shit. Ford, you get the Official Medal of Epic Awesomeness.
Its official! Ford! You need to put it in your sig now! "Official Mafia Welcomer!"

khearn

  • Bay Watcher
    • View Profile
Re: Babies dying of thirst in their mother's arms (DFusion Help)
« Reply #1 on: June 22, 2012, 03:40:36 pm »

Oh, I saw the subject and thought you were trying to mod it so that they would die of thirst in their mothers' arms. Oh well. :)
Logged
Have them killed. Nothing solves a problem quite as effectively as simply having it killed.

Captain Ford

  • Bay Watcher
  • Eating dragons has some side effects...
    • View Profile
Re: Babies dying of thirst in their mother's arms (DFusion Help)
« Reply #2 on: June 22, 2012, 05:11:27 pm »

Oh, I saw the subject and thought you were trying to mod it so that they would die of thirst in their mothers' arms.
Now why would I want to do that?  :o

-

I'm trying to run a fort where the entire population comes from babies rather than migrants, so this is a significant stumbling block.

I managed to solve it (kind of) by taking blind stabs in the dark until I stumbled upon the insert function. As far as I could tell it seemed to be working. The baby stopped being thirsty and hungry.

Then a goblin babysnatcher ran off with her.

*sigh*

Well, I still need one question answered: How do I get the size of a vector?
I've seen tons of example code that simply uses :size(), but that isn't working for me.
Logged
...Holy shit. Ford, you get the Official Medal of Epic Awesomeness.
Its official! Ford! You need to put it in your sig now! "Official Mafia Welcomer!"