Unsolved How to use readJsonFile in the mod zip

Discussion in 'Mod Support' started by jojos38, Jan 24, 2018.

  1. jojos38

    jojos38
    Expand Collapse

    Joined:
    Oct 22, 2013
    Messages:
    1,071
    Hi, in my mod i would like to use this command:
    readJsonFile("/mods/sirenmod/config/settings.json")
    and i would to know if it's possible to get the .zip path of my mod for exemple:
    mods/mymodZIPpath/...

    Thanks in advance :)
     
  2. thomatoes50

    thomatoes50
    Expand Collapse
    BeamNG Team

    Joined:
    Jan 31, 2013
    Messages:
    722
    Code:
    readJsonFile("file.json")
    Returns directly a table with the data from your json file



    for the mod folder :
    the argument is the zip filename without path or extension
    Code:
    core_modmanager.getModDB("maluch").dirname
    --"mods/repo/"
    
    core_modmanager.getModDB("maluch").fullpath
    --"mods/repo/maluch.zip"
     
  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