1. Trouble with the game?
    Try the troubleshooter!

    Dismiss Notice
  2. Issues with the game?
    Check the Known Issues list before reporting!

    Dismiss Notice
  3. Before reporting issues or bugs, please check the up-to-date Bug Reporting Thread for the current version.
    0.30 Bug Reporting thread
    Solutions and more information may already be available.

Incorrect formatting on license plate example from wiki

Discussion in 'Troubleshooting: Bugs, Questions and Support' started by Narwhal, Apr 15, 2017.

  1. Narwhal

    Narwhal
    Expand Collapse

    Joined:
    Aug 4, 2013
    Messages:
    1,698
    Hello
    I was helping as user on forums fix their license plate. I found that the example license plate .json file in the ZIP on the wiki has back slashes, when it should contain forward slashes. This caused their background image to not be found, as it was treating the whole file path as one name without slashes.

    I would update and fix it myself, but seeing as how its a user downloadable file, i would think only devs should do that. I have included the old code and the updated in spoilers below to avoid a wall of text.
    How the file is formatted now
    Code:
    {
          "name" : "username_license_plate",
            "version" : 1,
            "data" : {
                "size" : {"x" : 512, "y": 256},
                "text" : { "x" : 0.5, "y" : 0.65, "scale" : 1, "color" : "rgb(187, 61, 0)", "limit" : 8},
                "diffuse" : {
                    "spriteImg" : "vehicles\common\licenseplates\default\platefont_d.png",
                    "backgroundImg" : "vehicles\common\licenseplates\user_license_plate\user_license_plate_background_d.png",
                    "fillStyle" : "black"
                },
    
                "bump" : {
                    "spriteImg" : "vehicles\common\licenseplates\default\platefont_n.png",
                    "backgroundImg" : "vehicles\common\licenseplates\default\licenseplate-default_n.png",
                    "fillStyle" : "rgb(0,0,255)"
                },
    
                "specular" : {
                    "spriteImg" : "vehicles\common\licenseplates\default\platefont_s.png",
                    "fillStyle" : "rgb(233,233,233)"
                }
            }
      }
    How it SHOULD be
    Code:
    {
          "name" : "username_license_plate",
            "version" : 1,
            "data" : {
                "size" : {"x" : 512, "y": 256},
                "text" : { "x" : 0.5, "y" : 0.65, "scale" : 1, "color" : "rgb(187, 61, 0)", "limit" : 8},
                "diffuse" : {
                    "spriteImg" : "vehicles/common/licenseplates/default/platefont_d.png",
                    "backgroundImg" : "vehicles/common/licenseplates/user_license_plate/user_license_plate_background_d.png",
                    "fillStyle" : "black"
                },
    
                "bump" : {
                    "spriteImg" : "vehicles/common/licenseplates/default/platefont_n.png",
                    "backgroundImg" : "vehicles/common/licenseplates/default/licenseplate-default_n.png",
                    "fillStyle" : "rgb(0,0,255)"
                },
    
                "specular" : {
                    "spriteImg" : "vehicles/common/licenseplates/default/platefont_s.png",
                    "fillStyle" : "rgb(233,233,233)"
                }
            }
      }
     
    
     
  2. Narwhal

    Narwhal
    Expand Collapse

    Joined:
    Aug 4, 2013
    Messages:
    1,698
    Bump. Looks like this is still a problem. As i said, i would fix it, however i would think only devs should edit the files people download off the wiki.

    heres the wiki link
    License_plate_tutorial
     
  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