Results 1 to 5 of 5

Thread: Project Pokemon Save Editor - To Do List

  1. #1
    Your Pokémon has hex data too! DeveloperGame Save ResearcherRAM ResearcherIRC OwnerWiki ContributorContributor - ForumEvent ContributorAdministrator Sabresite's Avatar
    Join Date
    Mar 2009
    Location
    Los Angeles
    Posts
    588

    Project Pokemon Save Editor - To Do List

    Here will be a nice list of ToDo's for PPSE. This list will be updated with new stuff, and old stuff will be subtracted as necessary.

    • Change hardcoded resources.cpp information to a text or binary loaded resource to lower initialization file.
    • Add PokeText <--> Unicode library for fixed-length, dynamic length strings, and trash byte support using the font dictable.
    • Create a universal file loading handler to handle all possible formats. Handler will keep the file in memory then convert the file to the raw SAV format.
    • Create a universal file saving handler to handle all possible formats. Handler will covert the modified sav file to the same format as the original file from memory. Handler should automatically handle headers/footers.
    I will know everything about pokemon and when I do, you will too.



  2. #2
    Learning to breathe IRC VOPDeveloperGame Save ResearcherModerator codemonkey85's Avatar
    Join Date
    Apr 2009
    Location
    New Milford, CT
    Age
    28
    Posts
    983

    Re: Project Pokemon Save Editor - To Do List

    As far as a PokéText dictionary / string conversion formula goes, Jiggy and I have both done this. I know for my part that the function I wrote will take a string of any size and output the PokéText data as a byte array (including an optional boolean parameter for whether or not to append the FF FF terminator). Conversely, I wrote a function that will accept such a byte array and turn it into a string. Am I misunderstanding your intentions?

    And I also wrote a function that accepts a filename, determines which kind of save format to use, and returns an object of the matching type. Right now there are two structures to choose from, either DPSaveFile or PtSaveFile. I am using binary serialization to load / save these structures.

    Jiggy-Ninja and SCV did something different here; I believe Jiggy wrote a series of constructors to obtain the data from a "file vector" or somesuch Qt terminology.

    Unless you are referring to .DUC, .Sav, and all of those formats.

    You should take a look at my source one day, if you can manage to read VB.Net without a brain hemmorhage.

  3. #3
    Your Pokémon has hex data too! DeveloperGame Save ResearcherRAM ResearcherIRC OwnerWiki ContributorContributor - ForumEvent ContributorAdministrator Sabresite's Avatar
    Join Date
    Mar 2009
    Location
    Los Angeles
    Posts
    588

    Re: Project Pokemon Save Editor - To Do List

    Quote Originally Posted by codemonkey85 View Post
    As far as a PokéText dictionary / string conversion formula goes, Jiggy and I have both done this. I know for my part that the function I wrote will take a string of any size and output the PokéText data as a byte array (including an optional boolean parameter for whether or not to append the FF FF terminator). Conversely, I wrote a function that will accept such a byte array and turn it into a string. Am I misunderstanding your intentions?

    And I also wrote a function that accepts a filename, determines which kind of save format to use, and returns an object of the matching type. Right now there are two structures to choose from, either DPSaveFile or PtSaveFile. I am using binary serialization to load / save these structures.

    Jiggy-Ninja and SCV did something different here; I believe Jiggy wrote a series of constructors to obtain the data from a "file vector" or somesuch Qt terminology.

    Unless you are referring to .DUC, .Sav, and all of those formats.

    You should take a look at my source one day, if you can manage to read VB.Net without a brain hemmorhage.
    I haven't seen your VB code in regards to PokeText. I cannot find anything in the PPSE SVN for PokeText, so I will probably end up writing it. I have the code already taken care of, basically everything you said, except it also handles trash bytes dynamically.

    For the file loading, yeah I was going to expand on what has already been coded to support other formats universally, so the program can load a file and save it using the same object.
    I will know everything about pokemon and when I do, you will too.



  4. #4
    Learning to breathe IRC VOPDeveloperGame Save ResearcherModerator codemonkey85's Avatar
    Join Date
    Apr 2009
    Location
    New Milford, CT
    Age
    28
    Posts
    983

    Re: Project Pokemon Save Editor - To Do List

    Quote Originally Posted by Sabresite View Post
    I haven't seen your VB code in regards to PokeText.
    Here it is, if you want to see it.

    And here's how I basically use it:

    Spoiler
    Code:
        Public Shared CNVRT As New PKMFontConverter
    
        Public Shared Function PKMBytesToString(ByVal Byte_Array() As Byte) _
    As String
    
            PokemonLib.InitializeDictionaries()
    
            If Byte_Array.Length = 1 Then
                Dim buf As Byte = Byte_Array(0)
                ReDim Byte_Array(1)
                Byte_Array(0) = buf
            End If
    
            Dim strName As String = ""
            For iCount As Integer = 0 To Byte_Array.Length - 1 Step 2
                Dim iByte As UInt16 = BitConverter.ToUInt16(New Byte() {Byte_Array(iCount), Byte_Array(iCount + 1)}, 0)
                If iByte >= 0 Then
                    If iByte <> &HFFFF Then strName &= Char.ConvertFromUtf32(CNVRT.PKMToUnicode(iByte))
                End If
                If Byte_Array(iCount + 0) = &HFF And Byte_Array(iCount + 1) = &HFF _
                 Then Return strName
            Next
            Return strName
    
        End Function
    
    
        Public Shared Function StringToPKMBytes(ByVal mString As String, Optional ByVal Terminator As Boolean = False) As Byte()
            If mString = "" Then Return New Byte() {}
            Dim Data((mString.Length * 2) + 1) As Byte
            Dim strData As String = ""
            For i As Integer = 0 To mString.Length - 1
                Dim _i As Byte() = BitConverter.GetBytes(CNVRT.UnicodeToPKM(Char.ConvertToUtf32(mString, i)))
                strData &= _i(0) & "," & _i(1) & ","
            Next
            strData = strData.Substring(0, strData.LastIndexOf(","))
            Dim _strData() As String = strData.Split(",")
            CNVRT.DictionaryInitialize()
            For i As Integer = 0 To _strData.Length - 1
                Try
                    Data(i) = Integer.Parse(_strData(i))
                Catch ex As Exception
                    Console.WriteLine(Err.Number & ": " & ex.Message)
                    Stop
                End Try
            Next
            If Terminator Then
                If _strData.Length = Data.Length Then
                    Data(Data.Length - 2) = &HFF
                    Data(Data.Length - 1) = &HFF
                Else
                    Data(_strData.Length) = &HFF
                    Data(_strData.Length + 1) = &HFF
                End If
            End If
            strData = ""
            For i As Integer = 0 To Data.Length - 1
                strData &= Hex(Data(i)) & ", "
            Next
            If Terminator Then Return Data
            Dim dataout(Data.Length - 3) As Byte
            Array.Copy(Data, 0, dataout, 0, dataout.Length)
            Return dataout
        End Function

  5. #5
    PMD Researcher DeveloperGame Save ResearcherROM ResearcherEvent ContributorModeratorSuper Moderator evandixon's Avatar
    Join Date
    Apr 2009
    Location
    An Aperture Science lab near Treasure Town
    Posts
    1,947
    Blog Entries
    1

    Re: Project Pokemon Save Editor - To Do List

    Unstuck because this program was abandoned.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •