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

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: [v1.2.8] touphScript - FFVII-PC text editor
« Reply #150 on: 2012-09-16 04:20:22 »
My ff7 text file had MO chocobo names starting at line 737 (notepad++).  Seems ts wants it to start 766.

Has there been some alteration in newer ts revisions?
« Last Edit: 2012-09-16 05:01:59 by DLPB »

Kompass63

  • *
  • Posts: 695
    • View Profile
Re: [v1.2.8] touphScript - FFVII-PC text editor
« Reply #151 on: 2012-09-18 16:47:57 »
My ff7 text file had MO chocobo names starting at line 737 (notepad++).  Seems ts wants it to start 766.

Has there been some alteration in newer ts revisions?

???
The chocobo names starting at line 720 (notepad++) for me.

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: [v1.2.8] touphScript - FFVII-PC text editor
« Reply #152 on: 2012-09-18 23:05:34 »
Yours are not the MO chocobo names (Menu Overhaul supports longer chocobo names and chocobo prize names).  TS supports both.  I will explain this at a later time.

Tenko Kuugen

  • Public Enemy
  • *
  • Posts: 1416
    • View Profile
    • Twitter
Re: [v1.2.8] touphScript - FFVII-PC text editor
« Reply #153 on: 2012-10-02 08:15:31 »
in which order does TS encode the flevel files?
by ID? by name?
it always crashes at specific fields for me, so I can just replace them temporarily with vanilla editions

Asshiah

  • *
  • Posts: 19
    • View Profile
Re: [v1.2.8] touphScript - FFVII-PC text editor
« Reply #154 on: 2012-10-13 00:42:11 »
Just for those who'd like to compile the program from source themselves (I used MinGW and its included mingw32-make command to use the Makefile provided):

in the common.h file, line 134-156:

Code: [Select]
template<typename T>
inline T get(istream& in) {
T val;
read(in, &val, sizeof(T));
return val;
}

inline void read(istream& in, void* const p, int const size) {
in.read(static_cast<char* const>(p), size);
}
template<typename T>
inline void read(istream& in, T& out) {
read(in, &out, sizeof(T));
}
template<typename T>
inline void read(istream& in, vector<T>& out) {
read(in, out.data(), vsize(out));
}
template<typename T>
inline void read(istream& in, vector<vector<T>>& out) {
for (vector<T>& v : out)
read(in, v);
}

You need to declare the get method after the read methods in order to be able to compile.

So you would have to replace previous code with:

Code: [Select]
inline void read(istream& in, void* const p, int const size) {
in.read(static_cast<char* const>(p), size);
}
template<typename T>
inline void read(istream& in, T& out) {
read(in, &out, sizeof(T));
}
template<typename T>
inline void read(istream& in, vector<T>& out) {
read(in, out.data(), vsize(out));
}
template<typename T>
inline void read(istream& in, vector<vector<T>>& out) {
for (vector<T>& v : out)
read(in, v);
}

template<typename T>
inline T get(istream& in) {
T val;
read(in, &val, sizeof(T));
return val;
}

Asshiah

  • *
  • Posts: 19
    • View Profile
Re: [v1.2.8] touphScript - FFVII-PC text editor
« Reply #155 on: 2012-10-13 03:57:08 »
I tried using an altered touphscript program on the new ff7 2012 French files.
I altered the program so that it doesn't try to dump the ff7.exe file which is clearly not compatible without changes to the code and the definition of a new offsets table.
I also altered it so that it tries to dump the field.lgp file at the end after all the other files.

=> All files are dumped perfectly except from field.lgp.

I see some non blocking errors about blackbgb and blin67_2 files but this is not really too much of a problem.
But after that, a  fatal error (std::bad_alloc) occurs.

I looked into it a bit and it seems that when trying to read the crcin_1 file from field.lgp, a problem occurs in the following line of the field.cpp file when i=1:

Code: [Select]
out[i].resize(get<u32>(buf, pos));

I think we try to resize
Code: [Select]
out[i] which is of type vector<uint8_t> to a too big length : 2408550287.

Clearly we can't allocate the desired amount of memory.
« Last Edit: 2012-10-13 17:25:09 by Asshiah »

Asshiah

  • *
  • Posts: 19
    • View Profile
Re: [v1.2.8] touphScript - FFVII-PC text editor
« Reply #156 on: 2012-10-13 13:40:15 »
OK so I removed some variables defined in the touphScript.exe.h file:

Code: [Select]
#define _WIN32_WINNT 0x0502
#define WINVER _WIN32_WINNT
#define NTDDI_VERSION 0x05010300

This was saying to the compiler that we were targeting WinXPSP3 (or WIN2003). As I am using Windows 7 x64, this would cause a conflict when compiling with the new compiler describe below.
By removing it, I let the compiler find out the Windows version used by itself.

I then installed tdm-gcc with the MinGW-w64 based version which would allow to compile the program in x64.
I recompiled the zlib library from source using this new compiler.
Then I recompiled the touphScript program.

I the error about bad_alloc is gone!

This was due to the 32 bit compilation limiting the allowed maximum memory usable by the program.
By using 64 bit compilation (with enough RAM), there is no more problem.

Ragna

  • *
  • Posts: 266
    • View Profile
Re: [v1.2.8] touphScript - FFVII-PC text editor
« Reply #157 on: 2012-12-31 00:59:23 »
Got an error no matter what option I give: Fatal error (basic_ios::clear).
I'm running Win8 x64.

OmniWarrior

  • *
  • Posts: 5
    • View Profile
Re: [v1.2.8] touphScript - FFVII-PC text editor
« Reply #158 on: 2013-03-07 05:04:38 »
This might be a dumb question, but still...
The screenshots look nice, but for the people who have edited their games, are you going to post your config texts? I did some rom patching way back with SNES. I patched Harvest Moon and turned all of the "innocent girls" into foul mouthed, horny howlers. I think a rated R version of FF7 would be a riot.

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: [v1.2.8] touphScript - FFVII-PC text editor
« Reply #159 on: 2013-04-03 00:35:42 »
ugh... may have sussed out the issue I had. I will check.

edit.

yup.  Once again Luksy wins ;)  This still needs to be edited though so it can work with 2012 flevel.   :evil:
« Last Edit: 2013-04-03 00:58:55 by DLPB »

Agahnim

  • *
  • Posts: 40
  • fourgive mii four baud iinglisch :D
    • View Profile
    • Rom Dom Greece
Re: [v1.2.8] touphScript - FFVII-PC text editor
« Reply #160 on: 2013-04-26 02:30:10 »
just a question.. where are the title screen texts hidden? ("NEW GAME" and "Continue?")

Kaldarasha

  • *
  • Posts: 2449
  • Prince of Model Editing
    • View Profile
Re: [v1.2.8] touphScript - FFVII-PC text editor
« Reply #161 on: 2013-04-26 02:44:04 »
In the FF7.exe. DLPB has done some very smart tools, which allow you to modify the text.
DLPB Tools 1.2

The games converter wouldn't be possible without them.

Agahnim

  • *
  • Posts: 40
  • fourgive mii four baud iinglisch :D
    • View Profile
    • Rom Dom Greece
Re: [v1.2.8] touphScript - FFVII-PC text editor
« Reply #162 on: 2013-04-26 11:53:08 »
thanks a lot!

picklejar

  • *
  • Posts: 147
    • View Profile
Re: [v1.2.8] touphScript - FFVII-PC text editor
« Reply #163 on: 2013-06-19 21:39:22 »
after run and enter - d or e
Fatal error: basic_ios::clear

I had this problem, too, but I fixed it by doing two things:

#1: Run as Administrator.  (I suggest running "Command Prompt" as Administrator, then running touphScript.exe from the command prompt, so that you can see the output after it's done, and you can also provide the d option.  However, if you right-click touphScript.exe and "Run as Administrator", that works, too.)

#2: I installed FF7.  See, I was trying to run touphScript without actually installing FF7.  Is this supported, by the way?  I was expecting/hoping touphScript would default to the current directory, and that's where I put the FF7 files, but I still couldn't get this to work.  I tried lots of things, including removing read-only attributes; modifying the ini to set Override paths; tried putting the FF7 files in different places (all in the current directory, vs. putting them in the folder structure .\data\etc.); compatibility mode with earlier versions of Windows; etc.  However, it's very possible that I had installed then uninstalled FF7 a long time ago, so maybe touphScript still found the old install path in the registry and was looking for the files there?

Anyway, hope this helps!

Kompass63

  • *
  • Posts: 695
    • View Profile
Re: [v1.2.8] touphScript - FFVII-PC text editor
« Reply #164 on: 2013-06-20 03:16:46 »
FF7-GetKey.zip
Reads all a few FF7 Registry Keys I've found... :-D
« Last Edit: 2013-06-20 03:27:13 by Kompass63 »

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: [v1.2.8] touphScript - FFVII-PC text editor
« Reply #165 on: 2013-06-20 20:06:50 »
just a question.. where are the title screen texts hidden? ("NEW GAME" and "Continue?")

You can change them with touphscript by just editing the text file 0_ff7.exe.txt

Agahnim

  • *
  • Posts: 40
  • fourgive mii four baud iinglisch :D
    • View Profile
    • Rom Dom Greece
Re: [v1.2.8] touphScript - FFVII-PC text editor
« Reply #166 on: 2013-06-22 03:48:01 »
thanx a lot DLPB. my 0_ff7.exe.txt was empty and i was thinking it's normal but now i understand that's just a bad dump.

touphscript is a very useful tool

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: [v1.2.8] touphScript - FFVII-PC text editor
« Reply #167 on: 2013-06-28 18:25:10 »
This tool is being rewritten and I am sure Luksy will be addressing the problems that exist :)

PSDoff

  • *
  • Posts: 1
    • View Profile
Re: [v1.2.8] touphScript - FFVII-PC text editor
« Reply #168 on: 2013-06-29 16:07:35 »
First off, this is very, very awesome. I installed FF7 on my new PC a couple days ago and went crazy with the mods and I love it.

My mods resulted in the text boxes cropping off some of the dialogue which is how I found touphscript. Using it, I found that I had to use the suggestions from http://forums.qhimm.com/index.php?topic=12530.0 to get it working, using the following lines:

autosize_width = 1
autosize_height = 1

menumod = 0

This all seemed to work until I went back to the FF7 bootleg program to make a few more changes. I tried to run touphscript again in the same manner but it doesn't seem to be working anymore. My log outputs "Unknown ini key: menumod" and no change is apparent. I've also tried to dump and encode without this line but that doesn't do anything either.

Any thoughts?

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: [v1.2.8] touphScript - FFVII-PC text editor
« Reply #169 on: 2013-07-24 11:36:59 »
The links on the first post are wrong.  Probably because Qhimm forum was reset earlier this year to an earlier backup.  The proper links are:

1.2.9
http://dl.dropbox.com/u/3227870/touphScript_v1.2.9.7z

And source
http://dl.dropbox.com/u/3227870/touphScript_source_v1.2.9.7z

1.2.8 seems to have a few bugs.... so use these.

Template

  • *
  • Posts: 862
  • Life is a series of cats.
    • View Profile
Re: [v1.2.8] touphScript - FFVII-PC text editor
« Reply #170 on: 2013-07-24 13:38:19 »
The links on the first post are wrong.  Probably because Qhimm forum was reset earlier this year to an earlier backup.  The proper links are:

1.2.9
http://dl.dropbox.com/u/3227870/touphScript_v1.2.9.7z

And source
http://dl.dropbox.com/u/3227870/touphScript_source_v1.2.9.7z

1.2.8 seems to have a few bugs.... so use these.
omg... been using wrong version... /dies

Edit: And then I frikkin died again when I saw Cosby facepalm... 
« Last Edit: 2013-07-24 19:16:39 by Template »

Kaldarasha

  • *
  • Posts: 2449
  • Prince of Model Editing
    • View Profile
Re: [v1.2.8] touphScript - FFVII-PC text editor
« Reply #171 on: 2013-07-24 16:31:05 »
And I wondered, why the autosize didn't work...

Template

  • *
  • Posts: 862
  • Life is a series of cats.
    • View Profile
Re: [v1.2.8] touphScript - FFVII-PC text editor
« Reply #172 on: 2013-07-25 14:13:07 »
Using v1.2.9 going from a German flevel that has been highly modified (Kaldarasha's Reworked Mod) to English I get the following errors:
Code: [Select]
blin67_2 patch failed, not original script
chrin_2 patch failed, not original script
cosin1_1 patch failed, not original script
ealin_2 patch failed, not original script
elmin4_2 patch failed, not original script
elminn_1 patch failed, not original script
frcyo patch failed, not original script
fship_4 patch failed, not original script
games_2 patch failed, not original script
gongaga patch failed, not original script
goson patch failed, not original script
kuro_4 patch failed, not original script
lastmap patch failed, not original script
Error in mds7: Incorrect number of entries: 74/73
min51_1 patch failed, not original script
psdun_2 patch failed, not original script

After testing I'm guessing these are almost all choice boxes? We're finding yes/no type boxes that are off vertically 1 line. The mds7 scene error seems harmless enough, no? Anybody think I can repair these manually being a normal non-superhuman type?
If this were something I was having trouble with going from a regular flevel, I wouldn't bother asking; I'd start from scratch. But the Reworked Mod flevel.lgp is super highly modified, almost every scene has been changed in multiple ways. There is no way to start from scratch. I was hoping to port this flevel as part of Kaldarasha's Reworked mod (which includes his Unshaded Models Overhaul) to all available script languages. PitBrat has kindly sent me all the text rips, as I was planning to image install repeatedly in different languages and rip them with ToughScript myself. But now the project is totally stalled.
I would like to verify that the actual rips (and I'm pretty sure PB used 1.2.9 to do them) are not the issue. I am almost positive it is simply because the flevel I'm trying to encode to has already had these patches installed, but in German. Everything is longer in German so it's bumping the choice boxes down a line? :-D
I hate to admit defeat but unless I'm just doing something wrong I think I'll have to wait for some help with ToughScript itself :-[


PitBrat

  • *
  • Posts: 1376
  • Change to feed the machine.
    • View Profile
Re: [v1.2.8] touphScript - FFVII-PC text editor
« Reply #173 on: 2013-07-25 17:38:49 »
Ugerstl did the Touphscript rips most likely using 1.2.8.
That's also the version used in Bootleg .040.
Would re-ripping the text with 1.2.9 correct the errors?
I only have access to the re-release international versions of FF7.
I know there are some minor differences between the flevels of the re-release and cd-rom versions.

Template

  • *
  • Posts: 862
  • Life is a series of cats.
    • View Profile
Re: [v1.2.8] touphScript - FFVII-PC text editor
« Reply #174 on: 2013-07-25 17:47:29 »
Would re-ripping the text with 1.2.9 correct the errors?
Unfortunately, no. That's actually what I did as far as the English text. v3 is from a 1.2.9 rip :oops:
Pretty sure it's the encoding where the issue is coming up, and it's certainly not ToughScript's fault; the flevel text had already been altered.
Kaldarasha has decided to edit the v3 I encoded manually with Makuo Reactor. But I imagine the problem will remain if I try to use TS1.2.9 to port his fixed ENG flevel to the other languages.
« Last Edit: 2013-07-25 17:51:11 by Template »