[ff8] Edit the encounters on the world map

  • Thread starter Thread starter Girl next door
  • Start date Start date
Status
Not open for further replies.
G

Girl next door

Guest
Hi!

I want to edit the encounters on the world map. With Cactilio, I can change the scenes but not their location. The idea is to put some rare encounters on special places. I can do that with Deling on fields but not on the world map. Any idea how I can do this ?
 
Well, that's quite a heavy thing, I will wait for someone more skilled than me. ^^'
 
wmsetus.section2:
getpubthumb.png

Does it look similar to you? :)
I have not found the encounter data, but it's a map of world map regions for encounters. I'll be trying to reverse it.

EDIT: I found function that returns world map block ID based on Squall's position. 0x553760 for me
then:
mov     al, [edx+edi] (where EDX is world segment and EDI is LEA of section 2 start)

All six first wmset sections are tied to one function. I already found the one that gets the region ID when character is moving and have no enc-none equipped. This is clearly all encounters.
 
Last edited:
Yes, it's the same thing for the wmsetfr:

1476477084-capture.png


That's a weird code no ? You should find somewhere the encounter's ID no ? But here, it's just the map if you have the ability No encounters no ?
 
Good news! I found it!
wmsetus.section4 structure:

uint16 - encounter ID

It's as simple as that

0x541CF1 is mov     dx, [ecx+eax*2]
ECX - section4 pointer; eax is unknown so far...
Balamb garden uses:
0x6
0x8
0xC
0xE

It uses the same encounter IDs as normal scene.out file

also treat section 5 as leftover/null

I haven't localized the ECX yet (the pointer that tells which position from section4 to read encounter from)
 
Last edited:
That's good news ! ;D

But well, it's hard to understand for me. At which offset the sector 4 begins please ?
 
That's good news ! ;D

But well, it's hard to understand for me. At which offset the sector 4 begins please ?
If you use my Rinoas Toolset you can unpack wmset file. I'm working now on repacker and editor for section 4 and 2, so fear not. :3
 
About the world map, do you know where is the draw points data please ?
 
About the world map, do you know where is the draw points data please ?
Hm, the only function associated with draw points is kind of giant function of event processing probably (I called it draw point related, but I see now there are references to text and world map quests, so that's not this). Game calls "GetDrawMagic" from EAX that is dword_204400C.
dword_204400C however is set as return by sub_54F770
sub_54F770 in fact loads wmsetS35 pointer, so... Looks like section 35 is managing world map draw magic. That's all for now, I need to finish the editor for wmset 2 and 4 first.
 
Of course, one thing after the other. :) Will you put this editor in your Rinoa's toolset ?
 
Of course, one thing after the other. :) Will you put this editor in your Rinoa's toolset ?
Okay, it's done:
https://github.com/MaKiPL/FF8-Rinoa-s-Toolset/releases/tag/1.1.2

First open, unpack, open section you want to edit and finally click on compile. File saving prompt should appear if no errors. Remember to have backup of your files!
Compile/unpack/editor works on all language versions (wmsetus, wmsetit, wmsetfr etc...)

Now the draw points...
 
Last edited:
WMSET : not enough WMSET section! can't build file...
thats the message appear when i compile is that a normal error or i did something wrong maki?
 
WMSET : not enough WMSET section! can't build file...
thats the message appear when i compile is that a normal error or i did something wrong maki?
Rebuild function automatically finds all possible language versions. Normally, you should have one success and four errors like this.
 
About the world map, do you know where is the draw points data please ?
Section35:

Code:
[b]Offset[/b] | [b]Size[/b] | [b]Description[/b]
0x00 | 0x2C | Unused - skipped in ASM
0x2C + (drawID * 4) | 4 | [u]DrawPointVariable[/u]

DrawPointVariable:

Code:
[b]Offset[/b] | [b]Size[/b] | [b]Description[/b]
0x00 | short | Probably X
0x02 | short | Probably Y

The X and Y calculation example (FF8 2000 english):
ECX: 020409FC
ESI:  020400AC
EDX: 0204095C

X == EDX
Y == ((*ECX - *ESI) - 4 ) >> 4  [just gets pointer variable from ECX and substracts it from ESI, then substracts 4 and shifts right 4, pretty simple]

I'm still not sure how to calculate it to world map position. Magic IDs are probably coded inside EXE as field draw points are https://www.ff7catalog.com/threads/11693/

EDIT:
Yes, it gets data from the same DrawMagicArray as fields, just adds 0x80 to drawID. Therefore every drawmagic bigger than 0x80 is world-map only I think.
The magicID to draw is simple counted as draw entry. So, the first draw magic entry is magic ID = 0, second is magicID=1 and etc... [like autoincrement database]

EDIT2:
Okay, EDX = 0 if top left corner on map and 2FFF if bottom right corner.
but X makes no sense...
e720d46f474a3350021a38d1d232873b.gif

Zoom in if you don't see variables
 
Last edited:
EDIT2:
Okay, EDX = 0 if top left corner on map and 2FFF if bottom right corner.
but X makes no sense...
Yo!

The "0-2FFF" format is actually 2 bytes

In Big-Endian format:
 First byte is X location in width counted from blocks (0x20 * 4 or 32 * 4), where 0x20/32 is blocks from "left edge" to "right edge" in world map.
 Second byte being Y location in height counted from blocks (0x18 * 2 or 24 * 2), where 0x18/24 is blocks from "top edge" to "bottom edge" in world map.

In short:
Code: [Select]
Code:
First byte = Block in world map rowSecond byte = Block in world map column * 2 (Only for every other column block)
Hope that was clear in anyway :)
 
ok soo someone went around and completely deleted all encounter IDS of ff8 from all the wikis does anyone have this list on backup?
 
In short:
Code: [Select]
Code:
First byte = Block in world map rowSecond byte = Block in world map column * 2 (Only for every other column block)
Thanks!
I don't know if it happens everywhere, but the X variable should be ANDed to 7 bits (0x7F). Do you know for what this one bit is responsible for?
 
Status
Not open for further replies.
Back
Top