Author Topic: [FF7] Text editor - touphScript (v1.3.0)  (Read 69160 times)

red_evilspirit

  • Fast newbie
  • *
  • Posts: 28
  • Karma: 0
    • View Profile
Re: [FF7] Text editor - touphScript (v1.3.0)
« Reply #300 on: 2017-09-23 01:15:13 »
It still got that error: Errors list
My makefile: Makefile
----------
Anyway i ported ts to visual studio for easily debugging.
This is original text
This happen when i put uft8 character into text file image
What should i do to keep original uf8 character
« Last Edit: 2017-09-23 04:05:33 by red_evilspirit »

luksy

  • Insane poster
  • *
  • Posts: 362
  • Karma: 41
    • View Profile
Re: [FF7] Text editor - touphScript (v1.3.0)
« Reply #301 on: 2017-09-23 05:38:11 »
I don't use VS so I'm not sure I can help, but why are you linking libz.a and not zlib1.dll?

kenichi

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

red_evilspirit

  • Fast newbie
  • *
  • Posts: 28
  • Karma: 0
    • View Profile
Re: [FF7] Text editor - touphScript (v1.3.0)
« Reply #303 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

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

red_evilspirit

  • Fast newbie
  • *
  • Posts: 28
  • Karma: 0
    • View Profile
Re: [FF7] Text editor - touphScript (v1.3.0)
« Reply #305 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

  • Insane poster
  • *
  • Posts: 362
  • Karma: 41
    • View Profile
Re: [FF7] Text editor - touphScript (v1.3.0)
« Reply #306 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

  • No life
  • *
  • Posts: 8789
  • Karma: 251
  • My love is as sharp as a needle in your eye.
    • View Profile
Re: [FF7] Text editor - touphScript (v1.3.0)
« Reply #307 on: 2017-09-23 09:30:52 »
 :'(

red_evilspirit

  • Fast newbie
  • *
  • Posts: 28
  • Karma: 0
    • View Profile
Re: [FF7] Text editor - touphScript (v1.3.0)
« Reply #308 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

  • Insane poster
  • *
  • Posts: 362
  • Karma: 41
    • View Profile
Re: [FF7] Text editor - touphScript (v1.3.0)
« Reply #309 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

  • Fast newbie
  • *
  • Posts: 28
  • Karma: 0
    • View Profile
Re: [FF7] Text editor - touphScript (v1.3.0)
« Reply #310 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

  • Insane poster
  • *
  • Posts: 362
  • Karma: 41
    • View Profile
Re: [FF7] Text editor - touphScript (v1.3.0)
« Reply #311 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

  • Fast newbie
  • *
  • Posts: 28
  • Karma: 0
    • View Profile
Re: [FF7] Text editor - touphScript (v1.3.0)
« Reply #312 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

  • Insane poster
  • *
  • Posts: 362
  • Karma: 41
    • View Profile
Re: [FF7] Text editor - touphScript (v1.3.0)
« Reply #313 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

  • Fast newbie
  • *
  • Posts: 28
  • Karma: 0
    • View Profile
Re: [FF7] Text editor - touphScript (v1.3.0)
« Reply #314 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

  • Insane poster
  • *
  • Posts: 362
  • Karma: 41
    • View Profile
Re: [FF7] Text editor - touphScript (v1.3.0)
« Reply #315 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

  • Fast newbie
  • *
  • Posts: 28
  • Karma: 0
    • View Profile
Re: [FF7] Text editor - touphScript (v1.3.0)
« Reply #316 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

  • Insane poster
  • *
  • Posts: 362
  • Karma: 41
    • View Profile
Re: [FF7] Text editor - touphScript (v1.3.0)
« Reply #317 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

  • Fast newbie
  • *
  • Posts: 28
  • Karma: 0
    • View Profile
Re: [FF7] Text editor - touphScript (v1.3.0)
« Reply #318 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

  • No life
  • *
  • Posts: 8789
  • Karma: 251
  • My love is as sharp as a needle in your eye.
    • View Profile
Re: [FF7] Text editor - touphScript (v1.3.0)
« Reply #319 on: 2017-09-26 16:08:30 »
I've told you.  It's in menu.lgp on PC version NOT Window.bin.

red_evilspirit

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

kenichi

  • Crazy poster
  • *
  • Posts: 152
  • Karma: -15
    • View Profile
Re: [FF7] Text editor - touphScript (v1.3.0)
« Reply #321 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

  • No life
  • *
  • Posts: 8789
  • Karma: 251
  • My love is as sharp as a needle in your eye.
    • View Profile
Re: [FF7] Text editor - touphScript (v1.3.0)
« Reply #322 on: 2017-09-27 15:41:25 »
Because you need to change them in all the field files too.

red_evilspirit

  • Fast newbie
  • *
  • Posts: 28
  • Karma: 0
    • View Profile
Re: [FF7] Text editor - touphScript (v1.3.0)
« Reply #323 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

  • No life
  • *
  • Posts: 8789
  • Karma: 251
  • My love is as sharp as a needle in your eye.
    • View Profile
Re: [FF7] Text editor - touphScript (v1.3.0)
« Reply #324 on: 2017-10-02 21:19:06 »
That's not a question for this thread.  And I don't know :)