Author Topic: Encounter Probability and Battle ID reading???????  (Read 2841 times)

ARMs

  • *
  • Posts: 164
    • View Profile
How you do cacualate and seperate Encounter probablilty and Encounter ID?

the first 6 bits represent probabilty while the last 10 bits represent the Battle/Encounter ID.

What i'm asking for is maybe a formula of some sort?   I'm puzzled as to what these bytes mean 8A 18.

God I hope someone understands what i'm trying to say.

Synergy Blades

  • Guest
Re: Encounter Probability and Battle ID reading???????
« Reply #1 on: 2007-06-14 11:09:49 »
The Wiki page explains this.

ARMs

  • *
  • Posts: 164
    • View Profile
Re: Encounter Probability and Battle ID reading???????
« Reply #2 on: 2007-06-14 12:57:52 »
Yeah thats what i'm talking about but i what i want is some way to translate the Byts in the field file somet hing i can understand and convert it back so i can put it in the filed file.

Synergy Blades

  • Guest
Re: Encounter Probability and Battle ID reading???????
« Reply #3 on: 2007-06-14 14:09:25 »
Well, there's pseudocode on the page under "Encounter Structure" to do this but I'm guessing from what you wrote you aren't familiar with byte representations, so here's a quick explanation.

Convert the hex representation of the two bytes you see into binary form, as follows:

8: 1000
A: 1010
1: 0001
8: 1000

Then simply divide up the 8A18 along the 6/10 bits line, like so: 1000 10 || 10 0001 1000. The first portion is your probability, the second your encounter ID.

Probability 100010 in decimal is: 2+32=34
Encounter ID 1000011000 in decimal is: 8+16+512=536.

If you then want to make changes, you do so in binary form to these two values. Let's say you want to change the probability and encounter ID to... say, 15 and 328, respectively.

Probability 15 in binary is: 001111
Encounter ID 329 in binary is: 0101001001

Put these together with the probability first, encounter second, and you get: 0011 1101 0100 1001. These are your two new bytes - in binary form. To put them back in the file with a hex editor you just need to convert them back to hexadecimal form.

0011: 3
1101: D
0100: 4
1001: 9

Which gives you 3D49, your final value.


Note: I've seen unusual effects in trying to switch out probabilities, so if you can, leave them as they are. In fact, if you're only after switching the battle IDs, just use Meteor instead as it provides a GUI for encounter IDs (not probabilities, as yet). If you do mess something up, ID or probablities, you will probably just get a pyramid battle.

ARMs

  • *
  • Posts: 164
    • View Profile
Re: Encounter Probability and Battle ID reading???????
« Reply #4 on: 2007-06-14 21:31:16 »
Thanks yet again synergy blade.  You always explains things in a way that i can understand.

PS.  I would use Meteor but its for the PC version.
« Last Edit: 2007-06-14 21:33:45 by SaintDragon »