Author Topic: [FF7] FF7ddraw - WIP  (Read 10089 times)

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
[FF7] FF7ddraw - WIP
« on: 2016-12-20 08:34:11 »
WIP. See latest post.
« Last Edit: 2017-01-12 04:32:58 by DLPB »

Kaldarasha

  • *
  • Posts: 2449
  • Prince of Model Editing
    • View Profile
Re: ChangeMod [WIP]
« Reply #1 on: 2016-12-20 18:28:18 »
I miss Aali's mod path. To make sure that every mod does work for 7H, we came to the agreement to name it 'Textures' (because it only replaces textures).
A question: are the loose files are placed in folders or are they packed in a lgp file? I ask this because it will be problematic to share mods with files which do work with the game by replacing the original files. Though SE doesn't seem to care about that since it is the casual way to share mods on Steam for FF7.
So this tool will be a great oppertunity to mod the rerelease.  :-D

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: ChangeMod [WIP]
« Reply #2 on: 2016-12-20 22:18:02 »
It looks for entire archives, but the driver file isn't among the files.  There's no way to pirate the game by shipping whole files (when quite a lot of the other system files are not included. Even then, the exe can't work without some form of illegal crack).  But if that wasn't allowed, you could simply copy a file from the default folder, and then encode using ulgp / touphscript and so on.

If you look at the picture above, you can see the yellow entries are those the program has detected as being in the new custom mod folder (which I named REU, located inside data\0\REU). You can have as many folders in data\0 as you want - the program will detect them and update the relevant executable. For example, if the folder is "REU", then the exe will be named "0_REU.exe".

If data\0\CUS has only "battle.lgp" inside it, that one file will be used from the folder CUS, but ALL OTHER files will still be from their default position.  Changing from one mod to the next simply means a drop down menu to another folder and clicking OK.

The first 4 entries are folders. For example, if you want to move "scene.bin" to a custom folder, you will need to include all files from the battle folder (minus magic.lgp and battle.lgp, which are still optional), along with kernel.bin (since scene and kernel work together).

This may seem like it's complicated, but I'll be making a video soon, which will clear up any confusion. It's actually ridiculously simple.  The only small downside is that certain filenames have been changed (I was forced to). These are:

menu_us.lgp > menu.lgp
high-us.lgp > high.lgp
snowboard-us.lgp > snowboard.lgp
world_us.lgp > world.lgp
cr_us.lgp > cr.lgp
disc_us.lgp > disc.lgp
moviecam.lgp > movie.lgp

Personally, I think this is better anyway.  They couldn't even get their - and _ consistent. I may make I have made ChangeMod automatically detect these and rename if required.

Finally, if a folder called "mus" is present in the custom folder, this will be used for all ogg music files - instead of the default ones (which, again, were inconsistent between 1998 and Steam. SIGH.  Steam is data\music_ogg  and 1998 is a silly \music\vgmstream )
« Last Edit: 2016-12-22 04:14:11 by DLPB »

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: ChangeMod [WIP]
« Reply #3 on: 2016-12-22 04:15:34 »
I am updating Reunion R06 to be compatible with this new method. The program itself is complete and is undergoing further testing.

I will need some modders here to test this out with their own mods and see what they think ;)

Sega Chief

  • *
  • Posts: 4086
  • These guys is sick
    • View Profile
Re: ChangeMod [WIP]
« Reply #4 on: 2016-12-22 06:05:18 »
Let's have a go at it.

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: ChangeMod [WIP]
« Reply #5 on: 2016-12-22 06:22:08 »
I will send a link to PM soon with details on what to do. I'll get round to making a video soon also because it's so much better than reading text.

Kaldarasha

  • *
  • Posts: 2449
  • Prince of Model Editing
    • View Profile
Re: ChangeMod [WIP]
« Reply #6 on: 2016-12-22 10:31:20 »
Well, you can count me in.  :-D

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: ChangeMod [WIP]
« Reply #7 on: 2016-12-23 06:18:25 »
Sega Chief has confirmed that this fails on Steam thanks to its DRM.  Even minor changes to paths means it the launcher fail to load. It totally sucks. 1998 version will work perfectly.

I am going to have a rethink.

Edit. I have a fix.
« Last Edit: 2016-12-23 08:18:12 by DLPB »

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: ChangeMod [WIP]
« Reply #8 on: 2016-12-24 13:34:04 »
Ok here is how it works.  There are two ways.  One is a program that alters paths and requires different executables for each mod in root folder. It also requires edits to be made to FF7_launcher and to driver files (these changes can easily be reversed, though). This way is a dead certain way to making sure any mod is compatible. 

The second way is far cleaner, because it only requires a dll file, called ddraw, which will load when the game starts and alter MEMORY for the paths. So only the original exe is needed.  And it *should* be possible that this way can also make changes to the driver code (since it's in memory before ddraw from what I remember) and any other memory - using Hext instruction files.  These files would be unique to each mod folder.

I am testing the latter way as we speak.

Then I am off out for a drink. I won't be around Christmas Day - and I'll be legless on 27th. Hung over on 28th. 

So normal service will resume on 29th, where I will do the same thing I do every night - Try to.. complete The Reunion.

https://www.youtube.com/watch?v=mYvAYwpUDv8


edit.

It works. A new era of modding is at hand, I rek.  8) Time for some testing.
« Last Edit: 2016-12-24 15:33:42 by DLPB »

Covarr

  • Covarr-Let
  • Administrator
  • *
  • Posts: 3941
  • Just Covarr. No "n".
    • View Profile
Re: ChangeMod [WIP]
« Reply #9 on: 2016-12-25 13:36:41 »
Be careful with memory editing. A/V software will have a field day for false positives.

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
I've finally come to a final working model  And here it is:

There are three versions of my ddraw.dll

1. Main version. For use with any game (I'll need to add an option for more than just ddraw.dll). This one isn't made yet, but will basically be HextLaunch without the launcher.

2. A version for FF7. It is the same as the main version, but also allows for multiple mods on the same game installation. No hard drive renames needed. No messing about. A frontend program (FF7ddraw.exe) simply allows you to select which mod you want to load using a drop down menu. That's it. Each separate mod is placed into data\0\***\  where *** is a 3 character ID that the mod creator uses. Mine is REU (for The Reunion).  The frontend can display the full mod name. Eventually, this version will also support (optional) external full quality ogg/wav/mp3 sound effects. A replacement for the game version.

3. A version for FF8. Again this is the same as the main version, but comes with Roses and Wine. Roses and Wine will become optional.

The FF7 version only supports the English game when it comes to multiple mods.  But, one day, I may get around to adding support for all languages.

For FF7, The Hext instruction (memory changes based on plain text file) portion of this dll works as follows:

1. Add changes in root\ddraw_in\hext instantly (before the real ddraw.dll is loaded)
2. Add changes in data\0\***\ddraw_in\hext instantly (before the real ddraw.dll is loaded, and after 1.)
3. Add changes in root\ddraw_in\hext_delayed with the set delay (in a separate thread, and after 2).
4. Add changes in data\0\***\ddraw_in\hext_delayed with the set delay (in the same thread as 3, and after 3).

Hext instructions in 1 are instant GLOBAL changes that are loaded before any main executable code is initiated.

Hext instructions in 2 are instant MOD changes that are loaded before any main executable code is initiated.

Hext instructions in 3 are delayed GLOBAL changes that are loaded using a separate thread. Only use this folder if something is overwriting your changes in 1 (Aali's Custom Driver does this a few times in certain areas).

Hext instructions in 4 are delayed MOD changes that are loaded using a separate thread (the same thread that 3 uses). As with 3, only use this folder if something is overwriting your [by "your" I am referring mainly to the mod creator] changes in 2.

The Global folders are for changes that will always be made, regardless of  which mod is being loaded.
The Mod folders (***) are for changes that are only being made by the selected mod.

I will now finalize all this and make a video tutorial.  It's MUCH simpler to see this in action than to read about it here.
« Last Edit: 2017-01-12 01:29:58 by DLPB »

Kaldarasha

  • *
  • Posts: 2449
  • Prince of Model Editing
    • View Profile
Re: ChangeMod [WIP]
« Reply #11 on: 2017-01-11 17:45:34 »
Fat Chocobo.

If Hextlaunch is implemented, then we don't need foreign language support for the tool, since we could patch the text of the exe.
« Last Edit: 2017-01-11 18:04:04 by Kaldarasha »

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
FF7ddraw
« Reply #12 on: 2017-01-11 18:55:40 »
You would need non English exe support for multiple mods - which is one of the main features of this release. The path and file names are hard coded and offset and different from the English version.
« Last Edit: 2017-01-12 01:29:10 by DLPB »

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: [FF7] FF7ddraw - WIP
« Reply #13 on: 2017-01-16 05:26:25 »
Turboss has testing this - and I've sent 60fps mod to NFITC1 to test with also.  It's working fine.  I've even got The Reunion running entirely using this method.
« Last Edit: 2017-01-16 06:05:15 by DLPB »

TurBoss

  • 7th Heaven Crew
  • *
  • Posts: 15
    • View Profile
Re: [FF7] FF7ddraw - WIP
« Reply #14 on: 2017-01-17 20:58:33 »
It works fine here

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: [FF7] FF7ddraw - WIP
« Reply #15 on: 2017-01-18 04:33:05 »
I'm adding a full replacement for SFX and Music to this too. The music replacement should be superior to Aali's - no pops or clicks on track change.  And there should not be any issues with fades when I am done. This is being done properly too.  No hacky Roses and Wine ff8 type fix (Although I managed to make that seem great lol).

So far I have music and effects playing - but I'll need to be taking control of everything and supporting everything. So it may take time before this part of the dll is released.

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: [FF7] FF7ddraw - WIP
« Reply #16 on: 2017-01-18 17:55:56 »
Good news for anyone doing a voice over project too. At least 64000 extra sound effects will be available for use. Full panning and control. So adding a dialogue is as simple as putting a audio file into a folder and then adding effect to script using makou

Tsuna

  • Global moderator
  • *
  • Posts: 823
  • Working together to create awesome things!
    • View Profile
    • The home of Tsunamods
Re: [FF7] FF7ddraw - WIP
« Reply #17 on: 2017-01-18 22:01:15 »
Nice one. My only issue would be converting what I have to work with yours instead

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: [FF7] FF7ddraw - WIP
« Reply #18 on: 2017-01-20 16:10:09 »
Just realized this shouldn't be under tools.  Probably other? Or gameplay?

Anyway, work has begun recording all 700+ sound effects into 192 kbit/s stereo OGG files. Complete with loops if any exist (Luksy has provided me a full list which also shows if loop point is at the start). Programming replacement of field effects and music is going nicely.  Battle will prob prove more annoying.

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: [FF7] FF7ddraw - WIP
« Reply #19 on: 2017-01-30 15:36:58 »
All sound effects have been recorded flawlessly from Mednafen in stereo (had to start again because other emus have all sorts of issues with certain effects). Seems one or two are incorrect in PC too - wrong ID.

The looping ones are going to take a long time to sort (hard to find looping point on many of them) - but the rest is just a case of saving one by one. It took quite a long time to save them all (did it all today), as you might imagine.
« Last Edit: 2017-01-30 15:38:44 by DLPB »