Thanks for your answer though the JSON is valid, I’ve checked it with an online JSON verifier as well as a normal browser console.
Also, LoadResourceFile returns a string, which it’s able to do when I put the file in the root of my resource.
So if it return nil that must mean it’s unable to find the file, I’m just unable to verify how I’m supposed to form the path correctly for sub directories. My path is correct following normal standards on relative paths.
If you want to check yourself, here’s the JSON I’m trying to load.
[
{
"name": "Armor",
"type": "normal",
"mod": 16,
"start_cost": 5000,
"increment": 5000,
"labels": [
"Armor Upgrade 20%",
"Armor Upgrade 40%",
"Armor Upgrade 60%",
"Armor Upgrade 80%",
"Armor Upgrade 100%"
]
},
{
"name": "Brakes",
"type": "normal",
"mod": 12,
"start_cost": 300,
"increment": 300,
"labels": [
"Semi-metallic Brakes",
"Ceramic Brakes",
"Carbon Brakes"
]
},
{
"name": "Bumpers",
"options": [
{
"name": "Front Bumper",
"type": "normal",
"mod": 1,
"start_cost": 1000
},
{
"name": "Rear Bumper",
"type": "normal",
"mod": 2,
"start_cost": 1000
}
]
},
{
"name": "Engine",
"type": "normal",
"mod": 11,
"start_cost": 10000,
"increment": 10000,
"labels": [
"EMS Upgrade Level 1",
"EMS Upgrade Level 2",
"EMS Upgrade Level 3",
"EMS Upgrade Level 4"
]
},
{
"name": "Exhaust",
"type": "normal",
"mod": 4,
"start_cost": 1000
},
{
"name": "Grille",
"type": "normal",
"mod": 6,
"start_cost": 1000
},
{
"name": "Hood",
"type": "normal",
"mod": 7,
"start_cost": 2000
},
{
"name": "Horn",
"type": "normal",
"mod": 14,
"start_cost": 250,
"labels": [
"Truck Horn",
"Police Horn",
"Clown Horn",
"Musical Horn 1",
"Musical Horn 2",
"Musical Horn 3",
"Musical Horn 4",
"Musical Horn 5",
"Sadtrombone Horn",
"Classical Horn 1",
"Classical Horn 2",
"Classical Horn 3",
"Classical Horn 4",
"Classical Horn 5",
"Classical Horn 6",
"Classical Horn 7",
"Scaledo Horn",
"Scalere Horn",
"Scalemi Horn",
"Scalefa Horn",
"Scalesol Horn",
"Scalela Horn",
"Scaleti Horn",
"Scaledo Horn High",
"Jazz Horn 1",
"Jazz Horn 2",
"Jazz Horn 3",
"Jazzloop Horn",
"Starspangban Horn 1",
"Starspangban Horn 2",
"Starspangban Horn 3",
"Starspangban Horn 4",
"Classicalloop Horn 1",
"Classical Horn 8",
"Classicalloop Horn 2"
]
},
{
"name": "Lights",
"options": [
{
"name": "Neon",
"options": [
{
"name": "Color",
"type": "neon_rgb"
},
{
"name": "Layout",
"type": "neon_layout"
}
]
},
{
"name": "Xenon",
"type": "extended_labels",
"target": "XenonLights",
"labels": [
{
"name": "Stock Lights",
"value": false
},
{
"name": "Xenon Lights",
"value": true
}
]
}
]
},
{
"name": "Livery",
"type": "livery",
"mod": 48
},
{
"name": "Plate",
"type": "extended_labels",
"labels": [
{
"name": "Blue on White 1",
"value": 0
},
{
"name": "Blue on White 2",
"value": 3
},
{
"name": "Blue on White 3",
"value": 4
},
{
"name": "Yellow on Blue",
"value": 2
},
{
"name": "Yellow on Black",
"value": 1
}
]
},
{
"name": "Respray",
"options": [
{
"name": "Primary Color",
"type": "extended_labels",
"labels": []
},
{
"name": "Secondary Color",
"type": "extended_labels",
"labels": []
},
{
"name": "Pearlescent",
"type": "extended_labels",
"labels": []
}
]
},
{
"name": "Roll Cage",
"type": "normal",
"mod": 5,
"start_cost": 5000
},
{
"name": "Roof",
"type": "normal",
"mod": 10,
"start_cost": 1500
},
{
"name": "Spoiler",
"type": "normal",
"mod": 0,
"start_cost": 1000
},
{
"name": "Skirts",
"type": "normal",
"mod": 3,
"start_cost": 500
},
{
"name": "Suspension",
"type": "normal",
"mod": 15,
"start_cost": 5000,
"increment": 5000,
"labels": [
"Lowered Suspension",
"Street Suspension",
"Sport Suspension",
"Competition Suspension",
"Race Suspension"
]
},
{
"name": "Transmission",
"type": "normal",
"mod": 13,
"start_cost": 7000,
"increment": 3000,
"labels": [
"Street Transmission",
"Sports Transmission",
"Race Transmission"
]
},
{
"name": "Turbo",
"type": "extended_labels",
"start_cost": 50000,
"labels": [
{
"name": "None",
"value": false
},
{
"name": "Turbo Tuning",
"value": true
}
]
},
{
"name": "Wheels",
"options": [
{
"name": "Rims",
"options": [
{
"name": "Highend",
"type": "wheels",
"wheel_type": 7,
"labels": []
},
{
"name": "Lowrider",
"type": "extended_labels",
"wheel_type": 2,
"labels": []
},
{
"name": "Muscle",
"type": "extended_labels",
"wheel_type": 1,
"labels": []
},
{
"name": "Offroad",
"type": "extended_labels",
"wheel_type": 4,
"labels": []
},
{
"name": "Sport",
"type": "extended_labels",
"wheel_type": 0,
"labels": []
},
{
"name": "SUV",
"type": "extended_labels",
"wheel_type": 3,
"labels": []
},
{
"name": "Tuner",
"type": "extended_labels",
"wheel_type": 5,
"labels": []
}
]
},
{
"name": "Tyre Smoke",
"type": "extended_labels",
"target": "TyreSmokeColor",
"labels": [
{
"name": "White Tire Smoke",
"value": [ 255, 255, 255 ]
},
{
"name": "Black Tire Smoke",
"value": [ 1, 1, 1 ]
},
{
"name": "Blue Tire Smoke",
"value": [ 0, 150, 255 ]
},
{
"name": "Yellow Tire Smoke",
"value": [ 255, 255, 50 ]
},
{
"name": "Orange Tire Smoke",
"value": [ 255, 153, 51 ]
},
{
"name": "Red Tire Smoke",
"value": [ 255, 10, 10 ]
},
{
"name": "Green Tire Smoke",
"value": [ 10, 255, 10 ]
},
{
"name": "Purple Tire Smoke",
"value": [ 153, 10, 153 ]
},
{
"name": "Pink Tire Smoke",
"value": [ 255, 102, 178 ]
},
{
"name": "Gray Tire Smoke",
"value": [ 128, 128, 128 ]
}
]
},
{
"name": "Wheel Details",
"options": [
{
"name": "Bullet Proofing",
"target": "TyerBulletProof",
"type": "extended_labels",
"labels": [
{
"name": "Normal Tires",
"vale": false
},
{
"name": "Reinforced Tires",
"value": true
}
]
},
{
"name": "Custom Wheels",
"target": "Variation",
"type": "extended_labels",
"labels": [
{
"name": "Stock Tires",
"value": false
},
{
"name": "Custom Tires",
"value": true
}
]
},
{
"name": "Wheel Color",
"type": "extended_labels",
"labels": [
]
}
]
}
]
},
{
"name": "Windows",
"type": "extended_labels",
"labels": [
{
"name": "Clear",
"value": 0
},
{
"name": "Lightsmoke",
"value": 3
},
{
"name": "Darksmoke",
"value": 2
},
{
"name": "Pure Black",
"value": 1
},
{
"name": "Limo",
"value": 4
},
{
"name": "Green",
"value": 5
}
]
}
]