You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I played a small bit with your these tools, but i found out that editing it is quite a chore as everything is inflated out of proportions (although aesthetic). When i tried to look at the binary and the sources of GS tools, although i didn't understand much i noticed that OPcodes may be be same as in NDS script files and to my surprise, when i used an original script from NDS's Phoenix Wright, it ran properly (text was a mess cause of different encoding, but commands were executed properly). Years ago i tried to make my own decoder/encoder for NDS script files, PWSE was quite a chore to use and alpha state to begin with. I made such a tool after some "ordeal" as i'm an amateur and i noticed that original file translated to text with my tool and a file generated by gsmdttool.exe from unmodified JSON is a bit different than source file, the contents may be proper, but something with jump table is not correct.
This is original sc0_text_u.mdt.dec file converted to text:
[0]<noop><6B:1,0,31><bganim:98,626><6B:0,0,0><bganim:98,625>........
---- commands and text here ----
.....<wait:120><nextpage_nobutton>
<speed:255><hidetextbox:1><wait:40><bgcolor:516,1,31><wait:25>
<soundtoggle:1><bganim:0,4096><endjmp>
[1]<noop><person:0,0,0><bg:4095><bgcolor:257,1,31><wait:7>
<name:0><hidetextbox:0><74><p><noop>.....
As you can see, opcode ends the first script, but when i used my tool on a binary file converted from JSON, it looks like this:
[0]<b><noop><hideperson><bganim:98,626><6B:0,0,0>
<bganim:98,625><wait:1><6B:4,1,31><bganim:98,627><bganim:0,8192>...
---- commands and text here ----
<nextpage_nobutton><speed:255><hidetextbox:1><wait:40><bgcolor:516,1,31>
<wait:25><soundtoggle:1><bganim:0,4096><endjmp><noop>
<person:0,0,0>
[1]<noop><noop><bg:4095><bgcolor:257,1,31><wait:7>
<name:0><hidetextbox:0><74><p><noop>
<fademusic:23,0><26:1><wait:30><speed:10><30:2>
First script ends with <person,0,0,0> now. I checked it in the hex editor, original .mdt.dec file from game have 116 entries and generated one have 115 entries, original file points to second script at 0x54c, new file points to 0x54a.
At 0x54a we have 0x0000 0x0000 0x001b. When script is executed in sequence, nothing out of ordinary should happen, but glitches may appear during jump to a previous script. for e.g.
In the original file there are two entries at the end of pointer table that are pointing outside of the script, it seems that one of those is missing, hence two words shift in the file contents. I don't know if those are used in PC version (they are there), but in NDS i had black screen at the end of the case and for a long time i didn't know why.
Edit:
Actually the game crashes (stuck on judge animation, but text doesn't appear) at the first case when judge is about to ask about who defendant is, i imported a script from original PW game form NDS and although a text is garbage, it doesn't crash.
The text was updated successfully, but these errors were encountered:
I played a small bit with your these tools, but i found out that editing it is quite a chore as everything is inflated out of proportions (although aesthetic). When i tried to look at the binary and the sources of GS tools, although i didn't understand much i noticed that OPcodes may be be same as in NDS script files and to my surprise, when i used an original script from NDS's Phoenix Wright, it ran properly (text was a mess cause of different encoding, but commands were executed properly). Years ago i tried to make my own decoder/encoder for NDS script files, PWSE was quite a chore to use and alpha state to begin with. I made such a tool after some "ordeal" as i'm an amateur and i noticed that original file translated to text with my tool and a file generated by gsmdttool.exe from unmodified JSON is a bit different than source file, the contents may be proper, but something with jump table is not correct.
This is original sc0_text_u.mdt.dec file converted to text:
As you can see, opcode ends the first script, but when i used my tool on a binary file converted from JSON, it looks like this:
First script ends with <person,0,0,0> now. I checked it in the hex editor, original .mdt.dec file from game have 116 entries and generated one have 115 entries, original file points to second script at 0x54c, new file points to 0x54a.
At 0x54a we have 0x0000 0x0000 0x001b. When script is executed in sequence, nothing out of ordinary should happen, but glitches may appear during jump to a previous script. for e.g.
In the original file there are two entries at the end of pointer table that are pointing outside of the script, it seems that one of those is missing, hence two words shift in the file contents. I don't know if those are used in PC version (they are there), but in NDS i had black screen at the end of the case and for a long time i didn't know why.
Edit:
Actually the game crashes (stuck on judge animation, but text doesn't appear) at the first case when judge is about to ask about who defendant is, i imported a script from original PW game form NDS and although a text is garbage, it doesn't crash.
The text was updated successfully, but these errors were encountered: