Author Topic: Cloud's Model Height In Memory  (Read 5132 times)

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Cloud's Model Height In Memory
« on: 2014-10-01 19:41:30 »
OK, so as part of the mod to add 1:35 Soldiers around the world, I need Cloud stood where the soldiers will be.  And I need him to be the same height.  That means I need a way to change his height in realtime (since changing every field in flevel to make cloud the correct height may prove annoying (although tbh, i reckon I can pull that off with my own batch program).

In any case, I am stuck.  I've tried to locate it, but because I don't know enough about decent debuggers I am finding it nigh on impossible to see what is going on.

What I have learned so far:

When you change the model height in script, the code produced is actually a string value.  Thus if you change Cloud model height in script to "333" you end up with hex 33 33 33.  FF7 then copies that string (probably along with the rest since it comes with the Cloud name ID and other stuff) when you enter a new field location, to another location using the string copy at 63D977. After that I found what uses the new address, but came up empty handed. The function that seems to use the string value is 4130D0.

I have no clue why the game script is even using string value here instead of the actual value itself.

You can find the script in memory by searching for 48 52 43 (HRC) [or just search for HRC]. Cloud's model height is usually the second result. For example, this is usually 512.  So HRC512.

« Last Edit: 2014-10-01 19:51:46 by DLPB »

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: Cloud's Model Height In Memory
« Reply #1 on: 2014-10-01 21:09:29 »
Well, I found out how to change height when it is calculated at screen time.  Perhaps changing at runtime is significantly more difficult because the game is not designed to do it. 

Just a quick point that all models can be affected by the dword value at 007B78B0.  So if you ever need to scale all models, that's helpful.
« Last Edit: 2014-10-01 22:34:30 by DLPB »

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: Cloud's Model Height In Memory
« Reply #2 on: 2014-10-01 22:44:50 »
Ok this is solved... rather than mess about I've just scaled the models down using the factor 512(main model like cloud)  with  200 (1:35 Soldier) :)

Kaldarasha

  • *
  • Posts: 2449
  • Prince of Model Editing
    • View Profile
Re: Cloud's Model Height In Memory
« Reply #3 on: 2014-10-04 09:55:42 »
So it is possible to change the scale of the models in the FF7.exe? Together with 7th Heaven and hextLaunch it should be possible to make individual changes for the fields, so I could make the resized project independent from the field model loader.
Another question how does it scale? Along the hip origin or does it use the local position to scale it upwards or downwards?

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: Cloud's Model Height In Memory
« Reply #4 on: 2014-10-04 10:05:33 »
That scale factor above scales all models completely.  i.e. All models will be changed and made bigger/smaller.

halkun

  • Global moderator
  • *
  • Posts: 2097
  • NicoNico :)
    • View Profile
    • Q-Gears Homepage
Re: Cloud's Model Height In Memory
« Reply #5 on: 2014-10-05 21:53:21 »
The big model in the debug room tests exactly this function

Cyberman

  • *
  • Posts: 1572
    • View Profile
Re: Cloud's Model Height In Memory
« Reply #6 on: 2014-10-11 19:11:28 »
Would it not make more sense to add models of the proper scale? I don't recall any of the 1:35 solder model thing actually having an object associated with it in terms of models.
The other thing is that it would have been SOLDIER as in the organization not as in army member correct?
If I remember correctly each of the "clones" in the game were given numbers as members of soldier.
I believe Zack was a member Cloud didn't have a number (he's a free man?) and the others had different numbers (my guess why the #'s etc).
I can't remember of any hints other than that. How many clone #'s were their in the game? I know they gathered too Sephiroth.

Cyb

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: Cloud's Model Height In Memory
« Reply #7 on: 2014-10-11 20:07:56 »
The 1:35 Soldiers are scaled models, you can collect 2 of them in that form in the original game :)