Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - DLPB

Pages: [1] 2 3 ... 360
 WM module for example pushes files at 75938C. 

Might be that the files need to be loaded into memory and pointers adjusted.

Code: [Select]
FF7's "is_lib.cpp"
If you carefully read the previous posts, you may have notice some function calls commented with is_lib:; these functions belong to the is_lib module which performs the read operations on .lgp files (i.e archives).

The access to an archive is basically done with the next calls:
C_00675511; "opens" the archive file, and associate it with and Id (must be below 0x12); subsequent calls will use this Id only.
C_006759D2; allows to get the starting offset of an item (identified by name) in an opened archive (identified by its Id); since the caller uses this offset only as a parameter to subsequent calls, it maybe easier to consider this function as an "opener" and the offset as a "handle".
C_006762EA; returns the size of an entry (identified by its "handle") inside an opened archive.
C_0067633E; loads an entry into a buffer provided by the caller.
C_00675F1D; "closes" an archive
C_00676064; cleans the module, i.e closes all opened archives

The function I am changing pushes to is at 00675511.  Aali is hooking at 006759D2 to load individual files and handle it all.

Completely unrelated / Yuzo Koshiro Interview
« on: 2018-02-21 14:38:41 »

I always like these kinds of things.  It's nice to hear from guys like this.  They formed part of our childhood without us realizing it at the time.  I knew his music was among the best back then too...  You could tell.  Also, since his copyright credit was always displayed on the title screen, he was the only japanese composer I had any idea about for years.

It's interesting that he notes his influences as Western rock/dance.  Uematsu is also heavily influenced by Western artists, such as Elton John.  And you can definitely hear certain tracks having been influenced by certain songs.  Like Red XIII theme intro sounding similar to, and maybe being influenced directly by, Apache (my view).

What originally influenced me was... American and British music. It feels kind of strange to hear those people say they like my music. I think, “But it was your music originally!”

The source for 7H is online and you can see from that that it'#s doing some sort of lgp lzs decoding too.  But i don't know C.  And to be frank, I ferning hate C.  I hate it with a passion.  Coming from Delphi to that makes me want to weep for the world.

JWP knows his stuff when it comes to this kind of thing.  Would love to see how it's done.

I can load different archives from anywhere I like by pushing a new path into a loading function.  From there I assume that the files are read to memory.  It's all easy with source, of course... but with asm it's beyond me.  And I think 7H and aali are diverting calls at the api level - not just rewriting functions.

Aali and 7h can load individual files from your hd outside of the archives. At the moment my mod manager is sleek and simple but it really could benefit from this feature. Without hooks I've managed to load the archives from new locations but i do not understand in any way shape or form how id make ff7 locate say aaaa.hrc on my hd instead of out of char.lgp. in fact im not even sure if ff7 loads all the files contained within to memory. It seems to? Are 3rd party dll hooks the only way of doing this or can i rewriteva ff7 function or two. I'd prefer the latter since 7h is chocabloc with 3rd party dlls.

My own dll can intercept functions if need be - but at the moment, all I've managed to do is locate and change path at the memory location the actual archives are loaded.  The functions related to that are a complete mystery to me.

I forgot that even had one.  Updated.


...No it isn't? I just clicked that link and it loaded fine.

Plus it can't die....  It's a Drive database link.  Not some sort of download.

Unknown. But over 200 MB compressed probably.

The one in 7th Heaven is the one I made - and it has major glitches in there. The mandatory fixes are listed in The Reunion Database, which is on the first post.

nah it's my 60fps mod that breaks the game.  It's not stable in this version of The Reunion.

The interpolated model mod programming isn't released with Reunion so it won't work at all (plus will hang game when you are a frog).  I've got the inter + non inter lined up for release and it works perfectly so far.  But when I finally get this latest version out it will need a lot of testing.  There are certain things that are known to be wrong at moment.  I left them on your(?) 60fps model thread.

Troubleshooting / Re: How to change my FF8 FPS to 25?
« on: 2018-02-12 21:23:40 »
making battles 25fps will make your experience awful.  25 divided by 15 is not a whole number. It will not even give you smooth playthrough under optimal conditions.

You would need to make it 30 or 60 (esp since monitor refresh is usually 60) - and it takes a lot more work than what even Ochu does.  There is currently no way to do it.

Tools / Re: [FF7PC] Trainer and Debug Tool - Ochu (3.4)
« on: 2018-02-12 21:21:42 »
Raziel80 - Nope. It's a 100% different thing.

Firelawa: and nope.

Sorry, but this is your lot from me I am afraid :P

Alcohol never helps programming... not after first hour anyway :P

Exactly, Bahamut.

As for Reunion R06, I am having a real problem in how to approach the release.  You see, the DLL is now an add on by itself and has separate optional mods - as well as mandatory bug fixes.  But I don't want people to think that The Reunion is still how it was...  a fixed installer where you HAD to have Menu Enhancement/Beacause.  That's no longer the case.  The DLL is itself a tool!  And It powers the other now completely optional additions. It also allows modders to add their own complete packages to the game, which the user can switch between with the options.ini file.

Basically, if I treat the DLL as a separate mod... I then have to do more work, whereas I can include the DLL and make it part of The Reunion - but sow confusion.  I think the latter may be the price.  Perhaps I can get out a tutorial video to clear this all up.

Anxious Heart,  Menu Enhancement, Audio Replacement, Beacause (has to come with Menu Enhancement), 60fps Battles, Soldier Quest, Tweaks...  All of these are now COMPLETELY Optional and standalone.  If you want to simply have 60fps battles... you can. 

No, what I mean is - if you have 3 enemy skill materias on one person, and one of those materias has a skill - the other 2 can then no longer learn them.

Tools / Re: [N/A] Text and Hex Editors - Hext Tools 3.0
« on: 2018-02-09 23:41:30 »

{{Tifa change all miss to hit - exe addresses below}}

< This is what's doing it.  You can't have closing double bracket on same line.

Tifa change all miss to hit - exe addresses below


{Tifa change all miss to hit - exe addresses below


#Tifa change all miss to hit - exe addresses below

The working example shows the above - but I appreciate how strange it must seem that double curly cannot end on the same line.  I might change that in future revisions.

What {{Tifa change all miss to hit - exe addresses below}} is being seen as is

{{Tifa change all miss to hit - exe addresses below

i.e., skip everything from this point on.

Tools / Re: [N/A] Text and Hex Editors - Hext Tools 3.0
« on: 2018-02-09 17:32:29 »
]ill look later when i get home. have you checked exe write permissions

youll have to wait for reunion r06. it can't be added easily without my dll. it's a mandatory fux there along with many others.

Time to put this battle mode nonsense to bed.

Because this game is probably the most cobbled together thing I've ever seen, this Field Battle Mode flag (not to be confused with the Battle Type or the Battle Formation flag, set in Scene) stuff is a total nonsense when you look at what's going on.  The game actually only uses 16 bits for the Field Battle Mode - despite the fact there is a "Field Battle Mode (2)" which appears to allow 32 bits.  The engine simply does not support it.  Instead, the flags are converted to a 2 byte value. Regardless of the flag set in Field Battle Mode (1), the same counterpart will be set with Field Battle Mode (2).  Example:

Flag 1 in Field Battle Mode (1) is "Do not show Battle Rewards". This will set the exact same bit in FF7 memory as Flag 1 in Field Battle Mode (2).  The value in memory is 0x80 at CC0DC6.

Field Battle Mode (1) is actually only Flags 0-7 + Flag 16.  Why 16?  because that is the Disable Game Over flag, which gets its own byte to itself (CC0DC5).  In actual fact, this is a shoddy - and I do mean SHODDY - shoehorned fix. Clearly, the 16 bits (instead of 8) is there in Field Battle Mode (1) purely so the Disable Game Over byte can be set.  Flags 8-15 simply cannot be used in Field Battle Mode (1) - though I assume any of those being set to 1 will result in Disable Game Over, since CC0DC5 will then be non zero.

So, what about Field Battle Mode (2)?  Well, this is a jumble too.  The engine makes sure that the flags set here will set the same 2 byte value at CC0DC6 (+ Disable Game Over bit at CC0DC5). Flag 0-7 of Field Battle Mode (2) is the same as Flag 0-7 of Field Battle Mode (1). But Flag 24 becomes the Disable Game Over (it's Flag 16 in Field Battle Mode (1) ).  Flag 16 in Field Battle Mode (2) is Disable Victory Celebration Music, which is actually given the value 0x100 at CC0DC6. It's the only flag that can't be set with Field Battle Mode (1). 

Rather than think of this in terms of field flags, it's much easier to think of it as a memory value.  The value the engine actually makes use of.

The memory values at at CC0DC6/9A88A6 are:

Field Battle Mode (2). Current Makou flags in square brackets.
0x01: Unused [Flag 8]
0x02: Enable countdown timer [Flag 7]
0x04: Preemptive Strike [Flag 6]
0x08: Cannot escape from battle [Flag 5]
0x10: Unused [Flag 4]
0x20: Do not play victory fanfare music [Flag 3]
0x40: Activate Battle Arena [Flag 2]
0x80: Disable Rewards [Flag 1]
0x100: Disable Victory Celebration [Flag 16]
0x200: Unused [Flag 15]
0x400: Unused [Flag 14]
0x800: Unused [Flag 13]
0x1000: Unused [Flag 12]
0x2000: Unused [Flag 11]
0x4000: Unused [Flag 10]
0x8000: Unused [Flag 9]

And Disable Game Over is set as Value 0x01 at  CC0DC5 [Flag 24].  It must be noted that although 24 bits can be reflected from CC0DC5 using Field Battle Mode (2), only the 16 bits at CC0DC6 will be copied to battle memory (9A88A6) making them effective.  Game Over flag is not copied.  The engine checks for it at CC0DC5 - not at 9A88A5 when the battle ends.

Basically, as I noted on the github, Makou Reactor should do away with Field Battle Mode (1) and only allow the "32 bit version"  - although it should simply show to the user flag 1-17, with flag 17 being "Disable Game Over".   In other words, the non usable flags should be hidden and effective ones translated by Makou Reactor.

Yeah, it will fix the issue of them not saving.   8-)

I've also added the "if escape, still add kills"  to battle exit.
Code: [Select]
Procedure AddKillsOnEscape; stdcall;

push ebx

mov dx,[$9AB0C2]
and edx,$C // if escape (04 or 08)
test edx,edx
je @End

xor edx,edx
xor ebx,ebx


mov eax,ebx
inc ebx

cmp eax,2
ja @End

xor edx,edx
mov dl,[eax+$DC0230] // retrieve ID in slot 0-2
cmp dl,$FF
je @Start

imul eax,eax,$34
mov al,[eax+$9A8DBF]
and eax,$000000FF

imul edx,edx,$84
add edx,$DBFD8C + $24  //Character kills.

xor ecx,ecx
mov cx,word ptr [edx]
add ecx,eax
  cmp ecx,$FFFF
  jna @Label1
    mov ecx,$FFFF

mov word ptr [edx],cx

jmp @Start


pop ebx

Ordinary escape is given value of 04.  Seems Smoke Bomb (and possibly other materia/item escapes) are given 08.  I am going to check what value is given when the "no reward screen" field opcode is operating.

Edit.  It uses 0x20...  so normal victory flag when the "no reward" is in use.  I'm going to need to disable the normal victory kill update as well and always force it on exit.

For some reason, the enemy skills learned address (9A8DDC for Member 0) requires that byte to be $80.  If it isn't, the address isn't changed.  Perhaps there is a check for it somewhere.  If it's 00, then I assume the game ignores writing to 9A8DDC.  [Edit.  005DB061 is where the check is made.  The originally game sets the byte to 0x80, but any non zero should work. If 00 then Enemy Skill is not equipped, you see.  There is a further check after that, which I am unsure of.]

It also seems to me that the mask check (xor) can be ignored?  All it will do then is ALWAYS update on battle victory when E Skill is in a slot, rather than what it does now- check if any change from e skill at battle start.

I've also disabled the victory E Skill update and put the update in battle exit (so that the E skill change will always be reflected).

I'm not really sure if I need to preserve edi,ebx,esi here.  Didn't check.

Still this nifty replacement I've made for the Enemy Skill mask ensures that, from now on, the enemy skills MISSING from the total are what count, not the ones that are PRESENT.  See, originally, if one of your characters had a full enemy skill set, it would then stop all other enemy skills from learning all abilities. And if one of the materias had, say, Frog Song, then none of the others without it would gain it either.

Code: [Select]
Procedure CreateEnemySkillMask5CFB93; stdcall;

push ebx
push esi
push edi

xor edi,edi
mov esi,$00FFFFFF

mov ecx,[esp+$10] //Starting address of character materia

xor ebx,ebx


cmp ebx,8
je @Label5

test edi,edi
jne @Label3
  mov eax,[ecx+ebx*4+$40] // Retrieve Materia ID and AP in Weapon slot.
  jmp @Label4
  mov eax,[ecx+ebx*4+$60] // Retrieve Materia ID and AP in Armour slot.

cmp al,$FF //If no materia in slot, then jump to next slot.
je @Label2

xor edx,edx
mov dl,al
imul edx,edx,$14
mov dl,[edx+$DBDF6D] //retrieve formula ID for materia
and dl,$F
cmp dl,7  //materia is Enemy Skill
jne @Label2

shr eax,8
and esi,eax
or esi,$80000000

inc ebx

jmp @Label1

  test edi,edi
  jne @End
    inc edi
    jmp @START


mov eax,esi

pop edi
pop esi
pop ebx


Not rigorously tested yet, but seems to work.

Enemy skills can now be learned when a materia already has the skill.  It's not really a bug that it originally doesn't - but a design choice. A bit lazy of them not to add the ability in too.  For now, the "Enemy Skill learned" text will always be seen when it is used on member, but I am thinking I can add in a check to stop it.

NFITC1 also noted the area where they are all added, so I've moved the code to battle end, instead of "menu at battle end" - meaning learned skills are always learned.  Not just at victories. This one was a big oversight.

Pages: [1] 2 3 ... 360