[PC] Text editor - touphScript (v1.4.0)

  • Thread starter Thread starter luksy
  • Start date Start date
Status
Not open for further replies.
libz is included with mingw-w64, I'll try and compile when I get back home just to make sure nothing has broken in the years since ts was released.
 
Lusky my some friends have a problem about ts. When they encode ts they get regedit error and ts not install? İs ff7 save necessary for ts or how to solve? I share my regedit for ff7 with them then they edit but didnot work.
 
@red_evilspirit
download this http://www.winimage.com/zLibDll/zlib123dllx64.zip, extract the x64 dll and rename it to zlib1.dll, and put it in the same folder as touphscript source. Also please use the makefile to compile, i.e. run mingw32-make in the source directory.

@kenichi
If ts can't find the files by using the registry values you'll need to use the config file to override them, check the paths in touphscript.ini
 
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 edited:
I don't use VS so I'm not sure I can help, but why are you linking libz.a and not zlib1.dll?
 
another tip; use notepad ++ if original file 250 line translated file must 250 line too.
 
actually, vs and g++ are the same, the different is vs have UI.
Finally i can link libz.a with this syntax: Code: [Select]
Code:
LDLIBS :=  -L/ -lz -lshlwapi -lShell32
But i got another error:
Code: [Select]
Code:
x86_64-w64-mingw32/bin/ld.exe: i386 architecture of input file `touphScript.exe.res' is incompatible with i386:x86-64 output
 
Last edited:
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 edited:
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.
 
I give up on inputting utf8 character. It's too complicated to modify source.
String can not store uft8, only ascii table.
 
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.
 
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 edited:
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.
 
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.
 
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.
 
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.
 
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.
 
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
 
Status
Not open for further replies.
Back
Top