Author Topic: [WIP] Custom Game Settings (FF7)  (Read 56692 times)

DLPB

  • No life
  • *
  • Posts: 10264
  • Karma: 276
  • The ascension of the ordinary man
    • View Profile
Re: [WIP] Custom Game Settings (FF7)
« Reply #75 on: 2011-04-26 21:42:09 »
So what we saying now, that we can limit the sense to 65535?  I will look into this later and see what I can see.  Which won't be much . ha.

Wutai Clan

  • Crazy poster
  • *
  • Posts: 115
  • Karma: 0
    • View Profile
Re: [WIP] Custom Game Settings (FF7)
« Reply #76 on: 2011-04-26 21:52:24 »
For Sense, I would need both the current HP and max HP, and I can probably get it implemented. (Pointers to the values.)
« Last Edit: 2011-04-27 00:42:44 by Wutai Clan »

DLPB

  • No life
  • *
  • Posts: 10264
  • Karma: 276
  • The ascension of the ordinary man
    • View Profile
Re: [WIP] Custom Game Settings (FF7)
« Reply #77 on: 2011-04-26 21:55:41 »
I am looking now at the code.  In memory it is at :
5ca10f

It doesnt look too complicated to change.  Someone should be able to no probs.  Ill see what ive learned :)
« Last Edit: 2011-04-26 21:57:13 by DLPB »

Wutai Clan

  • Crazy poster
  • *
  • Posts: 115
  • Karma: 0
    • View Profile
Re: [WIP] Custom Game Settings (FF7)
« Reply #78 on: 2011-04-26 22:04:50 »
I am looking now at the code.  In memory it is at :
5ca10f

It doesnt look too complicated to change.  Someone should be able to no probs.  Ill see what ive learned :)

Alright, I'll see what I can do, looks simple to change, so long as that's the only value that's causing issues. (All I have to do is replace that call with a jmp, patch the value, and return the execution to the next command.)

Code: [Select]
__asm
{
    cmp dword ptr ds:[0x009AB10C][ecx], FFFFh
    jmp [0x005CA119]
}
« Last Edit: 2011-04-26 22:14:38 by Wutai Clan »

DLPB

  • No life
  • *
  • Posts: 10264
  • Karma: 276
  • The ascension of the ordinary man
    • View Profile
Re: [WIP] Custom Game Settings (FF7)
« Reply #79 on: 2011-04-26 22:08:50 »
it does seem to do a compare though to

9ab2ac  What is it doing there?

Wutai Clan

  • Crazy poster
  • *
  • Posts: 115
  • Karma: 0
    • View Profile
Re: [WIP] Custom Game Settings (FF7)
« Reply #80 on: 2011-04-26 22:13:05 »
it does seem to do a compare though to

9ab2ac  What is it doing there?

That's probably the current HP value, it compares it to the max value allowed(7530h), and if it passes, it works, if not it fails, see above(my last post) for an example of how to patch it.
« Last Edit: 2011-04-26 22:15:44 by Wutai Clan »

DLPB

  • No life
  • *
  • Posts: 10264
  • Karma: 276
  • The ascension of the ordinary man
    • View Profile
Re: [WIP] Custom Game Settings (FF7)
« Reply #81 on: 2011-04-26 22:28:25 »
Yes that gets it to 65535 I take it? Seemed to work for me, And if I read you right:

5ca107 becomes je 005CA119

and 5ca10f becomes cmp [ecx+009AB10C],0000ffff


Vgr

  • Global moderator
  • *
  • Posts: 2211
  • Karma: 35
  • If it quacks like a duck, it must be a duck
    • View Profile
Re: [WIP] Custom Game Settings (FF7)
« Reply #82 on: 2011-04-26 22:31:24 »
F*ck! Kranmer could you send me the needed DLLs?

Armorvil

  • Freak
  • *
  • Posts: 621
  • Karma: 0
  • Working on : FFVII Total Grudge
    • View Profile
Re: [WIP] Custom Game Settings (FF7)
« Reply #83 on: 2011-04-26 22:35:09 »
@NFITC1:

Yeah, I'm nitpicking with W-Magic, I admit. It's true that it works this way in all FFs that made the command available. Still, I'd love to select the first magic spell, its target, then press Square or something to bypass the need to enter a second command.

@ Wutai clan :

I'll test your test release right away :)
...if I can make multi.dll work, that is. I followed the instructions : Multi.dll and the LOADR folder are both in the Final Fantasy VII directory, and I added the load_library = Multi.dll line inside the FF7opengl.cfg. And it doesn't work either when I only put FF7anyCD.dll inside the LOADR folder. It works fine without Multi.dll though, so I'll try your dll without it for now.

DLPB

  • No life
  • *
  • Posts: 10264
  • Karma: 276
  • The ascension of the ordinary man
    • View Profile
Re: [WIP] Custom Game Settings (FF7)
« Reply #84 on: 2011-04-26 22:36:19 »
yeah your code works fine like that, question is can we possibly extend this to work for creatures up to HP's of  FF FF FF  ?

Wutai Clan

  • Crazy poster
  • *
  • Posts: 115
  • Karma: 0
    • View Profile
Re: [WIP] Custom Game Settings (FF7)
« Reply #85 on: 2011-04-26 22:44:11 »
Yes that gets it to 65535 I take it? Seemed to work for me, And if I read you right:

5ca107 becomes je 005CA119

and 5ca10f becomes cmp [ecx+009AB10C],0000ffff

Well, I don't know what method you are using, but for me, this is how it works.

0x005CA10F - get's replaced with an unconditional jmp to a code cave.

After the jump, it just executes this code, and returns to the original destination.

cmp dword ptr ds:[0x009AB10C][ecx], FFFFh
jmp [0x005CA119]

So basically, it's the same as just overwriting the original..

cmp     dword_9AB10C[ecx], 7530h

With this..

cmp     dword_9AB10C[ecx], FFFFh

---

@Vgr255, I take it it's not working for you again? I compiled in release mode this time, if you have the proper VC++ 2010 x86 runtimes installed, it should be working. ???
« Last Edit: 2011-04-26 22:49:26 by Wutai Clan »

DLPB

  • No life
  • *
  • Posts: 10264
  • Karma: 276
  • The ascension of the ordinary man
    • View Profile
Re: [WIP] Custom Game Settings (FF7)
« Reply #86 on: 2011-04-26 22:59:00 »
but what of increasing the limit to FF FF FF, is this possible?  How would it be done?

Wutai Clan

  • Crazy poster
  • *
  • Posts: 115
  • Karma: 0
    • View Profile
Re: [WIP] Custom Game Settings (FF7)
« Reply #87 on: 2011-04-26 23:05:21 »
but what of increasing the limit to FF FF FF, is this possible?  How would it be done?

Just put a larger value in than FFFFh, though, it won't look right in the menu's. (Edit: I misunderstood your question, I was distracted by the release not working for Vgr255..)
« Last Edit: 2011-04-27 00:43:08 by Wutai Clan »

Armorvil

  • Freak
  • *
  • Posts: 621
  • Karma: 0
  • Working on : FFVII Total Grudge
    • View Profile
Re: [WIP] Custom Game Settings (FF7)
« Reply #88 on: 2011-04-26 23:10:21 »
Quote
but what of increasing the limit to FF FF FF, is this possible? How would it be done?

I don't know if you read my previous messages, but this is what I did by directly editing the executable, and it works great. The only problem is, you'll never know how much HP the enemy really has... ...It will divide its HP in chunks of 65535. So, if the enemy has 131100 HP and you sense it, it will display "30/30 HP" then after you damage it for 30 points of damage, you'll read "65535/30 HP" and after you deplete these 65535, it will show "65535 / 30 HP" one last time.

@ Wutai clan : I installed the C++ thingy, used a clean FF7.exe, and made FF7opengl.cfg directly read GameSettings.dll, but it still doesn't work :(
« Last Edit: 2011-04-26 23:23:09 by Armorvil »

Armorvil

  • Freak
  • *
  • Posts: 621
  • Karma: 0
  • Working on : FFVII Total Grudge
    • View Profile
Re: [WIP] Custom Game Settings (FF7)
« Reply #89 on: 2011-04-26 23:17:02 »
Yeah, I saw your post after typing my message. And the new version doesn't work either :(

Wutai Clan

  • Crazy poster
  • *
  • Posts: 115
  • Karma: 0
    • View Profile
Re: [WIP] Custom Game Settings (FF7)
« Reply #90 on: 2011-04-26 23:23:28 »
Yeah, I saw your post after typing my message. And the new version doesn't work either :(

WTF...

Everything needed should either be a part of the runtime, or compiled into the .dll itself, this is why I HATE C++, it's junk.. C# never has issues like this, I really wish C# could do this kind of stuff natively. (It can with C++ dlls, but, then it's the same thing..)

Try installing the x64 version if you have an x64 system, then reboot..

msvcp100.dll
msvcr100.dll

Search your system for these files, and copy(don't move) them in your FF7 directory, if the above didn't work.

Did you install those with admin privs? That could be the problem too, you have to have admin privs to install stuff to the system directory where the runtimes install. (ie, Run as admin(win7) when installing the VC++ runtimes.)
« Last Edit: 2011-04-26 23:29:07 by Wutai Clan »

Armorvil

  • Freak
  • *
  • Posts: 621
  • Karma: 0
  • Working on : FFVII Total Grudge
    • View Profile
Re: [WIP] Custom Game Settings (FF7)
« Reply #91 on: 2011-04-26 23:26:15 »
My Windows XP is 32 bits, so it should do... Anyways, it's getting late in my part of the world (1:30 AM), so I'll call it a day. Maybe it will work tomorrow, nighty night everyone ^^

EDIT:

Sorry, I'll have to try this fix tomorrow.

EDIT2:

Yes, I run my system as an administrator. Can I go to bed, now ? lol
« Last Edit: 2011-04-26 23:30:34 by Armorvil »

Wutai Clan

  • Crazy poster
  • *
  • Posts: 115
  • Karma: 0
    • View Profile
Re: [WIP] Custom Game Settings (FF7)
« Reply #92 on: 2011-04-26 23:35:22 »
Sure, sleep well.. ?

Try this if you are having issues. It might work..?
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=c32f406a-f8fc-4164-b6eb-5328b8578f03

--

Edit: I'm going to try updating to the latest VC++ release, and rebuilding the project, hopefully they fixed this, because it's stupid. (So, you'll probably need that since it's the latest runtime.)
« Last Edit: 2011-04-26 23:39:49 by Wutai Clan »

DLPB

  • No life
  • *
  • Posts: 10264
  • Karma: 276
  • The ascension of the ordinary man
    • View Profile
Re: [WIP] Custom Game Settings (FF7)
« Reply #93 on: 2011-04-26 23:44:27 »
I don't know if you read my previous messages,

I did, and as you said, that simply won't work right.  It has to be done properly.

Wutai Clan

  • Crazy poster
  • *
  • Posts: 115
  • Karma: 0
    • View Profile
Re: [WIP] Custom Game Settings (FF7)
« Reply #94 on: 2011-04-26 23:54:17 »
I did, and as you said, that simply won't work right.  It has to be done properly.

That is done properly, the game just doesn't support it. There are various possible causes.

1. The variable may only be able to hold 65,535.
2. The message code just doesn't support it. (Variables too small, text limitations, etc,.)
3. Some unknown issue.
4. All of the above.

I might be able to fix it, but it's going to take time, and more investigation.

--

@Kranmer, let me know if you can run this new version, that will help narrow down the issue, I compiled in release mode, and switched the project to use the /MT switch, which compiles the runtime files directly into my DLL, so it should be working..

The only thing I can think of, is I compiled the hooking lib using different settings, so it's causing issues, I'm going to try recompiling that, updating my system, and updating Visual Studio.. (Then rebuilding the project.)

It will probably be tomorrow before I get another release up, but your answer will greatly aid in troubleshooting the issue.
« Last Edit: 2011-04-27 00:05:53 by Wutai Clan »

DLPB

  • No life
  • *
  • Posts: 10264
  • Karma: 276
  • The ascension of the ordinary man
    • View Profile
Re: [WIP] Custom Game Settings (FF7)
« Reply #95 on: 2011-04-26 23:58:36 »
yup, sadly thats how it looks. at least it is now extended.

Wutai Clan

  • Crazy poster
  • *
  • Posts: 115
  • Karma: 0
    • View Profile
Re: [WIP] Custom Game Settings (FF7)
« Reply #96 on: 2011-04-27 00:41:42 »
Okay, last attempt for the day.

Test Release
http://www.mediafire.com/?2mr51shembkmfbd

VC++ Runtime 2010
http://www.microsoft.com/downloads/en/details.aspx?familyid=A7B7A05E-6DE6-4D3A-A423-37BF0912DB84&displaylang=en

VC++ Runtime 2010 SP1
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=c32f406a-f8fc-4164-b6eb-5328b8578f03

---

Edit: Did you guys setup the .ini file? The debug console is disabled by default, as are all the other features, so if you didn't configure it, it won't appear to do anything. (Was a .log file generated, that should occur regardless.)

I've also posed the issue on a support site, so hopefully between them, Kranmer, and your responses, I can figure WTH is going on here.  :x
« Last Edit: 2011-04-27 01:29:06 by Wutai Clan »

Vgr

  • Global moderator
  • *
  • Posts: 2211
  • Karma: 35
  • If it quacks like a duck, it must be a duck
    • View Profile
Re: [WIP] Custom Game Settings (FF7)
« Reply #97 on: 2011-04-27 01:39:59 »
Even with VC++ installed, both DLLs in both FF7 and LOADR folder, it doesn't work...

Wutai Clan

  • Crazy poster
  • *
  • Posts: 115
  • Karma: 0
    • View Profile
Re: [WIP] Custom Game Settings (FF7)
« Reply #98 on: 2011-04-27 01:44:23 »
Even with VC++ installed, both DLLs in both FF7 and LOADR folder, it doesn't work...

Can you describe, "doesn't work"..

Will the game launch? Or does nothing happen at all.

Vgr

  • Global moderator
  • *
  • Posts: 2211
  • Karma: 35
  • If it quacks like a duck, it must be a duck
    • View Profile
Re: [WIP] Custom Game Settings (FF7)
« Reply #99 on: 2011-04-27 01:45:50 »
Game launch. I think I must try with an original ff7.exe ... well now I'm busy (lazy, yeah, but busy too)