kbuzsaki / bingosync

Collaborative bingo boards for speedrun races
https://bingosync.com
90 stars 108 forks source link

Trouble with JSN Text #331

Closed LudwigTweets closed 5 months ago

LudwigTweets commented 9 months ago

For some reason, when attempting to make my own custom bingo it gives me an error when attempting it.

Attempt Code 1:

[
[
{ "name": "Purchase A Wall Weapon", "types": ["weapon"] },
{ "name": "Purchase Two Wall Weapons", "types": ["weapon"] },
{ "name": "Purchase All Wall Weapons", "types": ["weapon"] },
{ "name": "Purchase Ammo for a Wall Weapon", "types": ["weapon"] },
{ "name": "Purchase Ammo for a Pack-A-Punched Wall Weapon", "types": ["weapon"] }],

[
{ "name": "First Time Mystery Box Spin", "types": ["box"] },
{ "name": "Obtain Wonder Weapon from Box", "types": ["box"] },
{ "name": "Obtain Secondary Equipment from Box", "types": ["box"] }],

[
{ "name": "Open Two Mystery Boxes during Fire Sale", "types": ["box"] },
{ "name": "Open Three Mystery Boxes during Fire Sale", "types": ["box"] },
{ "name": "Get Every Mystery Box Weapon", "types": ["box"] },
{ "name": "Get a Teddy Bear", "types": ["box"] }],

[
{ "name": "Spend a round using an Assault Rifle", "types": ["weapon"] },
{ "name": "Spend a round using a Shotgun", "types": ["weapon"] },
{ "name": "Spend a round using a Submachine Gun", "types": ["weapon"] },
{ "name": "Spend a round using an LMG", "types": ["weapon"] },
{ "name": "Spend a round using a Handgun", "types": ["weapon"] }],

[
{ "name": "Spend a round using explosives only", "types": ["weapon"] },
{ "name": "Spend a round using a Wonder Weapon", "types": ["weapon"] },
{ "name": "Purchase a Melee Weapon", "types": ["weapon"] },
{ "name": "Purchase Grenades", "types": ["weapon"] }],

[
{ "name": "Get an Instakill", "types": ["powerup"] },
{ "name": "Get Double Points", "types": ["powerup"] },
{ "name": "Get a Carpenter", "types": ["powerup"] },
{ "name": "Get a Fire Sale", "types": ["powerup"] },
{ "name": "Get a Max Ammo", "types": ["powerup"] },
{ "name": "Get a Nuke", "types": ["powerup"] },
{ "name": "Get a Perk Bottle", "types": ["powerup"] },
{ "name": "Get a Death Machine", "types": ["powerup"] }],

[
{ "name": "Use Every Powerup Once", "types": ["powerup"] },
{ "name": "Two of the Same Powerups in a row", "types": ["powerup"] },
{ "name": "Get Two Powerups at the Same Time", "types": ["powerup"] },
{ "name": "Get Three Powerups at the Same Time", "types": ["powerup"] }],

[
{ "name": "Get Juggernog", "types": ["perk"] },
{ "name": "Get Quick Revive", "types": ["perk"] },
{ "name": "Get Speedcola", "types": ["perk"] },
{ "name": "Get Doubletap", "types": ["perk"] },
{ "name": "Self-Revive Using Quick Revive", "types": ["perk"] },
{ "name": "Get All Perks", "types": ["perk"] }],

[
{ "name": "Get the Galil", "types": ["weapon"] },
{ "name": "Get the AUG", "types": ["weapon"] },
{ "name": "Get the G11", "types": ["weapon"] },
{ "name": "Get the M16", "types": ["weapon"] }],

[
{ "name": "Get the HS10", "types": ["weapon"] },
{ "name": "Get the Crossbow", "types": ["weapon"] },
{ "name": "Get the RPK", "types": ["weapon"] },
{ "name": "Get the HK21", "types": ["weapon"] },
{ "name": "Get the Python", "types": ["weapon"] }],

[
{ "name": "Get the China Lake", "types": ["weapon"] },
{ "name": "Get Monkeybombs", "types": ["weapon"] },
{ "name": "Get the SPAS-12", "types": ["weapon"] }],

[
{ "name": "Pack-A-Punch a Weapon", "types": ["pap"] },
{ "name": "Pack-A-Punch Two Weapons", "types": ["pap"] },
{ "name": "Pack-A-Punch Every Weapon", "types": ["pap"] },
{ "name": "Leave Gun in PAP Machine", "types": ["pap"] }],

[
{ "name": "Pack-A-Punch the Galil", "types": ["pap"] },
{ "name": "Pack-A-Punch the China Lake", "types": ["pap"] }],
{ "name": "Pack-A-Punch the M16", "types": ["pap"] },
{ "name": "Pack-A-Punch the Starting Pistol", "types": ["pap"] }],

[
{ "name": "Create a Crawler", "types": ["z"] },
{ "name": "Create a headless Zombie", "types": ["z"] },
{ "name": "Kill 5 Zombies At Once", "types": ["z"] },
{ "name": "Train a Zombie through the whole map", "types": ["z"] }],

[
{ "name": "Finish a round in less than a minute", "types": ["z"] },
{ "name": "Kill a boss zombie with an explosive", "types": ["z"] }],

[
{ "name": "Kill the Boss(es) Once", "types": ["boss"] },
{ "name": "Bring the Boss through the map", "types": ["boss"] }],

[
{ "name": "Get to Round 5", "types": ["round"] },
{ "name": "Get to Round 15", "types": ["round"] },
{ "name": "Complete a round (10+) in the starting room", "types": ["round"] },
{ "name": "Complete a round (15+) with only melee", "types": ["round"] }],

[
{ "name": "Get to Round 10", "types": ["round"] },
{ "name": "Get to Round 20", "types": ["round"] },
{ "name": "Repair every barricade before the end of a round", "types": ["round"] }],

[
{ "name": "Activate the Power", "types": ["map"] },
{ "name": "Repair Two Barricades Fully", "types": ["map"] },
{ "name": "Repair Five Barricades Fully", "types": ["map"] },
{ "name": "Open All Doors", "types": ["map"] },
{ "name": "Activate a Trap Once", "types": ["map"] }],

[
{ "name": "Purchase a Perk", "types": ["map2"] },
{ "name": "100 Kill Milestone", "types": ["map2"] },
{ "name": "250 Kill Milestone", "types": ["map2"] },
{ "name": "50 Headshot Milestone", "types": ["map2"] },
{ "name": "150 Headshot Milestone", "types": ["map2"] }],

[
{ "name": "Complete a round only using a Melee Weapon past Round 10", "types": ["challenge"] },
{ "name": "Activate Every Trap in the Map Once", "types": ["challenge"] }],

[
{ "name": "Complete the Main Easter Egg", "types": ["challenge"] }],

[
{ "name": "Prome from one room to the next", "types": ["challenge"] },
{ "name": "Crouch walk with a train across the map once", "types": ["challenge"] }],

[
{ "name": "Get to 1000 kills", "types": ["challenge"] },
{ "name": "Get to 500 headshots", "types": ["challenge"] }],

[
{ "name": "Get to round 30", "types": ["challenge"] }]]

Attempt Code 2:

[
[
[
{ "name": "Purchase A Wall Weapon", "types": ["weapon"] },
{ "name": "Purchase Two Wall Weapons", "types": ["weapon"] },
{ "name": "Purchase All Wall Weapons", "types": ["weapon"] },
{ "name": "Purchase Ammo for a Wall Weapon", "types": ["weapon"] },
{ "name": "Purchase Ammo for a Pack-A-Punched Wall Weapon", "types": ["weapon"] }],

[
{ "name": "First Time Mystery Box Spin", "types": ["box"] },
{ "name": "Obtain Wonder Weapon from Box", "types": ["box"] },
{ "name": "Obtain Secondary Equipment from Box", "types": ["box"] }],

[
{ "name": "Open Two Mystery Boxes during Fire Sale", "types": ["box"] },
{ "name": "Open Three Mystery Boxes during Fire Sale", "types": ["box"] },
{ "name": "Get Every Mystery Box Weapon", "types": ["box"] },
{ "name": "Get a Teddy Bear", "types": ["box"] }],

[
{ "name": "Spend a round using an Assault Rifle", "types": ["weapon"] },
{ "name": "Spend a round using a Shotgun", "types": ["weapon"] },
{ "name": "Spend a round using a Submachine Gun", "types": ["weapon"] },
{ "name": "Spend a round using an LMG", "types": ["weapon"] },
{ "name": "Spend a round using a Handgun", "types": ["weapon"] }],

[
{ "name": "Spend a round using explosives only", "types": ["weapon"] },
{ "name": "Spend a round using a Wonder Weapon", "types": ["weapon"] },
{ "name": "Purchase a Melee Weapon", "types": ["weapon"] },
{ "name": "Purchase Grenades", "types": ["weapon"] }],

[
{ "name": "Get an Instakill", "types": ["powerup"] },
{ "name": "Get Double Points", "types": ["powerup"] },
{ "name": "Get a Carpenter", "types": ["powerup"] },
{ "name": "Get a Fire Sale", "types": ["powerup"] },
{ "name": "Get a Max Ammo", "types": ["powerup"] },
{ "name": "Get a Nuke", "types": ["powerup"] },
{ "name": "Get a Perk Bottle", "types": ["powerup"] },
{ "name": "Get a Death Machine", "types": ["powerup"] }],

[
{ "name": "Use Every Powerup Once", "types": ["powerup"] },
{ "name": "Two of the Same Powerups in a row", "types": ["powerup"] },
{ "name": "Get Two Powerups at the Same Time", "types": ["powerup"] },
{ "name": "Get Three Powerups at the Same Time", "types": ["powerup"] }],

[
{ "name": "Get Juggernog", "types": ["perk"] },
{ "name": "Get Quick Revive", "types": ["perk"] },
{ "name": "Get Speedcola", "types": ["perk"] },
{ "name": "Get Doubletap", "types": ["perk"] },
{ "name": "Self-Revive Using Quick Revive", "types": ["perk"] },
{ "name": "Get All Perks", "types": ["perk"] }],

[
{ "name": "Get the Galil", "types": ["weapon"] },
{ "name": "Get the AUG", "types": ["weapon"] },
{ "name": "Get the G11", "types": ["weapon"] },
{ "name": "Get the M16", "types": ["weapon"] }],

[
{ "name": "Get the HS10", "types": ["weapon"] },
{ "name": "Get the Crossbow", "types": ["weapon"] },
{ "name": "Get the RPK", "types": ["weapon"] },
{ "name": "Get the HK21", "types": ["weapon"] },
{ "name": "Get the Python", "types": ["weapon"] }],

[
{ "name": "Get the China Lake", "types": ["weapon"] },
{ "name": "Get Monkeybombs", "types": ["weapon"] },
{ "name": "Get the SPAS-12", "types": ["weapon"] }],

[
{ "name": "Pack-A-Punch a Weapon", "types": ["pap"] },
{ "name": "Pack-A-Punch Two Weapons", "types": ["pap"] },
{ "name": "Pack-A-Punch Every Weapon", "types": ["pap"] },
{ "name": "Leave Gun in PAP Machine", "types": ["pap"] }],

[
{ "name": "Pack-A-Punch the Galil", "types": ["pap"] },
{ "name": "Pack-A-Punch the China Lake", "types": ["pap"] }],
{ "name": "Pack-A-Punch the M16", "types": ["pap"] },
{ "name": "Pack-A-Punch the Starting Pistol", "types": ["pap"] }],

[
{ "name": "Create a Crawler", "types": ["z"] },
{ "name": "Create a headless Zombie", "types": ["z"] },
{ "name": "Kill 5 Zombies At Once", "types": ["z"] },
{ "name": "Train a Zombie through the whole map", "types": ["z"] }],

[
{ "name": "Finish a round in less than a minute", "types": ["z"] },
{ "name": "Kill a boss zombie with an explosive", "types": ["z"] }],

[
{ "name": "Kill the Boss(es) Once", "types": ["boss"] },
{ "name": "Bring the Boss through the map", "types": ["boss"] }],

[
{ "name": "Get to Round 5", "types": ["round"] },
{ "name": "Get to Round 15", "types": ["round"] },
{ "name": "Complete a round (10+) in the starting room", "types": ["round"] },
{ "name": "Complete a round (15+) with only melee", "types": ["round"] }],

[
{ "name": "Get to Round 10", "types": ["round"] },
{ "name": "Get to Round 20", "types": ["round"] },
{ "name": "Repair every barricade before the end of a round", "types": ["round"] }],

[
{ "name": "Activate the Power", "types": ["map"] },
{ "name": "Repair Two Barricades Fully", "types": ["map"] },
{ "name": "Repair Five Barricades Fully", "types": ["map"] },
{ "name": "Open All Doors", "types": ["map"] },
{ "name": "Activate a Trap Once", "types": ["map"] }],

[
{ "name": "Purchase a Perk", "types": ["map2"] },
{ "name": "100 Kill Milestone", "types": ["map2"] },
{ "name": "250 Kill Milestone", "types": ["map2"] },
{ "name": "50 Headshot Milestone", "types": ["map2"] },
{ "name": "150 Headshot Milestone", "types": ["map2"] }],

[
{ "name": "Complete a round only using a Melee Weapon past Round 10", "types": ["challenge"] },
{ "name": "Activate Every Trap in the Map Once", "types": ["challenge"] }],

[
{ "name": "Complete the Main Easter Egg", "types": ["challenge"] }],

[
{ "name": "Prome from one room to the next", "types": ["challenge"] },
{ "name": "Crouch walk with a train across the map once", "types": ["challenge"] }],

[
{ "name": "Get to 1000 kills", "types": ["challenge"] },
{ "name": "Get to 500 headshots", "types": ["challenge"] }],

[
{ "name": "Get to round 30", "types": ["challenge"] }]]

Error Message for Code 1: Couldn't parse board json, try [jsonlint] Error Message for Code 2: A randomized board must have at least 25 goals (found 13)

Is anyone able to help me?

dveth commented 9 months ago

In Code 2, from line 2 (Opening '[') to line 86 (Pack-A-Punch the Starting Pistol) is all a single goal according to your JSON. You probably want to separate that out in some fashion into multiple goals.

kbuzsaki commented 5 months ago

It looks like your goal list is trying to use multiple difficulty tiers for an SRL v5 style list. (that's what the extra [ ], bits in the middle are doing). If that's the case then you need exactly 25 tiers, one for each square on the board.

If you just want a simple randomized goal list then you need the list to be "flat" without any tiers. Here's your current goals flattened, which should work with the "Randomized" custom setting:

[
{ "name": "Purchase A Wall Weapon", "types": ["weapon"] },
{ "name": "Purchase Two Wall Weapons", "types": ["weapon"] },
{ "name": "Purchase All Wall Weapons", "types": ["weapon"] },
{ "name": "Purchase Ammo for a Wall Weapon", "types": ["weapon"] },
{ "name": "Purchase Ammo for a Pack-A-Punched Wall Weapon", "types": ["weapon"] },
{ "name": "First Time Mystery Box Spin", "types": ["box"] },
{ "name": "Obtain Wonder Weapon from Box", "types": ["box"] },
{ "name": "Obtain Secondary Equipment from Box", "types": ["box"] },
{ "name": "Open Two Mystery Boxes during Fire Sale", "types": ["box"] },
{ "name": "Open Three Mystery Boxes during Fire Sale", "types": ["box"] },
{ "name": "Get Every Mystery Box Weapon", "types": ["box"] },
{ "name": "Get a Teddy Bear", "types": ["box"] },
{ "name": "Spend a round using an Assault Rifle", "types": ["weapon"] },
{ "name": "Spend a round using a Shotgun", "types": ["weapon"] },
{ "name": "Spend a round using a Submachine Gun", "types": ["weapon"] },
{ "name": "Spend a round using an LMG", "types": ["weapon"] },
{ "name": "Spend a round using a Handgun", "types": ["weapon"] },
{ "name": "Spend a round using explosives only", "types": ["weapon"] },
{ "name": "Spend a round using a Wonder Weapon", "types": ["weapon"] },
{ "name": "Purchase a Melee Weapon", "types": ["weapon"] },
{ "name": "Purchase Grenades", "types": ["weapon"] },
{ "name": "Get an Instakill", "types": ["powerup"] },
{ "name": "Get Double Points", "types": ["powerup"] },
{ "name": "Get a Carpenter", "types": ["powerup"] },
{ "name": "Get a Fire Sale", "types": ["powerup"] },
{ "name": "Get a Max Ammo", "types": ["powerup"] },
{ "name": "Get a Nuke", "types": ["powerup"] },
{ "name": "Get a Perk Bottle", "types": ["powerup"] },
{ "name": "Get a Death Machine", "types": ["powerup"] },
{ "name": "Use Every Powerup Once", "types": ["powerup"] },
{ "name": "Two of the Same Powerups in a row", "types": ["powerup"] },
{ "name": "Get Two Powerups at the Same Time", "types": ["powerup"] },
{ "name": "Get Three Powerups at the Same Time", "types": ["powerup"] },
{ "name": "Get Juggernog", "types": ["perk"] },
{ "name": "Get Quick Revive", "types": ["perk"] },
{ "name": "Get Speedcola", "types": ["perk"] },
{ "name": "Get Doubletap", "types": ["perk"] },
{ "name": "Self-Revive Using Quick Revive", "types": ["perk"] },
{ "name": "Get All Perks", "types": ["perk"] },
{ "name": "Get the Galil", "types": ["weapon"] },
{ "name": "Get the AUG", "types": ["weapon"] },
{ "name": "Get the G11", "types": ["weapon"] },
{ "name": "Get the M16", "types": ["weapon"] },
{ "name": "Get the HS10", "types": ["weapon"] },
{ "name": "Get the Crossbow", "types": ["weapon"] },
{ "name": "Get the RPK", "types": ["weapon"] },
{ "name": "Get the HK21", "types": ["weapon"] },
{ "name": "Get the Python", "types": ["weapon"] },
{ "name": "Get the China Lake", "types": ["weapon"] },
{ "name": "Get Monkeybombs", "types": ["weapon"] },
{ "name": "Get the SPAS-12", "types": ["weapon"] },
{ "name": "Pack-A-Punch a Weapon", "types": ["pap"] },
{ "name": "Pack-A-Punch Two Weapons", "types": ["pap"] },
{ "name": "Pack-A-Punch Every Weapon", "types": ["pap"] },
{ "name": "Leave Gun in PAP Machine", "types": ["pap"] },
{ "name": "Pack-A-Punch the Galil", "types": ["pap"] },
{ "name": "Pack-A-Punch the China Lake", "types": ["pap"] },
{ "name": "Pack-A-Punch the M16", "types": ["pap"] },
{ "name": "Pack-A-Punch the Starting Pistol", "types": ["pap"] },
{ "name": "Create a Crawler", "types": ["z"] },
{ "name": "Create a headless Zombie", "types": ["z"] },
{ "name": "Kill 5 Zombies At Once", "types": ["z"] },
{ "name": "Train a Zombie through the whole map", "types": ["z"] },
{ "name": "Finish a round in less than a minute", "types": ["z"] },
{ "name": "Kill a boss zombie with an explosive", "types": ["z"] },
{ "name": "Kill the Boss(es) Once", "types": ["boss"] },
{ "name": "Bring the Boss through the map", "types": ["boss"] },
{ "name": "Get to Round 5", "types": ["round"] },
{ "name": "Get to Round 15", "types": ["round"] },
{ "name": "Complete a round (10+) in the starting room", "types": ["round"] },
{ "name": "Complete a round (15+) with only melee", "types": ["round"] },
{ "name": "Get to Round 10", "types": ["round"] },
{ "name": "Get to Round 20", "types": ["round"] },
{ "name": "Repair every barricade before the end of a round", "types": ["round"] },
{ "name": "Activate the Power", "types": ["map"] },
{ "name": "Repair Two Barricades Fully", "types": ["map"] },
{ "name": "Repair Five Barricades Fully", "types": ["map"] },
{ "name": "Open All Doors", "types": ["map"] },
{ "name": "Activate a Trap Once", "types": ["map"] },
{ "name": "Purchase a Perk", "types": ["map2"] },
{ "name": "100 Kill Milestone", "types": ["map2"] },
{ "name": "250 Kill Milestone", "types": ["map2"] },
{ "name": "50 Headshot Milestone", "types": ["map2"] },
{ "name": "150 Headshot Milestone", "types": ["map2"] },
{ "name": "Complete a round only using a Melee Weapon past Round 10", "types": ["challenge"] },
{ "name": "Activate Every Trap in the Map Once", "types": ["challenge"] },
{ "name": "Complete the Main Easter Egg", "types": ["challenge"] },
{ "name": "Prome from one room to the next", "types": ["challenge"] },
{ "name": "Crouch walk with a train across the map once", "types": ["challenge"] },
{ "name": "Get to 1000 kills", "types": ["challenge"] },
{ "name": "Get to 500 headshots", "types": ["challenge"] },
{ "name": "Get to round 30", "types": ["challenge"] }
]