Pikifen/Quick creator guides

From Pikmin Fanon
Jump to: navigation, search

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.

Areas[edit]

Concepts[edit]

An area's physical geometry is made up of neighboring polygons, 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[edit]

Making a ramp with the area editor.

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).
    • Drag a polygon's vertexes around to give it shape.
    • Double click a polygon's lines to create a new vertex.
    • Use the "+" button on the panel to start drawing a new sector.
    • Drag a vertex into another to merge the two. Connect edges to stitch them.
    • Edges between higher sectors to lower ones make walls.
  5. Use the "Objects" mode to create and edit the level's objects.
  6. Use the "Paths" mode to create and edit the Pikmin's paths, by drawing the path stops and links between them.
  7. Use the "Details" mode to create and edit tree shadows.

Further info[edit]

  • 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

Object types[edit]

Concepts[edit]

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

How to create an object type[edit]

Feel free to check or copy the existing object types for references and ideas.

  1. Create a folder for your object's type in Game_data/Types/<category>.
  2. Inside, create Data.txt.
  3. Inside, write the necessary attributes, which take on the format attribute = value, one per line.
    • name, height, max_carriers, max_health, move_speed, pushable, pushes, radius, rotation_speed, weight.
  4. Depending on the category, you must also add:
    • Pikmin: icon_leaf, icon_bud, icon_flower, top_leaf, top_bud, top_flower. Optionally, but recommended: throw_strength_mult (a multiplier), carry_strength, has_onion.
    • Leader: icon. Optionally, but recommended: dismiss_sfx, name_call_sfx, throw_strength_mult (a multiplier), whistle_sfx.
    • Enemy: drops_corpse, pikmin_seeds. Optionally, but recommended, itch_damage, itch_time.
    • Onion: pikmin_type.
    • Pellet: match_seeds, non_match_seeds, number, number_image, pikmin_type.
    • Ship: can_heal (healing is done by pressing the throw button near the ship).
    • Bridge: main_texture, rail_texture.
  5. Create and set up the animations for it.

Further info[edit]

  • To make enemies, you also need to create their script.
  • The "Custom" category is for fully custom objects. These too need a script.

Full object type guide: Creating object types

Animations[edit]

Concepts[edit]

Animations are made up of frames 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. 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[edit]

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 Game_data/Types/ 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.
    • Use the big button at the top to select a sprite or create a new one.
    • 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.
  6. Use the "Edit animations" mode to create and edit the animations.
    • Use the big button at the top to select an animation or create a new one.
  7. Create the necessary animations for the type of object:
    • Pikmin: idling, thrown, attacking, grabbing, sprout, plucking, lying, carrying, sighing.
    • Leader: idling, walking, plucking, getting_up, dismissing, throwing, whistling, lying (lying down with the Napsack and staying there), pain, knocked_down (includes staying on the ground and getting up), spraying, punching.
    • Gate or bridge: idling, destroyed.

Further info[edit]

  • 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

Scripts[edit]

Concepts[edit]

Scripts use an event-driven finite-state machine. 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[edit]

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 Game_data/Types/<category>/<type>.
  2. Inside, create a file called Script.txt.
  3. Inside, add a script block. This means one line has script {, 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 first_state attribute, which specifies what the starting state is, and death_state, which is the state to go to when the health reches zero.
  8. In Data.txt in the same folder, next to the existing object attributes, add the following attributes:
    • territory_radius.
    • reaches, which is a block with named "reaches". Each reach uses the format <pie-slice 1 radius> <pie-slice 1 angle> <pie-slice 2 radius> <pie-slice 2 angle> (the latter two are optional).

Further info[edit]

  • 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 start_dying and later, finish_dying actions.
  • An enemy can keep a list of variables with any name you wish, and these variables can contain any value you want.
  • 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