Jump to content

Recommended Posts

Posted

Research from my White Save File, pretty sure Black won't be different. Inhabitants are not encrypted like the Entralink related stuff.

Save Block: 0x1FA00-0x1FCDF

0x1FA00-0x1FA07 Intro Data, constant.

24 bytes per Trainer starting at 0x1FA08 and repeating until 0x1FBE8

Struct of each 24 byte trainer block:

1byte - Trainer Present Byte (00 or 01)

1byte - Trainer ID# (00 thru 1D)

1byte - Happiness (00 thru 64)

1byte - Able To Talk To (07 yes, or 00 no)

20 bytes - zeroes.

No trainer is just zeroes.

0x1FCDE - Checksum (2 bytes as usual)

Over 0x1FA00 thru 0x1FCDB

wfbcchecksum.png

White Forest Inhabitants | Name / {In Grass} [in Water] 
==================================================
00 = Schoolkid Leo / {Pidgey} [surskit]
01 = Schoolkid Sylvia / {Wurmple} [surskit]
02 = Roughneck Dave / {Gastly} [surskit]
03 = Clerk Britney / {Hoppip} [surskit]
04 = Youngster Robbie / {Elekid} [surskit]
05 = Lass Miki / {Togepi} [surskit]
06 = Black Belt Ryder / {Machop} [Lotad]
07 = Battle Girl Karenna / {Slakoth} [Lotad]
08 = Clerk Doug / {Shinx} [Lotad]
09 = Ace Trainer Vincent / {Magby} [Corphish]
0A = Scientist Marie / {Magnemite} [Lotad]
0B = Ace Trainer Lena / {Ralts} [Wooper]
0C = Backpacker Carlos / {Starly} [Corphish]
0D = Backpacker Molly / {Azurill} [Lotad]
0E = Gentleman Frederic / {Budew} [Wooper]
0F = Lady Lynette / {Oddish} [surskit]
10 = Rich Boy Pierce / {Mareep} [surskit]
11 = Hiker Gene / {Aron} [surskit]
12 = Clerk Piper / {Bellsprout} [surskit]
13 = Nusery Aide Miho / {Seedot} [surskit]
14 = Schoolkid Shane / {Rhyhorn} [surskit]
15 = Pokemon Ranger Ralph / {Lotad} [surskit] 
16 = Pokemon Ranger Eliza / {Trapinch} [Lotad] 
17 = Clerk Collin / {Abra} [Lotad] 
18 = Veteran Ken / {Nidoran-M} [Corphish]
19 = Scientist Jacques / {Nidoran-F} [Lotad]
1A = Veteran Rosa / {Whismur} [Lotad]
1B = Backpacker Herman / {Porygon} [Wooper]
1C = Backpacker Emi / {Happiny} [Corphish]
1D = Socialite Grace / {Bagon} [Wooper]

enjoy :)

Posted

Hi,

I already devloped a tool for edit this data, but i am having problems with the Checksum.

The program is here: [ATTACH]8902[/ATTACH].

This is just a BETA version, only edit the first trainer. First i am trying to solve the Checksum problem, then i will do the rest.

It edit the data, but you need to fix the Checksum by yourself, or no change will be showed in-game.

To fix the Checksum just open PokéGen, load your save on PokéGen, and save it again.

It worked for me, tested two times.

If anyone can help me with the Checksum Fix, i would appreciate it.

Thanks

Posted

There's active trainers and inactive trainers.

10 slots for active, 12? slots for inactive.

There's some problems with 00 being the trainer value loaded (Leo), as his "Talked To" hex is 00. Which means there's no trainer there. (You probably already know this)

I'll look at it more in depth tonight, thanks for making this!

It's a ccitt-16 checksum by the way.

Posted
There's active trainers and inactive trainers.

10 slots for active, 12? slots for inactive.

There's some problems with 00 being the trainer value loaded (Leo), as his "Talked To" hex is 00. Which means there's no trainer there. (You probably already know this)

I'll look at it more in depth tonight, thanks for making this!

It's a ccitt-16 checksum by the way.

AS i said to you, the program is still a beta, so bugs will happen.

I will look on that, but first, the most important is the checksum fix.

Thanks

  • 2 weeks later...
Posted
Hi again,

In the Project Wikia there is a method of Checksum calculation, but don't know what language is it wrote, maybe someone can help me converting it to .net language? Thanks

The link is http://www.projectpokemon.org/wiki/Pok%C3%A9mon_NDS_Save_File_Checksum

Pedro, that link you provided has C# code, if you want VB.NET code it's a simple matter of popping that into a C# project, compile, pop the resulting executable into Reflector and change the language to VB.NET

For your convenience I've converted it to VB.NET for you


       Public Shared SeedTable As Integer()

       Public Function GetCheckSum(ByVal data As Byte()) As UInt16
           Dim sum As Integer = &HFFFF
           Dim i As Integer
           For i = 0 To data.Length - 1
               sum = ((sum << 8) Xor SeedTable(CByte((data(i) Xor CByte((sum >> 8))))))
           Next i
           Return CUShort(sum)
       End Function

       Public Shared Sub GetSeeds()
           SeedTable = New Integer(&H100 - 1) {}
           Dim index As Integer = 0
           Dim result As Integer = 0
           Do
               result = (index << 8)
               Do
                   If ((CByte((result >> 8)) And &H80) <> 0) Then
                       result = ((2 * result) Xor &H1021)
                   Else
                       result = (result * 2)
                   End If
               Loop While (++index < 8)
               index = index + 1
               SeedTable(index) = result
           Loop While (index <= &HFF)
       End Sub

  • 1 month later...
Posted

There are no 20 zeroes. Well... That's just if it's a new inhabitant. But if he/she comes from another Black City/White Forest it has the name of the trainer.

When you chat someone at White Forest, the trainer says: "I remember battling with [name] in Black City", that's the stored name :)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...