Maidens of the Kaleidoscope

~Hakurei Shrine~ => Rika and Nitori's Garage Experiments => Touhou Projects => Topic started by: dobro on July 09, 2013, 08:17:17 PM

Title: Touhou Toolkit GUI
Post by: dobro on July 09, 2013, 08:17:17 PM
(http://i43.tinypic.com/rt2d21.jpg)

As the name suggests, I'm developing a GUI for modding utilities known as Touhou Toolkit.

Help file is included with the program. Even if you haven't used thtk before, you may give it a shot. Feedback welcome on how easy to understand everything from scratch.

REMEMBER TO ALWAYS BACKUP YOUR .DAT FILES.

Installation is pretty straightforward. First you will need to download and unzip Touhou Toolkit (https://thtk.googlecode.com/files/thtk-mt-bin-5.zip)
Then navigate to Mega folder (https://mega.co.nz/#F!eNVWQJhJ!V2KmcjYK9hEhjwgTKz0F_w) and download the Bin subdirectory (or Bin.7z file which is the same directory, zipped) of the latest version (v1.0 as of now).  Alternatively, you may download the Src subdirectory and build the program yourself. Sources are also available at GitHub repository (http://github.com/fakedobro/thtkgui).

Waiting for suggestions and bugreports.
Title: Re: Touhou Toolkit GUI
Post by: Sparen on July 09, 2013, 10:05:42 PM
Should we reinstall if we already have a version?

Also, has the .anm packaging been fixed?
Title: Re: Touhou Toolkit GUI
Post by: Dark Kitsune on July 09, 2013, 11:36:03 PM
THANKS A TON FOR THIS

I'm sick of typing all that stuff in :P
Title: Re: Touhou Toolkit GUI
Post by: Lavalake on July 10, 2013, 07:45:48 AM
Shouldn't this be in the subforum?

Funny how I didn't know about Touhou Toolkit until this topic came along.
I might use this when I get the Touhou Toolkit. This seems like a brilliant program that helps those that hate typing.
AKA: Lazy people like me
Title: Re: Touhou Toolkit GUI
Post by: dobro on July 10, 2013, 03:55:10 PM
Should we reinstall if we already have a version?
You shouldn't if you have thtk version 5 (I only tested with this version, the others may or may not work).
Also, has the .anm packaging been fixed?
If you mean thanm stumbling over the double quotes in spellcard names, then no ? it still does. I can't really do much about this since I use thtk "as is" in binary form. However, I'll look into possible workarounds, it's already on my todo list.
EDIT: My mistake. This answer concerns a bug with THECL, not THANM. As far as I know, THANM works fine, I haven't run into any troubles with it yet.
THANKS A TON FOR THIS

I'm sick of typing all that stuff in :P
Glad you liked it.
Title: Re: Touhou Toolkit GUI
Post by: EthanSilver on July 10, 2013, 04:17:31 PM
I'm sick of typing all that stuff in :P
This seems like a brilliant program that helps those that hate typing.
AKA: Lazy people like me

Sigh... Fine, cue the comic strip.

(http://imgs.xkcd.com/comics/real_programmers.png)
(PS: Nice work btw - I'm not posting the above to criticize or anything.)

thdat.exe always makes rebuilding the dat into a friggin' mini-project... Having something to avoid building that huge command line by hand everytime? Useful! What would be even more useful? A project-manager that helps track which files were unpacked/modified and can rebuild the entire set of files/the .dat with one push of a button! You really should consider making this into more - simply wrapping a GUI around someone else's tools seems like a waste of an opportunity. :)

(Also, that's a SERIOUSLY huge .exe for what it does. 11.7MB for a graphics-free, plain window with a handful of controls that offloads all its work to some external programs. I'm kind of curious how you managed that one. ;))
Title: Re: Touhou Toolkit GUI
Post by: Lavalake on July 11, 2013, 05:10:17 AM
That was an interesting comic.
I personally might not even use Touhou Toolkit that much.
I like to maintain the original data and just play it instead of modifying it.
But I still think you can make more for this. Like EthanSilver said.

Title: Re: Touhou Toolkit GUI
Post by: dobro on July 12, 2013, 04:47:38 PM
What would be even more useful? A project-manager that helps track which files were unpacked/modified and can rebuild the entire set of files/the .dat with one push of a button! You really should consider making this into more - simply wrapping a GUI around someone else's tools seems like a waste of an opportunity. :)
Yeah, I've had similar thoughts during the development. And I've got a small comic just for the ocassion too
(http://habrastorage.org/storage/habraeffect/5c/47/5c4778ca8dad8f690b293db24b43b9f3.jpg)
(Translation: That's how, using some simple contraptions, you may turn a loaf of bread into a trolleybus... but why would you do that?)

You see, I (as well as the other guy, the one who came up with the idea) am already generally satisfied with how the program works. So, before I start to develop something new, I would like to make sure that there are people who actually need this kind of functionality. Maybe there is some group on this board which does translating or modding or whatever? I'll also need some feedback on what features are required exactly.

(Also, that's a SERIOUSLY huge .exe for what it does. 11.7MB for a graphics-free, plain window with a handful of controls that offloads all its work to some external programs. I'm kind of curious how you managed that one. ;))
Big file size is a common trait for applications built on Delphi. VCL (Visual Component Library, Delphi's bread and butter) gets packed into the .exe and instantly adds 10MB or so to the file size. There are some tricks to reduce the size, but I just don't see the point given the modern HDD sizes and internet speed. If downloading is really a problem, I'll be putting a zipped version from now on.
Title: Re: Touhou Toolkit GUI
Post by: saisengen on July 13, 2013, 01:00:37 PM
Also, has the .anm packaging been fixed?
What needs to be fixed? I have many times used thanm (for example, https://www.youtube.com/watch?v=HanVdbfMaw0 my real bullet hitbox mod) and it always worked correctly.

If you mean thanm stumbling over the double quotes in spellcard names, then no ? it still does
This is the problem with thecl, not thanm.

Title: Re: Touhou Toolkit GUI
Post by: Dark Kitsune on July 13, 2013, 06:28:21 PM
Quote from: EthanSilver
Having something to avoid building that huge command line by hand everytime?
Just write your own program to build it for you. It's really not hard, and doesn't even take as long as writing that command by hand...
Title: Re: Touhou Toolkit GUI
Post by: Wriggle on July 13, 2013, 06:42:22 PM
What needs to be fixed? I have many times used thanm (for example, https://www.youtube.com/watch?v=HanVdbfMaw0 my real bullet hitbox mod) and it always worked correctly.

Great patch btw, I'll try it sometime.. I wonder how funny Danmaku Paranoia would look with a patch like this for SA (same for the heart cards).
Title: Re: Touhou Toolkit GUI
Post by: saisengen on July 14, 2013, 03:26:31 AM
Great patch btw, I'll try it sometime.. I wonder how funny Danmaku Paranoia would look with a patch like this for SA (same for the heart cards).
(http://i.imgur.com/4TGjB93.png)
Very funny, yes (this isn't my replay). SA was the first game for which I made this patch to beat normal. I made a version of this patch for all Windows-parts and it is with their help beat 3 extras (and still going through the fourth), and phantasm. Screenshots of other games with this patch I put on the imageboard in which at my request was written this GUI: http://dobrochan.ru/to/res/35630.xhtml#i36455, http://dobrochan.ru/to/res/36670.xhtml#i36877, http://dobrochan.ru/to/res/36670.xhtml#i37030. But I didn't change the heart bullets, because I don't know about their hitbox form.
Title: Re: Touhou Toolkit GUI
Post by: Wriggle on July 14, 2013, 04:53:02 AM
Nice. About the heart, I have a feeling that their hitbox are actually balls, since the tip and the sides don't actually hit you, but I can be wrong as I don't remember having been hit by its upper part. :V
Title: Re: Touhou Toolkit GUI
Post by: saisengen on July 14, 2013, 05:48:53 AM
Nice. About the heart, I have a feeling that their hitbox are actually balls, since the tip and the sides don't actually hit you, but I can be wrong as I don't remember having been hit by its upper part. :V
(http://i.imgur.com/Ez2aSnf.png)
I don't beat SA extra (exception one run with trainer), but I think, based on replays, hitboxes of these bullets such as on picrelated.
Title: Re: Touhou Toolkit GUI
Post by: Wriggle on July 14, 2013, 07:03:10 AM
I've made a replay with MarisaC where I spam all my kappa shields there, if it's helpful. So you can analyze it with slowdown, recording, etc. Sadly it's almost impossible to get hit by the upper part of the heart while focused, which needs manual tracking of our own hitbox.
Title: Re: Touhou Toolkit GUI
Post by: dobro on July 14, 2013, 08:26:55 AM
Quote
If you mean thanm stumbling over the double quotes in spellcard names, then no ? it still does
This is the problem with thecl, not thanm.
Yeah, this. I somehow managed to misread the question. Edited my answer for clarity.

Anyway, have an update.

v0.8
Choosing a ecl or msg archive will cause the corresponding "File" field to be automatically generated.
Changed autogeneration of "Folder" and "Description" fields for thanm (added a folder with the same name as the .anm file).
Added "Help" menu item (F1) which displays a help file from \help folder according to the current language. The file is in html format and opens in a default browser. Thanks to sibgamer for for it.
Added option under "Settings" to not close the DOS window if an error has occured. This allows to view errors thrown by thtk (such as the game version not corresponding to archive version, syntax error for ecl, etc.).
Added option "Make backup" under "Settings" (enabled by default). Previously backup was always created before the main archive creation, now it can be disabled. Permission to overwrite the existing file will now only be asked if the option is disabled.

I would be ever grateful if someone took time to convert all this mess to proper English, both the program (strings in local.ini file) and the help (help_english.html file). I did the best I could but pretty sure I messed up some articles and maybe something else as well.
Title: Re: Touhou Toolkit GUI
Post by: The Noodles Guy on July 14, 2013, 08:57:32 AM
How do I make this work?

I already downloaded the Toolkit, the bin thing and the Src folder.
Title: Re: Touhou Toolkit GUI
Post by: saisengen on July 14, 2013, 09:25:03 AM
How do I make this work?
Obviously, run thtk_gui.exe.
Title: Re: Touhou Toolkit GUI
Post by: The Noodles Guy on July 14, 2013, 09:33:09 AM
Obviously, run thtk_gui.exe.
I know I have to run thtk_gui.exe, but when I try to extract archives/whatever it says that thdat.exe cannot be found.
Title: Re: Touhou Toolkit GUI
Post by: saisengen on July 14, 2013, 09:52:48 AM
I know I have to run thtk_gui.exe, but when I try to extract archives/whatever it says that thdat.exe cannot be found.
Set path to thtk in menu Settings - Path to Touhou Toolkit. (I suggested to the author of the program to display this text field before you first start the program.)
Title: Re: Touhou Toolkit GUI
Post by: The Noodles Guy on July 14, 2013, 10:36:10 AM
Set path to thtk in menu Settings - Path to Touhou Toolkit. (I suggested to the author of the program to display this text field before you first start the program.)
It worked, thanks!

Edit: How do I open th(something).exe files? Like thmsg.exe
Title: Re: Touhou Toolkit GUI
Post by: saisengen on July 14, 2013, 11:42:06 AM
How do I open th(something).exe files? Like thmsg.exe
GUI will launch these programs when you press one of the buttons in the appropriate box.
Title: Re: Touhou Toolkit GUI
Post by: メイフィールド on July 14, 2013, 03:46:51 PM
If I click on anything but "Create archive from folder" it does say  "File does not exist"
When i click on "Create archive from folder" it does say that a list/description file not And on THECL and THMSG it does say , the folder (Which i have chosen a few seconds ago) does not exist

I'm not really good in such things , sorry    :derp:     
Title: Re: Touhou Toolkit GUI
Post by: dobro on July 15, 2013, 02:30:23 PM
Well, this is not a kind of program you just run, click on everything and see what happens. You need to know what you are doing. otherwise you may end up breaking something in the game. I've included the help file for a reason, try reading it first. If some parts are unclear, post them here, I'll try to clarify.
Title: Re: Touhou Toolkit GUI
Post by: メイフィールド on July 16, 2013, 02:13:24 AM
Well , I'm not that new to this , but i know , the program is not supposed to that that T-T


click on everything and see what happens.


No matter what I'm doing , an error message  pop up  :getdown:
Title: Re: Touhou Toolkit GUI
Post by: dobro on July 27, 2013, 09:47:34 AM
Version 1.0 is here.

Fixed a ton of bugs, added some minor tweaks for convenience. Also, GitHub.

Links are in the first post.
Title: Re: Touhou Toolkit GUI
Post by: Sparen on October 10, 2013, 10:45:15 PM
I hope that you can respond to this, but...


Oh god I got a massive pile of error messages with the GUI. Firstly, trying to search for a filepath requires Vista or later. Secondly, it couldn't find thanm.exe, etc. (because they weren't in the folder). They also defaulted to EoSD and the first prompt was extremely confusing. I downloaded 1.0, and I'm using this because my thanm (command line) can't hook onto libpng for some reason.

Tested using Wine 1.7.3 built from source and libpng 1.5.17
Also, Mac OSX Lion
Title: Re: Touhou Toolkit GUI
Post by: Dark Kitsune on November 07, 2013, 10:12:51 PM
I'm getting really a strange problem.
It doesn't seem to be able to create PCB archives. Pressing the button only backs up th07e.dat, but never brings up thdat.exe.
As far as I know, it works for all the other versions, just not PCB.
Title: Re: Touhou Toolkit GUI
Post by: saisengen on November 08, 2013, 07:36:18 PM
Strange problem. Maybe th07e.dat has attribute "read only", check the file properties. You tried to run GUI in administrator mode? For me everything works fine (Win7/64bit), http://i.imgur.com/Dnx2Xuy.png.

You also can try the old GUI versions, for example http://dobrochan.com/to/res/36997.xhtml#i37099, but they have a lot of bugs, some of which may corrupt dat-files.
Title: Re: Touhou Toolkit GUI
Post by: Dark Kitsune on November 09, 2013, 08:22:44 AM
Strange problem. Maybe th07e.dat has attribute "read only", check the file properties. You tried to run GUI in administrator mode? For me everything works fine (Win7/64bit), http://i.imgur.com/Dnx2Xuy.png.

You also can try the old GUI versions, for example http://dobrochan.com/to/res/36997.xhtml#i37099, but they have a lot of bugs, some of which may corrupt dat-files.
Read-only? It's not accessing the original file, it's supposed to be creating a new one.
Anyway, I've already tried all these ideas and it still won't pack the th7e.dat.

But I ended up writing my own command-line application to handle the repacking until this problem gets sorted out somehow.
Title: Re: Touhou Toolkit GUI
Post by: Lanaryu on March 30, 2014, 01:19:42 AM
As much as I don't want to necro this old thing, I'm wondering if anyone's ever solved that problem of a .dat file not showing up.
Whenever I would try to repack the .dat file, it'd only turn the existing file into a backup, and the new archive isn't created; sort of what Ran's been running into, except I've been trying to modify IN archives.

I've managed to do this with EoSD before, but I'm only assuming that it worked because the .dat was split into six files.
It seems to be doing the same thing with the rest of the games though.

Sorry if it was preferred to make a new thread rather than bringing this back up. It just seemed viable since the issue was already brought up here.

Title: Re: Touhou Toolkit GUI
Post by: saisengen on February 23, 2015, 02:03:09 PM
Updated to version 1.1. Download: https://mega.co.nz/#F!eNVWQJhJ!V2KmcjYK9hEhjwgTKz0F_w

Added compatibility with http://en.touhouwiki.net/wiki/Game_Tools_and_Modifications#Touhou_Toolkit_Extra which in turn provides compatibility with Touhou 14 and 14.3. Encoding of INI files changed to UTF, so INI files from older versions are no longer compatible, though you may convert them to UTF manually via some kind of text editor like.
Title: Re: Touhou Toolkit GUI
Post by: ronglun227 on March 06, 2015, 03:47:46 PM
Thanks for the great toolkit dobro !  :)
but... I just have one question to ask, how can I put everything into one .dat file and play what I have done?
Thank you again :D
Title: Re: Touhou Toolkit GUI
Post by: saisengen on March 06, 2015, 06:20:59 PM
Click button "Create archive from folder".

Also, the program has help file.
Title: Re: Touhou Toolkit GUI
Post by: HaxorViper on August 20, 2015, 02:33:16 AM
I also don't want to revive this dead thread but I actually registered on this forum for the purpose of getting help for the Touhou Toolkit. I ported the enemy portraits from Hisoutensoku to EoSD and it has been working fine until I wanted to port the player portraits (Reimu and Marisa) I ported them but an error appears before I play that tells me something about the player01.anm file, I couldn't actually read it except stuff about directaudio as the text was junk. I don't know how to modify anm files, I thought I had to change the descriptions of the face01*.anm files (Marisa's portraits) to fit the resolution of the new portrait and I did. But I don't know how this has anything to do with Marisa's sprite sheet (which I also tried to get a description of).
Can anybody help me with .anm manipulation?