Pikifen/Quick creator guides

This page contains quick guides that teach you the basics on how to create content for Pikifen. Read this for a list of more in-depth and complete guides.

Concepts
An area's physical geometry is made up of neighboring s, which represent floors when seen from above. Their height can also be changed, and a polygon with a higher height than its neighbor creates a wall.

How to make an area
Feel free to check or copy the existing areas for references and ideas.


 * 1) Open the game, enter the area editor.
 * 2) Use the big button on the right to create your area.
 * 3) Use the "Info" mode to give it a name.
 * 4) Use the "Layout" mode to create and edit the polygons (also called sectors).
 * 5) * Drag a polygon's vertexes around to give it shape.
 * 6) * Double click a polygon's lines to create a new vertex.
 * 7) * Use the "+" button on the panel to start drawing a new sector.
 * 8) * Drag a vertex into another to merge the two. Connect edges to stitch them.
 * 9) * Edges between higher sectors to lower ones make walls.
 * 10) Use the "Objects" mode to create and edit the level's objects.
 * 11) Use the "Paths" mode to create and edit the Pikmin's paths, by drawing the path stops and links between them.
 * 12) Use the "Details" mode to create and edit tree shadows.

Further info

 * On the area editor, right-click-drag moves the camera.
 * Objects will walk up floors within 50 units of each other. Use this for ramps and staircases.
 * Bridges need to be inside sectors of the "Bridge" type. Neighboring "Bridge"-type sectors will be used for the finished bridge's layout.
 * Don't overlap lines or create non-simple polygons.

Full area guide: Creating areas

Concepts
Red Pikmin is a type of Pikmin, Wollywog is a type of enemy, Captain Olimar is a type of leader, and wood bridge is a type of bridge. You then place in an area several instances of Wollywog, several instances of wood bridge, (hopefully) one instance of Captain Olimar, etc. Each type has its own properties (color, health, script, etc.)

How to create an object type
Feel free to check or copy the existing object types for references and ideas.


 * 1) Create a folder for your object's type in.
 * 2) Inside, create.
 * 3) Inside, write the necessary attributes, which take on the format , one per line.
 * 4) Depending on the category, you must also add some more attributes; check the corresponding category article in the list of object categories.
 * 5) Create and set up the animations for it.
 * 1) Create and set up the animations for it.

Further info

 * Your object may also need a script; check if it does in the list of object categories.
 * The "Custom" category is for fully custom objects. These too need a script.
 * In order for your object to attack or be attacked, you need to specify its,  , and   properties.

Full object type guide: Creating object types

Concepts
Animations are made up of  that are displayed in rapid succession. Each frame has a sprite, and info about how long it lasts. The engine reads sprites from sections of one or more images (called spritesheets). Besides the image, each sprite has hitboxes, which are connected to body parts (e.g. body, head, tail, etc.), and define whether that body part is currently damageable, causing damage, or being ignored. These hit"boxes" are actually cylinders.

How to create animations
Feel free to check or copy existing animations and images for references and ideas.


 * 1) Create the images that will be used for the object's sprites. In every sprite's image, the object must be facing the right.
 * 2) Open the game, enter the animation editor.
 * 3) Use the big button on the right to load the object type whose animations you want to edit. Create its folder in   if it doesn't exist.
 * 4) Use the "Edit body parts" mode to create and edit the list of relevant body parts.
 * 5) Use the "Edit sprites" mode to create and edit the sprites to be used in future animations's frames.
 * 6) * Use the big button at the top to select a sprite or create a new one.
 * 7) * Use the "Edit hitboxes" button to specify where each body part's hitbox is and what it does. They can be dragged around and resized with the left mouse button.
 * 8) Use the "Edit animations" mode to create and edit the animations.
 * 9) * Use the big button at the top to select an animation or create a new one.
 * 10) Create the necessary animations for the type of object. To know which ones you need, check the corresponding category article from the list of object categories.

Further info

 * On the animation editor, right-click-drag moves the camera.
 * When making animations for Pikmin, use the "Edit Pikmin top" button on an animation's data to specify where the leaf/bud/flower is on that frame.

Full animation guide: Creating animations

Concepts
Scripts use an event-driven. An object is always in one of several states (e.g. sleeping, going home, biting). In this state, it can respond to a series of events (e.g. when it sees a Pikmin, when it reaches its home, when it loses health). Its response consists of a list of actions (e.g. changing animation, changing state, swallowing Pikmin in its mouth, walk somewhere). Only enemies and custom objects use the scripting feature.

How to create a script
Feel free to check or copy existing scripts for references and ideas. It is recommended to create the object you want before writing the script.


 * 1) Go to.
 * 2) Inside, create a file called.
 * 3) Inside, add a   block. This means one line has , and another has.
 * 4) Inside the script block, create a block for the name of a state.
 * 5) Inside a state's block, create a block for an event. See here for a list of events.
 * 6) Inside an event's block, write one action per line. See here for a list of action.
 * 7) In the same file, add the   attribute, which specifies what the starting state is, and , which is the state to go to when the health reches zero.
 * 8) In   in the same folder, next to the existing object attributes, add the following attributes:
 * , which is a block with named "reaches". Each reach uses the format  (the latter two are optional).
 * , which is a block with named "reaches". Each reach uses the format  (the latter two are optional).

Further info

 * To chase after an object, it must first be focused on.
 * For an enemy to eat, it must first set how many Pikmin can be grabbed at max, and which body parts will do the grabbing. After some Pikmin are grabbed, it must then swallow them, which is what really kills them.
 * When an enemy dies, it should run the  and later,   actions.
 * An enemy can keep a list of variables with any name you wish, and these variables can contain any value you want. You can refer to a variable's value in an action with.
 * When switching states, the action that switches the state should be the last one run on the event's code.

Full script guide: Object script