Author Topic: Making an Open Source FF7 Engine  (Read 31744 times)

naji

  • *
  • Posts: 38
    • View Profile
    • http://balder.prohosting.com/hackff7/
Making an Open Source FF7 Engine
« 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

Aaron

  • *
  • Posts: 2818
    • View Profile
    • http://aaron-kelley.net/
Making an Open Source FF7 Engine
« Reply #1 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.

naji

  • *
  • Posts: 38
    • View Profile
    • http://balder.prohosting.com/hackff7/
:(
« Reply #2 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

L. Spiro

  • *
  • Posts: 797
    • View Profile
    • http://www.memoryhacking.com/index.php
Making an Open Source FF7 Engine
« Reply #3 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)
Cloud vs. Safer•Sephiroth (1280×960, Anistropic Filtering)
Items Menu (640×480)
Sephiroth Stats (1024×768)
Tifa vs. Emerald WEAPON (1280×1024, Anistropic Filtering, 6× Anti-Aliasing)
Tifa vs. Ruby WEAPON (1280×1024, 6× Anti-Aliasing)
Tifa vs. Ying/Yang (1280×1024, 6× Anti-Aliasing)


L. Spiro

naji

  • *
  • Posts: 38
    • View Profile
    • http://balder.prohosting.com/hackff7/
Making an Open Source FF7 Engine
« Reply #4 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?

bulk_4me

  • *
  • Posts: 129
    • View Profile
    • BWHacks
Making an Open Source FF7 Engine
« Reply #5 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.

L. Spiro

  • *
  • Posts: 797
    • View Profile
    • http://www.memoryhacking.com/index.php
Making an Open Source FF7 Engine
« Reply #6 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

Micky

  • *
  • Posts: 300
    • View Profile
Making an Open Source FF7 Engine
« Reply #7 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.

L. Spiro

  • *
  • Posts: 797
    • View Profile
    • http://www.memoryhacking.com/index.php
Making an Open Source FF7 Engine
« Reply #8 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

mirex

  • *
  • Posts: 1645
    • View Profile
    • http://mirex.mypage.sk
Making an Open Source FF7 Engine
« Reply #9 on: 2005-06-26 14:09:58 »
L. Spiro: nice work :)

naji

  • *
  • Posts: 38
    • View Profile
    • http://balder.prohosting.com/hackff7/
cool
« Reply #10 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?

L. Spiro

  • *
  • Posts: 797
    • View Profile
    • http://www.memoryhacking.com/index.php
Making an Open Source FF7 Engine
« Reply #11 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

Micky

  • *
  • Posts: 300
    • View Profile
Making an Open Source FF7 Engine
« Reply #12 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.

bulk_4me

  • *
  • Posts: 129
    • View Profile
    • BWHacks
Making an Open Source FF7 Engine
« Reply #13 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.

James Pond

  • *
  • Posts: 880
  • Forums Grumpy Bastard....At The Best Of Times.
    • View Profile
Making an Open Source FF7 Engine
« Reply #14 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?

Alhexx

  • *
  • Posts: 1894
    • View Profile
    • http://www.alhexx.com
Making an Open Source FF7 Engine
« Reply #15 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

L. Spiro

  • *
  • Posts: 797
    • View Profile
    • http://www.memoryhacking.com/index.php
Making an Open Source FF7 Engine
« Reply #16 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.

    I am already a game programmer, working to get into better jobs, and my main interest in video-game programming is game security.  I specifically would like to help protect online games from cheating, so I have studied this field quite a bit.[/list:u]

      I am a moderator (just a low-end one, nothing fancy) of
this 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]

    I am the author of
this 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

bulk_4me

  • *
  • Posts: 129
    • View Profile
    • BWHacks
Making an Open Source FF7 Engine
« Reply #17 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

L. Spiro

  • *
  • Posts: 797
    • View Profile
    • http://www.memoryhacking.com/index.php
Making an Open Source FF7 Engine
« Reply #18 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]

Alhexx

  • *
  • Posts: 1894
    • View Profile
    • http://www.alhexx.com
Making an Open Source FF7 Engine
« Reply #19 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

bulk_4me

  • *
  • Posts: 129
    • View Profile
    • BWHacks
Making an Open Source FF7 Engine
« Reply #20 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. :)

Cyberman

  • *
  • Posts: 1572
    • View Profile
Making an Open Source FF7 Engine
« Reply #21 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

Akari

  • *
  • Posts: 766
    • View Profile
Making an Open Source FF7 Engine
« Reply #22 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.

L. Spiro

  • *
  • Posts: 797
    • View Profile
    • http://www.memoryhacking.com/index.php
Making an Open Source FF7 Engine
« Reply #23 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.

Alhexx

  • *
  • Posts: 1894
    • View Profile
    • http://www.alhexx.com
Making an Open Source FF7 Engine
« Reply #24 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