Author Topic: [PC] Text editor - touphScript (v1.4.0)  (Read 240212 times)

Kaldarasha

  • *
  • Posts: 2449
  • Prince of Model Editing
    • View Profile
Re: [v1.2.8] touphScript - FFVII-PC text editor
« Reply #175 on: 2013-07-25 18:05:46 »
My understanding is, that Tough Script can do these patches to an unmodified flevel.lgp. That means if the program is used a second time, it should detect the new entries in the flevel and doing nothing, except writing a report that it had done nothing to the scenes.

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: [v1.2.8] touphScript - FFVII-PC text editor
« Reply #176 on: 2013-07-25 19:35:03 »
My understanding is, that Tough Script can do these patches to an unmodified flevel.lgp. That means if the program is used a second time, it should detect the new entries in the flevel and doing nothing, except writing a report that it had done nothing to the scenes.

That's right.  Apart from his entry about wrong entry numbers... that's because the text file has different entries to the flevel.

Kaldarasha

  • *
  • Posts: 2449
  • Prince of Model Editing
    • View Profile
Re: [v1.2.8] touphScript - FFVII-PC text editor
« Reply #177 on: 2013-07-25 19:42:01 »
Yeah, an empty window is missing, I wonder how this happend.

Template

  • *
  • Posts: 862
  • Life is a series of cats.
    • View Profile
Re: [v1.2.8] touphScript - FFVII-PC text editor
« Reply #178 on: 2013-07-25 19:52:36 »
Does it matter if I ripped the English text from an flevel that was also modified? I even made sure the MO "additional script fixes" were in it... Was I supposed to use completely vanilla text rips?

luksy

  • *
  • Posts: 375
    • View Profile
Re: [v1.2.8] touphScript - FFVII-PC text editor
« Reply #179 on: 2013-07-25 22:59:19 »
The script patches only fail if the scripts themselves are not vanilla English, the text isn't considered (assuming of course the number of text entries matches the script). I can't remember off hand if the German flevel had any changes, but keep in mind that the patching will also fail if the scripts have already been patched.

Template

  • *
  • Posts: 862
  • Life is a series of cats.
    • View Profile
Re: [v1.2.8] touphScript - FFVII-PC text editor
« Reply #180 on: 2013-08-07 03:36:33 »
Aha, I think I get it. 1.2.9 seems to be working fine then, I just can't help but wonder if you have plans to adapt TS to work with the 2012 and STEAM flevel versions. I didn't realize they were different in a way that would make them incompatible with ToughScript but Dan mentioned it the other day. I could imagine that not really being in your plans. It only matters in that people who use GameConverter (keeps new files other than the exe) wont be able to use ToughScript (MO installer) without using something like bootleg first that overwrites using the 1998 flevel.

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: [v1.2.8] touphScript - FFVII-PC text editor
« Reply #181 on: 2013-09-04 10:40:53 »
Luksy is back to working on old ts to fix it up.  I have sent him the following changes.  If you have anything else you have noticed, please let me know.

ScreenWidth = 320
ScreenHeight = 240 (it's actually less in field (not world map), but I'll be fixing that, and the game moves box automatically anyway so keep 240).
Offset all sides = 0 (Again, game will sort it.  Make offset 0 for all sides.  No offset basically.)



1. Numerical value placements are not correct (at least... not with Menu mod).  In fact, I reckon a new way of going about this needs adding.

l (left) should have just 3 values.  0 (left aligned) 1 (centre) 2 (right).  That's all it needs... No one is going to use pixel accurate left positioning...  and its not needed.

Left position would just be the offset (maybe 2 pixels).
Centre would be (box width /2)-(numerical width/2)
Right would be Boxwidth-offset

t (top) should be done by lines, but they need adjusting. The distance between the end of line 1 on that picture and the start of the graphic is too great (not sure about non menu project).  You'd need to do something like line start + line height value + offset (lets say 2 pixels, its trial and error).  Also t=0 should mean the graphic is level with the top of the box (+ offset of 2 pixels).

#lt 1 1

Would simply mean it is placed in centre horizontally, and just after line 1 vertically.

#lt 1 0

Would be the top of the box+ 2 pixels, and centre horizontal.

2. ts does not work with 2012 flevel.  I have included it in this folder.

3. ts has a few problems with in-game dialogue options like before... I am not sure which yet or whether it can be fixed without ts being changed.   I'll find out.  Well, one of them is the push rock thing at Gaia cliff, but thats fixable at moment by reversing the options from yes no to no yes or whatever.

4. ts does not support 2012 exe which needs to have all values offset by 0xC00, assuming that the exe will allow change given the DRM.

5. I made a mess up of ONE of the ff7 exe offsets (BOARD) resulting in it being cut in snowboard minigame.  The offsets are:

No terminator, size in brackets.

5557E0   RETRY (8)
5557E8   EXIT (8)
5557F0   GHOST  (8)
5557F8   SURFACE  (8)
555800   OFF  (4)
555804   BOARD  (8)
55580C   SLEIGH  (8)
555814   ? ? ?  (8)
55581C   SNOW  (8)
555824   CHECKED  (8)

6. ts gives out report that certain script has already been patched, which makes people freak out.  The log should log it, but for that one, the pop up of the log should be disabled. 

7.  Option to disable log pop up entirely from ini.

8. Options to dump only certain files, script, exe, kernel, scene
Because sometimes you dont want to decode all.

9.   ts needs to support skip encoding  files when their
corresponding text file is not present.   If scene.bin
txt file is missing, kernels TABLE should also be left
alone automatically.  World map, ff7.exe and kernel2 would
all be skipped as well if corresponding text file
missing.  Sometimes a modder may only want to
update 1 file or not update others.

10. Certain lines when wrong length are being
reported with wrong number of chars over limit.

11. Log reports should start with line number, then file,
then char over limit in this format which is better
for readability.  Note file name in square brackets.

Line 762 [0_ff7.exe.txt]: 4 char(s) too long.

As opposed to

0_ff7.exe.txt line n.762 4 char(s) too long

12. Chocobo suit guy at gold saucer being wrong size and very
annoying needs fixing with script fix. Not essential to fix at all.

13.  Feature needs adding to place dialogue boxes centre horizontal.
     (this is for the numerous items and dialogues that require centring
     at the top).

X = (screenwidth*0.5)-(boxwidth*0.5)

perhaps use flag #c that requires no values.




« Last Edit: 2013-09-04 11:16:23 by DLPB »

Kaldarasha

  • *
  • Posts: 2449
  • Prince of Model Editing
    • View Profile
Re: [v1.2.8] touphScript - FFVII-PC text editor
« Reply #182 on: 2013-09-04 11:56:19 »
Point 9 is exactly that, what I needed. I only need to change the flevel.lgp for the flevel project.

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: [v1.2.8] touphScript - FFVII-PC text editor
« Reply #183 on: 2013-09-08 22:03:52 »
Correction. That chocobo being small isn't a bug really... it's supposed to be a child in a suit.  Perhaps still a bit small, but that's why it's smaller than usual.  The adult is with the child the first time you go there but later the child is on its own and comments that he/she will continue, even if alone.

ThunderPeel2001

  • *
  • Posts: 156
    • View Profile
Re: [v1.2.8] touphScript - FFVII-PC text editor
« Reply #184 on: 2013-09-15 19:50:41 »
Am I correct in stating that this tool does not work with the 2012 version? Every time I try to do anything with it, all I get is a "Couldn't open registry" error.

Forgive me for not reading all eight pages of this thread before posting.

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: [v1.2.8] touphScript - FFVII-PC text editor
« Reply #185 on: 2013-09-16 21:15:52 »
It doesn't yet no, but when it does, you still may need to manually set the paths in the ini file that comes with it.

luksy

  • *
  • Posts: 375
    • View Profile
Re: [v1.3.0] touphScript - FFVII-PC text editor
« Reply #186 on: 2013-09-24 13:00:21 »
Latest version is up, should fix the most glaring issues (2012 flevel support most of all).

There's a new archive with numeric fixes for those of you using menumod, you can run those until the new installer's out, details in the touphScript archive.

As usual bring out your bugs, make sure to give as much detail as possible including log.txt

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: [v1.3.0] touphScript - FFVII-PC text editor
« Reply #187 on: 2013-09-24 13:38:33 »
What's been done:

1.  Flevel 2012 support added.

2. text can be centred using the #c flag that takes no value.
   For example #cy 8 will place boxes centred horizontally, with vertical (Y) of 8.

3.  Log tidied up a bit (still needs a little refinement)

4. Log doesn't pop up anymore.

5. BOARD text in Snowboard minigame fixed. (you will need to add it to 0_ff7.exe.txt if using older text file).  Do a decode on original flevel to see where to place.

6. Numeric graphic has autosize feature if no text in the dialogue box, and allows full manual control otherwise, or if you include flags.  See Numeric readme in ts folder.  I wrote an explanation there of how to fix numerics for Menu Overhaul too (and the zip file containing the text files needed to do it all for you are on first post here).

Still needs doing:

1. Cleaner log text
2. Option to dump only certain files
3. Encode only files whose text files are present.
4. Char wrong length reported (not sure if this was fixed).
5. Update version number in app.
6. Log script patching errors only on encode, not decode.
7. Further patch needed to prevent crash on Corel Bridge with the fixed scene.
   At moment, when you revisit bridge after initial cut-scene, there is a crash.
   No cut-scene should probably happen after you have seen it the first time.
8. Range check on dialogue box X Y removing (if they are implemented. "Silently ignored" implies they arent)

Quote from: from Readme
Valid   ranges (out of range values are silently ignored):
    x / s: 0 - 304
    y: 0 - 224
    w: 16 - 304
    h / t: 1 - 13

Should be no check for X and Y.  Game will correct positions.
Width of box should be limited to minimum 16, no max limit.
Readme is wrong with regards to "top", which is now in absolute pixels and should be limited to 240.
Left should be limited to 320.


Looking good!

Also, support for 2012/13 executable is probably impossible due to DRM(?)
ts does not support 2012 version game.  That is, it will support 2012 flevel but only if it can read original executable file and use the original paths.  This application therefore is designed for use with 1998 version game with added support for 2012/13 flevel file.  I am not sure if Luksy plans to add full support for editing the rereleased game.  The issue is simply that protection on the exe makes it rather futile bothering, and you'd be better off just converting to 1998.
« Last Edit: 2013-09-24 22:37:12 by DLPB »

ProtoX

  • Guest
Re: [v1.3.0] touphScript - FFVII-PC text editor
« Reply #188 on: 2013-09-27 05:02:15 »
Edit: never mind the battle scene.bin gets corrupted after my fix ill post a link to the fix once finished
« Last Edit: 2013-09-27 13:48:35 by ProtoX »

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: [v1.3.0] touphScript - FFVII-PC text editor
« Reply #189 on: 2013-10-08 11:18:00 »
Another request from me, the eternal annoyance.  :evil:

I am going to be adding an option for playstation button graphics soon.  Obviously character widths are dealt with already because ts reads Window.bin, but I will also need ts to recognise certain flags and translate them to the correct character value.  Those flags would be

{U} Up
{D} Down
{L} Left
{R} Right
{C} Circle
{T} Triangle
{X} X
{S} Square
{R1} R1
{R2} R2
{L1} L1
{L2} L2
{SEL} Select
{STA} Start

I will begin work soon on adding them to the font map.  So I don't yet know which codes will be needed for each.

For other people this is how it works.

1.  Originally a sentence would be:
Code: [Select]
Character Name
“Which one?
  Use {PURPLE}[LEFT]{WHITE} and {PURPLE}[RIGHT]{WHITE},
  then press {PURPLE}[OK]{WHITE}.”

This is the PC version format. 

2.  My program TextChange, replaces these at install time

Code: [Select]
Text

[S-][R]
{PURPLE}[MENU]{WHITE}>{T}
{PURPLE}[CANCEL]{WHITE}>{X}
{PURPLE}[OK]{WHITE}>{C}
{PURPLE}[SWITCH]{WHITE}>{S}
{PURPLE}[PAGEUP]{WHITE}>{L1}
{PURPLE}[PAGEDOWN]{WHITE}>{R1}
{PURPLE}[CAMERA]{WHITE}>{L2}
{PURPLE}[TARGET]{WHITE}>{R2}
{PURPLE}[ASSIST]{WHITE}>{SEL}
{PURPLE}[START]{WHITE}>{STA}
{PURPLE}[UP]{WHITE}>{U}
{PURPLE}[DOWN]{WHITE}>{D}
{PURPLE}[LEFT]{WHITE}>{L}
{PURPLE}[RIGHT]{WHITE}>[R}

and then you get

Code: [Select]
Character Name
“Which one?
  Use {L} and {R},
  then press {C}.”

3.  In game, you see the graphic in the place of these tags.


« Last Edit: 2013-11-19 14:25:17 by DLPB »

tylerkschrute

  • *
  • Posts: 39
    • View Profile
Re: [v1.3.0] touphScript - FFVII-PC text editor
« Reply #190 on: 2013-12-27 02:58:18 »
I'm having problems with this application. Whenever I attempt to dump the files, I receive a read / write permission error. Running the program as an administrator does not help. Which permission settings do I need to change, and where? From the snooping around I've done, nothing in the folder is read only.

Green_goblin

  • *
  • Posts: 101
    • View Profile
    • Parasite Eve Translation Project
Re: [v1.3.0] touphScript - FFVII-PC text editor
« Reply #191 on: 2014-04-09 19:01:30 »
Hello NF, I have a question for you

I'm trying to import the "scene.bin" PC version translated by DLPB into the PSX version.
Both PC & PSX files are identical so there should be no problem. However the size are not the same:

Original PSX file is 270.336 bytes (0x42000)
DLPB file is 278.528 bytes (0x44000)

So now I'll have to reduce the size of the file using your tool ProudClod until I get 270.338 bytes.
I deleted a couple of scenes (238 and 249), and I 've got the correct size. Are these scenes unused in the game? It looks like so, but I need your confirmation.

There is another problem, according to Thisguyaresick2 (a user form the RHDN forum):



Do you know something about that? Maybe there are certain scenes that, when modified, causes that oversized file.

Please let me know. Thank you and regards

DLPB, I thought you were using ProudCloud to edit the "scene.bin" file. As I said before I deleted scenes 238 and 249 which seem to be unused, can you confirm this please? When I open these scenes I only see dummy texts, dummy attacks, no real enemies at all.
« Last Edit: 2014-04-09 19:04:17 by Green_goblin »

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: [v1.3.0] touphScript - FFVII-PC text editor
« Reply #192 on: 2014-04-09 19:07:14 »
All I touch so far is text using touphscript.  When I start work on Weapon properly, Weapon option will use PC.  But Translation and MO use ts only.

Green_goblin

  • *
  • Posts: 101
    • View Profile
    • Parasite Eve Translation Project
Re: [v1.3.0] touphScript - FFVII-PC text editor
« Reply #193 on: 2014-04-09 19:16:24 »
Ok no problem. I want to port your translation to the PSX game, since I don't have the PC version. Of course all credits will go to you and Lusky. I already have the "kernel" and "scene" files ready, now I'll take care of the worst part (copy/paste the dialogs). I'm planing to use Hack7. Any advice for me?

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: [v1.3.0] touphScript - FFVII-PC text editor
« Reply #194 on: 2014-04-09 19:58:00 »
I have no idea about psx editing or hack7. Sorry :)

Bosola

  • Fire hazard!
  • *
  • Posts: 1752
    • View Profile
    • My YouTube Channel
Re: [v1.3.0] touphScript - FFVII-PC text editor
« Reply #195 on: 2014-04-09 23:59:04 »
If you need to add a large scene.bin to a PSX ISO, search the forum for my old Disc Extension Patch. It should support scene files up to 2 Meg in length.

Green_goblin

  • *
  • Posts: 101
    • View Profile
    • Parasite Eve Translation Project
Re: [v1.3.0] touphScript - FFVII-PC text editor
« Reply #196 on: 2014-04-10 00:28:16 »
If you need to add a large scene.bin to a PSX ISO, search the forum for my old Disc Extension Patch. It should support scene files up to 2 Meg in length.

Here it is: http://forums.qhimm.com/index.php?topic=11541.msg159540#msg159540

 :)

kenichi

  • *
  • Posts: 157
    • View Profile
Re: [v1.3.0] touphScript - FFVII-PC text editor
« Reply #197 on: 2014-06-11 16:34:36 »
would you tell me about thisprogram with images or video? I tried tried but it does not happen.

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: [FF7] Text editor - touphScript (v1.3.0)
« Reply #198 on: 2014-07-20 19:48:01 »
1. Cleaner log text. A better format would be:

Line 1 [0_ff7.exe.txt]: 2 char(s) too long.

Line number, text file in square brackets, and description of error.

This has been done for char length errors, but not universal to all error messages.
For example : Error in ancnt1: Error in entry n 2: 23: Closing brace not found


2. Option to dump text from files separately. Something like:

Code: [Select]
# Dump Text
Exe = 1
Flevel.lgp = 1
Kernel.bin = 1
Kernel2.bin = 1
Scene.bin = 1
World_us.lgp = 1

3. Encode only files when corresponding text files are present.

4. When strings are too long, the char length report in the log is incorrect.
For example: 4294967288 char(s) too long.

5. No auto positioning for X and Y box positions.
   Game will correct positions if they exceed boundary.


This seems to have been done.

6. Width of box should be limited to minimum 16, with no max limit.
    TS should warn user in log if box fell below 16.
  TS is also allowing user to use #w 15  for example.

This wasn't really needed.  It's the user's job to make sure of this.  And they can set what they like.

7. Numeric graphic X/Y
    "Top" should be limited from 0 to 240.
   "Left" should be limited from 0 to 320.
   Log should note if user has tried to exceed this.

8. Menu Overhaul requires playstation buttons with following format.
    Hex Values are on right.


Code: [Select]
{U} BE
{D} BF
{L} 93
{R} 94
{X} 95
{S} 96
{T} 97
{C} 98
{L1} 99
{R1} 9A
{L2} 9B
{R2} 9C
{SEL} 81
{STA} 82

9. Remove registry check for the game when paths are set manually.
 
10. Remove script fixes, but keep ts option handling.  Ts should always try to sort options that modder edited.
     If this fails in game, the modder will have to create their own fix with Makou.

11. Log should not be called "log"  It should have a proper name like "touphScript.log"

12. Log needs to list issues with files missing at encode time, like Window.bin.

13. Possible log warning of shared var when encountered? [for dialogue option issue].  Log only needs to log the script with a shared var when the user has changed an option.

14. char length errors in kernel are not being reported. Probably same for kernel2, world map and scene.  They are being reported for the exe.

15.
As kal says below... ts should log errors of particular file and not quit.  A good idea would also be to log exactly which part of script failed.

16. ts should log error if a file is missing, but not halt operations.  The only time ts should exit is when dealing with field files.  When dealing with field files, ff7.exe / ff7_en.exe, and window.bin must exist.  But with everything else, the log should just state that a file was missing.  For example, when encoding ff7.exe if it does not exist, just add a log and move on to kernel1, kernel2 and so on.

17.   World map (0_mes) is not obeying/recognizing the #c flag.

18. kernel is missing a text entry for Red XIII  (although it's probably best to be complete and add all characters here).


19. When using Reunion,  icon tags (like {X}) are not being decoded.
« Last Edit: 2016-02-16 23:37:03 by DLPB »

Kaldarasha

  • *
  • Posts: 2449
  • Prince of Model Editing
    • View Profile
Re: [FF7] Text editor - touphScript (v1.3.0)
« Reply #199 on: 2014-07-21 20:05:44 »
It would be great if the tool could patch unpacked files of the flevel.lgp and skip the patch for bad files instead of aborting the whole patch.
I also would like to get then a proper report of these files in the log, so I can track down them easily and replace them with clean files.