Pikifen/Creator toolkit

From Pikmin Fanon
Jump to: navigation, search

This page explains how to use and set up the creator toolkit on Pikifen – a set of tools that help while creating content for the engine.


Most of these tools are used while playing the engine, and are called by pressing the F keys (F2, F3, etc.), or the number keys (the ones above the letter keys). Their effects vary, but their purpose is to help content creators by making mundane tasks easier and providing helpful information, useful in debugging any problems. It is possible to set which tools run on which key, and it's also possible to change some of the tools's settings. There are also some other tools that are not run on demand.

You can hold down the key to repeat the effect over and over. This is useful, for instance, to spawn several Pikmin quickly. It might stop working if you press another key while holding that one down, though. Some tools print out information on the top of the screen, on top of a see-through black box. This info disappears after 10 seconds, unless you call it again. F1 and F12 cannot be set as tool keys since they toggle the framerate and take a screenshot, respectively.

Configuration file[edit]

First of all, open User_data/Tools.txt. This file will contain the information for the toolkit to work. The remainder of this section will explain what each line does, so if any of the attributes listed are missing, add them yourself. See also: text files.

The enabled attribute controls whether or not the toolkit is enabled.

Afterwards, there are the f1, f2, etc. attributes, all the way up to f11, as well as the 0 to </code>9</code> attributes. These attributes specify what tool to run when that key is pressed, if any. The value of these attributes should be the tool's ID; to know a tool's ID, check its section on this article.

Finally, this file can also contain settings for some of the tools. Read a tool's section on this article to learn more about what settings it has.

Key tools[edit]

Area image[edit]

Creates an image of the entire area and saves it in the game's folder. This is a great way to show other people what your area is like. This draws the area just as it appears in-game, so with the objects and shadows and everything. The HUD won't be visible, though. How zoomed in or out the area is when compared to how it looks in-game depends on the size of the image. It is recommended that you don't try to aim for a 1:1 zoom level, but instead focus on having an image big enough for people to understand what is happening, but not so big that it is a pain to open.

  • Tool ID: area_image.
  • Settings:
    • area_image_size: Maximum image width or height, in pixels. 2048 is a good size for medium or large areas, otherwise 1024 works fine.
    • area_image_file_name: Name of the file, extension included (e.g. area.png). JPG creates a smaller file, but low-quality, PNG creates a high-quality, high-size file.
    • area_image_mobs: Set to true or false depending on whether or not you want to see objects, particle effects, etc.
    • area_image_shadows: Set to true or false depending on whether or not you want to see tree leaf shadows.

Change speed[edit]

Changes the game's flow of time, making it faster or slower. Press the tool's key while playing to switch from normal speed to the set speed, and then press again to return to normal. If you're testing something tedious, speeding up the gameplay means you have to wait less, and if you're trying to understand what is happening in a scenario that goes by too quickly, you can slow the game down. Note that the engine wasn't meant to run at these speeds, so some behaviors might not work properly, like objects being able to clip through walls they normally wouldn't.

  • Tool ID: change_speed.
  • Settings:
    • change_speed_multiplier: Game speed multiplier. 1 is normal speed, 0.5 is half speed, 2.0 is double speed, etc.

Geometry info[edit]

Prints out geometry info about what's under the cursor (or stops if pressed again), on the top of the screen. It uses the mouse cursor for this, not the leader's cursor. This prints out the cursor's coordinates, as well as some basic info about the sector that the cursor is on: its height and texture.

  • Tool ID: geometry_info.
  • Settings: none.

Hurt mob[edit]

Hurts the mob closest to the cursor. This is the mouse cursor, not the leader cursor. It saps away some half of its health every time you press it, meaning you can kill anything with just two presses (or more, if it regenerates). It's useful to kill troublesome enemies or boring obstacles without having to deal with them. Note that if you hold down the key, you'll be able to kill several mobs quickly, but if you don't pay attention, you could end up killing an object you didn't mean to, like your leader. To note also is that the mob does not receive any damage-related event with this, so it will never react to having lost health, even if its script says it should. It will die normally, however.

  • Tool ID: hurt_mob.
  • Settings:
    • mob_hurting_percentage: How much of the mob's total health should be lost each time. The default is 50, for 50%. 100 will kill any mob instantly.

Mob info[edit]

Prints out important information about the mob closest to the cursor, on the top of the screen. It uses the mouse cursor for this, not the leader's cursor. When you press the button, it locks-on to that mob, and only unlocks if the mob is deleted or if you press the button again while pointing to the same mob. Pointing to a different mob will lock to that one instead. The information shown is:

  • Name: The name of the type of mob this is (e.g. Red Bulborb, Olimar).
  • Coords: The mob's current coordinates, separated by space. The third coordinate is the Z, which means its vertical position.
  • State hist.: Name of the script states it has gone through (up to 4). The current one is the first on the list.
  • Health: Current health amount.
  • Timer: Time left on the currently running script timer, if any.
  • Animation: Name of the current playing animation, if any.
  • Vars: Name and value of all script variables.

As such, the information shown is mostly useful to debug scripts and animations.

  • Tool ID: mob_info.
  • Settings: none.

New Pikmin[edit]

Creates a new Pikmin where the cursor is, in the idle state. This uses the mouse cursor, not the leader's cursor. The type of the Pikmin created depends on the previous Pikmin created this way, in that it follows a cycle, alphabetically going through all Pikmin types declared on the engine. The new Pikmin will also have flower maturity. This tool is very useful if you need more Pikmin with you instantly. You can hold down the key to create a large army of Pikmin in a short time.

  • Tool ID: new_pikmin.
  • Settings: none.

Show hitboxes[edit]

Toggles visibility of mob hitboxes in-game. For each mob that has hitboxes, they will appear overlaid on top of it, and with a color scheme similar to the animation editor (green for hitboxes that can be damaged, red for those currently causing damage, and yellow for ignored ones).

  • Tool ID: hitboxes.
  • Settings: none.


Teleports the current leader to the cursor's position. This uses the mouse cursor, not the leader's cursor. Use this to go somewhere instantly or to move around the area quickly. Keep in mind that Pikmin in your party will not teleport with you, so they may have a hard time following you. This also has some technical drawbacks: Pikmin may go to an incorrect spot when trying to stay on the group, and the leader's vertical position may not be updated correctly. Neither of these are critical and eventually fix themselves. You can also hold down the key to repeatedly go to the cursor, which updates with the leader, meaning that this allows you to quickly move through everything in the direction the cursor is. This is however very hard to control.

  • Tool ID: teleport
  • Settings: none.

Other tools[edit]

Auto start[edit]

If you find yourself opening the engine, going to the same game mode, menu, or area every time, closing down, and repeating the process over and over, you can use this tool to avoid that. It makes the engine start on something other than the main menu automatically, and also optionally automatically open a specific area or animation.

The auto_start_mode variable controls what mode to automatically start on. If left empty, the engine boots to the main menu as usual. Valid values are play, animation_editor or area_editor. The auto_start_option variable contains the area or animation to load on the game or editor, optionally. For areas, this is just the area name, but for animations, this has to be the full file name, directories included.