Intro to Scripting
What the hey is all this?
Scripting is the act of writing a script.
- Scripts are a text files containing human-readable code. These instructions are meant to be interpreted by another program, rather than your computer's processor.
A program for interpreting scripts is called a compiler.
- Compiling is the act of converting human-readable code to machine language.
- A Binary is what we call the output, usually a single game file.
Atlus games use scripts to perform various logical procedures.
- Giving the player items, skills, or money
- Showing message windows or choosing options in a menu
- Playing sound effects or loading fields/events/battles
- etc. etc. etc. ...
I bet you can already picture how this opens tons of doors for modding. However, Atlus scripts have already been compiled. Normally, we wouldn't be able to do much with these files, since they only exist as binaries. But now we have TGE's AtlusScriptCompiler, which can:
To answer that, let's go over these proprietary Atlus binary formats.
- BF (
binary flow) The compiled form of Atlus's scripts.
- BMD (
binary message data) Another binary format often found embedded within
.BFfiles. These contain text and markup.
Altogether, this makes it possible to edit and create
The following is an example of a simple menu in Persona 5. See if you can surmise what's happening!
// Import the MessageScript into the script
import( "TestScript2.msg" );
// Main Script Procedure
// Display dialog window (by message name)
// Display dialog (by message name)
MSG( HelloDialog, 0 );
// Display selection menu (by message index)
int selection = SEL( 1 );
// Close dialog window
// Do whatever you selected
switch ( selection )
// Get Player Resource Handle
int playerResHandle = FLD_PC_GET_RESHND( 0 );
// Change Player Model Size
FLD_MODEL_SET_SCALE( playerResHandle, 2f );
// Go to Field 000_002
CALL_FIELD( 0, 2, 0, 0 );
// Index 0 [dlg BossRushModeDialog [TGE]] [f 2 1]Select a boss fight.[f 1 1][e]
// Index 1 [sel SelectBoss0] [f 2 1]D00_SCENARIO_BATTLE_01[e] [f 2 1]D01_01_SCENARIO_BATTLE_01[e] [f 2 1]D01_01_MORUGANA_BATTLE[e] [f 2 1]D01_02_SCENARIO_BATTLE_01[e] [f 2 1]Previous[e] [f 2 1]Next[e]
To make full use of this guide, you will need...
- A PC running Windows
- An open mind :)
Read on for how to get started with the program.