Pikifen/Object categories/Resource

Resources are objects that Pikmin can carry somewhere, and once delivered, they cause something to happen. These resources are almost always provided by a pile.

Examples of resource types include Burgeoning Spiderwort berries, which get delivered to the ship to make sprays with, bridge shards, which get delivered to the corresponding bridge, nuggets, which get delivered to the ship for points, etc.

To create a new type of resource, please follow the creating object types tutorial.

Overview
A resource type specifies where the resource must be delivered, what happens to the resource when it's delivered, and what happens when it's dropped by the Pikmin.

Resource type objects are hardcoded in the engine to sit there, be picked up by the Pikmin, be dropped by the Pikmin, vanish if necessary, and be delivered somewhere. There is also logic to cause something specific to happen when they are delivered.

Attributes
Besides the global object type attributes, a resource type has the following attributes.

Mandatory

 *  : Specifies where this resource must be taken to.  means it gets carried to the nearest ship, and   means it gets taken to whatever object is linked to the pile that originated this resource.
 *  : Specifies what happens when the resource is successfully delivered.  causes some amount of damage to the delivery object,   causes an increase (by one) in the number of ingredients that make up a spray, and   add points to the player's score.

Recommended
None.

Optional

 *  : If the resource's delivery damages the delivery object, this specifies how much to hurt it by. Defaults to 1.
 *  : If the resource's delivery increases the player's score, this specifies how much to increase by. Defaults to 1.
 *  : If true, the resource returns to the pile from which it came, when it vanishes. If false, it's gone forever. Defaults to false.
 *  : If the resource's delivery increases a spray's ingredient count, this specifies the name of the spray type. Defaults to not set.
 *  : When a resource is dropped, wait these many seconds before making it vanish. 0 means it vanishes instantly. Defaults to 0.
 *  : If true, the resource will vanish when the Pikmin drops it, after a delay. If false, the resource will lie there forever. Either way, it can be picked up again before it actually vanishes. Defaults to false.

Animations
A resource type needs to have the following animations:


 *  : Idling; used for everything.

Script
A resource type's script cannot be changed.

Object spawn script variables
Besides the global spawn script variables, resource type objects do not read any specific script variables.