Thread: can someone explain .p and .d files to me?

Results 1 to 6 of 6
  1. #1 can someone explain .p and .d files to me? 
    Registered Member
    Join Date
    Aug 2019
    Posts
    4
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    I've downloaded a matrix server and after inspecting the code base, the players information is being stored with in a .p file
    [Only registered and activated users can see links. ]

    I'm unsure of how to edit this file, as when i open it in notepad it returns mangled text:
    [Only registered and activated users can see links. ]

    I also have found .d file types where I believe the nps drops are being stored:
    [Only registered and activated users can see links. ]

    Could someone with more knowledge please shed some light upon I?
    Reply With Quote  
     

  2. #2  
    Registered Member
    Join Date
    Jun 2013
    Posts
    68
    Thanks given
    15
    Thanks received
    37
    Rep Power
    33
    The file extensions .p & .d have no real significance to the file-type. For example; .p could stand for player or packed. It's really decided at the programmers discretion and could be changed to .apples if you really wanted to.

    With Matrix frameworks you need to edit the unpacked file (usually a .txt).



    Here is an example, Edit files unpackedCustomSpawnsList.txt then delete the packedSpawns folder. When you reboot the server all the files should automatically re-pack themselves and it will regenerate a packedSpawns folder.

    Look inside the classes to see which files need to be deleted in order for them to be re-packed.
    Reply With Quote  
     

  3. #3  
    Registered Member
    hc747's Avatar
    Join Date
    Dec 2013
    Age
    23
    Posts
    1,448
    Thanks given
    3,133
    Thanks received
    672
    Discord
    View profile
    Rep Power
    1029
    Quote Originally Posted by guydatpwnz3 View Post
    I've downloaded a matrix server and after inspecting the code base, the players information is being stored with in a .p file
    [Only registered and activated users can see links. ]

    I'm unsure of how to edit this file, as when i open it in notepad it returns mangled text:
    [Only registered and activated users can see links. ]

    I also have found .d file types where I believe the nps drops are being stored:
    [Only registered and activated users can see links. ]

    Could someone with more knowledge please shed some light upon I?
    They're being serialized in a binary format - modifying them with a text editor is unsafe to do; if you want something human readable / editable, use JSON, XML, CSV, YAML, SQL etc.

    Quote Originally Posted by elitecodez View Post
    They are essentially RandomAccessFile

    More info: [Only registered and activated users can see links. ]

    The file extensions .p & .d have no real significance to the file-type. For example; .p could stand for player or packed. It's really decided at the programmers discretion and could be changed to .apples if you really wanted to.
    Has nothing to do with Random Access File(s), though you are correct in that the extension is arbitrary.
    [Only registered and activated users can see links. ]
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    Jun 2013
    Posts
    68
    Thanks given
    15
    Thanks received
    37
    Rep Power
    33
    Quote Originally Posted by hc747 View Post
    They're being serialized in a binary format - modifying them with a text editor is unsafe to do; if you want something human readable / editable, use JSON, XML, CSV, YAML, SQL etc.


    Has nothing to do with Random Access File(s), though you are correct in that the extension is arbitrary.
    Thanks for highlighting that one, my mistake.

    I'll edit my post and remove the Random Access File info and leave the rest; as it does explain how the matrix server loads & packs shops, drops, spawns, etc.
    Reply With Quote  
     

  5. Thankful user:


  6. #5  
    Contributor

    clem585's Avatar
    Join Date
    Sep 2013
    Posts
    3,555
    Thanks given
    652
    Thanks received
    640
    Rep Power
    358
    Important information regarding serialized files: they were not created to support changes made to the code, but rather to store objects with a fixed structure like database objects. In other words, if you remove or change a field from the Player class you might get errors trying to load a previous player save.
    Project thread
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  7. Thankful user:


  8. #6  
    Registered Member
    Join Date
    Aug 2019
    Posts
    4
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    Thank you for all the information guys it really helps push my rsps devlopment as knowing this has allowed me to do alot of stuff
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Replies: 0
    Last Post: 09-12-2015, 03:12 PM
  2. Replies: 2
    Last Post: 10-13-2014, 02:54 PM
  3. Replies: 8
    Last Post: 01-22-2013, 10:44 AM
  4. Replies: 5
    Last Post: 10-26-2009, 04:47 PM
  5. Replies: 2
    Last Post: 04-24-2009, 02:57 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •