[FF7]getting player's position reliably

  • Thread starter Thread starter hay
  • Start date Start date
Status
Not open for further replies.
H

hay

Guest
Anyone got player's current field/world position/face direction reliably? I can see there's an address for faster walking on gamehacking.org and I've found camera format along with walkmesh in here http://q-gears.sourceforge.net/gears.pdf but I don't see much world map info there. Any help?
 
Last edited:
That's the thing, thank you. I'm super impressed how far this modding scene have progressed.
I'll reverse Ochu if I have too, but before that it's worth to ask: any chance of finding it's source code or any references online? Pretty please, I need it HARD. Seriously, it's got about 15% of functonality I need, which would take me an assload of time to reverse.
 
Last edited:
I don't really want to release all the source for it right now, but if you give me specifics, I can at least give you what you need.  The source is Delphi anyway, so may not be as much use to you as you think.
 
Fair enough, this could work even better. I'm no good with Delphi at all.

1. How do you triangulate which addresses to read for example for player's position? Are those fixed offsets every time game is launched, or do you use method of tracking them throughout address space? I assume you know the data layout of the allocated memory and I would like to know it too.

2. How do you triangulate data needed for the save state function? There's certain data arrangement and a way to reach it. Ochu is more stable than my GPU drivers so I assume you got this thing tight.


Let's assume Example 1 where I'd like to make a difficulty setting mod which would include respawns for easy levels. Before a fight I make a savestate, after failure I load it up.

Let's assume Example 2 where I'd like to make a fast-travel sort of mod which would allow player to speak to a certain inserted npc and be moved between fields in a predictable, static pattern.
 
Last edited:
I am not sure what you mean by "triangulation".  There is no such thing here.  It's just reading values from static memory addresses.

It's too much messing to say how the savestate works - but suffice to say, I backup the Savemap and temp map
Code: [Select]
Code:
SaveMapArray: Array [0..$10F6] of byte;LastSaveMapArray: Array [0..$10F6] of byte;TempBankArray: Array [0..$FF] of byte;LastTempBankArray: Array [0..$FF] of byte;SaveMap = $DBFD38;  //Save map ends DC0E2C /Bank1/2 starts  DC08DCTempBank = $CC14D0;
and then restore it before calling the operation that initiates a field / wm jump. The game engine does the rest.  This will never be fool proof, because the game engine was never designed to be loaded in-between scenes and so on.  It can break the game in certain places, but generally it works very well - especially for debugging purposes.  There is no easy method for "save state saving".  I invented my own format and procedure for doing it.

Code: [Select]
Code:
   Case TargetModule Of        1: begin // Field to Field           Wword($CC0D8A,pWord(@FieldArray[254]) ^); //Screen ID           Wsint($CC0D8C,pLongint(@FieldArray[0 + (15 * CharacterID)])^ div 4096); //X           Wsint($CC0D8E,pLongint(@FieldArray[4 + (15 * CharacterID)])^ div 4096); //Y           Wword($CC0DAA,pWord(@FieldArray[12 + (15 * CharacterID)])^ );           //T           Wbyte($CC0DAC,pByte(@FieldArray[14 + (15 * CharacterID)])^ );           //D           end;        3: Wword($CC0D8A, 45); // Set jump to World Map        4: Wword($CC0D8A, 30); // Set jump to Submarine        5: Wword($CC0D8A, 60); // Set jump to Snowfield          else        End;      Wbyte($CC0D89, 1); // Initiate Field jump            end else // Current location is world map           if TargetModule = 1 then // World Map to Field           begin           Wword($CC0D8A,pWord(@FieldArray[254]) ^); //Screen ID           Wsint($CC0D8C,pLongint(@FieldArray[0 + (15 * CharacterID)])^ div 4096); //X           Wsint($CC0D8E,pLongint(@FieldArray[4 + (15 * CharacterID)])^ div 4096); //Y           Wword($CC0DAA,pWord(@FieldArray[12 + (15 * CharacterID)])^ );           //T           Wbyte($CC0DAC,pByte(@FieldArray[14 + (15 * CharacterID)])^ );           //D           Wbyte($CC1644, 0); //may not be needed, but setting to 0 just in case.           Wbyte($E3A884, 0); //This decides the type of jump. 00 = field/normal world map jump. 01 = Battle. 02 = fmv.                               //Battle ID is set at E3A88C           Wbyte($E045E4, 3); //Initiate wm jump - Wbyte($E045F0, 1);                               // 03 = jump to field. 04 = jump to submerged submarine. 05 = Jump to World map.            end;
I'd help more but I am really busy with The Reunion.
 
I am not sure what you mean by "triangulation".  There is no such thing here.  It's just reading values from static memory addresses.
A basic, few-step method of obtaining those addresses based on their neighbourhood or execution pattern. But I guess solid addresses are even better.


Code: [Select]
Code:
Wword($CC0D8A,pWord(@FieldArray[254]) ^); //Screen ID
I assume:
Wword = write word function
$CC0D8A = target address
pWord = pointer to a word type
@FieldArray[254] = 254th element in field array?
^ = i have no idea what it does

I'd help more but I am really busy with The Reunion.
You've already helped quite a lot, thanks! But don't think I'll stop asking questions :D If there's any way I can work that back in some way, I might be useful sometimes.
 
It's just part of my system for saving and retrieving stored values.  What counts are the base addresses.
 
Status
Not open for further replies.
Back
Top