Skip to content

master801/Wii-Discipline

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wii-Discipline

Discipline: Teikoku no Tanjou (ディシプリン*帝国の誕生)
<Would have cover art here, but none really exist...>


main.py

Text dumper and inserter.

Usage:

  • --mode
    • dump
    • insert
  • --csv
    • Directory containing CSV files, or CSV file
      • dump - May not exist
      • insert - Must exist
  • --mdt
    • Directory containing MDT files, or MDT file
      • dump - Must exist
      • insert - May not exist

Examples:

Dumping

python main.py --mode=dump --mdt=mdt --csv=csv

Dumps text from mdt files in a folder to specified csv directory.
mdt is a folder containing .mdt files
csv does not exist. This folder will be created automatically.

Inserting

python main.py --mode=insert --csv=csv --mdt=new_mdt

Creates .mdt files from text in dumped csv directory.
csv is the folder containing dumped .csv files
new_mdt does not exist. This folder will be created automatically.

Requirements:


CSV file standards:

  • Encoding should be UTF-8. Always.
    • Tool expects the file to be saved in UTF-8 encoding since it's a universal encoding.
  • Second row (below the header -first- row) should always be blank.
    • Don't ask. I don't understand why either, but that's how the original file is set up.
  • Newlines (\n) used in a CSV row will literally be used in the actual script.
    • What you give is what you will see in-game.
    • Do not use carelessly.
  • Word <NULL> signifies when the string ends.
    • Do NOT remove. I am not responsible if any unexpected behavior occurs if this is removed.
  • Lines should not exceed 20 characters.
    • Don't know what will happen otherwise, but probably not good things.

Weird unexpected behavior (or bug):

So, in file episodeendroll.mdt, the last string in the file ends with 0x0D (\r). However, when this tool recreates the same file via its dumped .csv file, 0x0D (\r) turns into 0x0A (\n).
I have no idea if the original episodeendroll.mdt uses \r intentionally or not.


Built with:

About

Discipline: Teikoku no Tanjou (ディシプリン*帝国の誕生)

Topics

Resources

Stars

Watchers

Forks