Baba Is You An Overview Guide Levelpack – Custom Mod and Basic Gameplay Tips

Baba Is You An Overview Guide Levelpack – Custom Mod and Basic Gameplay Tips 1 - steamsplay.com
Baba Is You An Overview Guide Levelpack – Custom Mod and Basic Gameplay Tips 1 - steamsplay.com

Table of Contents

An overview of the new, no-longer-hidden Level Editor. Includes a get-started guide, various useful settings, and an introduction to the built-in modding support. Focuses on levelpacks rather than standalone levels.
 
 

Introduction

Note: The editor update releases on November 17th; this guide was written based on the current beta branch.
 
 
A levelpack could appropriately be described as a “custom campaign”. The new Level Editor allows you to create a levelpack with almost all the features used by the main game itself.
 
The aim of this guide is to help you create a levelpack. I’ll outline how the Editor works, and write down every little janky or undocumented feature that I can. I won’t go into, for instance, what makes a “good” puzzle.
 
If there’s something confusing or missing, please let me know in the Comments.
 
 
Note: In the interest of completeness, this guide contains some late-game spoilers which are marked with spoiler tags.
 
 

Where do I go?

 
To make your first levelpack, see below, Get started with making levelpacks. This may also serve as an introduction to the editor in general.
 
To make your first levelpack mod, see Get started with custom code.
 
 
 

Get started with making levelpacks

Here’s how to get started and create a simple levelpack.
 
 

Create the levelpack

 
From the main menu, head to Level Editor.
 
Select Edit Levelpacks…. If it’s grayed out, first go to Help & General Settings and make sure Enable Extended Features is enabled.
 
Hit Create a New Levelpack. You’ll be prompted to enter the name of your new levelpack. After that, select your new levelpack from the list.
 
Here is the Level List, where you can add levels and change general levelpack settings. Currently there aren’t any levels, so it’s empty.
 
Before you make a level, make sure the author name is correct by clicking Change Author.
 
 

Create the first level

 

Set up the first level

 
Let’s create the level the player will see when starting the levelpack for the first time. Hit Create a New Level.
 
After choosing the name, you’ll get a prompt reading “Do you want to load a theme for this level?” Choose no for now.
 
The level editor appears. Let’s start placing objects.
 
Down at the bottom, click Objects to go to the Objects menu. Here, you’ll see a grid containing the pool of objects that the level uses. This is the Object Palette. Click an object to select it for drawing.
 
Go ahead and write a useful rule like Baba Is You. Make sure your level is winnable, you’ll need to test whether it all works later.
 

Add decoration

 
Let’s add a decorative object.
 
In the Objects menu, click the Add Object button, the one labeled with a Baba and plus sign.
 
Click Edit Search and put in the name of an object you want. For instance, you could add a patch of Grass, a Flower field, or a Brick floor. But for the sake of clarity, I am going to pretend you chose Grass.
 
After searching, the Grass Object and Grass Text show up. Click either one to add Grass to the Object Palette.
 
After selecting the Grass, you will almost certainly want to put it under some of your existing objects. To do this, you’ll need to select another Layer.
 
Click L2 in the top-right corner of the screen to select Layer 2. The other objects will fade to show they are not on the currently selected layer.
 
Put some Grass wherever you want, then hit Save down at the bottom.
 
Now hit Menu > Return to Level List. Booyah, your level is now in the list.
 
 

Create the world map

 

Set up the map

 
Let’s make the world map now. Hit Create a New Level.
 
This time, head to Settings at the bottom. Here are a bunch of different settings for this level.
 
You might want to change the music. Do Change Music > Map to use the map theme.
 
If you wish, you may also change the level size. Go to Change Level Size, play around with the size, then hit Apply New Size. (By the way, 33×18 is the size of every world map in the main game.)
 
Next, head over to Map Settings to take care of the world map-related setup.
 
Under Select Level Type, you’ll want to select Map. This adds the dandelion counter to the corner of the screen, and skips the normal level introduction screen that appears when a level is selected.
 
Alright, now exit out of the Settings menu.
 
 

Place Level

 
Now head to the Objects menu. Up until now, we’ve only worked with Object-Placing Mode. However, there are also other placing modes for Levels, Paths, and Specials. Choose Level-Placing Mode by hitting Levels.
 
Your cursor changed to a square; this signifies that you’re placing levels. Click to put one down.
 
A bunch of settings pop up, but the only ones we need to change are “Which level this leads to” and “Initial State”.
 
Hit the button under “Which level this leads to” and choose your first level from earlier.
 
Then, set the level’s Initial State to Opened. We do this because there’s a chance someone might Return to Map before the level is even beat. If the level isn’t unlocked, we’re pretty much softlocked, so we want this level to be open from the start.
 
Hit Return to confirm these settings. If you ever want to change a level’s settings, make sure Level-Placing Mode is selected in the Objects menu, and click the level you want to change.
 
 

Place Cursor

 
For the world map, you’ll need to add the Cursor to your Object Palette. In the Objects menu, go back to Object-Placing Mode by hitting Objects. Go and add the Cursor to the Object Palette, then place one on top of the Level to set the Cursor’s default location. (Levels are secretly on their own layer.)
 
 

Place Paths

 
You’ll also want paths. Add the object called “Line” to the Object Palette.
 
From the Objects menu, click that little gear button next to the Paths button to look at the settings for the paths you’ll place.
 
Chances are it’ll say Path Object: text_is. We’ve got to change the Path Object to line.
 
Go and press Return, then change to Path-Placing Mode by clicking Paths.
 
Now, while in Path-Placing Mode, click the Line in your Object Palette. This changes the Path Object from text_is to line.
 
Note: To change the Path Object, you’ve got to select an object while Path-Placing Mode is selected. It won’t remember if you previously selected an object in Object-Placing Mode.
 
Draw some paths adjacent to the level. Like with levels, you can edit a single path by selecting Path-Placing Mode and clicking the path you want to edit.
 
Hit Save, and exit back to the Level List.
 
 

Set first level and world map

 
Here, you’ll find two buttons named Set First Level and Set World Map. These are used to signify which two levels are the entry point for the levelpack. For instance, “Baba Is You” (level 0) is the first level of the main game, and “Map” is the world map.
 
Click Set First Level, then click your first level. You’ll see it’s been marked with an S. Similarly, click Set World Map, then click your world map to mark it with an M.
 
 

Find the Data folder

 
Finally, before we go to test out this levelpack, let’s quickly exit the game and head to the game’s Data folder. The Data folder is the awesome place where all the game’s files live. The process of finding it differs slightly between operating systems.
 

Windows

 
Right click the game in your library, then go to Manage > Browse local files. From there, head into the Data folder.
 

Mac

 
Right click the game in your library, then go to Manage > Browse local files. From there, right-click Baba Is You.app and choose Show Package Contents, then head into Contents/Resources/Data.
 
 

Rename the levelpack folder

 
Let’s head into the Data/Worlds directory, where all levelpacks live. In there, your new levelpack folder will be named something like 76world.
 
To make sure it’s the right one, open the folder and check its world_data.txt. The name= and author= fields should respectively contain the levelpack name and author name you specified earlier. Once you’ve verified that, rename the levelpack folder to something more unique.
 
Note: The name of the folder is used to match up your levelpack with your save file. Thus, if you rename your levelpack folder after playing it, the game will create a new save for the levelpack the next time you play it. So, renaming your levelpack folder is fine until you start putting it online.
 
 

Test out the levelpack

 
Now that you’ve done that, head back into the game. From the main menu, choose Play Levels > Play Levelpacks, and pick your levelpack from the list.
 
If everything went well, you should start off in the first level. Beating it should take you to the world map, where the paths will reveal themselves. You’ll also get the Area Complete message.
 
Cool! You did it. That ends the basic levelpack tutorial.
 
 
 

Edit a level

In the editor, objects are placed in levels. There’s also access to different object-placing tools and menus.
 
 
Baba Is You An Overview Guide Levelpack - Custom Mod and Basic Gameplay Tips - Edit a level - 60190C4
 
 

Use the object-placing tools

 
The tools are listed on the right side of the editor screen.
 

  • Drawing tool: Click and drag to freely place objects.
  • Line tool: Click and drag to place objects in a line.
  • Hollow rectangle tool: Click and drag to place objects in a hollow rectangle.
  • Filled rectangle tool: Click and drag to place objects in a filled rectangle.
  • Selection tool: Click and drag to pick up a rectangular area of objects, then click to overwrite an area with copies of it. Empty space will also overwrite the area.
  • Flood fill tool: Click to replace all objects in a contiguous area.
  • Eraser: Click and drag to remove objects. Alternatively, selecting empty space works the same as an eraser.

 

Draw on different layers

 
Layers allow objects to be placed independently of one another. To choose a layer, click the buttons labeled L1, L2, and L3 in the editor. The objects on the other layers will fade to show they are not on the currently selected layer.
 
Note: Level objects are placed on their own layer, so they aren’t on layers 1, 2, or 3. Switching layers with level-placing mode selected will switch to object-placing mode.
 
 

Select an object from the Quickbar

 
Click an object in the Quickbar to select it. Alternatively, the mouse wheel may be scrolled.
 
 

Lock an object in the Quickbar

 
Ordinarily, selecting an object from the Object Palette will cause it to be added to the Quickbar, pushing out the others towards the right. To prevent an object from being pushed out of the Quickbar, right-click it to lock it in place.
 
 

Clear an object from the Quickbar

 
Middle-click an object in the Quickbar to remove it.
 
 

Use the editor controls

 
The controls are listed at the bottom of the screen.
 

  • Test: Play the level. To go back, pause and select Return to Editor.
  • Swap: Select the text counterpart of the currently selected object.
  • Undo: Undo changes.
  • Save: Save changes. You’ll get a prompt if you attempt to leave a level without saving.

 
 
 

Use the Objects menu

The Objects menu provides access to the Object Palette and object-placing modes. To access the Objects menu, click the Objects button in the editor. Alternatively, Tab may be pressed to switch in and out of the Objects menu.
 
 
Baba Is You An Overview Guide Levelpack - Custom Mod and Basic Gameplay Tips - Use the Objects menu - 66F435E
 
 

Select an object

 
Click an object in the Object Palette to select it for drawing.
 
 

Add an object to the Object Palette

 
Click the button with the Baba and plus sign icon to open the Object List. From there, click on any object to add it to the Object Palette. Clicking an object will also add its text counterpart (and vice versa), and certain object pairs such as Hot and Melt will get added at the same time.
 
 

Remove an object from the Object Palette

 
Click the button with the crossed-out Baba icon, then click an object to remove it from the Object Palette. Alternatively, you may hold Ctrl and right-click an object to remove it.
 
 

Rearrange the Object Palette

 
Hold Ctrl and click and drag an object in the Object Palette to move it. I recommend moving the objects from their default locations. Keep in mind the layout of the Object Palette is different between the Object Palette display modes.
 
 

Customize an object

 
Click the button with the Baba and abc icon, then click an object to open its settings. Alternatively, you may right-click an object to quickly open its settings.
 
 

  • Baba: An object
     
     
     
  • Is: A verb or action
     
     
     
  • You: A property or quality
     
     
     
  • Lonely: A prefix condition
     
     
     
  • On: An infix condition
     
     
     
  • Ba: A letter

 
 
 

Use the level-placing mode

The Level-Placing Mode is used to place levels on a map. It functions differently than Object-Placing Mode: no object-placement tools are allowed, and levels are always placed on their own layer outside of the main three. To use Level-Placing Mode, open the Objects menu and select Levels. Your cursor changes to a square while in Level-Placing Mode.
 
 

Set up levels on the map

 
Clicking on the canvas will create a level and open a level setup dialogue.
 

  • None: The level is blank.
     
     
     
  • Numbers: The level has a regular number.
     
     
     
  • Text: The level has a letter. Used typically for levels off the main path.
     
     
     
  • Dots: The level is dotted. Used for Extra levels.
     
     
     
  • …: The level has a custom sprite. Used typically for world maps. The custom sprites are chosen through Map Icon Setup (see Change level settings > Change map settings).

 

Modify a level’s settings

 
Make sure Level-Placing Mode is turned on, then click a level to change its settings.
 
 

Open the editor for a level on the map

 
To go right into the editor for a level on the map, hover over the level and press E. (There’s currently no shortcut to go back.)
 
 
 

Use the path-placing mode

Paths are used to join levels together on the map. The Path-Placing Mode is more normal compared to the Level-Placing Mode: you can use the different object-placing tools again, and the paths are back on the three main layers. (Unfortunately, paths don’t fade like regular objects when they’re not on the currently selected layer.)
 
To use Path-Placing Mode, open the Objects menu and select Paths. Your cursor changes to an inverted cursor shape while in Path-Placing Mode.
 
 

Set the path object

 
In the end, paths are really just regular objects with some extra features. The main object used for paths is the Line, and the Gate is used for locked paths.
 
By default, the path object is text_is. To set the path object, click on an object in the Object Palette while the Path-Placing Mode is selected.
 
Note: It won’t work if you’d previously selected the object in Object-Placing Mode, then switched to Path-Placing Mode. Ideally it should, but for now you must make sure Path-Placing Mode is selected first. If you happen to see Hempuli, please ask him politely to take another look at this.
 
 

Change the path settings for paths to be placed

 
You can change the settings that will be applied to paths when they are placed. Open the Objects menu and select the small gear button next to Paths.
 

  • No: As long as the path is visible, it is always able to be passed by the cursor.
     
     
     
  • Level Clears: The path requires a number of levels to be cleared across the whole levelpack.
     
     
     
  • Map Clears: The path requires a number of flowers.
     
     
     
  • Orbs: The path requires a number of bonuses.
     
     
     
  • Local Clears: The path requires a number of levels to be cleared in the current map.

 

Modify a path’s settings

 
Make sure Path-Placing Mode is turned on and that you’re on the right layer, then click a path to change its settings. If you just placed the path, you might have to take the mouse off the path first and then put it back on.
 
 
 

Use the special-placing mode

Specials are used to place non-object entities such as control symbols, and to add metadata to existing objects.
 
In the level’s .ld file, the [specials] header contains the data of each special, and the specials= field under [general] holds the number of specials. For instance:
 
 

[general]
specials=1
(...more fields...)

[specials]
0X=10
0Y=5
0Z=4
0data=

 
The X and Y fields start with 1 in the top left corner of the screen. The Z field doesn’t do anything, specials affect all objects on a tile regardless of which layer they’re on.
 
 
To use Special-Placing Mode, open the Objects menu and select Special. Your cursor changes to an inverted cursor shape while in Special-Placing Mode.
 
 

Set a special’s data

 
For a special to do anything, it must have something in its data= field. This field must be set through editing the level’s .ld file. There are different kinds of specials which are described below.
 
 

Create a control symbol

 
Control specials place a non-interactable control symbol on the map. Control specials have the following data format:
 
 

0data=controls,<control symbol name>

 
where <control symbol name> is the name of the symbol, such as up, down, left, or right.
 

Make an object a sign

 
Sign specials are placed on top of objects to turn them into signs. When a “You” object is close enough to a sign, it will display a message. Sign specials have the following data format:
 
 

0data=sign=<line 1>=<line 2>=<line 3>

 
Note: The equals signs separating the values are not a typo. The lines are delimited by equals signs so you can write commas on signs.
 

Make an object able to transform into a level

 
Level specials are placed on top of regular objects to allow them to be transformed into levels. These specials have the following data format:
 
 

0data=level,<target level>,<level symbol style>,<level symbol>,<level initial unlock state>,<color x>,<color y>,<clear color x>,<clear color y>

 
where:
 

  • <target level> is something like 76level
  • <level symbol style> is 0 for numbers, 1 for text, and 2 for bonus dots
  • <level symbol> is a number from 0 to 99 indicating the level number
  • <level initial unlock state> is a number from 0 to 3 (Best keep this at 1)
  • <color x>, <color y>, <clear color x>, and <clear color y> are coordinates on the color palette (Actually, this doesn’t work quite as I expected. Adding these values in makes the level always the same color as the object it was before; leaving them out makes the level a default blue color)

Create a decorative flower

 
Flower specials place a non-interactable flower on the map. These specials have the following data format:
 
 

0data=flower,<color x>,<color y>,<number of rings>

 
where <color x> and <color y> are coordinates on the color palette.
 
 
 

Change level settings

The Settings menu provides access to basic things like the level name and size, as well as themey things like the music and color palette. To access the Settings menu, click the Settings button in the editor.
 
To change the settings of a level on a map, see Use the level-placing mode.
 
 

Change main settings

 

  • Name: Change the level name.
  • Author: Set the name of the level’s creator.
  • Subtitle: Add a subtitle to the level introduction screen (e.g. Welcome to Baba Is You).
  • Music: Change the level music.
  • Effect: Add an effect that is spread out over the level.
  • Palette: Change the level colors.
  • Level Size: Adjust the level size. The predefined options used by the main game are also provided.
  • Disable Particle Effects: Turn off all object particle effects.
  • Disable Rule Effect: Turn off the sound and particle effects caused by rule activations.
  • Disable Screenshake: Turn off the screenshake caused by object destruction.
  • “Level Is Auto” delay: Change the length of the automatic interval between turns when the rule “Level Is Auto” is in effect.

 

Change map settings

 
Select Map Settings in the Settings menu to open the map settings.
 

  • Parent Level: The usual setting; go back to the previous level in the level tree.
     
     
     
  • Victory: Roll the levelpack credits.
     
     
     
  • Select a Level: Bypass the level tree and go to a fixed level. Useful when you want to be able to win the main world map. Be careful, as this can mess up the level tree.

 
 
 

Change level metadata

There are additional level properties not accessible through the editor. Changing these requires a level’s .ld file to be modified.
 
 

Change a level’s map address

 
The map address appears on the level introduction screen and in the pause menu. By map address, I mean something like Level Lake-1.
 
A level’s map address is:
 
 

Level <map ID of parent level>-<map ID of current level>

 
For the level Icy Waters in The Lake, the map ID of the parent level is “Lake”, and the map ID of the current level is “1”.
 
Normally, a level’s map ID is automatically decided when it is opened in-game, based on the symbol style of the level on the map. So to get map IDs like “Extra 1”, use the “dots” symbol style.
 
For custom map IDs such as “Lake”, open your map’s .ld file, and under the [general] header, add the following value:
 
 

mapid=<custom map ID>

 
Additionally, a map ID of “<empty>” will remove this level’s map ID altogether.
 
Custom map IDs may also be applied to the levels themselves (not just world maps).
 
World maps do have map IDs, but do not use map addresses. So in the pause menu, you’ll just see the name of the world map with no map address prefixed.
 
Note: Oddly enough, the map ID of the World Map set in the Level List can’t be changed. It defaults to empty, but it may change under certain buggy conditions.
 
 

Show the Area Clear cutscene when this area is cleared

 
In the main game, clearing an area activates a short cutscene. The area that was cleared is shown on the main map, and a flower is received from it. In custom levelpacks, this is not set to happen by default, but it may be enabled.
 
In your map’s .ld file, under the [general] header, add the following value:
 
 

unlocklevels=<id of the map to be taken to>

 
where <id of the map to be taken to> is something like 76level.
 
 

Force Return to Map to open a specific level

 
It may be useful to force Return to Map to open a specific level, regardless of the current level tree. In your level’s .ld file, under the [general] header, add the following value:
 
 

customreturn=<id of the map to return to>

 
where <id of the map to be taken to> is something like 76level. Alternatively, _NONE_ may be used to disable the Return to Map button.
 
 

Force the rule list to only use one word

 
It is possible to substitute every word in the rule list for a single word. For example, if the word is “oioioi”, the rule “Baba Is You” would instead read “oioioi oioioi oioioi” in the rule list.
 
In your level’s .ld file, under the [general] header, add the following value:
 
 

customruleword=<word to use in rule list>

 
 

Add a background image to a level

 
In the main game, the world map uses a background image. This functionality is also available for custom levelpacks.
 
A background image is a series of three .png files with dimensions of (24 * level width) by (24 * level height). An individual frame is named:
 
 

<name of the image>_<wobble frame>.png

 
where <wobble frame> is from 1 to 3.
 
Any images in your levelpack’s Images folder will be recognized by the game.
 
Images can be used in levels. In your level’s .ld file, under the [images] header, change the value total= to 1. Then, add the following value:
 
 

0=<name of the image>

 
Any number of images may be added. The higher-numbered images will appear on top.
 
 
 

Change levelpack metadata

As with levels, there are levelpack settings that are only accessible through file editing.
 
 

Add an icon to a levelpack

 
Your levelpack’s icon is displayed where it is listed in the Play Levelpacks menu.
 
An icon is a file named icon.png with dimensions 48×48. To add an icon to your levelpack, place an icon at the root of your levelpack folder.
 
 

Add credits to a levelpack

 
When a levelpack is completed, it may roll credits from the credits.txt file. Alternatively, the credits_done.txt file will be used when the “All Is Done” ending is triggered.
 

Change the color of credits text

 
To change the color of text, use the color tag:
 
 

$<x>,<y>

 
where <x> and <y> are palette coordinates. For example, $0,3 resets the text color to white.
 
The color tag sets the color for all text after it. However, the text color is automatically reset on a newline.
 

Write an empty line

 
Multiple newlines in a row are skipped. To leave space between two lines, add one space to the empty lines.
 
 

Add 100% marks to a levelpack

 
A levelpack may have 100% marks that when fulfilled, add a star stamp to the levelpack in the Play Levelpacks menu.
 
To enable this levelpack setting, open your levelpack’s world_data.txt file. Under the [general] header, add the following values:
 
 

prize_max=<number of winnable levels>
clear_max=<number of clearable world maps>
bonus_max=<number of obtainable bonuses>

 
 

Enable mods for a levelpack

 
See below, Get started with custom code > Enable mods for a levelpack.
 
 
 

Get started with custom code

Custom code is the coolest custom thing. It uses Lua, so you don’t need any compilers. Moreover, the custom code system is built-in, so you don’t need to download any mod loaders.
 
The game supports custom Lua in two places: the Data/Lua folder for game-wide mods, and Data/Worlds/<levelpack>/Lua for levelpack-specific mods. This guide focuses on levelpack modding, which is better for custom objects and new behaviors.
 
Let’s quickly get started with creating Lua mods for a levelpack.
 
 

Enable mods for a levelpack

 
The game has a built-in system for adding custom code to levelpacks. When mods are enabled for a levelpack, the game will check for anything in your levelpack’s Lua folder. However, mods are disabled by default.
 
Mods must be enabled per levelpack. To enable this levelpack setting, open your levelpack’s world_data.txt file. Under the [general] header, add the value mods=1.
 
Next time the levelpack is loaded, it will load any .lua files in the levelpack’s Lua folder.
 
Note: Enabling mods only affects the Lua folder; mods don’t need to be enabled to use other folders such as Music.
 
Note: The game won’t check any subfolders in the Lua folder.
 
 

Create a Lua file

 
Add a new folder named Lua to the root of your levelpack folder. This will hold all the Lua files in your levelpack.
 
Go in and create a file named something like tesset.lua. In this file, write:
 
 

table.insert(mod_hook_functions.level_start,
 function()
 MF_playsound("winner2")
 end
)

 
Here we’re adding a new function to the level_start mod hook (see “Use mod hooks”).
 
Now open up the game and start up your levelpack. Whenever you enter a level, you’ll hear the memorable win sound. Better remove that code quickly, though, before that awesome sound gets boring.
 
 
 

Create custom code

It’s become common in Baba Is You modding to copy and paste entire functions from the game’s code in order to change them. I ask you, please don’t copy the game’s code… like seriously, that’s a pretty legally gray move. Unfortunately, we don’t have proper code injection yet, but there are still much better ways to do Lua modding that don’t involve code copying. I’ll list some simple modding techniques below.
 
 

Use mod hooks

 
A mod hook is simply a Lua table filled with functions. The game has a number of mod hooks that it “calls” at certain points in the code. The purpose of the mod hooks is to provide points to “inject” your own code into the game without having to copy it.
 
In Data/modsupport.lua, you’ll find a table named mod_hook_functions which lists all the mod hooks and their purposes.
 
To add a function to a mod hook, write:
 
 

table.insert(mod_hook_functions.<mod hook name>,
 function(args)
 -- whatever you want...
 end
)

 
where <mod hook name> is the name of the mod hook table in the mod_hook_functions list, and args is a table containing any extra data passed to the function.
 
 

Add functionality to the beginning or end of existing functions

 
This doesn’t exactly lead to clean code, but it “works”. (Again, if you’re tech-savvy enough to come up with a solution for proper code injection, I’d really love to see it.)
 
If you wanted to change a function named blah(), you could write:
 
 

local oldblah = blah
function blah()
 oldblah()
end

 
First, you save a copy of the old function by writing local oldblah = blah. Then you redefine the old function blah(), and call the old copy of the function inside it. Once you’ve done that, you can put anything else in this new function.
 
If blah() takes arguments, make sure to account for that:
 
 

local oldblah = blah
function blah(arg1, arg2, arg3)
 oldblah(arg1, arg2, arg3)
end

 
And blah() if returns a value, make sure the new function returns a value as well:
 
 

local oldblah = blah
function blah()
 return oldblah()
end

 
 

Use the MF functions

 
Functions with the “MF_” prefix are defined on the MMF side, so they’re not in the front-facing Lua files.
 
Here’s a Discord text attachment – [discordapp.com]  written by Hempuli containing documentation of all the MF functions.
 
 

Open the game through the command line

 
You can open the game through the command line to get print() output.
 
Note: If the game’s save files change while playing through the command line, you’ll likely get a conflict with the files in the Steam Cloud. If you’re playing on more than one computer, make sure to sync back with the Steam Cloud after playing.
 

Windows

 

PowerShell

 
 

$BabaAppDir = "${env:programfiles(x86)}\Steam\steamapps\common\Baba Is You"
$BabaExeDir = "$BabaAppDir\Baba Is You.exe"

# Navigate to .exe to execute it
$TerminalDir = Get-Location
cd $BabaAppDir
# Open the game
& $BabaExeDir | echo
# Go back to where we were
cd $TerminalDir

 
 

Mac

 

bash

 
 

#!/usr/bin/env bash
BABAAPPDIR=~/Library/Application\ Support/Steam/steamapps/common/Baba\ Is\ You/Baba\ Is\ You.app
BABABINDIR="$BABAAPPDIR"/Contents/MacOS/Chowdren

# open the game
"$BABABINDIR"

 
 

Replace MF_alert()

 
MF_alert() is used during the game’s development as a sort of print(). However, it doesn’t do anything in the release version of the game. To receive MF_alert() messages, you can replace it with a function that calls print() instead:
 
 

function MF_alert(message)
 print("(alert) "..message)
end

 
 
 

Create a custom sprite

A sprite is a set of .png files, typically with dimensions 24×24. An individual image is named:
 
 

<sprite name>_<state>_<wobble frame>.png

 
Any sprites in your levelpack’s Sprites folder will be recognized by the game, and appear in the sprite list in the object customization menu.
 
 

Sprite name

 
The sprite name is the same across all its individual images.
 
Objects in the object list will automatically match up with sprites of the same name. However, the sprite name does not have to match an object name. For instance, the underwater sprite for the “star” object is named “seastar”, while the object is still named “star”.
 
 

Sprite states

 
The sprite state is a number from 0 to 31. It depends on the type of the animation style the sprite uses.
 
 
Baba Is You An Overview Guide Levelpack - Custom Mod and Basic Gameplay Tips - Create a custom sprite - 7365A7C
 

  • Static: The state never changes
  • Directional: The state changes to reflect the object’s facing direction
  • Animated: The state animates every turn, cycling through 0-3
  • Animated directional: The state reflects the object’s direction as well as animating every turn
  • Character: Similar to animated directional. The state only animates when the object moves; and also changes to reflect whether the object is sleeping
  • Tiled: The state is chosen by checking for orthogonally adjacent objects of the same kind

 

Sprite wobble frames

 
The sprite wobble frame is a number from 1 to 3. For each sprite state, three wobble frames are always present.
 
 
 

Create custom music

A song is a looping .ogg file. Any songs in your levelpack’s Music folder will be recognized by the game.
 
Tell me if you want a separate guide for How to Make Baba-esque Music.
 
 
 

Create a custom color palette

Color palettes define the colors used by objects and other game elements. A color palette is a .png file with dimensions 7×5. Any color palettes in your levelpack’s Palettes folder will be recognized by the game.
 
 
Baba Is You An Overview Guide Levelpack - Custom Mod and Basic Gameplay Tips - Create a custom color palette - D59334E
 
Some common colors to consider include:
 

ColorElement
0,4Level background
1,0Level border
3,2; 3,1; 1,3Buttons
4,1Selected buttons
0,1Disabled buttons

 
 

Written by msmiley

 
 
Hope you enjoy the post for Baba Is You An Overview Guide Levelpack – Custom Mod and Basic Gameplay Tips, If you think we should update the post or something is wrong please let us know via comment and we will fix it how fast as possible! Thank you and have a great day!
 


Be the first to comment

Leave a Reply

Your email address will not be published.


*