├── .gitignore ├── App.config ├── AtlusScriptGUI.csproj ├── AtlusScriptGUI.sln ├── Config.cs ├── Events.cs ├── Flags.cs ├── Forms ├── MainForm.Designer.cs ├── MainForm.cs └── MainForm.resx ├── GUI.cs ├── Icons.txt ├── Program.cs ├── README.md ├── Updater ├── AtlusScriptToolsUpdater.deps.json ├── AtlusScriptToolsUpdater.dll ├── AtlusScriptToolsUpdater.exe ├── AtlusScriptToolsUpdater.runtimeconfig.json ├── Octokit.dll └── Version.txt ├── icon.ico └── packages.config /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.rsuser 8 | *.suo 9 | *.user 10 | *.userosscache 11 | *.sln.docstates 12 | 13 | # User-specific files (MonoDevelop/Xamarin Studio) 14 | *.userprefs 15 | 16 | # Build results 17 | [Dd]ebug/ 18 | [Dd]ebugPublic/ 19 | [Rr]elease/ 20 | [Rr]eleases/ 21 | x64/ 22 | x86/ 23 | bld/ 24 | [Bb]in/ 25 | [Oo]bj/ 26 | [Ll]og/ 27 | 28 | # Visual Studio 2015/2017 cache/options directory 29 | .vs/ 30 | # Uncomment if you have tasks that create the project's static files in wwwroot 31 | #wwwroot/ 32 | 33 | # Visual Studio 2017 auto generated files 34 | Generated\ Files/ 35 | 36 | # MSTest test Results 37 | [Tt]est[Rr]esult*/ 38 | [Bb]uild[Ll]og.* 39 | 40 | # NUNIT 41 | *.VisualState.xml 42 | TestResult.xml 43 | 44 | # Build Results of an ATL Project 45 | [Dd]ebugPS/ 46 | [Rr]eleasePS/ 47 | dlldata.c 48 | 49 | # Benchmark Results 50 | BenchmarkDotNet.Artifacts/ 51 | 52 | # .NET Core 53 | project.lock.json 54 | project.fragment.lock.json 55 | artifacts/ 56 | 57 | # StyleCop 58 | StyleCopReport.xml 59 | 60 | # Files built by Visual Studio 61 | *_i.c 62 | *_p.c 63 | *_h.h 64 | *.ilk 65 | *.meta 66 | *.obj 67 | *.iobj 68 | *.pch 69 | *.pdb 70 | *.ipdb 71 | *.pgc 72 | *.pgd 73 | *.rsp 74 | *.sbr 75 | *.tlb 76 | *.tli 77 | *.tlh 78 | *.tmp 79 | *.tmp_proj 80 | *_wpftmp.csproj 81 | *.log 82 | *.vspscc 83 | *.vssscc 84 | .builds 85 | *.pidb 86 | *.svclog 87 | *.scc 88 | 89 | # Chutzpah Test files 90 | _Chutzpah* 91 | 92 | # Visual C++ cache files 93 | ipch/ 94 | *.aps 95 | *.ncb 96 | *.opendb 97 | *.opensdf 98 | *.sdf 99 | *.cachefile 100 | *.VC.db 101 | *.VC.VC.opendb 102 | 103 | # Visual Studio profiler 104 | *.psess 105 | *.vsp 106 | *.vspx 107 | *.sap 108 | 109 | # Visual Studio Trace Files 110 | *.e2e 111 | 112 | # TFS 2012 Local Workspace 113 | $tf/ 114 | 115 | # Guidance Automation Toolkit 116 | *.gpState 117 | 118 | # ReSharper is a .NET coding add-in 119 | _ReSharper*/ 120 | *.[Rr]e[Ss]harper 121 | *.DotSettings.user 122 | 123 | # JustCode is a .NET coding add-in 124 | .JustCode 125 | 126 | # TeamCity is a build add-in 127 | _TeamCity* 128 | 129 | # DotCover is a Code Coverage Tool 130 | *.dotCover 131 | 132 | # AxoCover is a Code Coverage Tool 133 | .axoCover/* 134 | !.axoCover/settings.json 135 | 136 | # Visual Studio code coverage results 137 | *.coverage 138 | *.coveragexml 139 | 140 | # NCrunch 141 | _NCrunch_* 142 | .*crunch*.local.xml 143 | nCrunchTemp_* 144 | 145 | # MightyMoose 146 | *.mm.* 147 | AutoTest.Net/ 148 | 149 | # Web workbench (sass) 150 | .sass-cache/ 151 | 152 | # Installshield output folder 153 | [Ee]xpress/ 154 | 155 | # DocProject is a documentation generator add-in 156 | DocProject/buildhelp/ 157 | DocProject/Help/*.HxT 158 | DocProject/Help/*.HxC 159 | DocProject/Help/*.hhc 160 | DocProject/Help/*.hhk 161 | DocProject/Help/*.hhp 162 | DocProject/Help/Html2 163 | DocProject/Help/html 164 | 165 | # Click-Once directory 166 | publish/ 167 | 168 | # Publish Web Output 169 | *.[Pp]ublish.xml 170 | *.azurePubxml 171 | # Note: Comment the next line if you want to checkin your web deploy settings, 172 | # but database connection strings (with potential passwords) will be unencrypted 173 | *.pubxml 174 | *.publishproj 175 | 176 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 177 | # checkin your Azure Web App publish settings, but sensitive information contained 178 | # in these scripts will be unencrypted 179 | PublishScripts/ 180 | 181 | # NuGet Packages 182 | *.nupkg 183 | # The packages folder can be ignored because of Package Restore 184 | **/[Pp]ackages/* 185 | # except build/, which is used as an MSBuild target. 186 | !**/[Pp]ackages/build/ 187 | # Uncomment if necessary however generally it will be regenerated when needed 188 | #!**/[Pp]ackages/repositories.config 189 | # NuGet v3's project.json files produces more ignorable files 190 | *.nuget.props 191 | *.nuget.targets 192 | 193 | # Microsoft Azure Build Output 194 | csx/ 195 | *.build.csdef 196 | 197 | # Microsoft Azure Emulator 198 | ecf/ 199 | rcf/ 200 | 201 | # Windows Store app package directories and files 202 | AppPackages/ 203 | BundleArtifacts/ 204 | Package.StoreAssociation.xml 205 | _pkginfo.txt 206 | *.appx 207 | 208 | # Visual Studio cache files 209 | # files ending in .cache can be ignored 210 | *.[Cc]ache 211 | # but keep track of directories ending in .cache 212 | !*.[Cc]ache/ 213 | 214 | # Others 215 | ClientBin/ 216 | ~$* 217 | *~ 218 | *.dbmdl 219 | *.dbproj.schemaview 220 | *.jfm 221 | *.pfx 222 | *.publishsettings 223 | orleans.codegen.cs 224 | 225 | # Including strong name files can present a security risk 226 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 227 | #*.snk 228 | 229 | # Since there are multiple workflows, uncomment next line to ignore bower_components 230 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 231 | #bower_components/ 232 | 233 | # RIA/Silverlight projects 234 | Generated_Code/ 235 | 236 | # Backup & report files from converting an old project file 237 | # to a newer Visual Studio version. Backup files are not needed, 238 | # because we have git ;-) 239 | _UpgradeReport_Files/ 240 | Backup*/ 241 | UpgradeLog*.XML 242 | UpgradeLog*.htm 243 | ServiceFabricBackup/ 244 | *.rptproj.bak 245 | 246 | # SQL Server files 247 | *.mdf 248 | *.ldf 249 | *.ndf 250 | 251 | # Business Intelligence projects 252 | *.rdl.data 253 | *.bim.layout 254 | *.bim_*.settings 255 | *.rptproj.rsuser 256 | 257 | # Microsoft Fakes 258 | FakesAssemblies/ 259 | 260 | # GhostDoc plugin setting file 261 | *.GhostDoc.xml 262 | 263 | # Node.js Tools for Visual Studio 264 | .ntvs_analysis.dat 265 | node_modules/ 266 | 267 | # Visual Studio 6 build log 268 | *.plg 269 | 270 | # Visual Studio 6 workspace options file 271 | *.opt 272 | 273 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 274 | *.vbw 275 | 276 | # Visual Studio LightSwitch build output 277 | **/*.HTMLClient/GeneratedArtifacts 278 | **/*.DesktopClient/GeneratedArtifacts 279 | **/*.DesktopClient/ModelManifest.xml 280 | **/*.Server/GeneratedArtifacts 281 | **/*.Server/ModelManifest.xml 282 | _Pvt_Extensions 283 | 284 | # Paket dependency manager 285 | .paket/paket.exe 286 | paket-files/ 287 | 288 | # FAKE - F# Make 289 | .fake/ 290 | 291 | # JetBrains Rider 292 | .idea/ 293 | *.sln.iml 294 | 295 | # CodeRush personal settings 296 | .cr/personal 297 | 298 | # Python Tools for Visual Studio (PTVS) 299 | __pycache__/ 300 | *.pyc 301 | 302 | # Cake - Uncomment if you are using it 303 | # tools/** 304 | # !tools/packages.config 305 | 306 | # Tabs Studio 307 | *.tss 308 | 309 | # Telerik's JustMock configuration file 310 | *.jmconfig 311 | 312 | # BizTalk build output 313 | *.btp.cs 314 | *.btm.cs 315 | *.odx.cs 316 | *.xsd.cs 317 | 318 | # OpenCover UI analysis results 319 | OpenCover/ 320 | 321 | # Azure Stream Analytics local run output 322 | ASALocalRun/ 323 | 324 | # MSBuild Binary and Structured Log 325 | *.binlog 326 | 327 | # NVidia Nsight GPU debugger configuration file 328 | *.nvuser 329 | 330 | # MFractors (Xamarin productivity tool) working folder 331 | .mfractor/ 332 | 333 | # Local History for Visual Studio 334 | .localhistory/ 335 | -------------------------------------------------------------------------------- /App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /AtlusScriptGUI.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {B49F0A68-EAF7-4DEF-BC6B-09AD751CEEE6} 8 | WinExe 9 | AtlusScriptGUI 10 | AtlusScriptGUI 11 | v4.8 12 | 512 13 | true 14 | false 15 | publish\ 16 | true 17 | Disk 18 | false 19 | Foreground 20 | 7 21 | Days 22 | false 23 | false 24 | true 25 | 0 26 | 1.0.0.%2a 27 | false 28 | true 29 | 30 | 31 | 32 | AnyCPU 33 | true 34 | full 35 | false 36 | bin\Debug\ 37 | DEBUG;TRACE 38 | prompt 39 | 4 40 | 41 | 42 | AnyCPU 43 | pdbonly 44 | true 45 | bin\Release\ 46 | TRACE 47 | prompt 48 | 4 49 | 50 | 51 | icon.ico 52 | 53 | 54 | 55 | packages\MetroSet_UI.2.0.0\lib\net45\MetroSet UI.dll 56 | 57 | 58 | packages\Microsoft.Bcl.AsyncInterfaces.9.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll 59 | 60 | 61 | packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll 62 | 63 | 64 | 65 | packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll 66 | 67 | 68 | 69 | 70 | packages\System.IO.Pipelines.9.0.0\lib\net462\System.IO.Pipelines.dll 71 | 72 | 73 | packages\System.Memory.4.5.5\lib\net461\System.Memory.dll 74 | 75 | 76 | 77 | packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll 78 | 79 | 80 | packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll 81 | 82 | 83 | 84 | packages\System.Text.Encodings.Web.9.0.0\lib\net462\System.Text.Encodings.Web.dll 85 | 86 | 87 | packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll 88 | 89 | 90 | packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | Form 108 | 109 | 110 | Form 111 | 112 | 113 | Form 114 | 115 | 116 | MainForm.cs 117 | 118 | 119 | 120 | MainForm.cs 121 | 122 | 123 | 124 | 125 | 126 | 127 | PreserveNewest 128 | 129 | 130 | PreserveNewest 131 | 132 | 133 | 134 | 135 | False 136 | Microsoft .NET Framework 4.5.2 %28x86 and x64%29 137 | true 138 | 139 | 140 | False 141 | .NET Framework 3.5 SP1 142 | false 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | {6d910840-55be-428d-a714-791fe0e01661} 151 | AtlusScriptLibrary 152 | 153 | 154 | {7640412a-7372-4925-b20c-0178d8818a8f} 155 | ShrineFox.IO 156 | 157 | 158 | 159 | 160 | 161 | PreserveNewest 162 | 163 | 164 | PreserveNewest 165 | 166 | 167 | PreserveNewest 168 | 169 | 170 | PreserveNewest 171 | 172 | 173 | PreserveNewest 174 | 175 | 176 | PreserveNewest 177 | 178 | 179 | 180 | -------------------------------------------------------------------------------- /AtlusScriptGUI.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 17 4 | VisualStudioVersion = 17.0.31808.319 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AtlusScriptGUI", "AtlusScriptGUI.csproj", "{B49F0A68-EAF7-4DEF-BC6B-09AD751CEEE6}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ShrineFox.IO", "..\ShrineFox.IO\ShrineFox.IO.csproj", "{7640412A-7372-4925-B20C-0178D8818A8F}" 9 | EndProject 10 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AtlusScriptLibrary", "..\Atlus-Script-Tools\Source\AtlusScriptLibrary\AtlusScriptLibrary.csproj", "{6D910840-55BE-428D-A714-791FE0E01661}" 11 | EndProject 12 | Global 13 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 14 | Debug|Any CPU = Debug|Any CPU 15 | Release|Any CPU = Release|Any CPU 16 | EndGlobalSection 17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 18 | {B49F0A68-EAF7-4DEF-BC6B-09AD751CEEE6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 19 | {B49F0A68-EAF7-4DEF-BC6B-09AD751CEEE6}.Debug|Any CPU.Build.0 = Debug|Any CPU 20 | {B49F0A68-EAF7-4DEF-BC6B-09AD751CEEE6}.Release|Any CPU.ActiveCfg = Release|Any CPU 21 | {B49F0A68-EAF7-4DEF-BC6B-09AD751CEEE6}.Release|Any CPU.Build.0 = Release|Any CPU 22 | {7640412A-7372-4925-B20C-0178D8818A8F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 23 | {7640412A-7372-4925-B20C-0178D8818A8F}.Debug|Any CPU.Build.0 = Debug|Any CPU 24 | {7640412A-7372-4925-B20C-0178D8818A8F}.Release|Any CPU.ActiveCfg = Release|Any CPU 25 | {7640412A-7372-4925-B20C-0178D8818A8F}.Release|Any CPU.Build.0 = Release|Any CPU 26 | {6D910840-55BE-428D-A714-791FE0E01661}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 27 | {6D910840-55BE-428D-A714-791FE0E01661}.Debug|Any CPU.Build.0 = Debug|Any CPU 28 | {6D910840-55BE-428D-A714-791FE0E01661}.Release|Any CPU.ActiveCfg = Release|Any CPU 29 | {6D910840-55BE-428D-A714-791FE0E01661}.Release|Any CPU.Build.0 = Release|Any CPU 30 | EndGlobalSection 31 | GlobalSection(SolutionProperties) = preSolution 32 | HideSolutionNode = FALSE 33 | EndGlobalSection 34 | GlobalSection(ExtensibilityGlobals) = postSolution 35 | SolutionGuid = {4CED7D05-3A59-4115-9CB2-BF9DD9B44658} 36 | EndGlobalSection 37 | EndGlobal 38 | -------------------------------------------------------------------------------- /Config.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | using ShrineFox.IO; 3 | using System.IO; 4 | 5 | namespace AtlusScriptGUI 6 | { 7 | public class Config 8 | { 9 | public string Game { get; set; } = "Persona 5 Royal (PC/Switch)"; 10 | public string Encoding { get; set; } = "P5R_EFIGS"; 11 | public bool DarkMode { get; set; } = true; 12 | public bool Hook { get; set; } = true; 13 | public bool Disassemble { get; set; } = false; 14 | public bool Overwrite { get; set; } = false; 15 | public bool SumBits { get; set; } = true; 16 | public bool DeleteHeader { get; set; } = false; 17 | public bool BigEndianFlow { get; set; } = true; 18 | public bool CompilerLogOutput { get; set; } = true; 19 | 20 | public void SaveJson(Config settings) 21 | { 22 | File.WriteAllText("Config.json", JsonConvert.SerializeObject(settings, Newtonsoft.Json.Formatting.Indented)); 23 | } 24 | 25 | public Config LoadJson() 26 | { 27 | if (!File.Exists("Config.json")) 28 | return new Config(); 29 | 30 | return JsonConvert.DeserializeObject(File.ReadAllText("Config.json")); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Events.cs: -------------------------------------------------------------------------------- 1 | using AtlusScriptLibrary.Common.Libraries; 2 | using AtlusScriptLibrary.Common.Logging; 3 | using AtlusScriptLibrary.Common.Text.Encodings; 4 | using AtlusScriptLibrary.FlowScriptLanguage; 5 | using AtlusScriptLibrary.MessageScriptLanguage.Compiler; 6 | using AtlusScriptLibrary.MessageScriptLanguage; 7 | using MetroSet_UI.Forms; 8 | using ShrineFox.IO; 9 | using System; 10 | using System.IO; 11 | using System.Linq; 12 | using System.Text; 13 | using System.Windows.Forms; 14 | 15 | namespace AtlusScriptGUI 16 | { 17 | public partial class MainForm : MetroSetForm 18 | { 19 | private void Btn_Click(object sender, EventArgs e) 20 | { 21 | if (!File.Exists(CompilerPath)) 22 | RunUpdater(); 23 | 24 | var btn = (Button)sender; 25 | bool decompile = btn.Name.Contains("Decompile"); 26 | 27 | string browseWindowTitle = "Choose .MSG/.FLOW to Compile"; 28 | if (decompile) 29 | browseWindowTitle = "Choose .BMD/.BF to Decompile"; 30 | 31 | var files = WinFormsDialogs.SelectFile(browseWindowTitle, true); 32 | Compile(files.ToArray(), decompile); 33 | } 34 | 35 | private void Btn_DragDrop(object sender, DragEventArgs e) 36 | { 37 | if (!File.Exists(CompilerPath)) 38 | RunUpdater(); 39 | 40 | var btn = (Button)sender; 41 | 42 | string[] fileList = (string[])e.Data.GetData(DataFormats.FileDrop, false); 43 | 44 | Compile(fileList, btn.Name.Contains("Decompile")); 45 | } 46 | 47 | private void Btn_DragEnter(object sender, DragEventArgs e) 48 | { 49 | e.Effect = DragDropEffects.Move; 50 | } 51 | 52 | private void OpenLog_Click(object sender, EventArgs e) 53 | { 54 | OpenLog(); 55 | } 56 | 57 | private void Game_Changed(object sender, EventArgs e) 58 | { 59 | settings.Game = comboBox_Game.SelectedItem.ToString(); 60 | settings.SaveJson(settings); 61 | 62 | SetEncodingDropDown(); 63 | } 64 | 65 | private void Encoding_Changed(object sender, EventArgs e) 66 | { 67 | if (!comboBox_Encoding.Enabled) 68 | return; 69 | 70 | settings.Encoding = comboBox_Encoding.SelectedItem.ToString(); 71 | settings.SaveJson(settings); 72 | var encoding = GetSelectedEncoding(); 73 | Output.Log(encoding.EncodingName); 74 | } 75 | 76 | private void VanillaText_Changed(object sender, EventArgs e) 77 | { 78 | try 79 | { 80 | string result = ConvertVanillaFlag(txtBox_Vanilla.Text); 81 | if (result != "-1") 82 | txtBox_Royal.Text = result; 83 | else 84 | txtBox_Royal.Text = txtBox_Vanilla.Text; 85 | } 86 | catch 87 | { 88 | txtBox_Royal.Text = "Out of Range"; 89 | } 90 | } 91 | 92 | private void RoyalText_Changed(object sender, EventArgs e) 93 | { 94 | try 95 | { 96 | string result = ConvertRoyalFlag(txtBox_Royal.Text); 97 | if (result != "-1") 98 | txtBox_Vanilla.Text = result; 99 | else 100 | txtBox_Vanilla.Text = txtBox_Royal.Text; 101 | } 102 | catch 103 | { 104 | txtBox_Vanilla.Text = "Out of Range"; 105 | } 106 | } 107 | 108 | private void Check_Changed(object sender, EventArgs e) 109 | { 110 | var item = (ToolStripMenuItem)sender; 111 | if (!item.Enabled) 112 | return; 113 | 114 | settings.CompilerLogOutput = chk_CompilerLogOutput.Checked; 115 | settings.DeleteHeader = chk_DeleteHeader.Checked; 116 | settings.Disassemble = chk_Disassemble.Checked; 117 | settings.Hook = chk_Hook.Checked; 118 | settings.Overwrite = chk_Overwrite.Checked; 119 | settings.SumBits = chk_SumBits.Checked; 120 | settings.BigEndianFlow = chk_BigEndianFlowP3RE.Checked; 121 | 122 | settings.SaveJson(settings); 123 | } 124 | 125 | private void ToggleTheme_Click(object sender, EventArgs e) 126 | { 127 | ToggleTheme(); 128 | ApplyTheme(); 129 | } 130 | 131 | private void InjectMSG_Click(object sender, EventArgs e) 132 | { 133 | if (!File.Exists(CompilerPath)) 134 | RunUpdater(); 135 | 136 | string bfPath = ""; 137 | string msgPath = ""; 138 | var bfSelect = ShrineFox.IO.WinFormsDialogs.SelectFile("Choose Original BF File", false, new string[] { "Flowscript Binary (.BF)" }); 139 | if (bfSelect.Count <= 0 || string.IsNullOrEmpty(bfSelect.First())) 140 | return; 141 | else 142 | bfPath = bfSelect.FirstOrDefault(); 143 | var msgSelect = ShrineFox.IO.WinFormsDialogs.SelectFile("Choose File To Inject", false, new string[] { "Messagescript Text (.MSG)", "Messagescript Binary (.BMD)" }); 144 | if (msgSelect.Count <= 0 || string.IsNullOrEmpty(msgSelect.First())) 145 | return; 146 | else 147 | msgPath = msgSelect.FirstOrDefault(); 148 | 149 | FlowScript flowScript = FlowScript.FromFile(bfPath, GetSelectedEncoding()); 150 | MessageScript messageScript; 151 | 152 | if (Path.GetExtension(msgPath).ToLower() == ".bmd") 153 | messageScript = MessageScript.FromFile(msgPath, AtlusScriptLibrary.MessageScriptLanguage.FormatVersion.Version1BigEndian, GetSelectedEncoding()); 154 | else 155 | using (FileStream fileStream = File.OpenRead(msgPath)) 156 | { 157 | MessageScriptCompiler messageScriptCompiler = new MessageScriptCompiler( 158 | AtlusScriptLibrary.MessageScriptLanguage.FormatVersion.Version1BigEndian, GetSelectedEncoding()); 159 | messageScriptCompiler.AddListener(new ConsoleLogListener(true, LogLevel.Info | LogLevel.Warning 160 | | LogLevel.Error | LogLevel.Fatal)); 161 | messageScriptCompiler.Library = LibraryLookup.GetLibrary("P5R"); 162 | if (!messageScriptCompiler.TryCompile(fileStream, out messageScript)) 163 | return; 164 | } 165 | flowScript.MessageScript = messageScript; 166 | flowScript.ToFile(bfPath); 167 | MessageBox.Show("Done injecting message into .BF!"); 168 | } 169 | 170 | private Encoding GetSelectedEncoding() 171 | { 172 | return AtlusEncoding.GetEncodings().First(x => x.Name.Equals(comboBox_Encoding.SelectedItem.ToString())).GetEncoding(); 173 | } 174 | 175 | private void UpdateCompiler_Click(object sender, EventArgs e) 176 | { 177 | RunUpdater(); 178 | } 179 | 180 | private void RunUpdater() 181 | { 182 | Exe.Run(Path.Combine(Exe.Directory(), "Updater/AtlusScriptToolsUpdater.exe"), Exe.Directory(), false, "", false, false); 183 | Environment.Exit(0); 184 | } 185 | } 186 | } 187 | -------------------------------------------------------------------------------- /Flags.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Text.RegularExpressions; 6 | using System.Threading.Tasks; 7 | 8 | namespace AtlusScriptGUI 9 | { 10 | // Adapted from Lipsum 11 | public class Flag 12 | { 13 | public static int[] sVanillaBits = { 0, 2048, 4096, 8192, 8448, 8704, 8960 }; 14 | public static int[] sRoyalBits = { 0, 3072, 6144, 11264, 11776, 12288, 12800 }; 15 | 16 | public static int ConvertToRoyal(int flag) 17 | { 18 | var section = -1; 19 | var section_flag = 0; 20 | 21 | // convert 22 | for (var i = 1; i < sVanillaBits.Length; i++) 23 | { 24 | if (flag < sVanillaBits[i]) 25 | { 26 | section = i - 1; 27 | section_flag = flag - sVanillaBits[i - 1]; 28 | break; 29 | } 30 | } 31 | 32 | var result = sRoyalBits[section] + section_flag; 33 | 34 | // flag val exceeded max val in source array 35 | if (section < 0) return -1; 36 | 37 | // overflowed to next section after conversion 38 | if (result > sRoyalBits[section + 1]) return -1; 39 | 40 | return result; 41 | } 42 | 43 | public static int ConvertToVanilla(int flag) 44 | { 45 | var section = -1; 46 | var section_flag = 0; 47 | 48 | // convert 49 | for (var i = 1; i < sRoyalBits.Length; i++) 50 | { 51 | if (flag < sRoyalBits[i]) 52 | { 53 | section = i - 1; 54 | section_flag = flag - sRoyalBits[i - 1]; 55 | break; 56 | } 57 | } 58 | 59 | var result = sVanillaBits[section] + section_flag; 60 | 61 | // flag val exceeded max val in source array 62 | if (section < 0) return -1; 63 | 64 | // overflowed to next section after conversion 65 | if (result > sVanillaBits[section + 1]) return -1; 66 | 67 | return result; 68 | } 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /Forms/MainForm.Designer.cs: -------------------------------------------------------------------------------- 1 | using MetroSet_UI.Forms; 2 | 3 | namespace AtlusScriptGUI 4 | { 5 | partial class MainForm : MetroSetForm 6 | { 7 | /// 8 | /// Required designer variable. 9 | /// 10 | private System.ComponentModel.IContainer components = null; 11 | 12 | /// 13 | /// Clean up any resources being used. 14 | /// 15 | /// true if managed resources should be disposed; otherwise, false. 16 | protected override void Dispose(bool disposing) 17 | { 18 | if (disposing && (components != null)) 19 | { 20 | components.Dispose(); 21 | } 22 | base.Dispose(disposing); 23 | } 24 | 25 | #region Windows Form Designer generated code 26 | 27 | /// 28 | /// Required method for Designer support - do not modify 29 | /// the contents of this method with the code editor. 30 | /// 31 | private void InitializeComponent() 32 | { 33 | this.components = new System.ComponentModel.Container(); 34 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm)); 35 | this.btn_Decompile = new System.Windows.Forms.Button(); 36 | this.btn_Compile = new System.Windows.Forms.Button(); 37 | this.tpOverwrite = new System.Windows.Forms.ToolTip(this.components); 38 | this.lbl_Vanilla = new System.Windows.Forms.Label(); 39 | this.lbl_Royal = new System.Windows.Forms.Label(); 40 | this.txtBox_Royal = new System.Windows.Forms.TextBox(); 41 | this.txtBox_Vanilla = new System.Windows.Forms.TextBox(); 42 | this.btn_Convert = new System.Windows.Forms.Button(); 43 | this.menuStrip_Main = new System.Windows.Forms.MenuStrip(); 44 | this.gameToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 45 | this.comboBox_Game = new System.Windows.Forms.ToolStripComboBox(); 46 | this.encodingToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 47 | this.comboBox_Encoding = new System.Windows.Forms.ToolStripComboBox(); 48 | this.defaultEncodingToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 49 | this.optionsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 50 | this.chk_Hook = new System.Windows.Forms.ToolStripMenuItem(); 51 | this.chk_Disassemble = new System.Windows.Forms.ToolStripMenuItem(); 52 | this.chk_Overwrite = new System.Windows.Forms.ToolStripMenuItem(); 53 | this.chk_SumBits = new System.Windows.Forms.ToolStripMenuItem(); 54 | this.chk_DeleteHeader = new System.Windows.Forms.ToolStripMenuItem(); 55 | this.chk_BigEndianFlowP3RE = new System.Windows.Forms.ToolStripMenuItem(); 56 | this.injectMSGIntoBFToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 57 | this.toggleThemeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 58 | this.updateToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 59 | this.tlp_Main = new System.Windows.Forms.TableLayoutPanel(); 60 | this.splitContainer_Log = new System.Windows.Forms.SplitContainer(); 61 | this.groupBox_BitFlagConverter = new System.Windows.Forms.GroupBox(); 62 | this.tlp_BitFlagConverter = new System.Windows.Forms.TableLayoutPanel(); 63 | this.rtb_Log = new System.Windows.Forms.RichTextBox(); 64 | this.chk_CompilerLogOutput = new System.Windows.Forms.ToolStripMenuItem(); 65 | this.menuStrip_Main.SuspendLayout(); 66 | this.tlp_Main.SuspendLayout(); 67 | ((System.ComponentModel.ISupportInitialize)(this.splitContainer_Log)).BeginInit(); 68 | this.splitContainer_Log.Panel1.SuspendLayout(); 69 | this.splitContainer_Log.Panel2.SuspendLayout(); 70 | this.splitContainer_Log.SuspendLayout(); 71 | this.groupBox_BitFlagConverter.SuspendLayout(); 72 | this.tlp_BitFlagConverter.SuspendLayout(); 73 | this.SuspendLayout(); 74 | // 75 | // btn_Decompile 76 | // 77 | this.btn_Decompile.AllowDrop = true; 78 | this.btn_Decompile.Dock = System.Windows.Forms.DockStyle.Fill; 79 | this.btn_Decompile.Location = new System.Drawing.Point(4, 4); 80 | this.btn_Decompile.Margin = new System.Windows.Forms.Padding(4); 81 | this.btn_Decompile.Name = "btn_Decompile"; 82 | this.btn_Decompile.Size = new System.Drawing.Size(287, 106); 83 | this.btn_Decompile.TabIndex = 0; 84 | this.btn_Decompile.Text = "Drag a .BF or .BMD\r\nto Decompile\r\n"; 85 | this.btn_Decompile.UseVisualStyleBackColor = true; 86 | this.btn_Decompile.Click += new System.EventHandler(this.Btn_Click); 87 | this.btn_Decompile.DragDrop += new System.Windows.Forms.DragEventHandler(this.Btn_DragDrop); 88 | this.btn_Decompile.DragEnter += new System.Windows.Forms.DragEventHandler(this.Btn_DragEnter); 89 | // 90 | // btn_Compile 91 | // 92 | this.btn_Compile.AllowDrop = true; 93 | this.btn_Compile.Dock = System.Windows.Forms.DockStyle.Fill; 94 | this.btn_Compile.Location = new System.Drawing.Point(299, 4); 95 | this.btn_Compile.Margin = new System.Windows.Forms.Padding(4); 96 | this.btn_Compile.Name = "btn_Compile"; 97 | this.btn_Compile.Size = new System.Drawing.Size(288, 106); 98 | this.btn_Compile.TabIndex = 1; 99 | this.btn_Compile.Text = "Drag a .FLOW or .MSG \r\nto Compile\r\n"; 100 | this.btn_Compile.UseVisualStyleBackColor = true; 101 | this.btn_Compile.Click += new System.EventHandler(this.Btn_Click); 102 | this.btn_Compile.DragDrop += new System.Windows.Forms.DragEventHandler(this.Btn_DragDrop); 103 | this.btn_Compile.DragEnter += new System.Windows.Forms.DragEventHandler(this.Btn_DragEnter); 104 | // 105 | // tpOverwrite 106 | // 107 | this.tpOverwrite.ToolTipIcon = System.Windows.Forms.ToolTipIcon.Warning; 108 | this.tpOverwrite.ToolTipTitle = "Info"; 109 | // 110 | // lbl_Vanilla 111 | // 112 | this.lbl_Vanilla.Anchor = System.Windows.Forms.AnchorStyles.Top; 113 | this.lbl_Vanilla.AutoSize = true; 114 | this.lbl_Vanilla.Location = new System.Drawing.Point(86, 40); 115 | this.lbl_Vanilla.Name = "lbl_Vanilla"; 116 | this.lbl_Vanilla.Size = new System.Drawing.Size(59, 20); 117 | this.lbl_Vanilla.TabIndex = 18; 118 | this.lbl_Vanilla.Text = "Vanilla"; 119 | // 120 | // lbl_Royal 121 | // 122 | this.lbl_Royal.Anchor = System.Windows.Forms.AnchorStyles.Top; 123 | this.lbl_Royal.AutoSize = true; 124 | this.lbl_Royal.Location = new System.Drawing.Point(437, 40); 125 | this.lbl_Royal.Name = "lbl_Royal"; 126 | this.lbl_Royal.Size = new System.Drawing.Size(51, 20); 127 | this.lbl_Royal.TabIndex = 17; 128 | this.lbl_Royal.Text = "Royal"; 129 | // 130 | // txtBox_Royal 131 | // 132 | this.txtBox_Royal.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); 133 | this.txtBox_Royal.Location = new System.Drawing.Point(349, 7); 134 | this.txtBox_Royal.Name = "txtBox_Royal"; 135 | this.txtBox_Royal.Size = new System.Drawing.Size(227, 26); 136 | this.txtBox_Royal.TabIndex = 16; 137 | this.txtBox_Royal.Leave += new System.EventHandler(this.RoyalText_Changed); 138 | // 139 | // txtBox_Vanilla 140 | // 141 | this.txtBox_Vanilla.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); 142 | this.txtBox_Vanilla.Location = new System.Drawing.Point(3, 7); 143 | this.txtBox_Vanilla.Name = "txtBox_Vanilla"; 144 | this.txtBox_Vanilla.Size = new System.Drawing.Size(225, 26); 145 | this.txtBox_Vanilla.TabIndex = 15; 146 | this.txtBox_Vanilla.Leave += new System.EventHandler(this.VanillaText_Changed); 147 | // 148 | // btn_Convert 149 | // 150 | this.btn_Convert.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); 151 | this.btn_Convert.Location = new System.Drawing.Point(234, 8); 152 | this.btn_Convert.Name = "btn_Convert"; 153 | this.btn_Convert.Size = new System.Drawing.Size(109, 23); 154 | this.btn_Convert.TabIndex = 20; 155 | this.btn_Convert.Text = "<=>"; 156 | this.btn_Convert.UseVisualStyleBackColor = true; 157 | // 158 | // menuStrip_Main 159 | // 160 | this.menuStrip_Main.ImageScalingSize = new System.Drawing.Size(20, 20); 161 | this.menuStrip_Main.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { 162 | this.gameToolStripMenuItem, 163 | this.encodingToolStripMenuItem, 164 | this.optionsToolStripMenuItem, 165 | this.toggleThemeToolStripMenuItem, 166 | this.updateToolStripMenuItem}); 167 | this.menuStrip_Main.Location = new System.Drawing.Point(2, 0); 168 | this.menuStrip_Main.Name = "menuStrip_Main"; 169 | this.menuStrip_Main.Size = new System.Drawing.Size(591, 28); 170 | this.menuStrip_Main.TabIndex = 21; 171 | this.menuStrip_Main.Text = "menuStrip1"; 172 | // 173 | // gameToolStripMenuItem 174 | // 175 | this.gameToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { 176 | this.comboBox_Game}); 177 | this.gameToolStripMenuItem.Name = "gameToolStripMenuItem"; 178 | this.gameToolStripMenuItem.Size = new System.Drawing.Size(62, 24); 179 | this.gameToolStripMenuItem.Text = "Game"; 180 | // 181 | // comboBox_Game 182 | // 183 | this.comboBox_Game.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; 184 | this.comboBox_Game.Name = "comboBox_Game"; 185 | this.comboBox_Game.Size = new System.Drawing.Size(230, 28); 186 | this.comboBox_Game.SelectedIndexChanged += new System.EventHandler(this.Game_Changed); 187 | // 188 | // encodingToolStripMenuItem 189 | // 190 | this.encodingToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { 191 | this.comboBox_Encoding, 192 | this.defaultEncodingToolStripMenuItem}); 193 | this.encodingToolStripMenuItem.Name = "encodingToolStripMenuItem"; 194 | this.encodingToolStripMenuItem.Size = new System.Drawing.Size(85, 24); 195 | this.encodingToolStripMenuItem.Text = "Encoding"; 196 | // 197 | // comboBox_Encoding 198 | // 199 | this.comboBox_Encoding.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; 200 | this.comboBox_Encoding.Name = "comboBox_Encoding"; 201 | this.comboBox_Encoding.Size = new System.Drawing.Size(151, 28); 202 | this.comboBox_Encoding.SelectedIndexChanged += new System.EventHandler(this.Encoding_Changed); 203 | // 204 | // defaultEncodingToolStripMenuItem 205 | // 206 | this.defaultEncodingToolStripMenuItem.Enabled = false; 207 | this.defaultEncodingToolStripMenuItem.Name = "defaultEncodingToolStripMenuItem"; 208 | this.defaultEncodingToolStripMenuItem.Size = new System.Drawing.Size(225, 26); 209 | this.defaultEncodingToolStripMenuItem.Text = "Default Encoding"; 210 | this.defaultEncodingToolStripMenuItem.Visible = false; 211 | // 212 | // optionsToolStripMenuItem 213 | // 214 | this.optionsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { 215 | this.chk_CompilerLogOutput, 216 | this.chk_Hook, 217 | this.chk_Disassemble, 218 | this.chk_Overwrite, 219 | this.chk_SumBits, 220 | this.chk_DeleteHeader, 221 | this.chk_BigEndianFlowP3RE, 222 | this.injectMSGIntoBFToolStripMenuItem}); 223 | this.optionsToolStripMenuItem.Name = "optionsToolStripMenuItem"; 224 | this.optionsToolStripMenuItem.Size = new System.Drawing.Size(75, 24); 225 | this.optionsToolStripMenuItem.Text = "Options"; 226 | // 227 | // chk_Hook 228 | // 229 | this.chk_Hook.Checked = true; 230 | this.chk_Hook.CheckOnClick = true; 231 | this.chk_Hook.CheckState = System.Windows.Forms.CheckState.Checked; 232 | this.chk_Hook.Enabled = false; 233 | this.chk_Hook.Name = "chk_Hook"; 234 | this.chk_Hook.Size = new System.Drawing.Size(255, 26); 235 | this.chk_Hook.Text = "Enable Hooking"; 236 | this.chk_Hook.CheckedChanged += new System.EventHandler(this.Check_Changed); 237 | // 238 | // chk_Disassemble 239 | // 240 | this.chk_Disassemble.CheckOnClick = true; 241 | this.chk_Disassemble.Enabled = false; 242 | this.chk_Disassemble.Name = "chk_Disassemble"; 243 | this.chk_Disassemble.Size = new System.Drawing.Size(255, 26); 244 | this.chk_Disassemble.Text = "Disassemble"; 245 | this.chk_Disassemble.CheckedChanged += new System.EventHandler(this.Check_Changed); 246 | // 247 | // chk_Overwrite 248 | // 249 | this.chk_Overwrite.CheckOnClick = true; 250 | this.chk_Overwrite.Enabled = false; 251 | this.chk_Overwrite.Name = "chk_Overwrite"; 252 | this.chk_Overwrite.Size = new System.Drawing.Size(255, 26); 253 | this.chk_Overwrite.Text = "Overwrite"; 254 | this.chk_Overwrite.CheckedChanged += new System.EventHandler(this.Check_Changed); 255 | // 256 | // chk_SumBits 257 | // 258 | this.chk_SumBits.Checked = true; 259 | this.chk_SumBits.CheckOnClick = true; 260 | this.chk_SumBits.CheckState = System.Windows.Forms.CheckState.Checked; 261 | this.chk_SumBits.Enabled = false; 262 | this.chk_SumBits.Name = "chk_SumBits"; 263 | this.chk_SumBits.Size = new System.Drawing.Size(255, 26); 264 | this.chk_SumBits.Text = "Sum Bits"; 265 | this.chk_SumBits.CheckedChanged += new System.EventHandler(this.Check_Changed); 266 | // 267 | // chk_DeleteHeader 268 | // 269 | this.chk_DeleteHeader.CheckOnClick = true; 270 | this.chk_DeleteHeader.Enabled = false; 271 | this.chk_DeleteHeader.Name = "chk_DeleteHeader"; 272 | this.chk_DeleteHeader.Size = new System.Drawing.Size(255, 26); 273 | this.chk_DeleteHeader.Text = "Delete .h"; 274 | this.chk_DeleteHeader.CheckedChanged += new System.EventHandler(this.Check_Changed); 275 | // 276 | // chk_BigEndianFlowP3RE 277 | // 278 | this.chk_BigEndianFlowP3RE.Checked = true; 279 | this.chk_BigEndianFlowP3RE.CheckOnClick = true; 280 | this.chk_BigEndianFlowP3RE.CheckState = System.Windows.Forms.CheckState.Checked; 281 | this.chk_BigEndianFlowP3RE.Enabled = false; 282 | this.chk_BigEndianFlowP3RE.Name = "chk_BigEndianFlowP3RE"; 283 | this.chk_BigEndianFlowP3RE.Size = new System.Drawing.Size(255, 26); 284 | this.chk_BigEndianFlowP3RE.Text = "Big Endian .FLOW (P3RE)"; 285 | this.chk_BigEndianFlowP3RE.CheckedChanged += new System.EventHandler(this.Check_Changed); 286 | // 287 | // injectMSGIntoBFToolStripMenuItem 288 | // 289 | this.injectMSGIntoBFToolStripMenuItem.Name = "injectMSGIntoBFToolStripMenuItem"; 290 | this.injectMSGIntoBFToolStripMenuItem.Size = new System.Drawing.Size(255, 26); 291 | this.injectMSGIntoBFToolStripMenuItem.Text = "Inject .MSG into .BF..."; 292 | this.injectMSGIntoBFToolStripMenuItem.Click += new System.EventHandler(this.InjectMSG_Click); 293 | // 294 | // toggleThemeToolStripMenuItem 295 | // 296 | this.toggleThemeToolStripMenuItem.Name = "toggleThemeToolStripMenuItem"; 297 | this.toggleThemeToolStripMenuItem.Size = new System.Drawing.Size(118, 24); 298 | this.toggleThemeToolStripMenuItem.Text = "Toggle Theme"; 299 | this.toggleThemeToolStripMenuItem.Click += new System.EventHandler(this.ToggleTheme_Click); 300 | // 301 | // updateToolStripMenuItem 302 | // 303 | this.updateToolStripMenuItem.Name = "updateToolStripMenuItem"; 304 | this.updateToolStripMenuItem.Size = new System.Drawing.Size(137, 24); 305 | this.updateToolStripMenuItem.Text = "Update Compiler"; 306 | this.updateToolStripMenuItem.Click += new System.EventHandler(this.UpdateCompiler_Click); 307 | // 308 | // tlp_Main 309 | // 310 | this.tlp_Main.ColumnCount = 2; 311 | this.tlp_Main.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); 312 | this.tlp_Main.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); 313 | this.tlp_Main.Controls.Add(this.btn_Decompile, 0, 0); 314 | this.tlp_Main.Controls.Add(this.btn_Compile, 1, 0); 315 | this.tlp_Main.Controls.Add(this.splitContainer_Log, 0, 1); 316 | this.tlp_Main.Dock = System.Windows.Forms.DockStyle.Fill; 317 | this.tlp_Main.Location = new System.Drawing.Point(2, 28); 318 | this.tlp_Main.Name = "tlp_Main"; 319 | this.tlp_Main.RowCount = 2; 320 | this.tlp_Main.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 30F)); 321 | this.tlp_Main.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 70F)); 322 | this.tlp_Main.Size = new System.Drawing.Size(591, 382); 323 | this.tlp_Main.TabIndex = 22; 324 | // 325 | // splitContainer_Log 326 | // 327 | this.tlp_Main.SetColumnSpan(this.splitContainer_Log, 2); 328 | this.splitContainer_Log.Dock = System.Windows.Forms.DockStyle.Fill; 329 | this.splitContainer_Log.Location = new System.Drawing.Point(3, 117); 330 | this.splitContainer_Log.Name = "splitContainer_Log"; 331 | this.splitContainer_Log.Orientation = System.Windows.Forms.Orientation.Horizontal; 332 | // 333 | // splitContainer_Log.Panel1 334 | // 335 | this.splitContainer_Log.Panel1.Controls.Add(this.groupBox_BitFlagConverter); 336 | // 337 | // splitContainer_Log.Panel2 338 | // 339 | this.splitContainer_Log.Panel2.Controls.Add(this.rtb_Log); 340 | this.splitContainer_Log.Size = new System.Drawing.Size(585, 262); 341 | this.splitContainer_Log.SplitterDistance = 100; 342 | this.splitContainer_Log.TabIndex = 25; 343 | // 344 | // groupBox_BitFlagConverter 345 | // 346 | this.groupBox_BitFlagConverter.Controls.Add(this.tlp_BitFlagConverter); 347 | this.groupBox_BitFlagConverter.Dock = System.Windows.Forms.DockStyle.Fill; 348 | this.groupBox_BitFlagConverter.Location = new System.Drawing.Point(0, 0); 349 | this.groupBox_BitFlagConverter.Name = "groupBox_BitFlagConverter"; 350 | this.groupBox_BitFlagConverter.Size = new System.Drawing.Size(585, 100); 351 | this.groupBox_BitFlagConverter.TabIndex = 24; 352 | this.groupBox_BitFlagConverter.TabStop = false; 353 | this.groupBox_BitFlagConverter.Text = "BitFlag Converter"; 354 | // 355 | // tlp_BitFlagConverter 356 | // 357 | this.tlp_BitFlagConverter.ColumnCount = 3; 358 | this.tlp_BitFlagConverter.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 40F)); 359 | this.tlp_BitFlagConverter.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F)); 360 | this.tlp_BitFlagConverter.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 40F)); 361 | this.tlp_BitFlagConverter.Controls.Add(this.txtBox_Vanilla, 0, 0); 362 | this.tlp_BitFlagConverter.Controls.Add(this.lbl_Vanilla, 0, 1); 363 | this.tlp_BitFlagConverter.Controls.Add(this.btn_Convert, 1, 0); 364 | this.tlp_BitFlagConverter.Controls.Add(this.txtBox_Royal, 2, 0); 365 | this.tlp_BitFlagConverter.Controls.Add(this.lbl_Royal, 2, 1); 366 | this.tlp_BitFlagConverter.Dock = System.Windows.Forms.DockStyle.Fill; 367 | this.tlp_BitFlagConverter.Location = new System.Drawing.Point(3, 22); 368 | this.tlp_BitFlagConverter.Name = "tlp_BitFlagConverter"; 369 | this.tlp_BitFlagConverter.RowCount = 3; 370 | this.tlp_BitFlagConverter.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 40F)); 371 | this.tlp_BitFlagConverter.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 40F)); 372 | this.tlp_BitFlagConverter.RowStyles.Add(new System.Windows.Forms.RowStyle()); 373 | this.tlp_BitFlagConverter.Size = new System.Drawing.Size(579, 75); 374 | this.tlp_BitFlagConverter.TabIndex = 23; 375 | // 376 | // rtb_Log 377 | // 378 | this.rtb_Log.BorderStyle = System.Windows.Forms.BorderStyle.None; 379 | this.rtb_Log.Dock = System.Windows.Forms.DockStyle.Fill; 380 | this.rtb_Log.Location = new System.Drawing.Point(0, 0); 381 | this.rtb_Log.Name = "rtb_Log"; 382 | this.rtb_Log.ReadOnly = true; 383 | this.rtb_Log.Size = new System.Drawing.Size(585, 158); 384 | this.rtb_Log.TabIndex = 0; 385 | this.rtb_Log.Text = ""; 386 | // 387 | // chk_CompilerLogOutput 388 | // 389 | this.chk_CompilerLogOutput.Checked = true; 390 | this.chk_CompilerLogOutput.CheckOnClick = true; 391 | this.chk_CompilerLogOutput.CheckState = System.Windows.Forms.CheckState.Checked; 392 | this.chk_CompilerLogOutput.Enabled = false; 393 | this.chk_CompilerLogOutput.Name = "chk_CompilerLogOutput"; 394 | this.chk_CompilerLogOutput.Size = new System.Drawing.Size(255, 26); 395 | this.chk_CompilerLogOutput.Text = "Compiler Log Output"; 396 | this.chk_CompilerLogOutput.CheckedChanged += new System.EventHandler(this.Check_Changed); 397 | // 398 | // MainForm 399 | // 400 | this.AllowDrop = true; 401 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; 402 | this.ClientSize = new System.Drawing.Size(595, 412); 403 | this.Controls.Add(this.tlp_Main); 404 | this.Controls.Add(this.menuStrip_Main); 405 | this.DropShadowEffect = false; 406 | this.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F); 407 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Sizable; 408 | this.HeaderHeight = -40; 409 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); 410 | this.MainMenuStrip = this.menuStrip_Main; 411 | this.Margin = new System.Windows.Forms.Padding(4); 412 | this.MinimumSize = new System.Drawing.Size(500, 300); 413 | this.Name = "MainForm"; 414 | this.Opacity = 0.99D; 415 | this.Padding = new System.Windows.Forms.Padding(2, 0, 2, 2); 416 | this.ShowHeader = true; 417 | this.ShowLeftRect = false; 418 | this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; 419 | this.Text = "AtlusScriptGUI"; 420 | this.TextColor = System.Drawing.Color.White; 421 | this.menuStrip_Main.ResumeLayout(false); 422 | this.menuStrip_Main.PerformLayout(); 423 | this.tlp_Main.ResumeLayout(false); 424 | this.splitContainer_Log.Panel1.ResumeLayout(false); 425 | this.splitContainer_Log.Panel2.ResumeLayout(false); 426 | ((System.ComponentModel.ISupportInitialize)(this.splitContainer_Log)).EndInit(); 427 | this.splitContainer_Log.ResumeLayout(false); 428 | this.groupBox_BitFlagConverter.ResumeLayout(false); 429 | this.tlp_BitFlagConverter.ResumeLayout(false); 430 | this.tlp_BitFlagConverter.PerformLayout(); 431 | this.ResumeLayout(false); 432 | this.PerformLayout(); 433 | 434 | } 435 | 436 | #endregion 437 | 438 | private System.Windows.Forms.Button btn_Decompile; 439 | private System.Windows.Forms.Button btn_Compile; 440 | public System.Windows.Forms.ToolTip tpOverwrite; 441 | private System.Windows.Forms.Label lbl_Vanilla; 442 | private System.Windows.Forms.Label lbl_Royal; 443 | private System.Windows.Forms.TextBox txtBox_Royal; 444 | private System.Windows.Forms.TextBox txtBox_Vanilla; 445 | private System.Windows.Forms.Button btn_Convert; 446 | private System.Windows.Forms.MenuStrip menuStrip_Main; 447 | private System.Windows.Forms.ToolStripMenuItem gameToolStripMenuItem; 448 | private System.Windows.Forms.ToolStripMenuItem optionsToolStripMenuItem; 449 | private System.Windows.Forms.ToolStripMenuItem chk_Hook; 450 | private System.Windows.Forms.ToolStripMenuItem chk_Disassemble; 451 | private System.Windows.Forms.ToolStripMenuItem chk_Overwrite; 452 | private System.Windows.Forms.ToolStripMenuItem chk_SumBits; 453 | private System.Windows.Forms.ToolStripComboBox comboBox_Game; 454 | private System.Windows.Forms.ToolStripMenuItem toggleThemeToolStripMenuItem; 455 | private System.Windows.Forms.TableLayoutPanel tlp_Main; 456 | private System.Windows.Forms.GroupBox groupBox_BitFlagConverter; 457 | private System.Windows.Forms.TableLayoutPanel tlp_BitFlagConverter; 458 | private System.Windows.Forms.SplitContainer splitContainer_Log; 459 | private System.Windows.Forms.RichTextBox rtb_Log; 460 | private System.Windows.Forms.ToolStripMenuItem chk_DeleteHeader; 461 | private System.Windows.Forms.ToolStripMenuItem encodingToolStripMenuItem; 462 | private System.Windows.Forms.ToolStripComboBox comboBox_Encoding; 463 | private System.Windows.Forms.ToolStripMenuItem defaultEncodingToolStripMenuItem; 464 | private System.Windows.Forms.ToolStripMenuItem injectMSGIntoBFToolStripMenuItem; 465 | private System.Windows.Forms.ToolStripMenuItem chk_BigEndianFlowP3RE; 466 | private System.Windows.Forms.ToolStripMenuItem updateToolStripMenuItem; 467 | private System.Windows.Forms.ToolStripMenuItem chk_CompilerLogOutput; 468 | } 469 | } 470 | 471 | -------------------------------------------------------------------------------- /Forms/MainForm.cs: -------------------------------------------------------------------------------- 1 | using MetroSet_UI.Forms; 2 | using ShrineFox.IO; 3 | using System; 4 | using System.IO; 5 | 6 | namespace AtlusScriptGUI 7 | { 8 | public partial class MainForm : MetroSetForm 9 | { 10 | public static Version version = new Version(3, 5, 0); 11 | public Config settings = new Config(); 12 | 13 | public MainForm(string[] args) 14 | { 15 | InitializeComponent(); 16 | settings = settings.LoadJson(); 17 | if (!settings.DarkMode) 18 | Theme.ThemeStyle = MetroSet_UI.Enums.Style.Light; 19 | Theme.ApplyToForm(this); 20 | MenuStripHelper.SetMenuStripIcons(MenuStripHelper.GetMenuStripIconPairs("Icons.txt"), this); 21 | 22 | ApplyCheckboxStates(); 23 | SetDropDowns(); 24 | SetLogging(); 25 | 26 | this.Text += $" v{version.Major}.{version.Minor}.{version.Build}"; 27 | 28 | string versionTxtPath = Path.Combine(Exe.Directory(), "Version.txt"); 29 | if (File.Exists(versionTxtPath)) 30 | { 31 | var lines = File.ReadAllLines(versionTxtPath); 32 | if (lines.Length > 2) 33 | Output.Log($"AtlusScriptCompiler built from commit \"{lines[0].Replace("v1.0-","")}\"" + 34 | $"\nBuild Date: {lines[1]}", ConsoleColor.Green); 35 | } 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Forms/MainForm.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | 17, 17 122 | 123 | 124 | 154, 17 125 | 126 | 127 | 128 | 129 | AAABAAEAAAAAAAEAIAB1OgAAFgAAAIlQTkcNChoK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372 | fBWdzGH90aF8fwI/8fGL1ZxnGHV++uVLSdP2MX7Bu9ylPyoQCEoCHaTz8g3nj6Sk5fBrOQC8Q/+TwwJl 373 | fhjlPP55KWbCjLRD1WGgHegQpxgCgUMCHekhdJKGuHLn+X782+HXyygjQ1v9ssDtzA2dnzoMMzGjKSw0 374 | n8E94ldPICgL6ExUQmHoqxrlhhqdu0denimBVnPXDgAvtVxaHPePO+dWi7YrEAjsCHRuBhDx7Tfyepdm 375 | tF/A7/RULJpzAkFtBWYsf0cnXxgYkqwZzbDz04Bp2XrNhHYOKLrzAkFtBQYAHmEyjp4q9mz8bo/VKi+/ 376 | IAw/tdNvEwgEtRXo6FSSWbTncKiq33kVN/44/Z8F3qffIhAIaiswAGhmwqERqXv3HwsPNJvNG/D/Z/F7 377 | jdrQFAgEVQQ6PO0DXgabgdwYlJ1/gUAgEAgEAoFAIBAIBAKBQCAQCAQCgUAgEAgEAoFAIBAIBAKBQCAQ 378 | CAQCgUAgEAgEAoFAIBAIBAKBQCAQEP/3f/8fpJ3NqgyJQmoAAAAASUVORK5CYII= 379 | 380 | 381 | -------------------------------------------------------------------------------- /GUI.cs: -------------------------------------------------------------------------------- 1 | using MetroSet_UI.Forms; 2 | using ShrineFox.IO; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.IO; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading; 9 | 10 | namespace AtlusScriptGUI 11 | { 12 | public partial class MainForm : MetroSetForm 13 | { 14 | 15 | public static string CompilerPath = Path.Combine(Exe.Directory(), "AtlusScriptCompiler.exe"); 16 | 17 | public static List GamesList = new List() 18 | { 19 | "SMT 3 Nocturne", 20 | "SMT Digital Devil Saga", 21 | "Persona 3 Portable", 22 | "Persona 3", 23 | "Persona 3 FES", 24 | "Persona 3 Reload", 25 | "Persona 4", 26 | "Persona 4 Golden", 27 | "Persona 5", 28 | "Persona 5 Royal (PS4)", 29 | "Persona 5 Royal (PC/Switch)", 30 | "Persona Q2", 31 | "Catherine Classic", 32 | "Catherine Full-Body", 33 | }; 34 | 35 | private void ApplyCheckboxStates() 36 | { 37 | chk_CompilerLogOutput.Checked = settings.CompilerLogOutput; 38 | chk_DeleteHeader.Checked = settings.DeleteHeader; 39 | chk_Disassemble.Checked = settings.Disassemble; 40 | chk_Hook.Checked = settings.Hook; 41 | chk_Overwrite.Checked = settings.Overwrite; 42 | chk_SumBits.Checked = settings.SumBits; 43 | chk_BigEndianFlowP3RE.Checked = settings.BigEndianFlow; 44 | 45 | EnableCheckboxes(); 46 | } 47 | 48 | private void EnableCheckboxes() 49 | { 50 | chk_CompilerLogOutput.Enabled = true; 51 | chk_DeleteHeader.Enabled = true; 52 | chk_Disassemble.Enabled = true; 53 | chk_Hook.Enabled = true; 54 | chk_Overwrite.Enabled = true; 55 | chk_SumBits.Enabled = true; 56 | chk_BigEndianFlowP3RE.Enabled = true; 57 | } 58 | 59 | private void SetLogging() 60 | { 61 | Output.Logging = true; 62 | Output.LogControl = rtb_Log; 63 | } 64 | 65 | private void SetDropDowns() 66 | { 67 | SetGameDropDown(); 68 | 69 | SetEncodingDropDown(); 70 | } 71 | 72 | private void SetGameDropDown() 73 | { 74 | foreach (var game in GamesList) 75 | comboBox_Game.Items.Add(game); 76 | 77 | comboBox_Game.SelectedIndex = comboBox_Game.Items.IndexOf(settings.Game); 78 | } 79 | 80 | private void SetEncodingDropDown() 81 | { 82 | comboBox_Encoding.Enabled = false; 83 | comboBox_Encoding.Items.Clear(); 84 | 85 | // Hide encoding options and display text saying default option will be used 86 | comboBox_Encoding.Visible = false; 87 | defaultEncodingToolStripMenuItem.Visible = true; 88 | 89 | // Show encoding dropdown if there are optional encodings, select commonly used default 90 | switch (settings.Game) 91 | { 92 | case "Persona 3 Portable": 93 | foreach (var encoding in new string[] { "P3", "P3P_EFIGS" }) 94 | comboBox_Encoding.Items.Add(encoding); 95 | comboBox_Encoding.SelectedIndex = 0; 96 | comboBox_Encoding.Visible = true; 97 | defaultEncodingToolStripMenuItem.Visible = false; 98 | break; 99 | case "Persona 5": 100 | // Populate comboBox options with all available AtlusEncodings 101 | foreach (var encoding in new string[] { "P5", "P5_Chinese" }) 102 | comboBox_Encoding.Items.Add(encoding); 103 | comboBox_Encoding.SelectedIndex = comboBox_Encoding.Items.IndexOf("P5"); 104 | comboBox_Encoding.Visible = true; 105 | defaultEncodingToolStripMenuItem.Visible = false; 106 | break; 107 | case "Persona 5 Royal (PS4)": 108 | foreach (var encoding in new string[] { "P5", "P5_Chinese" }) 109 | comboBox_Encoding.Items.Add(encoding); 110 | comboBox_Encoding.SelectedIndex = 0; 111 | comboBox_Encoding.Visible = true; 112 | defaultEncodingToolStripMenuItem.Visible = false; 113 | break; 114 | case "Persona 5 Royal (PC/Switch)": 115 | // Populate comboBox options with all available AtlusEncodings 116 | foreach (var encoding in new string[] { "P5R_EFIGS", "P5R_Japanese", "P5R_Chinese" }) 117 | comboBox_Encoding.Items.Add(encoding); 118 | comboBox_Encoding.SelectedIndex = comboBox_Encoding.Items.IndexOf("P5R_EFIGS"); 119 | comboBox_Encoding.Visible = true; 120 | defaultEncodingToolStripMenuItem.Visible = false; 121 | break; 122 | default: 123 | comboBox_Encoding.Items.Add("P3"); 124 | comboBox_Encoding.SelectedIndex = 0; 125 | break; 126 | } 127 | 128 | // Select previous setting if it's still in the list 129 | foreach (var item in comboBox_Encoding.Items) 130 | if (item.ToString() == settings.Encoding) 131 | comboBox_Encoding.SelectedIndex = comboBox_Encoding.Items.IndexOf(item); 132 | 133 | comboBox_Encoding.Enabled = true; 134 | 135 | // Save selected encoding to config 136 | settings.Encoding = comboBox_Encoding.SelectedItem.ToString(); 137 | settings.SaveJson(settings); 138 | } 139 | 140 | public void Compile(string[] fileList, bool decompile = false) 141 | { 142 | rtb_Log.Clear(); 143 | new Thread(() => 144 | { 145 | string args = ""; 146 | for (int i = 0; i < fileList.Count(); i++) 147 | { 148 | string ext = Path.GetExtension(fileList[i]).ToUpper(); 149 | 150 | if (!decompile && (ext == ".MSG" || ext == ".FLOW")) 151 | args = GetArguments(fileList[i], ext, "-Compile "); 152 | else if (decompile && (ext == ".BMD" || ext == ".BF" || ext == ".UASSET")) 153 | args = GetArguments(fileList[i], ext, "-Decompile "); 154 | else 155 | return; 156 | 157 | bool success = Exe.Run(Path.GetFullPath(CompilerPath), args, redirectStdOut: settings.CompilerLogOutput); 158 | if (success) 159 | { 160 | Output.Log("Task Succeeded!", ConsoleColor.Green); 161 | ProcessUassetOutput(fileList[i], decompile); 162 | DeleteHeaderFiles(fileList[i]); 163 | } 164 | else 165 | Output.Log("Task Failed.", ConsoleColor.Red); 166 | } 167 | }).Start(); 168 | } 169 | 170 | private void ProcessUassetOutput(string file, bool decompile) 171 | { 172 | if (settings.Game != "Persona 3 Reload" || !settings.Overwrite) 173 | return; 174 | 175 | if (decompile && Path.GetExtension(file).ToUpper() == ".UASSET") 176 | { 177 | string bfFile = Path.Combine(Path.GetDirectoryName(file), Path.GetFileNameWithoutExtension(file) + "_unwrapped.bf"); 178 | string bmdFile = Path.Combine(Path.GetDirectoryName(file), Path.GetFileNameWithoutExtension(file) + "_unwrapped.bmd"); 179 | string flowFile = bfFile + ".flow"; 180 | string msgFile = bmdFile + ".msg"; 181 | string newFlowDest = Path.Combine(Path.GetDirectoryName(file), Path.GetFileNameWithoutExtension(file) + ".flow"); 182 | string newMsgDest = Path.Combine(Path.GetDirectoryName(file), Path.GetFileNameWithoutExtension(file) + ".msg"); 183 | string hFile = Path.Combine(Path.GetDirectoryName(file), Path.GetFileNameWithoutExtension(file) + "_unwrapped.bmd.msg.h"); 184 | string newHFileDest = Path.Combine(Path.GetDirectoryName(file), Path.GetFileNameWithoutExtension(file) + ".msg.h"); 185 | 186 | if (File.Exists(bfFile)) 187 | File.Delete(bfFile); 188 | if (File.Exists(bmdFile)) 189 | File.Delete(bmdFile); 190 | 191 | if (File.Exists(newFlowDest)) 192 | File.Delete(newFlowDest); 193 | if (File.Exists(newMsgDest)) 194 | File.Delete(newMsgDest); 195 | if (File.Exists(newHFileDest)) 196 | File.Delete(newHFileDest); 197 | 198 | if (File.Exists(flowFile)) 199 | File.Move(flowFile, newFlowDest); 200 | if (File.Exists(msgFile)) 201 | File.Move(msgFile, newMsgDest); 202 | if (File.Exists(hFile)) 203 | File.Move(hFile, newHFileDest); 204 | } 205 | else 206 | { 207 | string extension = ".bf"; 208 | if (Path.GetFileName(file).ToLower().Contains("bmd")) 209 | extension = ".bmd"; 210 | 211 | string scriptFile = Path.Combine(Path.GetDirectoryName(file), Path.GetFileNameWithoutExtension(file) + extension); 212 | string uassetFile = scriptFile + ".uasset"; 213 | string newUassetDest = Path.Combine(Path.GetDirectoryName(file), Path.GetFileNameWithoutExtension(file) + ".uasset"); 214 | 215 | if (File.Exists(scriptFile)) 216 | File.Delete(scriptFile); 217 | 218 | if (File.Exists(newUassetDest)) 219 | File.Delete(newUassetDest); 220 | 221 | if (File.Exists(uassetFile)) 222 | File.Move(uassetFile, newUassetDest); 223 | } 224 | } 225 | 226 | private void DeleteHeaderFiles(string file) 227 | { 228 | if (!settings.DeleteHeader) 229 | return; 230 | 231 | if (Path.GetExtension(file).ToUpper() == ".BMD") 232 | { 233 | string headerFile = file + ".msg.h"; 234 | if (settings.Overwrite) 235 | headerFile = FileSys.GetExtensionlessPath(file) + ".msg.h"; 236 | 237 | if (File.Exists(headerFile)) 238 | File.Delete(headerFile); 239 | } 240 | else if (Path.GetExtension(file).ToUpper() == ".UASSET" && Path.GetFileName(file).ToLower().Contains("bmd")) 241 | { 242 | string headerFile = Path.Combine(Path.GetDirectoryName(file), Path.GetFileNameWithoutExtension(file) + "_unwrapped.bmd.msg.h"); 243 | if (settings.Overwrite) 244 | headerFile = FileSys.GetExtensionlessPath(file) + ".msg.h"; 245 | 246 | if (File.Exists(headerFile)) 247 | File.Delete(headerFile); 248 | } 249 | } 250 | 251 | private string GetArguments(string inputFile, string extension, string compileArg) 252 | { 253 | string encodingArg = ""; 254 | string libraryArg = ""; 255 | string outFormatArg = ""; 256 | 257 | encodingArg = $"-Encoding {settings.Encoding}"; 258 | 259 | switch (settings.Game) 260 | { 261 | case "SMT 3 Nocturne": 262 | encodingArg = "-Encoding P3"; 263 | libraryArg = "-Library SMT3"; 264 | if (extension == ".MSG") 265 | outFormatArg = "-OutFormat V1"; 266 | if (extension == ".FLOW") 267 | outFormatArg = "-OutFormat V1"; 268 | break; 269 | case "SMT Digital Devil Saga": 270 | encodingArg = "-Encoding P3"; 271 | libraryArg = "-Library DDS"; 272 | if (extension == ".MSG") 273 | outFormatArg = "-OutFormat V1DDS"; 274 | if (extension == ".FLOW") 275 | outFormatArg = "-OutFormat V1DDS"; 276 | break; 277 | case "Persona 3 Portable": 278 | //encodingArg = "-Encoding P3"; 279 | libraryArg = "-Library P3P"; 280 | if (extension == ".MSG" || extension == ".FLOW") 281 | outFormatArg = "-OutFormat V1"; 282 | break; 283 | case "Persona 3": 284 | encodingArg = "-Encoding P3"; 285 | libraryArg = "-Library P3"; 286 | if (extension == ".MSG" || extension == ".FLOW") 287 | outFormatArg = "-OutFormat V1"; 288 | break; 289 | case "Persona 3 FES": 290 | encodingArg = "-Encoding P3"; 291 | libraryArg = "-Library P3F"; 292 | if (extension == ".MSG" || extension == ".FLOW") 293 | outFormatArg = "-OutFormat V1"; 294 | break; 295 | case "Persona 3 Reload": 296 | encodingArg = "-Encoding UT"; 297 | libraryArg = "-Library P3RE"; 298 | // OutFormat 299 | if (extension == ".MSG" || extension == ".FLOW") 300 | { 301 | if (extension == ".MSG") 302 | outFormatArg = "-OutFormat V1RE"; 303 | else if (extension == ".FLOW") 304 | { 305 | if (settings.BigEndianFlow) 306 | outFormatArg = "-OutFormat V4BE"; 307 | else 308 | outFormatArg = "-OutFormat V4"; 309 | } 310 | } 311 | else if (Path.GetFileName(inputFile).ToLowerInvariant().Contains("bmd")) 312 | outFormatArg = "-InFormat MessageScriptBinary -OutFormat V1RE"; 313 | else if (Path.GetFileName(inputFile).ToLowerInvariant().Contains("bf")) 314 | outFormatArg = "-InFormat FlowScriptBinary"; 315 | break; 316 | case "Persona 4": 317 | encodingArg = "-Encoding P4"; 318 | libraryArg = "-Library P4"; 319 | if (extension == ".MSG" || extension == ".FLOW") 320 | outFormatArg = "-OutFormat V1"; 321 | break; 322 | case "Persona 4 Golden": 323 | encodingArg = "-Encoding P4"; 324 | libraryArg = "-Library P4G"; 325 | if (extension == ".MSG" || extension == ".FLOW") 326 | outFormatArg = "-OutFormat V1"; 327 | break; 328 | case "Persona 5": 329 | //encodingArg = "-Encoding P5"; 330 | libraryArg = "-Library P5"; 331 | if (extension == ".MSG") 332 | outFormatArg = "-OutFormat V1BE"; 333 | if (extension == ".FLOW") 334 | outFormatArg = "-OutFormat V3BE"; 335 | break; 336 | case "Persona 5 Royal (PS4)": 337 | //encodingArg = "-Encoding P5"; 338 | libraryArg = "-Library P5R"; 339 | if (extension == ".MSG") 340 | outFormatArg = "-OutFormat V1"; 341 | if (extension == ".FLOW") 342 | outFormatArg = "-OutFormat V3BE"; 343 | break; 344 | case "Persona 5 Royal (PC/Switch)": 345 | //encodingArg = "-Encoding P5R_EFIGS"; 346 | //if (extension != ".BMD") 347 | libraryArg = "-Library P5R"; 348 | if (extension == ".MSG") 349 | outFormatArg = "-OutFormat V1BE"; 350 | if (extension == ".FLOW") 351 | outFormatArg = "-OutFormat V3BE"; 352 | break; 353 | case "Persona Q2": 354 | encodingArg = "-Encoding SJ"; 355 | libraryArg = "-Library PQ2"; 356 | if (extension == ".MSG") 357 | outFormatArg = "-OutFormat V1"; 358 | if (extension == ".FLOW") 359 | outFormatArg = "-OutFormat V2"; 360 | break; 361 | case "Catherine Classic": 362 | encodingArg = "-Enconding CAT"; 363 | libraryArg = "-Library CAT"; 364 | if (extension == ".MSG") 365 | outFormatArg = "-OutFormat V2BE"; 366 | if (extension == ".FLOW") 367 | outFormatArg = "-OutFormat V2BE"; 368 | break; 369 | case "Catherine Full-Body": 370 | encodingArg = "-Enconding CFB"; 371 | libraryArg = "-Library CFB"; 372 | if (extension == ".MSG") 373 | outFormatArg = "-OutFormat V2"; 374 | if (extension == ".FLOW") 375 | outFormatArg = "-OutFormat V2"; 376 | break; 377 | default: 378 | break; 379 | } 380 | 381 | StringBuilder args = new StringBuilder(); 382 | args.Append($"\"{inputFile}\" "); 383 | if (settings.Disassemble) //Omits all args if you are disassembling 384 | args.Append($" -Disassemble"); 385 | else 386 | { 387 | args.Append($"{compileArg} "); 388 | args.Append($"{outFormatArg} "); 389 | args.Append($"{libraryArg} "); 390 | args.Append($"{encodingArg} "); 391 | if (settings.Hook) 392 | args.Append(" -Hook "); 393 | if (settings.SumBits) 394 | args.Append(" -SumBits "); 395 | if (compileArg == "-Compile " && File.Exists(Path.ChangeExtension(inputFile, ".uasset"))) 396 | { 397 | args.Append("-UPatch \"" + Path.ChangeExtension(inputFile, ".uasset") + "\" "); 398 | } 399 | if (compileArg == "-Compile " && settings.Overwrite) 400 | { 401 | string outPath = inputFile.Replace(".flow", "") 402 | .Replace(".FLOW", "").Replace(".msg", "").Replace(".MSG", "") 403 | .Replace(".bf", "").Replace(".BF", "").Replace(".bmd", "") 404 | .Replace(".BMD", ""); 405 | if (extension == ".MSG") 406 | args.Append($"-Out \"{outPath + ".bmd"}\" "); 407 | else if (extension == ".FLOW") 408 | args.Append($"-Out \"{outPath + ".bf"}\" "); 409 | 410 | } 411 | else if (compileArg == "-Decompile " && settings.Overwrite) 412 | { 413 | string outPath = inputFile.Replace(".bmd", "").Replace(".BMD", ""); 414 | if (extension == ".BF") 415 | args.Append($"-Out \"{outPath + ".flow"}\" "); 416 | else if (extension == ".BMD") 417 | args.Append($"-Out \"{outPath + ".msg"}\" "); 418 | } 419 | } 420 | 421 | Output.Log(args.ToString(), ConsoleColor.Green); 422 | return args.ToString(); 423 | } 424 | 425 | public static string ConvertRoyalFlag(string text) 426 | { 427 | return Flag.ConvertToVanilla(Convert.ToInt32(text)).ToString(); 428 | } 429 | 430 | public static string ConvertVanillaFlag(string text) 431 | { 432 | return Flag.ConvertToRoyal(Convert.ToInt32(text)).ToString(); 433 | } 434 | 435 | public void OpenLog() 436 | { 437 | string logPath = Path.Combine(Path.GetDirectoryName(Path.GetFullPath(CompilerPath)), "AtlusScriptCompiler.log"); 438 | if (File.Exists(logPath)) 439 | Exe.Run(logPath); 440 | } 441 | 442 | private void ToggleTheme() 443 | { 444 | if (Theme.ThemeStyle == MetroSet_UI.Enums.Style.Light) 445 | { 446 | Theme.ThemeStyle = MetroSet_UI.Enums.Style.Dark; 447 | settings.DarkMode = true; 448 | } 449 | else 450 | { 451 | Theme.ThemeStyle = MetroSet_UI.Enums.Style.Light; 452 | settings.DarkMode = false; 453 | } 454 | settings.SaveJson(settings); 455 | } 456 | 457 | private void ApplyTheme() 458 | { 459 | Theme.ApplyToForm(this); 460 | } 461 | } 462 | } 463 | -------------------------------------------------------------------------------- /Icons.txt: -------------------------------------------------------------------------------- 1 | gameToolStripMenuItem controller 2 | optionsToolStripMenuItem cog 3 | toggleThemeToolStripMenuItem weather_cloudy 4 | encodingToolStripMenuItem text_replace 5 | updateToolStripMenuItem arrow_down -------------------------------------------------------------------------------- /Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows.Forms; 3 | 4 | namespace AtlusScriptGUI 5 | { 6 | static class Program 7 | { 8 | [STAThread] 9 | static void Main(string[] args) 10 | { 11 | Application.EnableVisualStyles(); 12 | Application.SetCompatibleTextRenderingDefault(false); 13 | Application.Run(new MainForm(args)); 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # AtlusScriptGUI 2 | ![](https://i.imgur.com/DwbSJu3.png) 3 | GUI that automatically passes commandline arguments to AtlusScriptCompiler. 4 | Also useful for converting bitflag IDs between vanilla P5 and Royal. 5 | # Usage 6 | 1. Download and extract AtlusScriptGUI v3.5 or higher from [the Releases page](https://github.com/ShrineFox/AtlusScriptGUI/releases). 7 | 2. Click "Update Compiler" in the top-right corner to install the latest Script Compiler build. 8 | 3. Drag files onto the buttons to compile/decompile. 9 | 10 | # Latest Updates 11 | ## [Update: 3.5](https://github.com/ShrineFox/AtlusScriptGUI/releases) 12 | - Adds an option to update to latest AtlusScriptCompiler via GitHub 13 | - Remove option to set AtlusScriptCompiler path (defaults to installation in AtlusScriptGUI folder) 14 | - Auto-download latest AtlusScriptCompiler when Exe is not found 15 | - Add toggle for showing output log (will simply print whether task succeeded or failed, helpful to speed up process for large files) 16 | ## Update 3.4 17 | - Add Catherine Classic/FB Support 18 | - Add P3R Support 19 | - Added ability to decompile .uassets to .flow/.msg and vice versa 20 | - Added toggle for V4/V4BE BF output 21 | - Check for AtlusScriptCompiler.exe path when picking files instead of at startup 22 | - Added option to change AtlusScriptCompiler.exe path 23 | -------------------------------------------------------------------------------- /Updater/AtlusScriptToolsUpdater.deps.json: -------------------------------------------------------------------------------- 1 | { 2 | "runtimeTarget": { 3 | "name": ".NETCoreApp,Version=v8.0", 4 | "signature": "" 5 | }, 6 | "compilationOptions": {}, 7 | "targets": { 8 | ".NETCoreApp,Version=v8.0": { 9 | "AtlusScriptToolsUpdater/1.0.0": { 10 | "dependencies": { 11 | "Octokit": "13.0.1", 12 | "System.IO.FileSystem.AccessControl": "5.0.0" 13 | }, 14 | "runtime": { 15 | "AtlusScriptToolsUpdater.dll": {} 16 | } 17 | }, 18 | "Microsoft.NETCore.Platforms/5.0.0": {}, 19 | "Octokit/13.0.1": { 20 | "runtime": { 21 | "lib/netstandard2.0/Octokit.dll": { 22 | "assemblyVersion": "13.0.1.0", 23 | "fileVersion": "13.0.1.0" 24 | } 25 | } 26 | }, 27 | "System.IO.FileSystem.AccessControl/5.0.0": { 28 | "dependencies": { 29 | "System.Security.AccessControl": "5.0.0", 30 | "System.Security.Principal.Windows": "5.0.0" 31 | } 32 | }, 33 | "System.Security.AccessControl/5.0.0": { 34 | "dependencies": { 35 | "Microsoft.NETCore.Platforms": "5.0.0", 36 | "System.Security.Principal.Windows": "5.0.0" 37 | } 38 | }, 39 | "System.Security.Principal.Windows/5.0.0": {} 40 | } 41 | }, 42 | "libraries": { 43 | "AtlusScriptToolsUpdater/1.0.0": { 44 | "type": "project", 45 | "serviceable": false, 46 | "sha512": "" 47 | }, 48 | "Microsoft.NETCore.Platforms/5.0.0": { 49 | "type": "package", 50 | "serviceable": true, 51 | "sha512": "sha512-VyPlqzH2wavqquTcYpkIIAQ6WdenuKoFN0BdYBbCWsclXacSOHNQn66Gt4z5NBqEYW0FAPm5rlvki9ZiCij5xQ==", 52 | "path": "microsoft.netcore.platforms/5.0.0", 53 | "hashPath": "microsoft.netcore.platforms.5.0.0.nupkg.sha512" 54 | }, 55 | "Octokit/13.0.1": { 56 | "type": "package", 57 | "serviceable": true, 58 | "sha512": "sha512-tjXTa2FXzbd3n17VWpi8UXe05EIJqHcWJW8C2kukftIve00duWiZL8x4i1vlZQ0zQ4RbRANbRc7J5K7Co/1spQ==", 59 | "path": "octokit/13.0.1", 60 | "hashPath": "octokit.13.0.1.nupkg.sha512" 61 | }, 62 | "System.IO.FileSystem.AccessControl/5.0.0": { 63 | "type": "package", 64 | "serviceable": true, 65 | "sha512": "sha512-SxHB3nuNrpptVk+vZ/F+7OHEpoHUIKKMl02bUmYHQr1r+glbZQxs7pRtsf4ENO29TVm2TH3AEeep2fJcy92oYw==", 66 | "path": "system.io.filesystem.accesscontrol/5.0.0", 67 | "hashPath": "system.io.filesystem.accesscontrol.5.0.0.nupkg.sha512" 68 | }, 69 | "System.Security.AccessControl/5.0.0": { 70 | "type": "package", 71 | "serviceable": true, 72 | "sha512": "sha512-dagJ1mHZO3Ani8GH0PHpPEe/oYO+rVdbQjvjJkBRNQkX4t0r1iaeGn8+/ybkSLEan3/slM0t59SVdHzuHf2jmw==", 73 | "path": "system.security.accesscontrol/5.0.0", 74 | "hashPath": "system.security.accesscontrol.5.0.0.nupkg.sha512" 75 | }, 76 | "System.Security.Principal.Windows/5.0.0": { 77 | "type": "package", 78 | "serviceable": true, 79 | "sha512": "sha512-t0MGLukB5WAVU9bO3MGzvlGnyJPgUlcwerXn1kzBRjwLKixT96XV0Uza41W49gVd8zEMFu9vQEFlv0IOrytICA==", 80 | "path": "system.security.principal.windows/5.0.0", 81 | "hashPath": "system.security.principal.windows.5.0.0.nupkg.sha512" 82 | } 83 | } 84 | } -------------------------------------------------------------------------------- /Updater/AtlusScriptToolsUpdater.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShrineFox/AtlusScriptGUI/eb7d2f7daa61d65ad5ff8c2fa094a492ba74873c/Updater/AtlusScriptToolsUpdater.dll -------------------------------------------------------------------------------- /Updater/AtlusScriptToolsUpdater.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShrineFox/AtlusScriptGUI/eb7d2f7daa61d65ad5ff8c2fa094a492ba74873c/Updater/AtlusScriptToolsUpdater.exe -------------------------------------------------------------------------------- /Updater/AtlusScriptToolsUpdater.runtimeconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "runtimeOptions": { 3 | "tfm": "net8.0", 4 | "framework": { 5 | "name": "Microsoft.NETCore.App", 6 | "version": "8.0.0" 7 | }, 8 | "configProperties": { 9 | "System.Reflection.Metadata.MetadataUpdater.IsSupported": false, 10 | "System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /Updater/Octokit.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShrineFox/AtlusScriptGUI/eb7d2f7daa61d65ad5ff8c2fa094a492ba74873c/Updater/Octokit.dll -------------------------------------------------------------------------------- /Updater/Version.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShrineFox/AtlusScriptGUI/eb7d2f7daa61d65ad5ff8c2fa094a492ba74873c/Updater/Version.txt -------------------------------------------------------------------------------- /icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShrineFox/AtlusScriptGUI/eb7d2f7daa61d65ad5ff8c2fa094a492ba74873c/icon.ico -------------------------------------------------------------------------------- /packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | --------------------------------------------------------------------------------