Qhimm.com Forums

Miscellaneous Forums => Scripting and Reverse Engineering => Topic started by: naji on 2005-06-26 00:04:12

Title: Making an Open Source FF7 Engine
Post by: naji on 2005-06-26 00:04:12
I thought it might be a good idea if a group of FF7 hackers/programmers started their own Open Source Final Fantasy VII Engine which uses the original data of the original engine but is better than the original engine with lots of new features like you can specify more resolutions, and have better more detailed models like PS2 graphics, and possibley extend the game making it longer etc. I'm a programmer myself but I don't know much about hacking/editing the FF7 engine and data files, I still have some learning to do ;) I think this engine might be able to be made in a few years with a team of 10 good FF7 hackers/programmers :D
Title: Making an Open Source FF7 Engine
Post by: Aaron on 2005-06-26 00:26:32
There's been on-again off-again talk of a project like this around here for many years.  However, such a thing would take a long time to put together, and most of us are pretty busy.
Title: :(
Post by: naji on 2005-06-26 00:29:02
Oh well... I guess it's all up to me then, I have plenty of free time in my hands. :D

Expect it to be finished in around 10 years time, when no one cares about FF7 anymore :P
Title: Making an Open Source FF7 Engine
Post by: L. Spiro on 2005-06-26 05:13:34
It’s really not that hard.

I would estimate my own personal progress at 40% or so.

But, like me, you’re going to run into dead ends when you realize we haven’t hacked ALL of the formats (battle animations, camera motions sequences, attack script sequences [used to drop particles, squish planets, make things shiny, and perform the actual animations related to the attack]).

I am not focused on making the engine capable of playing through the game again; I am focused on making it online.
For this, it would normally have only taken 1 to 2 years alone, if i was able to just work without having to wait for certain file formats to be decoded.

If you want to make the engine single-player capable, it would take a while longer, but probably only up to 3 years.
And you still have to wait until we have fully decoded the field file backdrops (right now there are many errors in them).




Bandersnatch vs, Ruby WEAPON (1280×1024, 6× Anti-Aliasing) (http://www.memoryhacking.com/SS7O/Bandersnatch%20vs.%20Ruby%20Weapon.jpg)
Cloud vs. Safer•Sephiroth (1280×960, Anistropic Filtering) (http://www.memoryhacking.com/SS7O/Cloud%20vs.%20Safer-Sephiroth.png)
Items Menu (640×480) (http://www.memoryhacking.com/SS7O/Menu4%20-%20Items.png)
Sephiroth Stats (1024×768) (http://www.memoryhacking.com/SS7O/Sephiroth-Stats.png)
Tifa vs. Emerald WEAPON (1280×1024, Anistropic Filtering, 6× Anti-Aliasing) (http://www.memoryhacking.com/SS7O/Tifa%20vs.%20Emerald%20Weapon.png)
Tifa vs. Ruby WEAPON (1280×1024, 6× Anti-Aliasing) (http://www.memoryhacking.com/SS7O/Tifa%20vs.%20Ruby%20WEAPON.png)
Tifa vs. Ying/Yang (1280×1024, 6× Anti-Aliasing) (http://www.memoryhacking.com/SS7O/Tifa%20vs.%20Ying,%20Yang,%20Ying-Yang.png)


L. Spiro
Title: Making an Open Source FF7 Engine
Post by: naji on 2005-06-26 06:23:28
I think it'd take around 3 years for a new engine to be made as well, but with a team of programmers, around 10.

What are those pictures you posted? is that your engine?
Title: Making an Open Source FF7 Engine
Post by: bulk_4me on 2005-06-26 06:49:57
Quote from: naji
I think it'd take around 3 years for a new engine to be made as well, but with a team of programmers, around 10.

What are those pictures you posted? is that your engine?

I think it's pretty obvious those are game specific hacks.
Title: Making an Open Source FF7 Engine
Post by: L. Spiro on 2005-06-26 07:06:14
They are pictures of my engine, yes.

As shown, it runs in any resolution modern cards can handle (no restrictions) and can run with a variety of settings (anti-aliasing, anistropic filtering, etc.)

That part is not hard, anyway.  That is just standard DirectX® programming.

The “hard” (read “tedious”) parts are making it load the resources from the original files.

As shown, my engine loads all textures, models, animation files, scene files, etc., from their original source files.
None of those models have been edited in any way.


For the sake of all the changes I am adding to the gameplay (for online play), I am making the menus from scratch on my own.
I am using the image resources from the original game, yes, but I am putting the text in their correct locations manually, adding my own types of buttons (coded from scratch), the list boxes you see are my own custom controls, etc.
If you were to use the menu structures in the game, it may be faster.

My project is on hold for now because I am working on my hacking software, which I need to complete in order to better hack Final Fantasy® VII and decode the battle animation file format.

Once that is decoded, I will become giddy like a schoolgirl, and I will continue on my project.
When that file format is decoded, I will be able to finish a large part of my engine.


L. Spiro
Title: Making an Open Source FF7 Engine
Post by: Micky on 2005-06-26 08:58:41
I don't know, whenever I get the idea to work on an FF7 engine clone, shortly after that I feel it would be much better to spend the time on my own engine. :)
There was a FF7 field emulator mentioned here some time ago, does anyone know the back story behind that? Was it taken down because the original authors ran out of time or motivation, or did Square ask them to stop? With all the progress on the PC file format, and with some of the knowledge from the PSX version it would be a good place to start.
Title: Making an Open Source FF7 Engine
Post by: L. Spiro on 2005-06-26 11:40:26
Maybe you are referring to my project.
I have mentioned it here before, but I try to keep it low for exactly the reasons you mentioned.

I have no intentions of getting Square Enix’s attention with it until it is 100% done.

If it is indeed my project on your mind, you can rest assured I have not lost my motivation.
I have just stopped for now so I can develop tools that help me hack the game, specifically battle animation formats.


Making your own engine is easier than a full clone engine.
My engine is something of a hybrid.  it is all entirely mine, but it is built to load only the resource files from the game.
In that respect, it is like a clone.
But it is built from scratch and I have modified some things to be able to give myself more control on the outcome of the project, in which respect it is not a clone.

As I said before, the menus look the same as in the game, but that is simply because I have put the same text in the same positions as they are in the game (and the same colors for the background, and I am using the game’s resources for the outlines and fonts).
I am not actually loading the menu structures from any resources or any files; my engine is coded to construct the menus internally.
This gives me full control over how the menus look, so if I need to add new buttons (“Connect” for example) to conform to online play, it is very easy to do.


Well I work nonstop on my hacking software and I am getting it to a point where it can really help in decoding anything in Final Fantasy® VII (all formats).
It just takes time, but my motivation is unrelenting.


L. Spiro
Title: Making an Open Source FF7 Engine
Post by: mirex on 2005-06-26 14:09:58
L. Spiro: nice work :)
Title: cool
Post by: naji on 2005-06-26 19:35:27
That sounds like a very good idea L. Spiro, I always wanted to play FF7 online :D Like have a battle with my friends and see who is more powerful.

Is there a place I can download what you have done of your engine so far? like a beta release?
Title: Making an Open Source FF7 Engine
Post by: L. Spiro on 2005-06-26 20:03:31
No.
There is no site and I don’t mention it except rarely.
I keep it low to avoid getting shut down.
Besides, it isn’t in a state of user friendliness.
If I gave you what I have right now, you would only be able to run in one resolution (whichever resolution I set when I compile it) and you would need to have Final Fantasy® VII installed to its default location.

I have sent it to a few people before but only when I have time on my hands.
The reason I need time on my hands is because their graphics card may have problems which require that I change a setting and recompile/resend.
Luckily one person had an old outdated card and in fact it helped solve tons of compatibility issues, but there could be more.

I am definitely not comfortable with putting it up on a site for all to download.

As for battling your friends, well you and your friends will just have to start a new game from scratch when it is up and running.
I will not allow any importing of existing save files simply because it is so easy to use the tools found via this very forum to edit your save files.
So, everyone starts from scratch.  Your real save file will be stored on the server so you can’t change it, and a backup will be on your hard drive simply to give your client something to show you when it is offline or connecting.


L. Spiro
Title: Making an Open Source FF7 Engine
Post by: Micky on 2005-06-27 18:27:14
Quote from: L. Spiro
Maybe you are referring to my project.

No, I know you're in stealth mode (for obvious reasons).

I just tried to find it again, but unsuccessful so far. It came up in the discussion about the field script tokens.
Title: Making an Open Source FF7 Engine
Post by: bulk_4me on 2005-06-27 21:12:51
Quote from: L. Spiro
As for battling your friends, well you and your friends will just have to start a new game from scratch when it is up and running.
I will not allow any importing of existing save files simply because it is so easy to use the tools found via this very forum to edit your save files.
So, everyone starts from scratch.  Your real save file will be stored on the server so you can’t change it, and a backup will be on your hard drive simply to give your client something to show you when it is offline or connecting.

It's relatively easy to get around that kind of restriction. :roll: Because the way I see it, you can't control what happens between saves.
Title: Making an Open Source FF7 Engine
Post by: James Pond on 2005-06-27 22:35:42
Quote from: bulk_4me

It's relatively easy to get around that kind of restriction. :roll: Because the way I see it, you can't control what happens between saves.


I didn't know that there are tools for editing the game as you play it, now.

Besides, what bother cheating? What does it accomplish?
Title: Making an Open Source FF7 Engine
Post by: Alhexx on 2005-06-27 22:40:51
Did you never hear of "Trainers" ?
That are in-game-cheating-tools. However, most of them were written for Win9x, and they do not work under Win2K/XP.
AFAIK, it's even harder to create trainers for 2K/XP, since they have memory protection routines or something.

And BTW: As soon as the client synchronizes with the server very often, it shouldn't be that easy cheating... but, of course, nothing is impossible

 - Alhexx
Title: Making an Open Source FF7 Engine
Post by: L. Spiro on 2005-06-28 04:04:14
I am not trying to sound “big” but I would like to impress upon you the idea that when it comes to methods of cheating, I know up from down.

The following is for that purpose.

this (http://www.gamehacking.com/ipb/index.php) hacking/cheating forum.  I generally help the single-player hackers and tell the online hackers to screw off, or ignore them.  But although I help the hackers, my real purpose there is to gather knowledge regarding hacking methods so I can best combat these methods should I get into game security some day.[/list:u]

this (http://www.memoryhacking.com/index.php) memory hacking tool called Memory Hacking Software.  This very tool is what I use to hack all games, including Final Fantasy VII, and it is what is going to discover the unfinished file formats for me.  As shown in the gallery, it is actually capable of running entire cheats inside itself, and is in fact more powerful than trainers.[/list:u]



So, with this in mind…

Quote from: bulk_4me
It's relatively easy to get around that kind of restriction.  Because the way I see it, you can't control what happens between saves.

Well not entirely.  There are certainly things the player can change on his client, but the important things will always be stored on the server, and the client can not change those by any other means except playing the game fairly.
A guy at his home can change his Potion count to 99, but the server knows he only has 3.  When he tries to use all 99, the server allows him to use only 3, and updates his Potion count back to 0, and updates his HP level.
In other words, changing information in the client just makes the client lie to you about your information.




Quote from: James Pond
I didn't know that there are tools for editing the game as you play it, now.

I have actually written one of the very packages of software that does this.
Quote from: James Pond
Besides, what bother cheating? What does it accomplish?

It depends on the game.
There are games that give the client too much control (in order to conserve packets and network communications).  In some games, if you change your gold on your client, it will actually TELL the server how much gold you have.
But any good game will have the server in full control, and the client used only as a display mechanism for the user to know what the server wants.
There are even a few games that tell you to stop cheating if the server tests the client and finds that the client has the wrong amount of gold.
I will probably have a few hidden warning messages that only cheaters will be able to find.


Quote from: Alhexx
Did you never hear of "Trainers" ?
That are in-game-cheating-tools. However, most of them were written for Win9x, and they do not work under Win2K/XP.
AFAIK, it's even harder to create trainers for 2K/XP, since they have memory protection routines or something.

If you go to the forum I mentioned you will find a “Game Trainer Studio” section.
This is a trainer MAKER that those people put together.
It allows any newbie to make a trainer (sad really), and works on any platform.  I haven’t used it but my understanding is that you just use the interface to create the cheat, and then it compiles your trainer into a stand-alone .exe.

As for the memory protections on Windows 2000/XP, I would go as far as to say non-existent.
My own hacking software does the following:
Injects a DLL into the target for faster searching.  DLL injection is popular for cheating.
Reads/writes the RAM of the target process.
Uses a device driver to run under Windows and hide itself from the task list so it can not be detected (by any easy means at least).
Uses a device driver to run under Windows and read target RAM that is normally unreadable (ranges above 0x7FFFFFFF) and normally reserved only for Windows.
Disables debugging protections other software try to employ so it is able to debug all processes on your computer (well, almost).

If you look at the Gallery page on my site you will see a Doom 3 Cheat.
This is something like a trainer, only it is built as a DLL plug-in that Memory Hacking Software is able to run.  This cheat is able to do everything I showed in the pictures, but recently I have also added full auto-aim, with VERY high precision.
Now the problem is that, since the DLL runs inside Memory Hacking Software, it gets all the protections/access levels/debugging privileges/etc. that Memory Hacking Software gets.
Anyone can write a plug-in DLL for my software, and create a cheat that way, which can not be detected by normal means.



Quote from: Alhexx
And BTW: As soon as the client synchronizes with the server very often, it shouldn't be that easy cheating... but, of course, nothing is impossible

Yes.  The rule companies should be following is that the server tells the client what to do, not the other way around.
It’s true that the client needs to tell the server when I hit a button to walk, or attack, but that’s it.  Server verifies everything and keeps everyone in check.


L. Spiro
Title: Making an Open Source FF7 Engine
Post by: bulk_4me on 2005-06-28 04:34:04
A Hook on the Persistent Connection.. :roll: If there is no Persistent Connection, someone could easily go to a Save Point (if that's checked), edit the Items, Stats, etc. And request a Save, that way my Save File will be legit.

Edit.. Mod? It says Group: Members
Title: Making an Open Source FF7 Engine
Post by: L. Spiro on 2005-06-28 05:14:04
I assume you’re talking about packet editing.
It’s possible to edit the packets just as well as editing your own RAM, which I mentioned.

It still has no point.
If you edit your packets to the server, the server isn’t going to care one way or another.  If you edit a packet, for example, to send a command, “Use 99 Potions on Cloud”, the server is just going to say, “But, um, you only have 3 Potions.  Stop hacking,”  then kick you.

If you edit a packet to say, “Cloud’s Level is Now 99,” the server is just going to say, “Um, no, it’s not.  Stop hacking.”



On the other end, you could edit an incoming packet from the server.
If the server sends a packet to you after a battle saying, “Cloud gained a level!  His level is now 22!”, and you edit it to say, “Cloud gained 3 levels!  His level is now 24!”, all you’re doing is making the client lie to YOU.  The server stores level 22 before it sends the packet to you, and it knows what his level really should be.
After that, your client may print Cloud’s level as 24, but it is only lying to you.  Cloud will still hit for level-22 damage, etc.
Same applies to Gil.
You can edit a packet to show you any Gil amount you want, but when it comes time to buy something with that Gil, the server verifies everything.


However there are other types of hacks that can be made, but I am not THAT concerned about them.
The other hacks would involve simply lifting “hidden” information from the client.
For example, you should not know how much Gil another player has.
If your client has this information, however, you can RAM hack it out and then you can know how much Gil/HP/MP/etc. another player has.
For this reason, I will not send that information to your client.

I am still deciding exactly how much information I should send about monsters in battle, considering most people already know monster stats, but a hack could help them know when the monster will die in one hit, or such, which would be bad.
Also, during battle, we wouldn’t want players knowing how much HP another HUMAN has, causing them to gang rape the lowest-HP human foe.

For now, I am planning only to send information that the player is allowed to see and that the client needs to function.
Player positions and statuses will be sent.
Players will be able to see other player levels so they know not to fight that person.
The rest should be a mystery unless they are in your group or such.

It’s all in the works, but unless the hacker is able to hack remote computers, the game should be cheat-free.


L. Spiro




[EDIT]My reply above was for your post before you edited it.
As for your edit.
No, that won’t work.
When you save, the server doesn’t ask you what you have, it tells you what you have, and then your client keeps a backup of that.
Changing that file means nothing.
The ONLY way to modify the values on the server (the official values) is by fighting legitimate battles.
You can change your own save file, but again it’s just making your client lie to you.[/EDIT]
Title: Making an Open Source FF7 Engine
Post by: Alhexx on 2005-06-28 14:42:45
L. Spiro:
Quote from: Alhexx
That are in-game-cheating-tools. However, most of them were written for Win9x, and they do not work under Win2K/XP.


What I wanted to say is:
The time when I was using trainers, they were all made for Win9x OS. However, trainers compiled for use with Win9x do not work on Win2K/XP OS, since the memory offset is different and the trainer overwrites an invalid part of the memory...
But I'm not into trainers anymore - so you are the one who has knowlegde about this.
I primarily sit in front of my hex-editor browsing through the wide world of bits and bytes...  :D

 - Alhexx
Title: Making an Open Source FF7 Engine
Post by: bulk_4me on 2005-06-28 16:15:59
@Alhexx: No, a Trainer for Windows 98 may not work on NT 'cuz a faulty/lazy implementation by the developer.

@L. Spiro: Ok.. Seriosuly I am far from new to Online Game Hacking, that shouldn't suggest I consider myself as "uber l33t" or sumthin', but I find the whole concept way to vulnerable. Anyway keep the good work hopefully we will see online FF7 battles.. and a couple of "h4x" for it. :)
Title: Making an Open Source FF7 Engine
Post by: Cyberman on 2005-06-29 03:14:55
Quote from: bulk_4me
@Alhexx: No, a Trainer for Windows 98 may not work on NT 'cuz a faulty/lazy implementation by the developer.

@L. Spiro: Ok.. Seriosuly I am far from new to Online Game Hacking, that shouldn't suggest I consider myself as "uber l33t" or sumthin', but I find the whole concept way to vulnerable. Anyway keep the good work hopefully we will see online FF7 battles.. and a couple of "h4x" for it. :)

I think what Spiro was saying is that if the game is isoserver IE isolated to the server. The client is merely a something that performs the motions given by the server.  Thus the only information that's pertinent to the game is on the server.  Of course if the server looses the character it's gone.. forever :)

Cyb
Title: Making an Open Source FF7 Engine
Post by: Akari on 2005-06-29 06:28:59
Back to the FFVII engine. Why not to start making it like separate moduls and then compound it like it was when the original game was developed.

Right now I trying to get job of game programmer, so it will be great expierience to me.

L. Spiro, I can help you a little bit. Just tell what and where.
Title: Making an Open Source FF7 Engine
Post by: L. Spiro on 2005-06-29 07:29:51
I appreciate the offer but this is my project; as far as all coding is concerned, I just want to do it all.
I started this engine years ago and I didn’t have a great coding style back then.
Some things could be rewritten, modularized, optimized, etc., but it has to fall on me to do it.

I have the whole plan for the project in my head and it helps me to keep track of every tiny detail if I myself perform every tiny detail.

However, the greatest help you or anyone can be to me is to work out the battle animation file format.
I myself am giving it another go (or will be soon) and I can share what we have already uncovered about it.

I can even use the game RAM to get the final rotation values for each animation, so all you would have to do is look at the file and figure out how it went from the bits in the file to the float values in RAM.

I have actually taken the rotations from the RAM of the game and put them together to make my own raw rotation that my game could load.  It works.  My models will move correctly as long as I can translate the animations from their source files to the final float-value rotations.

Once animations are loaded I will make a demo which just runs through random animations on the battle field.

From there I can actually begin to create structured battle sequences and possibly get some client/server action going.




Another thing to do, if you don’t want to work on the battle animations, is finish the field file formats.
The images drawn in the fields are not finished.  Although mostly complete, there are obvious flaws in many of them.
Of course my engine will need to load them all correctly (and I will make sure there aren’t scanlines in my engine).



Quote
Of course if the server looses the character it's gone.. forever

*shrug* That’s just how it goes.  It’s the same for any game really.
I mean your save file can be edited on your end, so the server should NEVER ask your client for stat information.  Players will just have to trust the server to keep everything.  Of course that means a server owner who hates someone can delete his or her character too, just to be mean, but I suspect those servers won’t be too popular.


L. Spiro



P. S.: bulk_4me, there will be a few types of hacks that could be made for it.  My game uses your own resource files for everything.  If you modify those, they will show on your screen when you play (but no one else’s).
I plan to add alternative costumes and things of that nature.
You could unlock them on your own by changing your model files, but it’s really no big deal.  No one else will see your changes, and it doesn’t give you any advantage over someone else.
Title: Making an Open Source FF7 Engine
Post by: Alhexx on 2005-06-29 12:34:43
Quote from: L. Spiro
However, the greatest help you or anyone can be to me is to work out the battle animation file format.


I'm writing my exams in 4 weeks, so I don't have the time to take care of it now. But since now I'm reading a book about computer animation, I think I will give it a try after my exams.

 - Alhexx
Title: Making an Open Source FF7 Engine
Post by: mirex on 2005-06-29 13:18:19
Quote
However, the greatest help you or anyone can be to me is to work out the battle animation file format.
I myself am giving it another go (or will be soon) and I can share what we have already uncovered about it.
Hard thing to do man, I already tried long time ago, when Phareon's info came out. Its bit information .. i think it was 12 bits for a float ? And it does not work afterwards on next frame ... but it works on some next frames ... so i think either a) its somehow bit-aligned and i missed that b) those next frames are delta values, and some of the frames are not. c) maybe those are deltas or not, but some bones (which haven't moved) are left out from the frame data d) homm i had one idea but ... it just flew out of my mind.

I can give you information from Biturn, which can read at least some of the frames if you want.

Quote
Another thing to do, if you don’t want to work on the battle animations, is finish the field file formats.
The images drawn in the fields are not finished. Although mostly complete, there are obvious flaws in many of them.

What's missing on field file formats ? You mean field 3d models or something else ?
Title: Making an Open Source FF7 Engine
Post by: L. Spiro on 2005-06-29 16:52:36
Quote
i think it was 12 bits for a float ? And it does not work afterwards on next frame

Err, didn’t you remember it was I who provided more information about those files?
Remember, I redid the header structure, including number of frames in the information, and also the special byte that details how many bits per float.
0 = 12 bits, 2 = 10 bits, and 4 = 8 bits per float.

After that follows the position offset, then the rotations.
Then yes, there are some frames where the second animation from is decoded also.  I don’t know why yet because I haven’t studied any animation sets where this is actually the case.



Quote
c) maybe those are deltas or not, but some bones (which haven't moved) are left out from the frame data

I have confirmed that they are definitely deltas.  I have figured out the offset information for the second frame, which is delta information.  After that, I can change certain bits and cause his arm to move too much in a direction or something like this.  Everything points to offset data mixed with flags that determine which frames are left out and how many deltas there are.
I just can’t find the exact system.

I am hoping if bulk_4me gets the windowed patch up again I can use it to debug Final Fantasy VII and actually follow, step-by-step, the routine that decodes the battle animation file format.



Quote
What's missing on field file formats ? You mean field 3d models or something else ?

I am talking about the background files.  The 2-D animated backgrounds for every area where you can walk, aside from the main map.
To the best of my knowledge, LGP Tools has the most recent decoder for these files, but even with it you can see plenty of disfigured areas.

Then there is the walk mesh, which Micky (?) decoded, but I haven’t put any of that information to use yet.
I really need to back up that topic so it doesn’t get lost…


L. Spiro
Title: Making an Open Source FF7 Engine
Post by: Cyberman on 2005-06-29 17:00:00
Well
L. Spiro has a nice long diatrab on his working on the animation format (http://forums.qhimm.com/viewtopic.php?t=3576).
Anyhow it appears to be some sort of nifty bit packed scheme.
12 10 8 bit angles (initial) then shifting to dx dy dz and the change in angle for each bone.
unfortunately with bit pack schemes like that it's never obvious how they work.  If it were people would have had the animation format decoded by now :)

Probably what would be helpful is a set of decoded (IE results) values (preferably integers) to work from a singular animation.

Cyb
Title: Making an Open Source FF7 Engine
Post by: bulk_4me on 2005-06-29 19:24:56
Quote from: L. Spiro
I am hoping if bulk_4me gets the windowed patch up again I can use it to debug Final Fantasy VII and actually follow, step-by-step, the routine that decodes the battle animation file format.

I'll but I am rewriting the whole thing.. stupid Sony discs. :lol:
Title: Making an Open Source FF7 Engine
Post by: mirex on 2005-06-30 07:45:19
Quote from: L.Spiro
Err, didn’t you remember it was I who provided more information about those files?
Eh sorry, I forgot about that :) I was using the specs from Phareon. But now I remember something that you were saying something about this ... now when I see the thread I remember ... sorry
Quote from: L.SPiro
Then there is the walk mesh, which Micky (?) decoded, but I haven’t put any of that information to use yet.
iirc it was 'Kero' who posted the screenshots of walkmesh (http://forums.qhimm.com/viewtopic.php?t=3247&postdays=0&postorder=asc&start=0)
Title: A little kick-start.
Post by: L. Spiro on 2005-06-30 17:40:36
I have compiled some information regarding Cloud’s first 5 animations (in rtda).
I can compile more but I have to sleep.


NOTE: THE .RAR and .ZIP ARCHIVES CONTAIN THE SAME FILES.  YOU DO NOT NEED TO DOWNLOAD THEM BOTH.
Cloud.rar (http://l-spiro.0kuntz.ca/Cloud.rar)
Cloud.zip (http://l-spiro.0kuntz.ca/Cloud.zip)


What this is:
Cloud’s first 5 animations in 3 files each and in 4 versions.
Each animation has a .bin file.  This is the raw data extracted from rtda.
This is the animation as it appears inside the files.  Every animation BEGINS on 0x11 (because the header is 0x11 bytes!).
Each animation begins with 6 bytes of offset information (3 shorts) followed by the root rotation (almost always 0 0 0).
Consult my “nice, long, hard, throbbing, ‘diatrab’” here (http://forums.qhimm.com/viewtopic.php?t=3576) for more format information.

Each .bin file has a .txt file (.bin.txt).  This is the above file, only translated into bits and hexadecimal.
I have put a break in these files where the second frame begins (and so begins the mostly non-decoded data).

Finally, each animation has a .txt version.  This is the final list of rotations for each frame/bone.  The goal is to take what is in the .bin files and turn them into what is in the .txt files.
The .txt files have two versions of the animation information.
A series of raw floats and then the same floats listed in frame/bone structure.  Offset information has been added also.  I wrote a script to do all of this.


Hopefully this will be enough to get some people interested in it.

I am thinking it is best to start with very simple animations though.
I want to get the animation information for the helicopter during the Rufus fight.  It is surely very simple and it would be very easy to see any patterns in that animation, but getting it is the hard part since I lost my files that had a save at every save point (hard drive crash).

Also, I would recommend this program specifically for the converter:
Memory Hacking Software (http://l-spiro.0kuntz.ca/index.php)
I am not sporting my own software here; that will come another day.
But in this case it really does have the most useful converting tool.
Just run it and press Alt-T/C, or go to Tools/Converter.
It shows things in both big and little Endean which makes it especially useful for hacking Final Fantasy® VII.
As well it shows many data types at once, which helps to recognize between data stored as floats or longs.


L. Spiro
Title: Making an Open Source FF7 Engine
Post by: bulk_4me on 2005-06-30 21:26:13
FF7w Mirror:

http://aaronserv.dyndns.org/!!stuff/qhimm/FF7w.zip

Thanx to Aaron
Title: Making an Open Source FF7 Engine
Post by: MaTiAz on 2005-07-03 17:25:19
Quote from: L. Spiro
anti-cheat stuff........

Wouldn't those anti-cheat measures be pretty CPU/Memory intensive, since all the "hard work" is done by the server?
Title: Making an Open Source FF7 Engine
Post by: L. Spiro on 2005-07-04 03:40:30
Not at all.
The anti-cheat by design simply means giving less information to the client and having the server keep track of your stats (which is only logical).


This won’t be at all process-intensive on the client end, and it won’t be packet-intensive on the server end.
Your stats change after every battle and when you change your equipment or use an item.
These are the times when the server will send your stats (and only the stats that have changed) to your client.
This could mean about 16 bytes of data (assuming a 10-byte header) sent when you give yourself a Potion, or up to 60 (spread out in chunks which your client will receive when you are looking at the items/gold you gained) after a battle.
60 is a rough guess, but I think that number should mostly stay down near 20 or so for an average after-battle gain (Gil + 2 or 3 items = [10-byte header + 2-byte specific header + Gil amount (4) + 2-byte specific header + item amount(s) (3 bytes per item)] = 10 + 2 + 4 + 2 + 6 (2 items) = 22.



As for the client, it is currently running at over 1,000 frames-per-second on my AMD 2.8 GHZ computer with a Radeon 9700.
I sent it to a friend some time ago who has a lower-end computer but he was also getting over 1,000.
You must understand that the models, textures, etc., were all designed for low-end machines (so low even a PlayStation® can handle it).
To completely remake the engine for modern machines leaves plenty of room for adding fancy effects or any type of mathematical computation.

I only plan to add a little; I don’t want to ruin the spice of the original game.  It isn’t the same unless the polygons are jagged.

While your client will have a huge frame rate, the server will also have room to spare.

The server has nothing to do but verify.
When formulating packets, it has nothing to do but add something to your current stat and then create a packet and send it to the client.
Client overwrites the old value with the new value, thus if you change your Gil in the client to 99999, when you get a packet that tells you your Gil is 10, your client will now have 10 for Gil.
When running a battle, it only needs to work about 2 or 3 times per second (when something attacks something else).

The anti-cheat measures aren’t active devices, running constantly to verify the client is clean.
It simply involves limiting information the client gets and never asking questions when it comes to stats.



L. Spiro
Title: Making an Open Source FF7 Engine
Post by: rmco2003 on 2005-07-04 04:10:11
What about botting? If PVP is involved in this online rendition then players can use bots to increase their stats tenfold overnight like in Gunbound. That game has anti-cheat design but it still doesn't know when bots are running and when they're not.
Title: Making an Open Source FF7 Engine
Post by: L. Spiro on 2005-07-04 05:55:38
Bots are hard to detect and they were a problem in one of my previous games (a game my company is remaking now for Nintendo DS).

But actually there is one simple method that is a bit awkward, but works.
It’s essentially the same method forums use to control bot spamming.

After 1 or 2 hours of straight gaming, the server can send a message to the client which causes the client to display a graphical picture, which contains text.  The user would then need to type the text he or she see in the image before he or she is allowed to continue gaming on the server.
The person could just be AFK, so he or she won’t be kicked for not answering at all, but while the server is waiting for an answer, the player will not be able to move or fight in any battles.

The correct answer will not be sent to the client at all, so no hooks, RAM hacks, or packet sniffers will be able to find out the answer.
The server can generate the image and store the correct answer itself.
Then send only the image.
Client is ordered to display it (which can be ignored but it won't work since the server won’t let you battle until you answer the question).
When you type the text, it will send what you typed to the server.
The server will verify it and if it is correct, it will release the lock, allow you to continue, and order the client to stop showing you the picture.



It seems awkward to have to do this, but it isn’t unreasonable, and it will fix the bot problem.
It would only occur after a player has been playing for 2 hours (or so), which is pushing the limit of human endurance anyway.



But anyway, making a bot for this type of game is risky business.
Unless you put a lot of effort into the bot, it will just get you killed.
At least in medium+ battles.  Maybe it can fight MP’s all night but who is going to gain a level from that…


L. Spiro
Title: Making an Open Source FF7 Engine
Post by: Qhimm on 2005-07-04 09:15:15
Actually, real players might get more than a little miffed being constantly asked to verify their species like that. Also, the standard captcha's are starting to be cracked anyway, if we look at current anti-spamming measures. ;)
Title: Making an Open Source FF7 Engine
Post by: bulk_4me on 2005-07-04 14:46:42
Quote from: L. Spiro
Bots are hard to detect and they were a problem in one of my previous games (a game my company is remaking now for Nintendo DS).

Which game?
Title: Making an Open Source FF7 Engine
Post by: rmco2003 on 2005-07-04 15:51:00
You could always code for it to detect if keys are being pressed at regular intervals for more than 40+ minutes, I doubt human players can keep up constantly pressing a key at exactly the same time difference for that long, so it might be something to look in to rather than having to verify yourself all the time. Is this an official remake with official Nintendo devkits or are you using homebrew devkits for it?
Title: Making an Open Source FF7 Engine
Post by: L. Spiro on 2005-07-05 02:54:25
Quote
Actually, real players might get more than a little miffed being constantly asked to verify their species like that.

Yes, this is what I want to avoid, but at when it comes time I will just have to weigh the two sides.
If I can find a good lengthy time period that won’t bother too many people but at the same time won’t give bots as much time as they need to be useful, that would be best.

Quote
Also, the standard captcha's are starting to be cracked anyway, if we look at current anti-spamming measures.

Well nothing is ever going to be 100%.  I just have to deal with the 99% of script kiddies who are not skilled enough to get past these checks.  Eliminating them is worth it.


Quote
Which game?

It was a personal project of mine a long time ago.
An online fighting game where each player selects his or her moves in secret, then the bot (mIRC bot) would take their moves and deal damage, then let them both attack again.
Had a lot of magic and customization of your character and became quite popular for being just a text-based IRC battle bot.
The battle style is like Pokémon in terms of both players select their moves (secretly) and then attack.
The rest of the game and battle mechanics are really their own styles.
I borrowed some things I liked from some good games and mixed in some new things of my own to make sure the battles are very interesting and strategic.  This is important, since “just attack until you win” is dull and pointless.  I want magic and strategic combinations of spells to decide the winner, with pure stats being more of a minor factor, but still enough factor that a player 10 levels higher than you will almost always win, unless he is a moron or TRYING to lose.
Each spell needs more value besides just “deal more damage than a regular attack would”.  Spells need to actually do things to somehow change the state of the character.
So, it is actually pretty fun and most of the people who played the original are very excited about it.
Several of them have decided this game is the only reason they will buy a Nintendo DS.




Quote
You could always code for it to detect if keys are being pressed at regular intervals for more than 40+ minutes, I doubt human players can keep up constantly pressing a key at exactly the same time difference for that long, so it might be something to look in to rather than having to verify yourself all the time.

When you make a bot, you don’t necessarily have to put keypresses on timers that repeat.
You can hook in-game functions to find out when things are happening and then only hit keys in reply to those events.
Especially during battle, where the bot would have to wait for its turn to attack.


Quote
Is this an official remake with official Nintendo devkits or are you using homebrew devkits for it?

It is an official remake that, when completed, you should be able to go to the store and buy.  We are using official devkits.


L. Spiro
Title: Making an Open Source FF7 Engine
Post by: bulk_4me on 2005-07-05 04:11:29
What's the name of the game? Where can I download the PC version of it? Or this was just a personal game that it's somehow ported to a console?
Title: Making an Open Source FF7 Engine
Post by: L. Spiro on 2005-07-05 07:16:22
It was a personal game of my own that I was able to convince my company to make as a project.
I called it Shiny Star, but we will rename it for the Nintendo DS.

I don’t always have it running but you can go to #FF7 on irc.dynamix.com (I own the room) and request to play it.
I will load it and you can play it from mIRC (or any IRC client you like).

Simple text-based input to play, but somehow fun even from the start.


L. Spiro
Title: Making an Open Source FF7 Engine
Post by: jc2k300 on 2005-08-28 05:28:42
Bad Idea, Square Enix will close your project down in a snap of a finger.
Title: Making an Open Source FF7 Engine
Post by: Decayrate on 2005-09-24 22:15:55
not if evry one keep quite and dont blow the wissel, it wont go down.....so don't be the one that blow the wissel. I would NOT do that cuz then I had to go and make you dont do it

sorry if you are scared by me
Title: Making an Open Source FF7 Engine
Post by: yoshi314 on 2005-09-27 07:19:05
nobody said you need to write your own engine from scratch in order to write a new one for ff7.

if someone would use OGRE rendering engine it would save ppl tons of work. it is GPL licensed and there is also a GPL physics engine and stuff.

http://www.ogre3d.org

actually i was thinking of rewriting vagrant story more :D

i'm currently looking for spare time to take some tutorials on ogre (their wiki is great in that matter).

of course Square will not allow to make a custom ff7 engine :/

then again, why does ficedula work on his remake?
Title: Making an Open Source FF7 Engine
Post by: Micky on 2005-09-27 18:49:46
Quote from: yoshi314
nobody said you need to write your own engine from scratch in order to write a new one for ff7.

if someone would use OGRE rendering engine it would save ppl tons of work. it is GPL licensed and there is also a GPL physics engine and stuff.

Actually the rendering side on FF7 is quite simple: Just some static backgrounds and some rigid skinning. Most people already have code for that in their drawer.
The difficult thing is all the scripting, and of course reverse-engineering the so-far unkown bits (for example the battle animations, worldmap, field NPCs...)
Title: Making an Open Source FF7 Engine
Post by: L. Spiro on 2005-09-28 03:22:09
Battle Animation Format (http://forums.qhimm.com/viewtopic.php?p=58303#58303)

I will decode the rest when I am ready to use them.

Right now that may be a while since I am working on my GoldenEye 007â„¢ and Perfect Darkâ„¢ projects, and since I have officially decided to rewrite my engine.

I have found myself to be highly uninspired when I think about what to do next on my engine, and it is basically because the code in it is 3-4 years old and frankly “newbie”.

Even though all the code works and it is stable, I am just not happy with it.
It needs to be cleaner and faster.
But anyway it won’t take long to restart it and catch up to where I am already.
Probably a week or so.
Once I am working with faster, cleaner, and more organized code, I will become much more energetic with the project.
Strange how my inspiration can be directly related to the tidiness of the code rather than the functionality?


L. Spiro
Title: Re: :(
Post by: PapSnatchBrim [SwornEnemy] (DMR) on 2014-08-28 12:26:38
Oh well... I guess it's all up to me then, I have plenty of free time in my hands. :D

Expect it to be finished in around 10 years time, when no one cares about FF7 anymore :P

its nearly been 10 years hows it going? lol
Title: Re: Making an Open Source FF7 Engine
Post by: Covarr on 2014-08-28 15:11:29
Reviving a ten-year-old thread outside of Completely Unrelated? That's a paddlin'.

Anyway, there is such an engine in public development right now. It's called Q-Gears (http://forums.qhimm.com/index.php?board=12.0). I'm gonna go ahead and lock this thread now. ~Covarr