Solved New material file format?

Discussion in 'Mod Support' started by swift502, Aug 31, 2019.

  1. swift502

    swift502
    Expand Collapse

    Joined:
    Oct 30, 2018
    Messages:
    103
    I'm working on a map for several months now.
    When I started static models generated materials.cs file, but now they generate main.materials.json.

    I'm writing format converters in Python from one format to the other out of desperation and I'm just wondering what am I missing.

    Is this intentional?
    If so is it documented anywhere?
    Was there an update that changed this?
    Or has it always been like this?
     
  2. Alex_Farmer557

    Alex_Farmer557
    Expand Collapse

    Joined:
    Dec 28, 2016
    Messages:
    3,541
    this changed in 0.17
     
  3. swift502

    swift502
    Expand Collapse

    Joined:
    Oct 30, 2018
    Messages:
    103
    Ok thanks a lot.

    0.17 changelog:
    "Material files moved to new Json format, allowing multiple files for better modability"

    At least it's backwards compatible, but it's hell to work with both formats at the same time.
     
  4. Nadeox1

    Nadeox1
    Expand Collapse
    Spinning Cube
    BeamNG Team

    Joined:
    Aug 5, 2012
    Messages:
    14,683
    It's not documented in the Wiki, as the Wiki itself is getting replaced by proper documentation in the hopefully-near future.

    You should prefer JSON over CS, more future-proof and flexible.
    It's the same thing, just how the text is formatted is different.

    Just check one of the materials.json file, it's easier to see the difference.
    All the various variables and 'material features' names are the same.
     
    • Like Like x 2
  5. bendervdb06

    bendervdb06
    Expand Collapse

    Joined:
    May 29, 2014
    Messages:
    152
    salut moi je cherche la liste complète des groundType attribuable aux matériaux
    asphalt mud snow sand rock metal ? je n'ai pas trouvé vous avais une idée
     
  6. thomatoes50

    thomatoes50
    Expand Collapse
    BeamNG Team

    Joined:
    Jan 31, 2013
    Messages:
    722
    "vanilla" groundmodels are listed in this file gameengine.zip/art/groundmodels.json

    if you want to add custom ones you can do this
    https://www.beamng.com/threads/groundmodel-properties.24270/#post-356304
     
    • Like Like x 1
  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