Released Zeit Radio (The Zeidio) - Discussion Thread 3.4.1 Release

A radio available on any vehicle, controlled through an UI app.

  1. DaddelZeit

    DaddelZeit
    Expand Collapse

    Joined:
    Jul 17, 2019
    Messages:
    3,390
    _intro.gif
    Zeit Radio (The Zeidio) - Discussion/Troubleshooting



    How do I download music?
    That's up to you and what platform you use. As long as the format is either MP3, WAV, OGG or FLAC the source does not matter.

    Why does it need to copy files?

    The mod may copy files outside of itself to allow you to modify it: the JSON files for song/playlist entries are copied into your userfolder to /settings/zeit/radio/ and the assistant installs another mod to contain all of your custom songs.
    All of this should only happen once after installing the mod or opening the assistant, respectively.

    I have no audio, but the mod shows as playing.
    Make sure you are in first-person view or have enabled third-person audio in the settings.
    You can access these by clicking the cover in the player UI app.

    Does this sync to the radio in the mods supporting it?
    Yes. As the Zeit Radio mod has to be installed to function in mods containing in-depth support for it (Hirochi CCF, Procyon Centauri, Gavril Scout) it is the same internally. All changes made to the Zeit Radio will apply to these. Some mods, like the Gavril Vertex or the 1963 Volkswagen Bug include their own separate radio.

    Why do I need to "upgrade" files?
    The upgrade process moves playlists out of the tracktable file to prevent conflicts and to make editing the radio easier. Newer versions of the mod automatically use this save method.

    Can I add music manually?
    The supported file formats are: MP3, WAV, OGG or FLAC file. A cover image is optional.
    I recommend using Visual Studio Code or NotePad++ to edit the JSON files, as these support syntax detection.

    First, add the files to the game's file system.
    There are three ways to do so:
    1. Additional mod zip. (Best method, also applied by the Assistant)
    These instructions are also executed automatically when opening the Assistant.
    Download the attached template zip file ("zeit_radio_usermusic.zip") and place it in your mods folder. Then, unpack it within the game.
    upload_2024-5-22_20-19-9.png
    upload_2024-5-22_20-19-20.png
    Click the "Open in Explorer" button, navigate to the end of the folder structure and move your files into the folder with the file telling you to. Do not re-pack the zip.
    Files will only be removed if you delete the zip. They are not affected by mod updates, game updates or cache clear.

    2. Userfolder.
    Create a folder called "art" directly in your userfolder, the folder that contains your "mods" folder. In the newly created "art" make another folder called "zeitRadio". Put your files there.
    Easy to access, however files will be removed with the next cache clear.
    3. Mod zip.
    Unpack the mod through the game using the method above: search for "Radio", and click "unpack". Then, move your files to "mods/unpacked/zeit_radio/art/zeitRadio".
    Files will not be removed with the next cache clear, but will when updating the mod.

    Then, open your userfolder and navigate to "settings/zeit/radio" and open "trackTable.json". Do not edit "trackTableDefault.json" inside the mod itself. This contains default songs.
    You will need to add a song entry to the JSON. The format is as follows:
    Code:
    "unique song id":{
      "artist": "artist name" ,
      "coverUrl": "cover url, if no custom cover use art/zeitRadio/empty.png" ,
      "duration": song duration in seconds ,
      "name": "song display name" ,
      "url": "audio file path with extension (e.g.: art/zeitRadio/empty.ogg)" ,
      "volCoef": volume modifier
    },
    "duration" is the song duration in seconds. Use 0 to disable this feature.
    "volCoef" is not a required attribute, however it can be used for especially quiet songs.
    An entry may not support special characters and square/curly brackets. This will break things.
    It is best to stick to latin characters.

    Make sure that the parentheses of separate entries do not overlap. Multiple song entries are stacked behind each other.
    Code:
    "drip_fountain":{
      "artist":"gabester, CaptainZoll",
      "coverUrl":"art/zeitRadio/drip_fountain.png",
      "duration":66,
      "name":"Drip Fountain",
      "url":"art/zeitRadio/drip_fountain.mp3",
      "volCoef":4
    },
    "dicta":{
      "name":"Dicta Loop (Old Menu Music)",
      "artist":"gabester",
      "url":"art/sound/music/dicta.ogg",
      "coverUrl":"art/zeitRadio/empty.png",
      "duration":35,
      "volCoef":1.5
    },
    
    Ensure that the syntax is correct and save the json.
    The track table JSON is contained in a set of curly brackets. Make sure to not delete or skip these. They need to open at the very top and close at the very bottom.

    A song has to be in a playlist to be available for you to play.
    To edit, add or delete playlists (required when adding/removing songs) open the file called "playlists.json".
    This is what the entry format for a playlist looks like:
    Code:
    [
      "unique song id 1",
      "unique song id 2",
      "unique song id 3",
    ],
    Make sure that the parentheses of separate entries do not overlap. Multiple playlists are stacked behind each other.
    Code:
    [
      "lightrunner",
      "dicta",
      "ample_descent",
    ],
    [
      "fall_fountain",
      "splendid_misanthropy",
      "credits"
    ],
    Playlists can be added or removed. The playlist order starts at 1 beginning from the top of the file going downwards. There is no limit to how many playlists you can add and how many songs are in a playlist.
    The playlist JSON is contained in a set of square brackets. Make sure to not delete or skip these. They need to open at the very top and close at the very bottom.
    Ensure that the syntax is correct and save the json.

    Remember to apply changes.



    My songs fail to import.
    This can happen when file does not match a supported format. Make sure you correctly convert files if needed. Renaming the file extension from .mp4 to .mp3 will not work. Use external programs like XMedia Recode or similar to convert files to the target format and encoding. This can also help if the file uses an uncommon encoding that might be supported by the format but not readable by the game.

    My song covers fail to import.
    This means that the mod was unable to export a valid image from the file's ID3 tags. Try using a different program to edit the ID3 tags, or manually add a cover with the assistant.

    I get an unknown import error.
    If you experience this, please notify me of the error and provide a screenshot of the message.

    I can't select my songs to play after importing.
    Make sure to reload your vehicle properly. Either use the "Apply Changes" button in the assistant or the "Reload Vehicle" binding (CTRL+R by default). Alternatively you may restart the game.

    When im driving, the audio keeps cutting out.
    This is caused by the game's audio engine failing to keep up with streaming the audio file. This can commonly be fixed by increasing the "Maximum Voices" setting in Options > Audio.



    I'm a mod developer. How do I add support for this mod?
    This post has an attached Lua file that can be used directly with the genericGauges Lua controller supplied by BeamNG. Move this file into /vehicles/YourMod/lua/controller/gauges/customModules/. You are permitted to change it to your needs so you can use your own custom HTMLTexture Lua.
    Here's an example JBeam setup:
    Code:
        "controller": [
            ["fileName"],
            ["gauges/genericGauges", {"name":"radioScreen"}],
            ["gauges/customModules/zeitRadio"],
        ],
        "radioScreen": {
            "configuration": {
                "materialName": "",
                "htmlPath": "",
                "displayWidth":1024,
                "displayHeight":512
            },
            "displayData": {
                "electrics": [],
                "powertrain": [
                    ["deviceName", "property"]
                ],
                "customModules": [
                    ["moduleName", "property"],
                    ["zeitRadio", "songUpdate"],
                    ["zeitRadio", "durationUpdate"],
                    ["zeitRadio", "playlistUpdate"],
                    ["zeitRadio", "playPauseUpdate"],
                ]
            }
        }
    
    In your JS code, use:
    Code:
      $window.screenEnableZeidio = (data) => {
        // data[0]: bool, enabled
      }
    Code:
      $window.zeidioPlaylistChanged = (data) => {
        // data[0]: array, all song ids in this playlist
        // data[1]: dictionary, all songdata of songs in playlist
        // data[2]: int, the id of the playlist
      }
    Code:
      $window.zeidioSongChanged = (data) => {
        // data[0]: dictionary, songdata of the current song
      }
    Code:
      $window.zeidioPlayPauseChanged = (data) => {
        // data[0]: bool, paused
      }
    Code:
      $window.zeidioTimeChanged = (data) => {
        // data[0]: float, play time
        // data[1]: float, song duration
      }
    Songdata dictionaries and playlists follow the format also used in the JSON.



    If you'd like personal support you can contact me through a conversation or via Discord: zeit8323
     

    Attached Files:

    #1 DaddelZeit, May 18, 2022
    Last edited: Oct 26, 2024
    • Like Like x 11
  2. Duh anime addict

    Duh anime addict
    Expand Collapse

    Joined:
    Aug 5, 2021
    Messages:
    928
    Nice!
     
  3. 1993 MAZDA MIATA

    1993 MAZDA MIATA
    Expand Collapse

    Joined:
    Nov 19, 2021
    Messages:
    215
    i cant get it to work no matter what
     
    #3 1993 MAZDA MIATA, May 18, 2022
    Last edited: May 18, 2022
  4. imma EL Camino

    imma EL Camino
    Expand Collapse

    Joined:
    Mar 30, 2021
    Messages:
    34
    okay i need help i dont know if this is right or if it works at all, there was no Track.table so i just made a new one and put the folowing code in and i dont know whats wrong because its not working, and yes i do (i think) have the correct files in place
     

    Attached Files:

    • Screenshot218.png
    • Screenshot220_LI.jpg
    #4 imma EL Camino, May 19, 2022
    Last edited: May 19, 2022
  5. DaddelZeit

    DaddelZeit
    Expand Collapse

    Joined:
    Jul 17, 2019
    Messages:
    3,390
    The track table is in 0.24/settings/zeit/radio, not in the mod. Also, the <> brackets are not allowed in JSON syntax, I just put them into the tutorial to make it clear that it's a template. The playlist requires you to enter the song id, not name.
     
  6. Nanandmic567

    Nanandmic567
    Expand Collapse

    Joined:
    Oct 3, 2021
    Messages:
    160
    I just tried recently and it's alright to listening, but I have some question about the internet streaming radio URLs (Or any other media URL available) because I like to listens these a lot. But the limitation to uses only just MP3/WAV medias aren't enough for me... So, this was just a thought about that.
     
  7. DaddelZeit

    DaddelZeit
    Expand Collapse

    Joined:
    Jul 17, 2019
    Messages:
    3,390
    I cannot access external resources outside of beamng.com (and that also only through angular/UI stuffs) so no, unfortunately not possible.
     
    • Agree Agree x 1
  8. Argicity

    Argicity
    Expand Collapse

    Joined:
    Apr 7, 2021
    Messages:
    9
    Kinda frustrating that i edited some tracks and i saved it but it all dissapeared once i got into the game. I dont know if its the mod that did that or something but it would be cool if theres an automatic coder like the guy in the Mod Review said
     
  9. DaddelZeit

    DaddelZeit
    Expand Collapse

    Joined:
    Jul 17, 2019
    Messages:
    3,390
    The file should only be overridden again if there was a JSON syntax error.
    I'll look into somehow making it an automatic process, or to avoid having the user edit the file manually. Whether that be through a UI app in game or an external program, I don't know.
     
    • Agree Agree x 1
  10. GEKA

    GEKA
    Expand Collapse

    Joined:
    Oct 28, 2021
    Messages:
    280
    I moved the music to a file according to the instructions in the preferred way and edited it according to the template, saved it then packed it and went into the game.
    But the music was not detected.
    I opened the json file again to find errors, but it turned out that the game deletes all changes in the "trackTable.json" immediately after the game is launched.:(
    Why can this be and how can it be fixed?
     
  11. DaddelZeit

    DaddelZeit
    Expand Collapse

    Joined:
    Jul 17, 2019
    Messages:
    3,390
    Please check if you make any syntax errors inside the trackTable.json. The game cannot read the file if there are errors and will replace it with the default because of this.
    I recommend using NotePad++ or Visual Studio Code to edit JSONs as those have good syntax detection.
    I apologise for not having made a tool to do all the technical stuff and only requiring the user to put in the name, author etc.
     
  12. imma EL Camino

    imma EL Camino
    Expand Collapse

    Joined:
    Mar 30, 2021
    Messages:
    34
    sorry im a little stupid but where do i find the song id?
     
  13. DaddelZeit

    DaddelZeit
    Expand Collapse

    Joined:
    Jul 17, 2019
    Messages:
    3,390
    You can just make that up. It's the text that's right before the curly brackets where you put in your song info.
     
  14. Wild Hog

    Wild Hog
    Expand Collapse

    Joined:
    Oct 30, 2016
    Messages:
    1,145
    It works but the balance is all wrong for me, it only really comes out the left channel plus it sounds pretty muffled
     
    • Like Like x 1
    • Agree Agree x 1
  15. DaddelZeit

    DaddelZeit
    Expand Collapse

    Joined:
    Jul 17, 2019
    Messages:
    3,390
    Yes this unfortunately is because of how the game works. I might be able to set the sounds to 2D rather than 3D, however this would mean that the radio either simply wouldn't play at all when outside or always play outside at any distance, just quiet. The muffling is part of the driver cam sound muffling which is hardcoded into the game engine sadly.
     
    • Agree Agree x 1
  16. Wild Hog

    Wild Hog
    Expand Collapse

    Joined:
    Oct 30, 2016
    Messages:
    1,145
    Weird, 'cause it starts out sounding fine sometimes but as soon as you do anything (restore car position, switching camera etc.) it get's muffled
     
  17. OmegaWolf543

    OmegaWolf543
    Expand Collapse

    Joined:
    May 22, 2022
    Messages:
    1
    I cannot for the life of me get this to work. the song displays on the radio correctly, and plays, but there's no sound. I've changed the volume, and I've also made sure my mp3 file was correct and functioning, so that's not the issue. I've also made sure that I coded it correctly, and everything displays properly, but no sound
     
  18. Ilovecarcrash101

    Ilovecarcrash101
    Expand Collapse

    Joined:
    Sep 5, 2013
    Messages:
    118
    Code:
      "playlists":{
        "1":[
          "lightrunner",
          "dicta",
          "ample_descent",
          "fall_fountain",
          "splendid_misanthropy",
          "credits",
          "drip_fountain"
        ]
      },
     END??
      "splendid_misanthropy":{
        "artist":"gabester",
        "coverUrl":"art/zeitRadio/splendid_misanthropy.jpg",
        "duration":338,
        "name":"Splendid Misanthropy",
        "url":"art/zeitRadio/splendid_misanthropy.mp3",
        "volCoef":3
      }
    Why does an entry for a specific song appear after song definition & playlist?
    That's confusing.

    Also your explaination should be improved in the post. At first you say it only requires to add WAV or MP3 Files to add to one of those locations, but you didn't mentioned that it needs a json defintion in order to work.

    And
    should be highlighted to bold.

    Also what about duration value? Which values can't be ignored, which don't?

    And for a lot of none modding experienced people, it should be mentioned that Notepad++ or VS as you say, should be used to edit. I useally do, but just saying.
    Spending more time into the tutorial should result in less confusing discussions.

    And for makeing it more easier, i recommend building a simple tool which allows to add multiplie song files all at once to the tool and then maybe have a list of those selected files where each entry have a button to add a specific cover image. And in the and it saves all those entrys.
     
    #18 Ilovecarcrash101, May 25, 2022
    Last edited: May 25, 2022
    • Like Like x 1
  19. Louie's Workshop

    Louie's Workshop
    Expand Collapse

    Joined:
    Feb 5, 2021
    Messages:
    2,880
    never mind.
    I cant read
     
    #19 Louie's Workshop, May 27, 2022
    Last edited: May 27, 2022
  20. Ilovecarcrash101

    Ilovecarcrash101
    Expand Collapse

    Joined:
    Sep 5, 2013
    Messages:
    118
    Ok here is my explaination of how to add your own music. For me it kinda worked. Some songs don't play and song length seems to a bit off, idk why. But here it is.


    To add your own song to the Zeit radio mod, you have to:
    1. Install the mod
    2. Unpack the mod via the in game menu
    3. Go to the unpacked mods folder ...\0.24\mods\unpacked\zeit_radio\art\zeitRadio\
    4.
    Place your MP3 or WAV file into that folder
    5. Start the game again and pack the mod with your added songs
    6. Now go to 0.24\settings\zeit\radio\ and open the trackTable.json with Notepad++ or Visual Studio
    7.
    Add a song definition after the already existing one and don't forget to add "}" for each new entry
    Code:
    "<song id>":{
      "artist":"<artist name>",
      "coverUrl":"<cover url, if no custom cover use art/zeitRadio/empty.png>",
      "duration":<song duration in seconds>,
      "name":"<song display name>",
      "url":"<audio file path (format: art/zeitRadio/xyz.xyz)>",
      "volCoef": <increases volume>
    },
    duration value is defining the max. length of each song.

    Example:
    Code:
    "iran":{
        "artist":"A Flock Of Seagulls",
        "coverUrl":"art/zeitRadio/empty.png",
        "duration":237,
        "name":"I Ran",
        "url":"art/zeitRadio/A Flock Of Seagulls - I Ran.mp3"
      },
    In my case the A Flock Of Seagulls - I Ran.mp3 file is 3 minutes and 57 seconds long. So to caculate the duration value for this song, i have to know first how long 3 minutes are in seconds. Which is 180 seconds. And now a add the 57 seconds to it and got a value of 237 which i set in "duration".
    In other words 180+57=237 seconds. Correct me if i did it wrong :).

    8. Add your newly defined song to the playlist section. If you don't want to add your song to the playlist that comes with the mod. Create a new one. In my case:
    Code:
    "2":[
          "iran",
        ]
    
    "iran" is the name of the id that i gived the song. Make it simple and lower cased like the other entrys.
    9. Now if you are done with your playlist, just safe the file and run the game.
    10. Done :D

    Example of the trackTable.json in 0.24\settings\zeit\radio before any editing:

    Code:
    "ample_descent":{
        "artist":"gabester",
        "coverUrl":"art/zeitRadio/ample_descent.jpg",
        "duration":278,
        "name":"Ample Descent",
        "url":"art/zeitRadio/ample_descent.mp3",
        "volCoef":3
      },
      "credits":{
        "artist":"gabester",
        "coverUrl":"art/zeitRadio/lonle.jpg",
        "duration":261,
        "name":"Lonle",
        "url":"art/zeitRadio/lonle.mp3"
      },
      "dicta":{
        "artist":"gabester",
        "coverUrl":"art/zeitRadio/empty.png",
        "duration":35,
        "name":"Dicta Loop (Old Menu Music)",
        "url":"music_menu"
      },
      "drip_fountain":{
        "artist":"gabester, CaptainZoll",
        "coverUrl":"art/zeitRadio/drip_fountain.png",
        "duration":66,
        "name":"Drip Fountain",
        "url":"art/zeitRadio/drip_fountain.mp3",
        "volCoef":4
      },
      "fall_fountain":{
        "artist":"gabester",
        "coverUrl":"art/zeitRadio/fall_fountain.jpg",
        "duration":288,
        "name":"Fall Fountain",
        "url":"art/zeitRadio/fall_fountain.mp3",
        "volCoef":3
      },
      "lightrunner":{
        "artist":"TDK",
        "coverUrl":"art/zeitRadio/lightrunner.png",
        "duration":1206,
        "name":"Lightrunner Loop",
        "url":"event:>Music>synthwave"
      },
      "playlists":{
        "1":[
          "lightrunner",
          "dicta",
          "ample_descent",
          "fall_fountain",
          "splendid_misanthropy",
          "credits",
          "drip_fountain"
        ]
      },
      "splendid_misanthropy":{
        "artist":"gabester",
        "coverUrl":"art/zeitRadio/splendid_misanthropy.jpg",
        "duration":338,
        "name":"Splendid Misanthropy",
        "url":"art/zeitRadio/splendid_misanthropy.mp3",
        "volCoef":3
      }

    Example of 3 added songs to the trackTable.json in 0.24\settings\zeit\radio\
    Code:
    {
      "ample_descent":{
        "artist":"gabester",
        "coverUrl":"art/zeitRadio/ample_descent.jpg",
        "duration":278,
        "name":"Ample Descent",
        "url":"art/zeitRadio/ample_descent.mp3",
        "volCoef":3
      },
      "credits":{
        "artist":"gabester",
        "coverUrl":"art/zeitRadio/lonle.jpg",
        "duration":261,
        "name":"Lonle",
        "url":"art/zeitRadio/lonle.mp3"
      },
      "dicta":{
        "artist":"gabester",
        "coverUrl":"art/zeitRadio/empty.png",
        "duration":35,
        "name":"Dicta Loop (Old Menu Music)",
        "url":"music_menu"
      },
      "drip_fountain":{
        "artist":"gabester, CaptainZoll",
        "coverUrl":"art/zeitRadio/drip_fountain.png",
        "duration":66,
        "name":"Drip Fountain",
        "url":"art/zeitRadio/drip_fountain.mp3",
        "volCoef":4
      },
      "fall_fountain":{
        "artist":"gabester",
        "coverUrl":"art/zeitRadio/fall_fountain.jpg",
        "duration":288,
        "name":"Fall Fountain",
        "url":"art/zeitRadio/fall_fountain.mp3",
        "volCoef":3
      },
      "lightrunner":{
        "artist":"TDK",
        "coverUrl":"art/zeitRadio/lightrunner.png",
        "duration":1206,
        "name":"Lightrunner Loop",
        "url":"event:>Music>synthwave"
      },
      "iran":{
        "artist":"A Flock Of Seagulls",
        "coverUrl":"art/zeitRadio/empty.png",
        "duration":237,
        "name":"I Ran",
        "url":"art/zeitRadio/A Flock Of Seagulls - I Ran.mp3"
      },
      "takeonme":{
        "artist":"A-ha",
        "coverUrl":"art/zeitRadio/empty.png",
        "duration":224,
        "name":"Take On Me",
        "url":"art/zeitRadio/A ha Take On Me.mp3"
      },
      "allthatshewants":{
        "artist":"Ace Of Base",
        "coverUrl":"art/zeitRadio/empty.png",
        "duration":209,
        "name":"All that she wants",
        "url":"art/zeitRadio/Ace of Base - All that she wants.mp3"
      },
      "playlists":{
        "1":[
          "lightrunner",
          "dicta",
          "ample_descent",
          "fall_fountain",
          "splendid_misanthropy",
          "credits",
          "drip_fountain"
        ]
        "2":[
          "iran",
          "takeonme",
          "allthatshewants",
        ]
      },
      "splendid_misanthropy":{
        "artist":"gabester",
        "coverUrl":"art/zeitRadio/splendid_misanthropy.jpg",
        "duration":338,
        "name":"Splendid Misanthropy",
        "url":"art/zeitRadio/splendid_misanthropy.mp3",
        "volCoef":3
      }
    }

    But:
    This mod currently doesn't support none english letters. So i encounter issues with songs that had letters in the song name or file name like "ä,ö,ü" or "ù". Also don't have any cling signs in your file names like sometimes songname [1998].mp3. Remove anything like that and don't forget to update your zeit mod package according to that if you had already songs put in there with these sings.
    If you have such letters in the file names, your whole game UI will go broken. Your car will spawn with broken suspension and such. If you have these letters in the song name description like for the "artist" name or "name", then you will not having problems to load the game. But the music player will show you a "?" warning emoji sign.
     
    #20 Ilovecarcrash101, May 27, 2022
    Last edited: May 28, 2022
    • 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