Eat message

This is the complete specification for the eat message, saved from the now dead-and-buried sl ecowiki.

Feel free to comment it, but don't expect this to change. If you want to suggest a modification/improvement, please see the Version 2 instead.

From SL EcoWiki

The only variables in this message are what food types it affects and how much food is requested. Replies are sent to the predator from the prey via a Food Message. The hexadecimal message ID for this message is 0×10010200. In order to request food an object should add to that message ID the food types it wants to request in the bit positions replaced by AA in the example below. You may send a request more than one type of food. The types set should indicate which of the requested types you are returning. Do not set a type that was not requested.

Example Format: 0×100101AA|FF

Affects Bits

Change the affects bits of your message according to the food types listed below.

Request Animal Food

bit assignment – UUUUUUUM

    • U – Unassigned

    • M – Meat(HEX 1)

Request Plant Food

bit assignment – UUWRLNSF

    • U – Unassigned

    • T – Tree Leaf(Hex 10)

    • L – Leaf(Hex 08)

    • N – Nut(Hex 04)

    • S – Seed(Hex 02)

    • F – Fruit(Hex 01)

Message Payload

The Message Payload for this message is a single integer indicating how much food you are requesting. You may not receive the full amount requested, depending on the internal state of the requester.

Examples

This "0×10010108|10" requests 10 units of Leaf Food

This "0×10010102|10" requests 10 units of Seed Food