Modding French Bread Games: Characters

From Mizuumi Wiki
< User:Pixloen‎ | FPANModding
Revision as of 07:03, 21 January 2023 by Pixloen (talk | contribs) (changed title name + changed a few subtitles and wordings)
Jump to navigation Jump to search


If pixloen feels like it, documentation on backgrounds, music, grpdat and stages may or may not be written on separate pages. hey maybe there'll actually be a full documentation on French bread modding

Credits

feel free to write your own name/notes/whatever


contributions
pixloen Color wrote base page with some odd workarounds currently downloading every raito instrument as you read this

Introduction

This guide is a general how-to and reference page for modding UNICLR & MBTL characters. WIP and based on experience / trial & error, but also just a page so I can get used to mediawiki and such. MBAACC uses different versions of software and a different format and won't be covered here.

When finished this will contain enough information so that you don't struggle and die when you enter maincord's #modding-tl channel.

Assumed Knowledge

  • Basic understanding of file structures
  • Basic understanding of batch files
  • Basic understanding of programming

Note that French Bread uses Squirrel for most functions, but such code can be easily understood if you have JS, LUA, C and etc. experience

Tools & Other Guides

Basic Tools

  • Hantei-chan, a HA6 editor
  • CGlib, .cg extractor
  • CGTool, .cg compiler
  • A basic text editor such as Notepad++. Regular Notepad is fine but may be harder to use.
  • A hex editor. HxD is used commonly.
  • .pat editor / visualizer. None are public, but you can use HA6 + hex editor as a close enough replacement.
  • DDS decomp/compression tool. Found in the .pat cut-ins guide.

Game Specific Injectors / Extractors

MBTL

UNICLR

Written Guides & Documentation


Setting Up The Modding Environment

Game files are located in a place like ...SteamLibrary/steamapps/common/UNDER NIGHT In-Birth Exe Late[st], or ...SteamLibrary/steamapps/common/MELTY BLOOD TYPE LUMINA This is commonly referred to as the game's directory or root folder. (REMEMBER THIS!)

Follow this guide for extracting MBTL files. For UNICLR, simply download UNIST Unpacker, head to the /d folder in the game's directory, place UNIST unpacker there, and drag every file onto the unpacker.exe.Once you're done extracting, the unpacked / out folder's contents can be dragged to the root folder.

Install the injector / _English patch file and now the game's code will read files from the unpacked folders instead of the archives. Editing the new folders will create changes in the game respectively.

Basic Character File Structure

Head to /data and you'll see a folder for every character. You can either edit these or make new characters (more info down below). Every character folder in modern French Bread games have some variation of these files:

Name File Comment
Project / System character_0.txt Contains a list of files to load. Usually references the .ha6, the .cg and the .pat.
CommandTable character_cmd_0.txt Contains the move list.
MoveTable character_mv_0.txt Contains the move logic and specific code for unique moves or projectiles.
Sound Effect List character_se_0.txt Contains the location of sound effects found in ROOTFOLDER/se
Hantei-kun Project File character.ha6 Stores move animations, hitboxes and hit data.
CG character.cg Stores character sprites.
Pattern character.pat Stores images that aren't sprites. Incl. effects such as sword swipes or wings, or MBTL cut-ins.
Base files BaseData.LST / _temp.ha6 / _temp.LST Usually files that don't mention character name / number. Haven't tested what they do but I presume it's a necessity for the character to function.

In short, the CommandTable gives a character inputs which are assigned to patterns in the Hantei-kun Project File, which can feed information to the MoveTable. The MoveTable can then create new functions.

Character_0.txt

This text file contains a list of files to load for the character, as well as character project name. Self-explanatory.

An example .txt from Akatsuki's folder.

 
[System]
ProjectName=Aka
[DataFile]
FileNum= 3
File00=_temp.HA6
File01=Aka.HA6
File02=../BaseData.HA6
[BmpcutFile]
FileNum= 
File00=Aka.cg
[PAniFile]
FileNum= 1
File00=Aka_ef00.pat

Character_cmd_0.txt

This text file contains all unique moves that this character can do. Note that it only has the move commands in the list and does not contain any actual framedata or graphics. However, conditions such as timing, move followups and inputs can be applied here. Moves 5A, 5B, 5C, 2A, 2B, 2C, j.A, j.B and j.C are universal across all characters.

Special moves are listed as Skills, and normals are listed as Atk_Std, Atk_Cro, and Atk_Air for Standing, Crouching and Air normals respectively. EX moves that take meter such as 236C are listed as 236EX, and Super attacks such as Infinite Worth and Arc Drive are listed with SP.

In MBTL, character move commands must start with cmd.. Examples include


Skill_0202EX = {},	
Skill_0202BorC = {},
Skill_0202A = {},	

Atk_Std6B = {},
Atk_Std6C = {},	
Atk_Air2C = {},
Atk_Air6C = {},

Skill_J0202A = 
	{
		command = ["0202","2+A+B"],
		flags = [ "lastdelay" ],
		
		CmdCheck = {
			HeightLimit = def_POS_AirDashLimitHeight,
			SkillType="SpecialDouji",
		}
	},

Skill_41236SP_ABC = {}, //Last Arc and Infinite Worth's need both (input)SP AND (input)SP_ABC
Skill_41236SP = {},     //Don't know why but they do

Despite the names containing motions, these commands can have different inputs if desired. Inside the curly braces many functions and variables can be set.

List of Variables

List of Things That Can be Set (incomplete)
Function Name Comment
command = [x, y] Sets the command that this move is registered to. Multiple inputs can be set, such as command = [2A+B, 0202]
num = def_CN_Atk_AddCommandn Used to create moves such as 6CC. Each AddCommand has a unique number n to differentiate.
name = "Cmd_x" Sets the name of the move that will be looked up in the .ha6, or something like that.
UpdateTable = {name = ______} Updates the pattern that is used from the .ha6, and the MoveTable.
flags = Sets flag conditions? Havent experimented and not too sure
CmdCheck = {} Adds conditions that must be fulfilled in order for the move to register. Commonly used for conditions such as having less that 5 fireballs on screen or being on a certain pattern/move.

Character_mv_0.txt

This is where the bulk of the code is stored, and hence this section will not cover everything. You'll have to do a lot of trial and error.

The MoveTable lists every move + functions for Skills.

Editing Moves

Editing Skills

List of Variables

Editing .ha6

The HanteiKun File, also known as HA6 can either be edited using hex or more commonly Hantei-chan. Everything there is very self-explanatory, so here are a few tips that you may or may not know. TEMPORARY, WILL WRITE FULL INDEPTH GUIDE


Editing .cg

Sprite Tips

Editing .pat

Editing Sound Effects

Replacing Files

Assigning Sounds

Adding New Characters

= Making Them Selectable

Now on the CSS

Head to D:\SteamLibrary\steamapps\common\UNDER NIGHT In-Birth Exe Late[st]\System\BtlCharaTbl.txt

//Section from UNICLR
Chara_Table <-
{
	// ƒLƒƒƒ‰ƒZƒŒƒNƒg—p”z’u 99 ‚ªƒ‰ƒ“ƒ_ƒ€A•K‚¸‚QŽŸŒ³”z—ñ‚É‚È‚é‚悤‚É
	// E”z—ñ‚Í“à•”‚Ì’l‚Å‚·AƒAƒCƒRƒ“‚̈ʒu‚ªˆÚ“®‚µ‚½‚è‚Í‚µ‚Ü‚¹‚ñB
	// E“¯‚¶ƒLƒƒƒ‰”ԍ†‚ª”z’u‚³‚ê‚Ä‚¢‚é‚Æ‚½‚Ô‚ñ³í‚É“®ì‚µ‚È‚¢
	// E’·‚³‚O‚Ì”z—ñ‚ª‚ ‚é‚Æ—Ž‚¿‚é
	// E”z—ñ”‚͏cx‰¡‚ª100–¢–ž‚É‚È‚é‚悤‚É
	SelectTable = 
	[
		[ 24,12,08,02,00,99,01,03,09,13,21 ],  // ‚±‚Ì—ñ‚ª‰ŠúˆÊ’u
		[ 11,10,06,04,16,18,17,05,07,15,14 ],
	],
	SelectDefault = [ 0, 1 ],  // ‰ŠúˆÊ’u 1P 2P

	// ‹­§‚Ńtƒ‰ƒO‚𗧂ĂéŽd—l ¦ƒZ[ƒuƒf[ƒ^‚ªã‘‚«‚³‚ê‚é
	_FileType = 0, //
	//_SecretFlag = 0, // ƒNƒŠƒA
	// _SecretFlag = (1<<0), // ƒGƒ‹ƒgƒiƒ€‚ªŽg‚¦‚é

	// ‰æ–ʏ㕔ƒƒbƒZ[ƒWA‘SŠp16•¶Žš‚Ü‚Å
	AcVsMes0 = "‰SŽÒ—ûK’†I",
	AcVsMes1 = "—“üŠ½Œ}I ’§íŽÒ‹‚ށI",
	AcVsMes2 = "ƒ‰ƒCƒoƒ‹•åW’†I",


	Status = [],
};

This section of code handles the cursor selection. 99 is random and every other number corresponds to a character. -1 corresponds to null or unselectable.

Player 1 and Player 2's cursors start at character 00 and 01 respectively (defined by SelectDefault) When a player inputs directions, the cursor switches to the character corresponding to the direction. For example, moving left on 00 will set the character to 02, etc. If you want to add characters around the vanilla UNI characters, you can set up something like this (using characters 25 and 26 as an example)

SelectTable = 
	[
		[ -1,24,12,08,02,00,99,01,03,09,13,21 ], // character -1/null is to the left of 24/Phonon, so pressing left on Phonon will wrap around to character 21/Mika
		[ 26,11,10,06,04,16,18,17,05,07,15,14 ], // character 26 is to the left of 11/Eltnum, so pressing left on Eltnum will select character 26.
                [ -1,25,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 ], // character 25 is underneath 11, so pressing down on Eltnum will select character 25.
	],
// Note that these characters' CSel icons will not appear in relative positions because this handles cursor logic; not visual placement

Adding CSS Visuals

Unfortunately, UNICLR's CSS is mostly hardcoded so anything other than Character portraits (left and right of the screen) cannot be modded. To add these portraits, head to grpdat/CSel/chara, and copy/paste a .pat.

Steps to take

  • Rename the file to correspond to the character project name
  • Edit the dds file using the easy .pat guide

Troubleshooting

A lot of bugs and errors can cause some glitch messes with your character / mods. Here are a few I've dealt with and some ideas for solutions.

My character freezes! / Can't Input Anything!

Caused usually by a error in the MoveTable. Check formatting for any missed comments. Also, check that variables, skills and functions are defined before they are used.

When I do a move my character gets cloned!

Caused by a spawn effect/projectile error. Spawning a pattern that doesn't exist causes the projectile/effect to set itself to pattern 0, or the idle animation. Check that the patterns you spawn are in the HA6, and that the names match that of the MoveTable.

My character turns invisible when airdashing / jumping / when hit!

Caused by Hanteichan being a nuisance and crashing while saving, corrupting the HA6 file. Nothing you can do other than save backups constantly. Usually happens when you copy and paste frames too much, so save every time before you intend to copy a frame.

The game doesn't load / gets stuck in a loop before battle!

Most likely caused by a faulty .pat or project file.

My character's grab glitches out the opponent / sticks the opponent!

Caused by incorrect .txt encoding. The UNICLR/MBTL engine use japanese characters to define types of grabs, which can be corrupted if you save with the wrong encoding. French bread uses ANSI / UTF-8. CORRECT ME IF I AM WRONG ABOUT THIS

For those using VSC, I'm afraid that I can't find a suitable encoder. Notepad and Notepad++ can save in UTF-8 which makes the Japanese characters unreadable, but still works with the engine.

My character crashes the game!

The big one. There are a few causes which I only know so few.

  • Loading character slots past (28 on MBTL) will crash the game.
  • Faulty scripts
  • Can't find HA6/HA6 is corrupt
  • .pat is corrupt

There are plenty more but these are the ones that I know of.