[Tool] EmpyrionStuff - EPB read/write

Discussion in 'The Hangar Bay' started by Apan Loon, Jun 7, 2018.

  1. Apan Loon

    Apan Loon Lieutenant

    Joined:
    Jun 7, 2018
    Messages:
    91
    Likes Received:
    52
    I created a binary release on GitHub. It is highly likely that you need to install .Net framework v4.5.2 or later for epb and EPBLab to work. In regards to ecf, you'll probably need .Net Core v2.2 or later installed. But the use of ecf is extremely limited right now. I only use it to generate block type definitions that I later compile into epb and EPBLab. So you'll probably not have much use for it anyway.

    Also, the use of EPBLab is quite limited, yes, you can load EPB files and examine them, but you can't really do anything with them. There is a "Save As" button and it works, but since you can't really create or change anything, the point is rather blunt.

    The "New" button creates a blueprint with all shapes of SV steel blocks in a grid. I use this for reference when modelling by own shapes - shapes I have no geometry for are shown as cubes, but loading this blueprint into the game show how they should look.

    Oh, one control that isn't really mentioned anywhere is that you can hit "f" when a block is selected in the block view to focus on that block and using the scroll wheel to move closer and farther back also moves the focus point. If you want to orbit the selected block after using the scroll wheel, hit "f" again.

    EDIT: It might help if I also provide the link: https://github.com/ApanLoon/EmpyrionStuff/releases/tag/0.1

    EDIT 2: If you test this, please let me know if it works, what doesn't and what you would like to see fixed first. :)
     
    #81
    Myrmidon likes this.
  2. Apan Loon

    Apan Loon Lieutenant

    Joined:
    Jun 7, 2018
    Messages:
    91
    Likes Received:
    52
    Oops. I just noticed that the version I just uploaded can't save the blueprint generated by the "New" button. I fixed it already but won't make a new release right away. If you want to play with that particular blueprint, I uploaded it here.
     
    #82
    Last edited: Jul 2, 2019
  3. Apan Loon

    Apan Loon Lieutenant

    Joined:
    Jun 7, 2018
    Messages:
    91
    Likes Received:
    52
    I updated the summary view and added editable fields for many values:

    EPBLab-SummaryView002.png
     
    #83
    Last edited: Jul 2, 2019
  4. Apan Loon

    Apan Loon Lieutenant

    Joined:
    Jun 7, 2018
    Messages:
    91
    Likes Received:
    52
    I realise that it is a bit late, but the current version can actually do this now. :)

    The binary release from yesterday still has a read-only field, but the committed source has a writable text field for the name of signal sources. It doesn't automatically try to update any signal targets or signal operators that might be listening to it yet. I will add a feature request for an option to do that on my GitHub repository so that I won't forget.

    The previous caveat is still in effect - even though I added writing of a lot of data recently, I still only save the parts that were available in v20 of the file format. So files saved in game now (v23) may have data that will be washed away by opening and saving in EPBLab. Most notable things are custom palette and filler blocks. As long as you don't use any of the more recent features, this shouldn't cause too many issues.
     
    #84
  5. Fenra369

    Fenra369 Commander

    Joined:
    Apr 5, 2016
    Messages:
    341
    Likes Received:
    139
    I would also suggest you make it an executable of some kind... I don't have VB to run this code.
     
    #85
  6. Apan Loon

    Apan Loon Lieutenant

    Joined:
    Jun 7, 2018
    Messages:
    91
    Likes Received:
    52
    I published a new release >here<.

    EDIT: I have not done any extensive testing confirming that all information of a v20 blueprint pass through the EPBLab Load/Save process. I would appreciate feedback, either here or directly on GitHub.
     
    #86
    chaser likes this.
  7. Apan Loon

    Apan Loon Lieutenant

    Joined:
    Jun 7, 2018
    Messages:
    91
    Likes Received:
    52
    Another release:
    • Added toolbar for constructing various structures
    • Made meta tag values editable
    • Added read-only view of device groups
    • Added BlockVariant names for all block types - Thanks Taelyn for the assistance
    • Added block names from A10.2.0-2482
    >Download<

    It seems as if my server has died, so no screenshot this time.
     
    #87
    chaser likes this.
  8. Apan Loon

    Apan Loon Lieutenant

    Joined:
    Jun 7, 2018
    Messages:
    91
    Likes Received:
    52
    My server is still down - the GFX card burned up after many years of 24/7 service. I made a temporary patch so that the images I post might still be accessible and also so I can upload the image I wanted to show with the release:

    EPBLab-CreateStructures001.png
     
    #88
    Last edited: Jul 2, 2019
    chaser likes this.
  9. Apan Loon

    Apan Loon Lieutenant

    Joined:
    Jun 7, 2018
    Messages:
    91
    Likes Received:
    52
    Added a way to enter parameters for positioning and sizing structures.

    EPBLab-CreateStructures002.png
     
    #89
    Last edited: Jul 2, 2019
    chaser and Myrmidon like this.
  10. Apan Loon

    Apan Loon Lieutenant

    Joined:
    Jun 7, 2018
    Messages:
    91
    Likes Received:
    52
    Now exposes block tags.

    EPBLab-BlockTags001.png
     
    #90
    Last edited: Jul 2, 2019
    chaser and Myrmidon like this.
  11. Apan Loon

    Apan Loon Lieutenant

    Joined:
    Jun 7, 2018
    Messages:
    91
    Likes Received:
    52
    Release v0.4 - afflatus
    EPBLab
    • Added sphere structure building command
    • Added parameters to the structure building commands
    • Shows block tags in the block inspector
    • Structure commands now use a default block type that is allowed in the current blueprint type
    • Bugfix: Creation of Media3D objects is handled asynchronously so that EPBLab no longer crashes on huge blueprints

    epb/EPBLib
    • Identified some more meta tags
    • Identified DoorCount and SolidsCount
    • Guessed what blocks are allowed in what blueprints and made the "All blocks" structure building command take this into account
    • First attempt at counting blocks using guessed groupings
    • Added block types


    EPBLab-BlockView6.png

    >Download<
     
    #91
    chaser likes this.
  12. Apan Loon

    Apan Loon Lieutenant

    Joined:
    Jun 7, 2018
    Messages:
    91
    Likes Received:
    52
    After adding the "sphere" generator I got inspired and started filling in a mini-Death Star CV with a radius of 60 blocks - it feels humongous. Here is the generator room, almost an "Alien" feel to it:

    Generator Room.png

    This thing has more than 45000 blocks and it is still mostly hollow. :)

    P.S. I hope that I didn't notification-spam anyone to death - I uploaded all the images that I previously only linked to. For some reason I didn't realise that I can upload images here even though my very first post in this thread has an attachment. o_O
     

    Attached Files:

    #92
    Last edited: Jul 2, 2019
    Sup and chaser like this.
  13. Apan Loon

    Apan Loon Lieutenant

    Joined:
    Jun 7, 2018
    Messages:
    91
    Likes Received:
    52
    There hasn't been many updates in a while. Some block types has been added here and there but nothing major. Today I added read support for the new things added in the two new versions of the file format that I missed:

    v24: Three new counters of unknown use
    v25: Flags for lock codes, "Private" and "Token"

    I now also show these and the lock code itself in EPBLab.

    Some day I might consider re-factoring this entire project considering the new information given in the configuration files. I am quite certain that these will throw some light on a few of the shady assumptions I made.

    EDIT: EPBLib apparently saves v23 files, not v20.
    EDIT2: Now EPBLib saves version 25 files, so lock code flags are saved too.
     
    #93
    Last edited: Apr 23, 2020
    Myrmidon likes this.
  14. Myrmidon

    Myrmidon Rear Admiral

    Joined:
    Mar 26, 2016
    Messages:
    1,729
    Likes Received:
    2,058
    Thank you for the update notes. Nice to hear from you again. Do you think it might be easy for you to make a usage video? Who knows you may attract new players to use that now may not understand it. Same goes for old thread followers.
     
    #94
  15. Apan Loon

    Apan Loon Lieutenant

    Joined:
    Jun 7, 2018
    Messages:
    91
    Likes Received:
    52
    I am not sure that I will make proper user manuals or tutorial videos, at least not now.

    My main goal with this is still figuring out the file format. The fact that enough has been uncovered for EPBLab to exist is more of a bonus.

    I am more likely to respond to specific questions like “how do I change the lock code in a blueprint” and I would reply with something like this:

    1. Make a copy of the blueprint file in the Empyrion folder
    2. Open the blueprint in EPBLab, note that large builds may make it crash
    3. Go to the Blocks tab and expand the Devices node in the block tree
    4. Locate the device you want to change and select it
    5. In the block info section below the tree you se “Lock code”, here you can toggle the code on/off, set a new code or toggle the “Private” and “Token” flags
    6. Click “Save as...” and save your modified blueprint.
    Note that since not all of the file format is fully understood, some features might be lost in this process. This is the reason for the importance of the first step.

    Edit: Of course you can do this in game too. This was just an example.
     
    #95
    Last edited: Apr 24, 2020
  16. nickotin.zp.ua

    nickotin.zp.ua Ensign

    Joined:
    Nov 30, 2020
    Messages:
    1
    Likes Received:
    1
    I will be very grateful if you will back to the application and update it. Currently, I can't open any .epb file using EPBLab v0.4.
     
    #96
    Myrmidon likes this.
  17. Apan Loon

    Apan Loon Lieutenant

    Joined:
    Jun 7, 2018
    Messages:
    91
    Likes Received:
    52
    Creaks open the dusty old coffin lid

    Huh?

    Blinks

    What's up?
     
    #97
    Myrmidon and Kassonnade like this.
  18. Apan Loon

    Apan Loon Lieutenant

    Joined:
    Jun 7, 2018
    Messages:
    91
    Likes Received:
    52
    Release v0.5 - equity
    epb/EPBLib
    • Saves as v26
    • Added two unknown floats that appeared in v26 of the EPB file format (Read/write)
    • Added MetaTagUInt10x3 - a UInt32 that contains three ten bit integers. This is used by RotationSensitivity
    • Renamed MetaTag03 to MetaTagFloat
    • Renamed MetaTag05 to MetaTagDateTime
    • MetaTag02 renamed to MetaTagUInt32
    • Added meta tag 20 (RotationSensitivity)
    • Now reads the lock code flags "IsPrivate" and "RequiresToken" as added some time around build 2877 (File format v25)
    • Added three more unknown counters as they appeared in v24 of the format
    • Added blocks for build 2759
    • Added blocks for build 2717
    • Added block types and variants for build 2687-10.6.0 EXP
    • Added blocks for build 2625
    • Renamed some meta tags after checking the "prefabinfo" console command
    • Modified resource blocks as they were included in the config of build 2543
    • Defaulting BlockPos.U1 and BlockPos.U2 to 8 instead of 0 make the lock codes work. Probably the other references too, but not tested.
    • Unknown07 is lock codes
    • Added block for build 2535
    • Bugfix - The masking was off in the block type matrix, this made the variants funky. Saving did not retain the same variants as loaded

    EPBLab
    • Added new unknown floats in the summary view
    • Added the unknown byte of MetaTagUInt32 to the UI for completeness
    • Added the three unknown counters for file format v24
    • Added controls for lock codes
    • Shows the properties of the selected block type
    • Fixed bug that prevented 256 as width, height or depth
    • Added Cylinder structure
    • Added parameters to Box and Sphere

    (Note: Writing is not even tested)


    EPBLab-Scarab.png

    >Download<
     
    #98
    Last edited: Dec 2, 2020
    Sup, byo13 and Myrmidon like this.
  19. Myrmidon

    Myrmidon Rear Admiral

    Joined:
    Mar 26, 2016
    Messages:
    1,729
    Likes Received:
    2,058
    [​IMG]
     
    #99
    Apan Loon likes this.
  20. byo13

    byo13 Captain

    Joined:
    Jul 13, 2020
    Messages:
    415
    Likes Received:
    638
    Excellent work.
    Also thanks for the BP file format specification.
     
    #100

Share This Page