Qhimm.com Forums

Final Fantasy 7 => FF7 Tools => Topic started by: sithlord48 on 2012-03-23 14:37:35

Title: [FF7] Programing Toolkit - ff7tk
Post by: sithlord48 on 2012-03-23 14:37:35
complete list (http://sithlord48.github.io/ff7tk/annotated.html))

Currently there are only a few objects that deal mostly with stuff needed for black chocobo (as it is now build using FF7tk). but all the text data returned will be translated for you already (working on how to getting the translations used per class instead of per application , but the strings are done already)





static_data classes included
Utilities Include:
Widgets (gui objects) Included:


Where is this going???
as i said currently most of the items are focused on save game stuff. but eventually we are planing to include EVERYTHING needed to provide a High Level toolkit for easy creation of cross platform tool for working with and modifing ff7

Where can i get it?

You can Get it Here (https://github.com/sithlord48/ff7tk)
Documentation is here (http://sithlord48.github.io/ff7tk/)

The toolkit includes a small demo program so you can view the widgets. you only need qt (http://qt-project.org/downloads) to build the included demo program.

Good Idea How can i help?
help us code , provide info on formats, give us your exsisting code so we can port to Qt, etc. these are all ways you (the person already making an ff7 specific app) can help.i would love to see all of qhimm embrace this and have us not duplicate work on these tools ever again.[/list][/list]
Title: Re: [RELEASE] FF7tk
Post by: Vegeta_Ss4 on 2012-03-23 15:06:48
I think this will write a very important page in the ff7 devel. I'm glad to be part of this so promising project, and you will have me coding side by side as always.

I encourage all the community to help and form part of this project. One of the more promising goal is to been able to dev universal global toolkit that embrace all the scenarios.

Welcome FF7tk Toolkit!
Title: Re: [RELEASE] FF7tk
Post by: obesebear on 2012-03-23 16:07:54
I like it and thoroughly encourage this.
Title: Re: [RELEASE] FF7tk
Post by: Dark_Ansem on 2012-03-26 16:54:00
I like this and I hope that, for the model editing, you join up with Borde, the author of kimera, in order to improve on the features of that mod :D
maybe this can join as well with the new versions of WallMarket and Proud cloud the author is working on?
Title: Re: [RELEASE] FF7tk
Post by: sithlord48 on 2012-03-26 17:22:42
i would love it if those people who know about certain parts can work with us to create a toolkit we can all use.
Title: Re: [RELEASE] FF7tk
Post by: Dark_Ansem on 2012-03-26 17:24:05
AFAIK they're both very busy, but one can try....
Title: Re: [RELEASE] FF7tk
Post by: sithlord48 on 2012-07-03 18:32:27
THIS POST NEEDS LINKS FIXED!

While Work on this project has been slowed down a bit there is still progress being made. For some objects we are waiting for Qt 5.0 to come out so that we can use some of the newer features. For older objects there will only need to have small update to build with Qt 5.0. ( this is basicly Done already and it all works under Qt5 currently)

Some FF7Tk Related News:
  Updated: CharEditor, mostly completed.needs the layout optimized before i am ready to use it in black chocobo.(its to large)
  Updated: All Static Data Classes Have Been updated.
  New: ChocoboEditor Widget to Edit your Chocobo Stable.

Some Data on the Objects of Use: (start of Documentation)

SEE GITHUB WIKI (https://github.com/sithlord48/ff7tk/wiki) FOR  DOCS (still being created)

Please Note: Requirements for items only count the files from the Tk that need inclusion in your project. All objects require Assorted Items from the Qt Toolkit.

FF7Text  (https://github.com/sithlord48/ff7tk/wiki/FF7Text)- Convert Text To/ From FF7 Format

FF7Save (http://sourceforge.net/p/blackchocobo/code/HEAD/tree/FF7tk/static_data/FF7Save.h) - The Core Object for Working with FF7 Save Games.

Requirements for use:
FF7Save_Const.h  - All consts placed here
FF7Save_Types.h  - All Custom Types for this class here.
FF7Text.h  - Text Conversion Object

Loading and Saving Functions

bool  loadFile(const QString &fileName)
bool saveFile(const QString &fileName)
Load or Save fileName (type is auto detected)

bool exportPC(const QString &fileName)
bool exportVMC(const QString &fileName)
bool exportDEX(const QString &fileName)
bool exportVGS(const QString &fileName)
Export data as that type to fileName , all 15 slots

bool exportPSX(int s,const QString &fileName)
Exports Slot s to raw PSX format file name fileName.  (even if more then one data block)

bool exportCharacter(int s,int char_num,QString fileName)
Exports Character from slot s in character slot char_num to fileName

bool importCharacter(int s,int char_num,QByteArray new_char)
Imports new_char (raw 132 byte array) to slot s in character slot char_num.

All Above Functions Return 0 if Fails to load/save fileName

void importPSX(int s,const QString &fileName)
void importPSV(int s,const QString &fileName)

Imports data from fileName to slot s

void clearSlot(int s)
clears data in slot s (fills with 0's)
void copySlot(int s)
saves slot s into a buffer

void pasteSlot(int s)
pastes save stored in buffer to slot s

void newGame(int s,QString fileName="")
Puts default Save in slot s  if no fileName is provided.
if a fileName is provided it MUST BE PSX Format data.

void newGamePlus(int s,QString CharFileName,QString fileName="")
Creates a new Game + in slot s. exports cait/ vincent to CharFileName.
if no fileName is provided will use default save to make the new game +
if a fileName is provided it will be used to create the new game + it MUST BE PSX Format.

File Info Functions (the headers code says it all)

int lenFile(void);//Return File length.
int lenFileHeader(void);//Return File Header length
int lenFileFooter(void);//Return File Footer length
int lenCoreSave(void);//Return Slot length (data portion)
int lenSlotHeader(void);//Return slot header length
int lenSlotFooter(void);//Return slot footer length
int lenSlot(void);//Return Slot length
int numberOfSlots(void);//Return number of slots in the file_footer_dex
QString type(void);// Returns the file type loaded.
bool isFF7(int s);//valid ff7 slot?
bool isPAL(int s);//PAL SLOT?
bool isNTSC(int s);//NTSC SLOT??
bool isJPN(int s);//is a Japanese File
QString region(int s);// region string of slot s
//Set Needed Info Stuffs
void setType(QString);//allows for slot change.
void setRegion(int s ,QString region);
QByteArray slot_header(int s); //return slot header.
quint8 psxBlockType(int s);//mask of psx slot (used by index)
quint8 psxBlockNext(int s);// if using more then one block return location of next block
quint8 psxBlockSize(int s);//how many blocks save uses.
void fix_pc_bytemask(int s);// update so last slot is shown selected on load (must be public to set to currently viewed slot).

FF7Char (https://github.com/sithlord48/ff7tk/wiki/FF7Char) - Info About Characters.
FF7Item (https://github.com/sithlord48/ff7tk/wiki/FF7Char) - Info About FF7 Items
Title: .
Post by: Jenova's Witness on 2012-07-03 18:48:06
.
Title: Re: [RELEASE] FF7tk
Post by: sithlord48 on 2012-07-03 19:27:29
Thank you for doing this, and doing it right.

Request:
*Instructions on adding your PPA to my sources

*Instructions for linux newbs on what to git clone, and a list of sudo apt-get commands to get all the required dependencies.

add my ppa in (*)buntu thread about there here:
http://forums.qhimm.com/index.php?topic=11928.msg165409#msg165409

instructions.. well i don't use git. and  to build the FF7tk you neeed the source (link in first post above) and extract it
then for programs you can install them easily with the following command
Code: (run in terminal) [Select]
sudo apt-get install build-essential qtcreator

after you install you just have to open the .pro file in Qt Creator and build the Program.

Also, I noticed you're using qt.  Are you sure that's a good idea for something as simple as a game editing program (though editing FF7 isn't exactly simple).
  Do you think it may be a better idea to use something smaller, like, say, Phoenix (http://byuu.org/phoenix/), or GTK?
No i think Qt is perfect for this project. it has more os support then either of those toolkits mentioned.None of those toolkits run on phones,linux, windows, mac os Qt does. above i said something about not having to dupilcate work if you have to recode to make it work on an os or a device your redoing work. also unlike GTK, QT looks good on more then just Gnome.
Title: .
Post by: Jenova's Witness on 2012-07-03 20:17:07
.
Title: Re: [RELEASE] FF7tk
Post by: sithlord48 on 2012-07-03 20:26:11
i've been coding w/ Qt for quite some time, in my code i rarely run into a problem with Qt itself , also that is over 2 years old. and most of it only either applies to windows or items i don't use or wouldn't need to use.
Title: Re: [RELEASE] FF7tk
Post by: luksy on 2012-07-04 02:54:32
I've started rewriting the file twiddling code I used for touphScript, here's what I have so far

https://dl.dropbox.com/u/3227870/libs.7z

I haven't finished most of it yet, dunno if any of it is useful to you but just in case.

One suggestion: as I'm sure you know, the ingame text has subtle differences depending on where it's used - the meaning of the opcodes can change (e.g. 0xEA in scene.bin), unavailable ops (e.g. tab in world map) - so FF7Text will probably need to provide other functions (or be subclassed).

Although I support it all in touphScript if you want to have a look, the code is pretty awful (hence the rewrite).

I'm happy to help out either way.
Title: Re: [RELEASE] FF7tk
Post by: Borde on 2012-07-04 20:36:18
Nice idea sithlord48. Had this been done earlier, I'm sure we would have avoided some headaches. I don't feel like rewritting my code anymore, though. I've got some ported to C though. I can post it if you're interested.
Title: Re: [RELEASE] FF7tk
Post by: sithlord48 on 2012-07-05 20:05:09
@luksy , i currently only know about text in the save format , but FF7Text can easily be subclassed or modified to have different versions. , thank you for the 7z stuff i will work in porting as soon as i get a chance.

@ Borde, i should have done this much eariler. but it started out as a rewrite of BC and then i realized that we could use a proper kit so i figured its best to start with what i knew about.  i will take what ever code you wish to provide(in c or not), credit will be given of course, and when im done what ever i end up with will be gpled