[For Devs] PK2 Writer .NET

Results 1 to 12 of 12
  1. #1
    Account Upgraded | Title Enabled! lemoniscool is offline
    MemberRank
    Nov 2009 Join Date
    GermanyLocation
    579Posts

    [For Devs] PK2 Writer .NET

    This is not a ready-to-use program this release is intended for devolopers
    Hi!

    Ive been working on a way to implement the PK2API functions for importing into PK2's made by Drew Benton (pushedx) into C# and/or VB.net programs and finally i managed to do so! Below you will find a dll that includes those functions and a Class for VB.net or C# you can use in your projects.

    Credeits:
    - PK2Writer API: Drew Benton (pushedx)
    - API Conversion to DLL: LemoniscooL
    - VB.Net / C# Class: LemoniscooL

    Features:
    - Open PK2 files with any blowfish key
    - Import files to the pk2

    Known bugs:
    - none

    Available Functions:
    - Initialize
    Sets up GfxFileManager.DLL for PK2 operations. This function must be called first.
    - Deinitialize
    Cleans up GfxFileManager.DLL. This function must be called before the program exits and after Close if a PK2 file was opened.
    - Open
    Opens a PK2 file for writing. Use:
    "169841" - For official sro, mysro
    "\x32\x30\x30\x39\xC4\xEA" - for zszc, swsro
    - Close
    Closes an opened PK2 file. This function must be called before the program exits and before Deinitialize is called.
    - ImportFile
    Imports a file to the PK2.
    'entryFilename' should be the full path the file should have in the PK2 (including filename).
    Example:
    Please note: in C# you have to escape the backslashes (that means use \\ instead of \)
    Code:
    PK2Writer.Initialize("D:\Silkroad\GFXFileManager.dll")
    PK2Writer.Open("D:\Silkroad\Media.pk2", "169841", 6)
    
    PK2Writer.ImportFile("\sv.t", "D:\Silkroad\Patch\sv.t")
    
    PK2Writer.Close()
    PK2Writer.Deinitialize()
    Downloads:
    PK2Writer.dll & Classes: PK2Writer.rar

    greetz
    LemoniscooL
    Last edited by lemoniscool; 30-03-13 at 03:40 PM. Reason: typo >.<


  2. #2
    Enthusiast 3DProgramme is offline
    MemberRank
    Jun 2012 Join Date
    31Posts

    Re: [For Devs] PK2 Writer .NET

    If it's able to overwrite pk2 files, it's awesome :O

  3. #3
    (⌐■_■) NourAyman is offline
    MemberRank
    Feb 2012 Join Date
    Behind you :PLocation
    683Posts

    Re: [For Devs] PK2 Writer .NET

    Nice Thread.

  4. #4
    Account Upgraded | Title Enabled! lemoniscool is offline
    MemberRank
    Nov 2009 Join Date
    GermanyLocation
    579Posts

    Re: [For Devs] PK2 Writer .NET

    Quote Originally Posted by 3DProgramme View Post
    If it's able to overwrite pk2 files, it's awesome :O
    in case you mean overwriting files inside a pk2 then the answere is yes it can
    it can both import files that do not exist already inside the pk2 and also overwrite the file inside the pk2 if it exists already

  5. #5
    Developer sladlejrhfpq is offline
    MemberRank
    Oct 2011 Join Date
    671Posts

    Re: [For Devs] PK2 Writer .NET

    really nice, thank you very much!

  6. #6
    beq $v0, $0, 0x80000000 megaman963 is offline
    MemberRank
    Sep 2011 Join Date
    r3000 - MIPSLocation
    198Posts

    Re: [For Devs] PK2 Writer .NET

    Great release, useful for developing anything related to PK2 API ... especially for manual updates or something like that ...

    Good job ^^

  7. #7
    Account Upgraded | Title Enabled! lemoniscool is offline
    MemberRank
    Nov 2009 Join Date
    GermanyLocation
    579Posts

    Re: [For Devs] PK2 Writer .NET

    Quote Originally Posted by megaman963 View Post
    Great release, useful for developing anything related to PK2 API ... especially for manual updates or something like that ...

    Good job ^^
    thats exactly what i wrote it for, my own launcher, with patch download and patching process ^^

  8. #8
    Novice Crous is offline
    MemberRank
    May 2013 Join Date
    2Posts

    Re: [For Devs] PK2 Writer .NET

    Great usefull stuff!

  9. #9
    S.W.A.T K4bo is offline
    MemberRank
    Apr 2012 Join Date
    EgyptLocation
    239Posts

    Re: [For Devs] PK2 Writer .NET

    Awesome! :)

  10. #10
    Apprentice atahan150 is offline
    MemberRank
    May 2013 Join Date
    19Posts

    Re: [For Devs] PK2 Writer .NET

    so please give me the file in the non-pk2 got an empty lot pk2

  11. #11
    Account Upgraded | Title Enabled! MGProjects is offline
    MemberRank
    Oct 2011 Join Date
    BrazilLocation
    400Posts

    Re: [For Devs] PK2 Writer .NET

    reupload?

  12. #12
    Novice gabbro97 is offline
    MemberRank
    Feb 2021 Join Date
    2Posts

    Re: [For Devs] PK2 Writer .NET

    Can you reupload ? The link is broken.
    Last edited by gabbro97; 15-02-21 at 04:11 PM.



Advertisement