Author Topic: [PSX/PC] General editor - Hades Workshop (0.50b)  (Read 844571 times)

Yugisokubodai

  • *
  • Posts: 42
    • View Profile
Re: [FF-IX] Hades Workshop
« Reply #150 on: 2014-05-13 15:17:31 »
Hello, I found this great tool on Romhacking.net and now I'm here.
First, thank you very much for your effort.
Secondly, my PC can read Japanese properly, but I wonder why the Japanese encoding in Hades Workshop is not right. Below are my screenshots for Hades Workshop and Deling (FF8 editor) for Japanese version of FF9 and FF8.

Hades Workshop, thing are not right


Deling, things are right


Can you tell me what I have to do to read the Japanese encoding properly?

Second, I want to translate FF9 to my native language, so I must redraw the font. Can you tell me and people here where the font locate? Is there any tool out there allow me to extract and reinsert to font?

Thank you very much for reading.
 :)

Tirlititi

  • *
  • Posts: 874
    • View Profile
Re: [FF-IX] Hades Workshop
« Reply #151 on: 2014-05-13 17:28:14 »
Hey thanks !
To properly display the japanese test, go in the File->Preferences menu and select Japanese as the game's alphabet.

The font is in the Environment->Text panel. Check out the "Charmap" section, you'll see several pictures : the global text font is the first one.

Here is the method to import your own font (I should add it in the help but I always forget ><) :
1st step : create an image .tga with every letters and characters you want. That's tedious if you paint it but Gimp and other programs have options to paint characters. Best way to draw them : they must be 13 pixels high maximum, 3, 6, 9, 12 or 15 pixels large, being white on a black background and having ~ 6 different tones of grey. It's also better if you use the same dimensions than in the game, so it's better to export the font before and use it as the base image.
2nd step : open HadesWorkshop.conf with a simple text editor and add a new line in the [Text] section :
Charmap[YourLanguageHere]=
and then you put all the letters one by one. They should be in the same order than in your image (that makes things easier). Since you don't draw the space, you can put it anywhere (it's in 16th position in normal games but that's only a standart). You're limited to 247 characters for the first charmap. If you need more, add a second line "Charmap[YourLangageHere][A]=" and put up to 256 more characters in that line. You can do it once again with a "B" option so you can use up to 759 characters.
3rd step : open Hades Workshop and your game, go to the charmap image (Environment -> Texts -> Charmap) and select the first picture : you see the current charmap. Click on "Manage Textures" then "Browse", select your charmap image, adjust its scale/position and then click on "Import" : you see the characters as they will appear in-game. Because of the way FFIX compresses it, it'll look bad if your letters are not 3, 6, etc... pixels-large.
4th step : in the same screen, select all the paintings one by one and make them surround each a letter. The order here must be the same as the one in the .conf file (let a 0-large painting for the space). You can delete or add paintings with a right-click.
5th step : go to preferences and select your charmap in the field "Game alphabet".
6th step : translate everything you can ^^'

Note that the Japanese version actually uses an extended charmap that is dependant on where the player is located. The font picture for it can be managed the same way, but there is no support for displaying/editing characters from that charmap inside the dialogs...
« Last Edit: 2014-05-13 17:30:29 by Tirlititi »

Yugisokubodai

  • *
  • Posts: 42
    • View Profile
Re: [FF-IX] Hades Workshop
« Reply #152 on: 2014-05-13 22:17:29 »
Thank you very much for the quick reply.

Actually, I did choose Japanese alphabet in the preference, but it's no use. I wonder why? Does it concerned to the Non-unicode setting in the Window's control panel? Currently, my setting for non-unicode for program is Japanese, and I can read Japanese properly in other softwares except for Hades Workshop.

I'm pretty used to doing the font editting stuff, I'll try the way you mentioned here.

P/S: I decided to choose Japanese version as the base of my translation because at the first glance, it uses more space than English version (because of Kanjis) so I have much space for my text than the English one.

I wonder does FF9 use any kind of pointer for text?

And one more important thing: it's the character width. How can I adjsut the character width? For example, the original character "A" has 12 pixels width, but I redraw it in to "i", so there's a space after the letter. Is there a way to reduce or enlarge the width space?
« Last Edit: 2014-05-13 22:29:00 by Yugisokubodai »

Tirlititi

  • *
  • Posts: 874
    • View Profile
Re: [FF-IX] Hades Workshop
« Reply #153 on: 2014-05-14 17:20:21 »
I have no clue about the japanese, then... Works fine for me when I try to open the japanese version. If I recall well, the unicode encoding for my program is utf-8. Do you read properly the HadesWorkshop.conf file when you open it with a text editor?

For the letters' width, you can use the extra space obtained when you redraw big letters, as long as you keep everything a multiple of 3. It only mean you'll have to actually do the 4th step and adjust every "letter boxes" to fit the letters.

I'm not sure of what you mean by text pointers : there are tables of pointers for each text tokens (so "Cure" has a pointer for it, "Cura" has another which points 5 characters after the previous one). But I don't think there is a pointer table for each location to where there is text (a table saying "there's ability texts here, menu texts here, etc...").
Besides, the pointers for text tokens are not always near the texts themselves, and the 0-position often differs for a case to another.

Yugisokubodai

  • *
  • Posts: 42
    • View Profile
Re: [FF-IX] Hades Workshop
« Reply #154 on: 2014-05-15 12:56:54 »
Now I know why I can not read the Japanese version properly. The reason as the video below.

https://www.youtube.com/watch?v=fFK3Br_W-3I

Here's the summery.

1. When I first downloaded Hades Workshop, the HadesWorkshop.conf is 4K (3,107 bytes) and it has Japanese charmap, Latin charmap in it.
2. When I opended Hades Workshop and choose Japanese in the preference, somehow it automatically overwrite the conf file. This is inevitable.
3. The new .conf file (overwrited by the program) now is 1Kb (297 bytes) and the Japanese charmap, Latin charmap was gone!

I wonder is the the bug of HadesWorkshop? 
By the way, I download the proram from Romhacking.net

Tirlititi

  • *
  • Posts: 874
    • View Profile
Re: [FF-IX] Hades Workshop
« Reply #155 on: 2014-05-15 16:43:31 »
Ok, thanks for the explanation. I'll see what I can do about that (it has to be some sort of option to make sure the .conf file is properly read/overwritten whichever your platform's configuration is).
There is no difference between the Romhacking.net version and the one here. Only the source code is in a separate file here.
« Last Edit: 2014-05-15 16:55:52 by Tirlititi »

Yugisokubodai

  • *
  • Posts: 42
    • View Profile
Re: [FF-IX] Hades Workshop
« Reply #156 on: 2014-05-16 15:35:53 »
In the Control panel, there's Region and Language setting. When I chose Change system locale to English, now Hadesworkshop doesn't delete the Japanese charmap in the .conf file so I can read it properly now.
But if I change system locale to Japanese, Hadeworkshop delete Japanese charmap whenever I open it.
Hope to see another version which fix this problem soon.

demeterf

  • *
  • Posts: 18
    • View Profile
Re: [FF-IX] Hades Workshop
« Reply #157 on: 2014-05-18 12:55:42 »
Hello, your program works great, but I have a problem.

I'm not really good with creating charmaps, so could I request your help (or someone else's) to make
Ő, Ű, ő, ű characters for a hungarian translations? Only these characters are missing. It would be a really big help.

By the way, I see, that I can export text blocks, but cannot import them back. Is it possible, that in the near future you make the enviroment/texts part importable? It would fasten up the translation process, because it's really hard and slow to open, then close a text line, and repeat plus it would be possible to work with a group to translate...

Thank you! :)

Tirlititi

  • *
  • Posts: 874
    • View Profile
Re: [FF-IX] Hades Workshop
« Reply #158 on: 2014-05-18 14:12:17 »
Is there some characters you don't need in the charmap? Because there's the place to add ő and ű but not the upper-case ones without deleting anything.

Here is the lower-case texture (at the right of the picture) :
https://dl.dropboxusercontent.com/u/98687557/Charmap.tga

For the upper-case, just copy-paste a O and a U and the accent from the lower-case and put it over an unneeded character.
If there are no unneeded character, it'll be much more complicated :/ It's really tedious to properly draw letters from nothing because the game's compression algorithm tends to alterate the picture a lot.

You still have to do all the steps 2-6, though.

For the importing feature, that's not my priority.

demeterf

  • *
  • Posts: 18
    • View Profile
Re: [FF-IX] Hades Workshop
« Reply #159 on: 2014-05-19 12:45:55 »
Yes, there are some characters that I don't need, but I downloaded GIMP (it has taken a half hour to learn how to use it :D ), edited the charmap file, (deleted a char that I don't need, copied the normal upper case version and the accent from the lower- case version to make Ő and Ű) and the config file, and now it works perfectly.

The only problem is, that now I can't load the iso file with Hades if it's patched. But I can do make a mod :D

Anyway, thanks for your help. It will be much easier to do the translation from now on.


shikulja

  • *
  • Posts: 68
    • View Profile
Re: [FF-IX] Hades Workshop
« Reply #160 on: 2014-05-21 07:45:47 »
need add\edit this menu (add characters from charmap like in image)

and add save/load gliph positions in manadge texture menu

Yugisokubodai

  • *
  • Posts: 42
    • View Profile
Re: [FF-IX] Hades Workshop
« Reply #161 on: 2014-05-23 23:20:04 »
I now can open the Japanese version, but there's many Kanji missing from the text (ones replaced by "?").
Is this because of differents Kanji table are used in different location in the game?



Is there any way to fix this?

Tirlititi

  • *
  • Posts: 874
    • View Profile
Re: [FF-IX] Hades Workshop
« Reply #162 on: 2014-05-24 10:19:56 »
Yes, that's because of the extended table. I don't know any simple way to make it work : I guess I'll have to list all the kanjis in each of the extended tables and put them in the .conf as well...
If it's only a matter of translating, you can try to find the game script somewhere else and erase those characters. It shouldn't bug if you replace them by some other text.

Another bad news : the update will surely be delayed. I want to fix that previous bug, with the local system dependancies and I'm not done yet with the other thing that I've worked on.

JBedford128

  • *
  • Posts: 113
    • View Profile
Re: [FF-IX] Hades Workshop
« Reply #163 on: 2014-05-24 15:29:54 »
If it helps, I had a Japanese reader figure out the "first" table for me once (the one in the Prima Vista rooms, don't remember if its ID is 0):

Code: [Select]
            '姫','我','隊','来','船','誘','拐','父','様','思','居','芝','観','演','虫','室',
            '客', 'Υ','_','俺','愛','貴','度','奏','語','婚','刃','足','恋','話','仕','連',
            '達','結','役','嫌','親','聞','掛','仲','言','主','太','乗','飛','続','望','宵',
            '友','声','待','席','議','会','込','訳','申','引','醜','隙','驚','皆','苦','兄',
            '張','頑','悟','良','奴','落','貸','到','団','戻','遅','娘','容','始','困','負',
            '勝','存','納','年','座','玉','為','観','考','関','機','痛','壊','塞','赦','余',
            '露','礼','悲','弟','済','刺','静','烈','憎','希','和','笑','千','丸','斯','母',
            '原','覧','裂','公','盛','評','集','揮','響','美','番','情','急','舞','台','細',
            '練','習','念','計','違','願','恩','配','漫','毎','朝','穴','幕','軽','頼','鳥',
            '君','顏','参','安','丈','夫','熱','勘','弁','明','説','籍','祝','建','怪','男',
            '捕','低','鐘','総','豪','少','逢','緒','帰','央','貢','仇','庫','温','泣','潮',
            '早','準','完','供','胆','例','功','哀','彼','広','界','拒','輝','七','貝','似',
            '仮','倉', non, non, non, non, non, non, non, non, non, non, non, non, non, non,
             non, non, non, non, non, non, non, non, non, non, non, non, non, non, non, non,
             non, non, non, non, non, non, non, non, non, non, non, non, non, non, non, non,
             non, non, non, non, non, non, non, non, non, non, non, non, non, non, non, non
sauce

Where "non" is nothing.

I felt too bad about asking her to do the rest because it takes a long time, and there's like 20 of them or something.

Tirlititi

  • *
  • Posts: 874
    • View Profile
Re: [FF-IX] Hades Workshop
« Reply #164 on: 2014-05-24 19:58:16 »
Yeah, that'll save some time to me or thisguyaresick (who gentlefully helps me).
Thank your friend for us.

Yugisokubodai

  • *
  • Posts: 42
    • View Profile
Re: [FF-IX] Hades Workshop
« Reply #165 on: 2014-05-27 05:00:28 »
need add\edit this menu (add characters from charmap like in image)

and add save/load gliph positions in manadge texture menu

For shikulja's question:
1. Extract FF9.IMG from the CD
2. Open it in a hex editor. I recommend Windhex by Bongo.
3. You can edit the hex manually or just use Atlas to insert it. The address as my picture below.



For Tirlititi's: I have seen many strategy games like Fire Emblem use various Kanji tables as well as the Kana table. They have a trigger bite for each array, such as $09 to trigger the Kana array, $0A for Kanji array 1 and $0B for Kanji array 2. I think FF9 use the same method (Japanese version). Can you embede this function to Hades workshop?

Tirlititi

  • *
  • Posts: 874
    • View Profile
Re: [FF-IX] Hades Workshop
« Reply #166 on: 2014-05-27 09:23:07 »
I know how it works, it's just that it's incredibly tedious because we need to register all the kanjis' tables and that there are a lot of them (between 20 and 30 I would say).
You're right about the byte flags though. It's explained here :
http://wiki.qhimm.com/view/FF9/CharTables

The problem is for the "External Kanji Table" : there is one different for each place in the game. thisguyaresick is doing a great job at the moment to write down all these tables but you can figure it takes some time.

EDIT : Actually, that makes 65 external tables in total...
« Last Edit: 2014-05-27 16:57:58 by Tirlititi »

Tirlititi

  • *
  • Posts: 874
    • View Profile
Re: [FF-IX] Hades Workshop
« Reply #167 on: 2014-05-31 23:32:12 »
Update to 0.24.
Here are the changes :
- You can now edit the game's script (for fields and battles). It's a new feature and is still very limited though. You can also edit fields' name. See bellow for more informations,
- You can now add and edit text opcodes. I don't know the effect of all the opcodes but the most useful of them (the unknown are read as their hexadecimal code, as before).
- Added a "curve editing tool" for the level progressions. It's nice for seeing the progression curves, but not too much precise. It's more like a gadget for now even if it's better than a bunch of figures. I'd like to improve it but that really shouldn't be my priority.
- Fixed the bug making the configurations file not working depending on the local system.
- Fixed a bug making World Maps' texts uneditable (it must be recent because that worked before).
- Improved the time spent for scanning files (it shouldn't upgrade with this version though ^^').

Also, please note that the DLLs have been updated as well.

So, I've got a whole bunch of things to say...

First, I gave up on card data finding. There are several reasons for that, the main one being the fact they are not at the same place at all in the binary files in PAL/NTSC versions and the Japanese one. I'll get back to it when I understand better the top levels structures of the binary file (once again, your wiki helped a lot but it wasn't enough for that particular problem :/).

Second, about the external kanji table, I'm being helped by ThisGuyAreSick2 and Yugisokubodai and that's the next thing I'm donna do. It will come asap with a bug-fix version if I find any (not that I want it but I know there are usually some of them ^^').

Third, the game's script...
You can edit both Battle scripts and Field scripts, as said, but you cannot edit the World Maps' scripts. The reason is that, in the Japanese version, there is A FRACKING BLOCK OF TEXT IN THE MIDDLE OF THE SCRIPT. I have absolutely no clue about why it is there or even if it's properly handled by the game itself (it may be present only inside unused World Maps, since there are 13 of them). So I disabled the reading/editing of the scripts in World Maps.
Here is an example of a piece of script :

It's Baku's scripted movements and dialogs after the party defeats him (as Masked Man). The first "Animation" code is him patting Zidane's head, then he says "You're looking a lot better", then he faces south (a 0 angle is south ; a 64 angle is west) and say "Gwahahaha", etc...

About what you can edit, I'm not 100% sure of pretty much everything, so it may bug a lot. I just played with it a little and succeeded in changing some chests' content, some dialogs and with a good practice, you should be able to edit some scripted cinematics to a certain extent.
About editing limitations : I don't know the meaning of most opcodes and I've not implemented a way to change a code's length yet. Thus, you can't change an opcode yet, only its arguments. What's more, you can't change any of its arguments, but only the numerical ones. Most of opcodes' arguments can be either numerical values or "variable code" : the variable codes are (quiet) well displayed but cannot be edited yet.
Also, all the JUMP-ing opcodes are displayed as is. The jumping offset is the binary value so it won't help a lot. I would like to turn them all into "if/then/else", "switch" and "loop" statements but that's for a next time.

And one last thing : the edition of the script can be made easier if you go to the item, stats, texts and enemies panel before. Some numerical values (item ID, character's name, text ID and battle ID) will be translated in more understandable things. It's not 100% accurate though, for now :/

I'm gonna be really busy IRL for the month to come. I don't think I'll do anything else than reading some kanji tables until then.

EDIT : Update to 0.24b. Fixed some few things I forgot to do.
« Last Edit: 2014-06-01 10:35:02 by Tirlititi »

Yugisokubodai

  • *
  • Posts: 42
    • View Profile
Re: [FF-IX] Hades Workshop
« Reply #168 on: 2014-06-02 03:19:10 »
I'm doing with the Kanji tables now  :P
By the way, about the font. I extracted it with Tim Viewer, edited it with a photo editor out there, then re-insert to the game and it's displayed just as in the Photo editor.

However, when I exctracted the font using Hades to .tga file, then edited it with the photo editor, re-inserted with Hades, it does't displayed excatly what I did in the photo editor.

I wonder does Hades modifies the font wrongly?

Tirlititi

  • *
  • Posts: 874
    • View Profile
Re: [FF-IX] Hades Workshop
« Reply #169 on: 2014-06-02 17:50:11 »
There are several sorts of TIM and I handle them quiet differently. Besides the compression method (the 3-pixels-coded-as-2 thing), there is also the handling of the transparancy : it's ignored in some of the TIMs.

I guess TIM viewer retrieve the 3rd pixel slightly differently than me, then... But I only compute a mean and it seems the most correct way of doing it...

aladore384

  • *
  • Posts: 23
    • View Profile
Re: [FF-IX] Hades Workshop
« Reply #170 on: 2014-07-02 10:03:46 »
Hi Tirlititi,

First thanks for this tool. It's amazing. I am now considering fixing those minor glitches still present in the game.

The infamous Thunder Slash Glitch is my target for now and we're having a lengthy discussion with Vir about HOW it should be fixed : http://www.gamefaqs.com/boards/197338-final-fantasy-ix/69536029#8

But that's not why I am replying here. I was wondering if you would make the tool so that we can change stuff in Tetra Master. I'd like to fix the 1,700 pts glitch.

Self-quoting from : http://www.gamefaqs.com/boards/197338-final-fantasy-ix/69143572?page=5#54

Quote
I was wondering about the intended rank for 1,700 pts in Tetra Master. It currently reads "Would you like to discard this card?" as we all know. The 2nd best rank is "Master".

Now, if you read the "Strategy Guide" key item, it is signed by "Grand Master I", and I think this is the title that would have been earned by the player if there wasn't the glitch. Simply "Grand Master" would be my guess as I don't think they would have specified the count, or maybe "Grand Master IX", who knows !

Tirlititi

  • *
  • Posts: 874
    • View Profile
Re: [FF-IX] Hades Workshop
« Reply #171 on: 2014-07-02 16:29:12 »
Hi Aladore,
I don't really know how to fix that bug properly. The title "The Collector" is present in the text datas but it is kinda badly referenced for its use in the card menu.

Here is what I know :
• The text list begins with each of the 32 rank names, including the last one which is "The Collector".
• The text coming right after it is "Would you like to discard this card ?".
• In the UI datas, there is some variable pointer instead of the text ID for the collector rank's text field.
So it seems that the variable jump from value 30 ("Master") to value 32 (the "Would you like..." text ID) instead of being caped at 31 ("The Collector"). I don't know why, though, but I checked and there is no dummy rank in-between so it really seems to be relative to how the variable is increased.

So, here is a ppf patch to fix it in a non-satisfying way (for me ^^') : I swapped the IDs of the texts "The Collector" and "Would you like...". Two errors make it work fine... It's only for the US version, though.
But I would prefer to fix the way the variable is incremented.

As for being able to fix it with HW, I don't think it will be feasible before long. I gave up on Tetra Master edition and even so it would be more a matter of coding/UI managing.

About the Thunder Slash glitch, I personally think that it was changed from a physical attack to a demi-like spell because otherwise it would be too much similar to Thunder Swords. It would be that they forgot to change the accuracy (and maybe power) in the process.

Thanks for your feedback and good luck bug-fixing the game ^^
« Last Edit: 2014-07-02 16:32:21 by Tirlititi »

aladore384

  • *
  • Posts: 23
    • View Profile
Re: [FF-IX] Hades Workshop
« Reply #172 on: 2014-07-02 20:35:47 »
Thanks to you, I had the curiosity to check "The Collector" rank's localization in French, which is "LE Grand Maître"... kinda disappointing. Anyway this gave me closure about this issue.

http://aladore3viii4.free.fr/files/FF9/Tetra%20Master%20ranking%20-%20French.htm

I used monkey-moore-0.5-2009-11-29-win32 for a Relative Search in order to check that.

I was wondering, your "The Collector fix" ppf file worked perfectly for my NTSC US copy : how did you make it ? If it's too much trouble don't bother to answer, but I was thinking of making the same file for other regions. So if you could provide me with the names of softwares that can do the job I'd be grateful.

Well, just for the sake of discussion, I also wondered about the cap of two things :

- Frogs caught : 32,767. This cap seems forced as it is 7FFF in hex. Do you think another cap was intended ?

- Jump rope : there seem to be no cap at all. After 8,388,607 (7F FFFF) the counter displays 0 and after 16,777,215 (FF FFFF) the counter overflows. I tested 9,999 among other values to see if there is a cap but I don't seem to find one.

Also, about the Thunder Slash glitch, it's settled. We (Vir and I) both agreed on the fact that it should be changed to Physical Attack. The only nitpicking lies in the Power where Vir went with 19 and I went with 17.

Tirlititi

  • *
  • Posts: 874
    • View Profile
Re: [FF-IX] Hades Workshop
« Reply #173 on: 2014-07-02 21:14:22 »
I wrote a detailled way to make the fix, but it was a bit tedious and doesn't work for the japanese version (card datas are a bit different in it). So here it is :

More details if someone wants to make one himself (you should better know some hex editing ^^') :
Only in PAL/US versions

You need to change 3 bytes to fix the bug :
1) change the 31th text pointer to the one of the 32th
2) change the 32th text pointer to the one of the 31th
3) change the ID of the text used by the question box when discarding cards from 32 to 31

1) The text lists and pointers are at the very beginning of the "Card Menu" module (see the wiki : the card module is the 11th of the 1st directory (Directory '0' in the wiki)). The pointers begin at the position 0x1C of the module and are 4 bytes-long (2 bytes for the actual pointer and 2 unknown bytes). Go to the 31th pointer (position in the module : 0x98) and change its value by the one following it (at position 0x9C).
To find the card module easier, you may try to search for the raw datas 0x0113002F002D that should be at position 0x13 of the card module, but that's not the case in some version (Japanese at least, though it seems to be ok in PAL versions).

2) Do the same for the 32th pointer (at position 0x9C, still) : change it to the value the previous one had before you changed it.

3) Search for the raw datas 0x20000424 in the same module (it seems it's always 0x2000042400000486 in all versions) and change that 0x20 into 0x1F.
You should find it approximatively at the offset 0x5C00 from the beginning of the module.

EDIT : I forgot to answer you about the caps. You will be able to see how values are caped with the scripts. HW can already display/edit the field scripts in some extent (it's hard to decipher but you could retrieve the things you asked with some patience ^^'). Besides that, the caps are related to the byte length of the datas.
We are on making the japanese charmaps for now, then I'll do 2/3 things like editing images directly inside HW and then I'll try to organize and improve the script editing tool.
« Last Edit: 2014-07-02 21:42:09 by Tirlititi »

aladore384

  • *
  • Posts: 23
    • View Profile
Re: [FF-IX] Hades Workshop
« Reply #174 on: 2014-07-04 11:31:37 »
Thank you for these answers. I'll give you feedback about those matters as soon as I got a chance to follow your instructions :)