Welcome to the Shining Force Central Forums!
SFC Forums Index Shining Forums Shining Force II
Register for your free forum account now or Login to remove this advert.

[GitHub] ShiningForceCentral/SF2TextManager

A simple Java GUI with text import/export functions

Discussion about this classic Genesis/Mega Drive game.

[GitHub] ShiningForceCentral/SF2TextManager

Postby Wiz » Mon Sep 12 2016 7:56pm

Hi guys,

Here's a tool that I'd like to share, SF2TextManager.

This is a small Java GUI with only import/export functions for the game's compressed text.
It also acts as a Java API for future use in other disassembly-oriented tools.

Image

Latest release available here :
https://github.com/ShiningForceCentral/SF2TextManager/releases/latest

And more importantly, sourcecode available here under the SFC GitHub organization :
https://github.com/ShiningForceCentral/SF2TextManager
Contributions are welcome !

Technical notes :
- This tool is able to re-generate Huffman trees, so any two-character combination is now possible.
It unlocks the use of characters previously unavailable, like the {COLOR;#} special character !
(any color from the base palette is available, even the transparent one :excited: )
WARNING: SPOILER!


Available characters :
WARNING: SPOILER!


Special thanks to :
- romhacking.net user 'g8z et al' for his trace analysis : http://www.romhacking.net/documents/267/
- BigNailCow who had already done most of the work with the Caravan editor
Last edited by Wiz on Wed Sep 14 2016 7:55pm, edited 2 times in total.
Wiz

User avatar
Member
Member
 
Posts: 73
Joined: Sun Mar 18 2007 2:43pm

Re: [GitHub] ShiningForceCentral/SF2TextManager

Postby RedShine » Mon Sep 12 2016 8:10pm

That's pretty neat. I wonder if it would be possible to integrate other functions down the road, like font editing in an easier way than Caravan offers currently. I never did like the italic font for SF when it comes to readability. Call me picky, but yeah.
RedShine

User avatar
Shining Member
Shining Member
 
Posts: 160
Joined: Sat Apr 05 2014 6:22am

Re: [GitHub] ShiningForceCentral/SF2TextManager

Postby ronnen » Mon Sep 12 2016 8:58pm

Nice Wiz :)
ronnen

Shining Member
Shining Member
 
Posts: 162
Joined: Fri Jan 20 2012 9:01pm

Re: [GitHub] ShiningForceCentral/SF2TextManager

Postby Stordarth » Tue Sep 13 2016 3:16am

Freakin' well done, man! This is fantastic! The only thing I'd consider adding would be a search function. Occasionally you want to edit a line, and remember certain phrases used in the line (such as evil spilit, for instance), but scrolling through several hundred lines of code is tedious. I have all the lines in a text file to allow me to search, but an inbuilt search for this would make this much more cohesive and useful.
Stordarth

User avatar
The L-Block Anomaly
Administrator
 
Posts: 15484
Joined: Thu Sep 16 2004 3:30pm
Location: The Midlands, Staffordshire, England

Re: [GitHub] ShiningForceCentral/SF2TextManager

Postby Wiz » Tue Sep 13 2016 7:37pm

Thanks guys, glad you like it ! :)

I prefer to make lots of simple tiny tools instead of creating a unmaintainable monster.

So this one will not include a font editor, but that could well be the next tiny tool I'll make, because it seems to be quite simple to do actually ...
Once again though, I'll do my best to avoid to loose time by re-inventing the wheel, so this might just become a "Font Manager", with import/export functions to/from a 2BPP PNG format, something like that. I just need to know if I can store the character's width as some kind of metadata somewhere in the PNG format. :shifty: We'll see !

Stordarth, while this is not an editor and you can't edit lines inside the program (I prefer to delegate that to existing text editors with the TXT format), I was still curious to try a "filter" feature ... and it's great fun to use !
So thanks for the idea, and here's the new 1.1.0 release (updated first post) :
https://github.com/ShiningForceCentral/SF2TextManager/releases/tag/1.1.0

Evil Spilit indeed !
Image
Wiz

User avatar
Member
Member
 
Posts: 73
Joined: Sun Mar 18 2007 2:43pm

Re: [GitHub] ShiningForceCentral/SF2TextManager

Postby Stordarth » Wed Sep 14 2016 3:42am

Brilliant! The fact that you can see multiple lines at once will make searching for specific words or phrases far easier than searching in notepad. A real shame that this can't edit the text directly though. If it could do that whilst also regenerating the huffman trees it would even surpass the textbank editor in the caravan, and that's saying something.
Stordarth

User avatar
The L-Block Anomaly
Administrator
 
Posts: 15484
Joined: Thu Sep 16 2004 3:30pm
Location: The Midlands, Staffordshire, England

Re: [GitHub] ShiningForceCentral/SF2TextManager

Postby Sir Astral » Wed Sep 14 2016 6:20am

This is great work, and opens up a lot of possibilities. I'll personally find it very useful for an ambitious project. :thumbsup:
Sir Astral

User avatar
The White Wizard
Shining Member
 
Posts: 342
Joined: Thu Sep 16 2004 7:52pm
Location: Ohio

Re: [GitHub] ShiningForceCentral/SF2TextManager

Postby Wiz » Wed Sep 14 2016 8:04pm

I thought an external editor would be much more convenient, but oh well :) ...

WARNING: SPOILER!


Release 1.2.0 :
https://github.com/ShiningForceCentral/SF2TextManager/releases/tag/1.2.0

Actually, this is also quite fun to use !
Really efficient process, no need to switch between this and the text editor anymore, silly results appear in emulator quicker than ever ! :excited:

Please be aware I don't want to re-implement a text editor in here though, so I hope this will be enough, ergonomically speaking ! ;)
Wiz

User avatar
Member
Member
 
Posts: 73
Joined: Sun Mar 18 2007 2:43pm

Re: [GitHub] ShiningForceCentral/SF2TextManager

Postby RedShine » Wed Sep 14 2016 8:09pm

Wow, awesome progress Wiz! your efforts with the disassembly are really paving the way for an eventual retranslation of SF2, much closer to the source material, not to mention games with entirely new stories, if you are able to get deep enough into the heart of the game to be able to edit events.
RedShine

User avatar
Shining Member
Shining Member
 
Posts: 160
Joined: Sat Apr 05 2014 6:22am

Re: [GitHub] ShiningForceCentral/SF2TextManager

Postby Stordarth » Wed Sep 14 2016 10:42pm

Awesome. I can see very little that would improve this, except perhaps a glossary or buttons of some of the coded functions, like the formatting buttons used for making posts here. It'd be so awesome to have buttons that you hover over, have a tooltip explaining them, and then press to insert it into the text at the cursor. I always forget which codes exist, so having them all to hand would be fantabulous.

Still, I don't want to keep adding more work for you to do. This is a fine achievement as it is. :thumbsup: :thumbsup:
Stordarth

User avatar
The L-Block Anomaly
Administrator
 
Posts: 15484
Joined: Thu Sep 16 2004 3:30pm
Location: The Midlands, Staffordshire, England

Re: [GitHub] ShiningForceCentral/SF2TextManager

Postby Assassins » Thu Sep 15 2016 5:31pm

Wiz living up to the name
The failblood.

On the battlefield, when everything is chaos/ you have nothing but the way you feel, your strategy and a sword/ just think of the life you'll have together after the war
The failblood.

On the battlefield, when everything is chaos/ you have nothing but the way you feel, your strategy and a sword/ just think of the life you'll have together after the war
Assassins

User avatar
Mentat
Shining Legend
 
Posts: 5847
Joined: Thu Sep 16 2004 8:08pm
Location: Medina OH

Re: [GitHub] ShiningForceCentral/SF2TextManager

Postby Wiz » Thu Sep 15 2016 11:23pm

:excited: So many kind words, thank you so much guys, it really motivates me ! :)

Yes RedShine, in my mind this is only the beginning and the true target is to create whole new adventures to enjoy.
But with this first tool, indeed a re-translation seems already quite feasible right now, which is nice !

Thank you for your feedback Stordarth, and yeah, now that the tool works well, you already guessed that I prefer to focus on more essential stuff for the moment, instead of polishing a GUI.

I'll take this example as an opportunity to express what I feel about things like that more generally.
I don't want to seem elitist or condescending with what I'm going to say, but in a few (shocking) words ... I don't want make my tools user friendly. I just want to make them developer-friendly ! :damnit:
I feel like making a user-friendly tool sometimes needs more work than the tool's essential features themselves (in terms of GUI conception, documentation, and user support ...), and as long as we've not reached our primary, technical goals, I don't want to spread myself on too much user-comfort considerations.
But ... I'm not sharing my work on the SFC GitHub account for nothing. :shifty: Anybody is free to contribute and polish stuff here and there ! :)

So I'm counting on you guys to understand that you will mostly see me provide rough Proof-of-Concept GUIs, and pass to the next thing I think is most essential to go on. Or sometimes simply the most fun/rewarding/relaxing to work on. :shifty:
Wiz

User avatar
Member
Member
 
Posts: 73
Joined: Sun Mar 18 2007 2:43pm

Re: [GitHub] ShiningForceCentral/SF2TextManager

Postby RedShine » Sat Sep 24 2016 12:08am

Oh that's definitely understandable!
I'm not a developer by any stretch, but I completely agree that ease of development, clean code and modular, extensible functionality should come before any GUI considerations.

When you feel everything is sufficiently solidified and documented, then prettying it up for the general public becomes a consideration. Be as it may, you on the SF2 front and [b]Rubixcuber/b] on the SF1 front are attaining amazing progress.
RedShine

User avatar
Shining Member
Shining Member
 
Posts: 160
Joined: Sat Apr 05 2014 6:22am

Re: [GitHub] ShiningForceCentral/SF2TextManager

Postby Earl » Mon Oct 03 2016 12:25am

One thing that would be absolutely fantastic - the ability to add additional lines.

I know from dicking around that the game can handle more than the original alottment of lines... but it wasn't convenient to add text banks and fill them with dialogues (I did it through copy/pasting in a hex editor, which got cumbersome).
Earl

User avatar
Shining Legend
Shining Legend
 
Posts: 2881
Joined: Sat Apr 24 2004 6:39am

Re: [GitHub] ShiningForceCentral/SF2TextManager

Postby Wiz » Mon Oct 03 2016 12:45am

Well, I've designed this tool with that kind of thing in mind, so I'm pretty sure that's already feasible if you use the TXT file.
Just add new lines at the end !
Ideally you should follow the hex index values with 4 digits, but actually I believe that you can just put the equal character with no index before, then import it in SF2TextManager, and then export it back into TXT file, and the tool itself will write proper indexes just by following order of appearance of text lines.
Of course, when exporting to ROM files you will encounter big problems if you get a bigger last textbank. (EDIT : err actually not so much, as only the ending credits would get overwritten :shifty: )
But when exporting to disassembly files, the tool should be able to produce any size of textbank, even for the last one, and even better, it must be already able to produce any number of new textbanks.
At least up to 100, considering current file naming convention. ;)
Since I've not taken the time to test all of this myself, this is purely theoretical at the moment, but I really believe it already allows new lines so please, give it a try ! :)
Last edited by Wiz on Mon Oct 03 2016 4:23pm, edited 2 times in total.
Wiz

User avatar
Member
Member
 
Posts: 73
Joined: Sun Mar 18 2007 2:43pm

Re: [GitHub] ShiningForceCentral/SF2TextManager

Postby Earl » Mon Oct 03 2016 3:04am

I don't know when I'll have the time, but still, <3 <3 <3
Earl

User avatar
Shining Legend
Shining Legend
 
Posts: 2881
Joined: Sat Apr 24 2004 6:39am

Re: [GitHub] ShiningForceCentral/SF2TextManager

Postby SirHedge » Sun Feb 12 2017 11:32pm

I'm sorry for the necro, but I just came across this, and had to share my thanks. Maybe some others who missed this the first time will see it now too.
SirHedge

User avatar
Shining Hero
Shining Hero
 
Posts: 820
Joined: Sat Mar 15 2008 4:10am

Re: [GitHub] ShiningForceCentral/SF2TextManager

Postby greyskies » Mon Feb 13 2017 9:07am

Woah, I totally did. Gotta take this for a drive sometime soon. That said, this should really be on the front page of the hack library thread. Great work, Wiz!
.
Check out Return to Grans - A Shining Force II hack which features a completely
reworked story, numerous visual improvements, and tons of balance changes.

Also available as storymode hack only.
.
Check out Return to Grans - A Shining Force II hack which features a completely
reworked story, numerous visual improvements, and tons of balance changes.

Also available as storymode hack only.
greyskies

User avatar
Shining Member
Shining Member
 
Posts: 343
Joined: Wed Feb 02 2011 11:55am
Location: Seebenstein, Austria

Re: [GitHub] ShiningForceCentral/SF2TextManager

Postby MXC » Mon Feb 13 2017 1:39pm

I'll send Drakonis a PM to update the library in general.
MXC

User avatar
1090
Shining Legend
 
Posts: 24729
Joined: Fri Sep 17 2004 1:48am
Location: Cincinnati, Ohio

Re: [GitHub] ShiningForceCentral/SF2TextManager

Postby Wiz » Mon Feb 13 2017 1:55pm

Just created a new thread actually !
Thanks for the kind words guys, I'm back into this since a few days ago and I hope to make good progress in the next few weeks ! :)
Wiz

User avatar
Member
Member
 
Posts: 73
Joined: Sun Mar 18 2007 2:43pm


Return to Shining Force II

Who is online

Users viewing this topic: No registered users and 1 guest