Weekly Update - Creature Nests, Eggs, and Spawning

Last week my attention shifted from the AI Behavior Editor to the creatures themselves. While my intent was to start building a nice behavior tree for the jidou and iichii, I first needed to get them spawning and de-spawning from the world in a well-tracked manner.

AI Behavior Editor

Work related to the behavior editor this week was limited to adding new behavior nodes and data functions. AI Behaviors now have access to properties on the current creature/character (including things like species, bloodlines), as well as stats (including health, energy, carry weight, and core attributes).

There is still room for improvement with regards to how variables are accessed. Right now data nodes are a bit "here is a list of things you can copy/paste into the right box". It'd be much better if these selections could be made from a searchable list. I'd like to get a few basic behaviors working in the editor to learn the ins and outs a bit, then smooth out the less user-friendly parts.

Here is a shot of the AI Behavior Editor as I started work on the Jidou.

Creature Nests

Last week I started using the editor to design a behavior tree for the  Jidou and  Iichii, but haven't gotten very far on that yet. Here is an outline of how I'd like them and their nest/spawners to behave:

  1. The Nest is the Hub - For these types of creatures, their behavior is centered around their nests.
  2. The Nests are Hidden - The maximum number of nests have already been manually placed in the world. The nests are invisible and (mostly) disabled by default. (Spawning and expansion of these creatures is limited by the number and positions of their hidden nests.)
  3. Bootstrap - If nothing has occurred at nest for a really long time, the nest will just suddenly become active. I call this the "bootstrap" function - even if a population and their nests is completely wiped out, they will eventually return. (Likely a week or more of in-game time, but each nest type can be configured differently. Server admins can enable/disable the server-wide spawning of each nest type in Antilia.)
  4. Nests Have a Creature Limit - Nests will only spawn up to a maximum number of creatures and then stop spawning.
  5. Creatures Hide in Nests - Creatures can "enter" the nest, and remain inactive until needed. (Creatures inside a nest are put in a "sleep" state and do not perform AI behaviors until the nest expels them after a max time, at a set time each day, or when the nest is attacked.)
  6. Creatures Recover in Nests - Creatures inside a nest for a set time will be restored to full health.
  7. Nests Produce Eggs or Creatures - Once an inactive/invisible nest has been "claimed" by a creature (or bootstraps) it will become visible in the game world and will start producing creatures or eggs.
  8. Creatures Gather Resources - For the jidou and iichii, the nest will form a small colony where members gather resources and store them in the nest. (The nest is one of Antilia's "open" containers, which display their contents like eggs in the game world. Clicking on the nest will allow players to access what is stored in the nest.)
  9. Eggs Incubate in Nests - While in the nest the eggs will incubate, and eventually hatch. (The nest will eventually have an effect it imparts on eggs within it which causes them to hatch. To incubate them outside of their nest will require re-creating that condition.)
  10. Creatures Hatch and Begin AI Behavior - After hatching is when the creature's AI behavior begins, and where the jidou and iichii diverge in their behaviors.
  11. Creatures Leave Spawn Nest to Find their Own - When they reach a certain age the spawned creatures will leave their spawn nest and go into an exploration mode where they look for an unclaimed (hidden) nest in the world around them. If they find one they will claim the nest, it will appear, and the process repeats with them stocking the nest and eggs beginning to spawn and incubate.
  12. Nests can be attacked and destroyed! - When a nest is destroyed any creatures hiding inside will be expelled and either flee or attack the attacker!

Testing the "bootstrap" feature of the creature nests.

Clicking on one of the nests allows you to access it's contents. Of course, some creatures might not like it if you start adding or removing things...

When I started this week I had a vague plan of those details, but it wasn't until I went to implement them that I started to discover just how complex and interconnected some of those things turned out. I've only got about half of these things working so far.

Creatures now grow in size over time, starting out small after hatching from the egg and getting larger until they reach their max size. I really wanted to have the eggs incubating in time for today's update but that'll have to wait until next time!

That's all for this week, thanks for reading!