WIP Beta released C# Grille.BeamNG.Lib v0.1.2

Discussion in 'Utilities and programming' started by Grille, May 14, 2024.

  1. Grille

    Grille
    Expand Collapse

    Joined:
    Aug 17, 2019
    Messages:
    208
    BeamNG.Lib

    C#/Net6 Library derived of my [BeamNG_LevelTemplateCreator] project.

    Its currently focusing on level data and is generally very WIP.
    If you find a piece of code useful but don’t want to include the whole library, feel free to copy paste.
    Credits to this project are appreciated but not necessary.

    Links

    Features
    • Read/Write BeamNG terrain binary files (testet againt file version 9 used by 0.32)
    • Parsing/Writing of BeamNG scene-tree json
     
    #1 Grille, May 14, 2024
    Last edited: May 14, 2024
    • Like Like x 2
  2. burilkovdeni

    burilkovdeni
    Expand Collapse

    Joined:
    Aug 21, 2014
    Messages:
    1,187
    is there a way to just download this was whole .zip file?
     
  3. Grille

    Grille
    Expand Collapse

    Joined:
    Aug 17, 2019
    Messages:
    208
    Under GitHub you can download the repository as zip, or do you mean precompiled .dll?
     
    • Like Like x 1
  4. burilkovdeni

    burilkovdeni
    Expand Collapse

    Joined:
    Aug 21, 2014
    Messages:
    1,187
    where do you put the zip file?

    This is a nice and usefull tool
     
  5. Grille

    Grille
    Expand Collapse

    Joined:
    Aug 17, 2019
    Messages:
    208
    • Like Like x 1
  6. burilkovdeni

    burilkovdeni
    Expand Collapse

    Joined:
    Aug 21, 2014
    Messages:
    1,187
    I downloaded the file, which direcory/path do put that file in?
     
  7. Grille

    Grille
    Expand Collapse

    Joined:
    Aug 17, 2019
    Messages:
    208
    The downloadable zip files contain a standalone program, you extract the zip it and run the program.

    As for this thread, it’s a net6 programming library consumed by other programs, neither is an regular BeamNG mod that does anything useful while zipped.
     
    • Like Like x 1
  8. AlexKidd71

    AlexKidd71
    Expand Collapse

    Joined:
    Mar 16, 2022
    Messages:
    492
    That's very kind and helpful! I really can upgrade my code with your library! Thanks again for this.
     
  9. AlexKidd71

    AlexKidd71
    Expand Collapse

    Joined:
    Mar 16, 2022
    Messages:
    492
    One question. With the Lib, is it possible to read an existing already terraformed terrain, add a material and save it so that the new material is selectable in the terrain painter? Or do I have to do some split and merge operations on the binary?
     
  10. Grille

    Grille
    Expand Collapse

    Joined:
    Aug 17, 2019
    Messages:
    208
    Ist possible ^^

    The Grille.BeamNG.Terrain class can both load and save, and exposes an string[] MaterialNames property that can be changed.
    It has also a TerrainDataBuffer Data property, that gives complete access to the terrain data like height and used material.
    --- Post updated ---
    I also plan on adding some extra functionality to terrain like resizing terrain data, or drawing one terrain block on another to combine them.

    Would be relatively easy for me to add and potentially very useful.
     
    • Like Like x 2
  11. AlexKidd71

    AlexKidd71
    Expand Collapse

    Joined:
    Mar 16, 2022
    Messages:
    492
    oh yes! A lot of possibilities come into my mind :)
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice