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

kenichi

  • *
  • Posts: 157
    • View Profile
Re: [FF7] Text editor - touphScript (v1.3.0)
« Reply #325 on: 2017-09-23 08:31:42 »
another tip; use notepad ++ if original file 250 line translated file must 250 line too.

red_evilspirit

  • *
  • Posts: 41
    • View Profile
Re: [FF7] Text editor - touphScript (v1.3.0)
« Reply #326 on: 2017-09-23 08:37:51 »
actually, vs and g++ are the same, the different is vs have UI.
Finally i can link libz.a with this syntax:
Code: [Select]
LDLIBS :=  -L/ -lz -lshlwapi -lShell32But i got another error:
Code: [Select]
x86_64-w64-mingw32/bin/ld.exe: i386 architecture of input file `touphScript.exe.res' is incompatible with i386:x86-64 output
« Last Edit: 2017-09-23 13:10:43 by red_evilspirit »

luksy

  • *
  • Posts: 375
    • View Profile
Re: [FF7] Text editor - touphScript (v1.3.0)
« Reply #327 on: 2017-09-23 08:43:07 »
You've compiled the resource file with the 32 bit version of windres.

red_evilspirit

  • *
  • Posts: 41
    • View Profile
Re: [FF7] Text editor - touphScript (v1.3.0)
« Reply #328 on: 2017-09-23 09:02:04 »
No, I use mingw64 which you gave me, maybe you compiled with 32bit ;D.
I remove old touphScript.exe.res and compile again,  now i get touphScript.exe.
Could you tell me how to do with character like ọ ế ớ ...
« Last Edit: 2017-09-23 09:03:41 by red_evilspirit »

luksy

  • *
  • Posts: 375
    • View Profile
Re: [FF7] Text editor - touphScript (v1.3.0)
« Reply #329 on: 2017-09-23 09:28:37 »
The source distribution doesn't contain a compiled resource file. As for the characters, like I said before you're going to first need to find out if the PC version of FF7 still supports multiple font tables, otherwise it's a hopeless endeavour for Vietnamese unless you want to go into the assembly and lose your mind like DLPB.

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: [FF7] Text editor - touphScript (v1.3.0)
« Reply #330 on: 2017-09-23 09:30:52 »
 :'(

red_evilspirit

  • *
  • Posts: 41
    • View Profile
Re: [FF7] Text editor - touphScript (v1.3.0)
« Reply #331 on: 2017-09-23 17:43:51 »
I give up on inputting utf8 character. It's too complicated to modify source.
String can not store uft8, only ascii table.

luksy

  • *
  • Posts: 375
    • View Profile
Re: [FF7] Text editor - touphScript (v1.3.0)
« Reply #332 on: 2017-09-23 18:25:46 »
If it were only a few characters all you need to do is edit ffstring.cpp, which has the font table (which is in utf8), but due to the number of characters you need for Vietnamese one table is not enough.

red_evilspirit

  • *
  • Posts: 41
    • View Profile
Re: [FF7] Text editor - touphScript (v1.3.0)
« Reply #333 on: 2017-09-24 02:24:00 »
I see that table, but the problem is:
- ASCII is 2 byte so string type can store character one by one. And all ASCII character in ffstring.cpp, so i can't add more
- utf8 is 4 byte, string type split one character to two so i lost original character.
If i modify source from string to wstring, editing all function may be a bad choice:(
-----
I think even when i can input uft8 character, it doesn't mean ff7 system can read that. Unless ff7 have font file like .OTF, .TTF or .FNT
« Last Edit: 2017-09-24 02:30:33 by red_evilspirit »

luksy

  • *
  • Posts: 375
    • View Profile
Re: [FF7] Text editor - touphScript (v1.3.0)
« Reply #334 on: 2017-09-24 05:53:49 »
I'm not sure you've understood, but I'll try again:
-The character table in FFVII is fixed at 256 characters, some of these cannot be modified because they are expanded to things like characters names
-You can easily replace most of the characters in the table with whatever utf8 character you like, it doesn't matter whether it occupies 1, 2, 3, or 4 bytes. These will be used by touphscript when scanning text to map a character to FFVII's single byte encoding.
-The Japanese version of FFVII had multiple font tables, these were selected using a 2-byte sequence, the PC version may still retain this functionality
-You might be able to squeeze the Vietnamese alphabet, digits, and punctuation into the table by replacing the characters you don't need, the total number of user characters available in the table are about 210, otherwise you'll need multiple tables like Japanese

N.b.: ASCII is a 1-byte encoding, in fact it can be packed into 7 bits; utf8 is a variable width encoding, from 1-4 bytes, but this has nothing to do with editing the character table in touphscript.

red_evilspirit

  • *
  • Posts: 41
    • View Profile
Re: [FF7] Text editor - touphScript (v1.3.0)
« Reply #335 on: 2017-09-24 08:19:47 »
I understand the way which replacing characters in the table.
---
As you say "utf8 is a variable width encoding, from 1-4 bytes",
i see stdString2Text() in source code,  it read all characters one by one so when reaching utf8 character it throw error. ts doesn't accept utf8 character when reading from text.

luksy

  • *
  • Posts: 375
    • View Profile
Re: [FF7] Text editor - touphScript (v1.3.0)
« Reply #336 on: 2017-09-24 08:33:24 »
It absolutely does read utf8 characters otherwise it simply wouldn't work. I'm guessing your issue is your trying to get it to read characters that aren't in the character table.

red_evilspirit

  • *
  • Posts: 41
    • View Profile
Re: [FF7] Text editor - touphScript (v1.3.0)
« Reply #337 on: 2017-09-24 11:34:36 »
I'm guessing your issue is your trying to get it to read characters that aren't in the character table.
Correct.
but in c++ language, string type only can store ascii.
I think even i can put vietnamese into flevel file, there is no way to force ff7 system recognize new symbol.
I should accept that from beginning :( i have spent two week for nothing.

luksy

  • *
  • Posts: 375
    • View Profile
Re: [FF7] Text editor - touphScript (v1.3.0)
« Reply #338 on: 2017-09-24 12:08:48 »
Correct.
but in c++ language, string type only can store ascii.
I think even i can put vietnamese into flevel file, there is no way to force ff7 system recognize new symbol.
I should accept that from beginning :( i have spent two week for nothing.

C++ doesn't care what you put in a standard string, it's a glorified vector, the encoding of the characters that take up the bytes of a string is no concern.

You haven't yet grasped that ffvii has its own text encoding, touphscript handles converting between utf8 and the ffvii format.

red_evilspirit

  • *
  • Posts: 41
    • View Profile
Re: [FF7] Text editor - touphScript (v1.3.0)
« Reply #339 on: 2017-09-24 12:47:25 »
You haven't yet grasped that ffvii has its own text encoding, touphscript handles converting between utf8 and the ffvii format.
I know the thing you say.
But ts only call process a part of utf8, if you debug with vietnamese character you'll see that.
before ts convert character to vector, it must read character from text file. In source code, ts use string type to store character. It can not handle some character like ọ, ư, ơ.
I can modify readText function, using wstring to store vietnamese character, but can't convert back to byteVec in stdString2Tex function

luksy

  • *
  • Posts: 375
    • View Profile
Re: [FF7] Text editor - touphScript (v1.3.0)
« Reply #340 on: 2017-09-24 13:45:24 »
Ts can only process the characters you give it in the charMap in ffstring.cpp, because those are the only ones available in the font.

As we've been trying to tell you all week, if you want Vietnamese you'll need to both patch the character map, and the font. How ts processes the characters has got nothing to do with it, seriously just try replacing one of the characters in charMap with "ọ", and try using ọ in one of the text files, it simply works, I just tried. It still won't show up in the game until you replace the same character in the font.

red_evilspirit

  • *
  • Posts: 41
    • View Profile
Re: [FF7] Text editor - touphScript (v1.3.0)
« Reply #341 on: 2017-09-26 15:50:38 »
it's my fault. if compiling ts on vs, it can't read utf8.
now i can replace character with ts, but i don't know why ff7 don't use font in window.bin anymore.
I redraw font in window.bin, Makou_Reactor can read it but ff7 still show original character.

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: [FF7] Text editor - touphScript (v1.3.0)
« Reply #342 on: 2017-09-26 16:08:30 »
I've told you.  It's in menu.lgp on PC version NOT Window.bin.

red_evilspirit

  • *
  • Posts: 41
    • View Profile
Re: [FF7] Text editor - touphScript (v1.3.0)
« Reply #343 on: 2017-09-26 16:25:04 »
what is happened  :'(
A few day before, ff7 still can read

kenichi

  • *
  • Posts: 157
    • View Profile
Re: [FF7] Text editor - touphScript (v1.3.0)
« Reply #344 on: 2017-09-27 15:37:45 »
ı translated 0_kernel2.bin.txt about %50 and ı play the game how to see working but its english. For example I translated potion, hi potion mostly armors, weapons description, materia name etc but still english. Why?

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: [FF7] Text editor - touphScript (v1.3.0)
« Reply #345 on: 2017-09-27 15:41:25 »
Because you need to change them in all the field files too.

red_evilspirit

  • *
  • Posts: 41
    • View Profile
Re: [FF7] Text editor - touphScript (v1.3.0)
« Reply #346 on: 2017-09-30 02:43:05 »
I lost font color when putting font image back to menu.lgp. What program should i use to keep all color?
« Last Edit: 2017-10-01 20:10:40 by red_evilspirit »

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: [FF7] Text editor - touphScript (v1.3.0)
« Reply #347 on: 2017-10-02 21:19:06 »
That's not a question for this thread.  And I don't know :)

bidaum

  • *
  • Posts: 5
    • View Profile
Re: [FF7] Text editor - touphScript (v1.3.0)
« Reply #348 on: 2017-10-03 16:50:03 »
I've found after trying to fumble my way through this today on the steam install that the readme could really do with an actual install guide as.. there no info on where it should actually be installed or how to update ini for non standard directories etc etc.

Hell could make it even easier by just allowing this way
Under a default setup you would be able to do the following:
1. Extract content to {ff7-install-directory}/touphscript/ (and put in readme to do so)
2. Run touphscript.exe
3. Select between steam version and 1998
4. auto-updates touphscipt.ini
5. d to decode
6. go to touphscipt/text/ to modify the text
7.  rerun touphscipt.exe
8. e to encode
9. takes a copy of bins/lgps into touphscript/backups
10. encodes

Also.. I'm not actually getting anywhere trying to run the extract..

« Last Edit: 2017-10-03 16:56:26 by bidaum »

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: [FF7] Text editor - touphScript (v1.3.0)
« Reply #349 on: 2017-10-03 16:55:16 »
There is no installation. It doesn't get any simpler than just editing an ini or running program, using "d" then editing files and running with "e".