Skateside / pocket-grimoire

A mobile version of the Blood on the Clocktower grimoire
https://www.pocketgrimoire.co.uk
GNU General Public License v3.0
38 stars 19 forks source link

Homebrew Jinxes #70

Closed Skateside closed 10 months ago

Skateside commented 1 year ago

They're currently not supported, but they should be.

Here's the syntax for a homebrew character that has a jinx

{
    "id": "perfumer_the_bootleggers_anthology",
    "image": [
        "https://www.bloodstar.xyz/p/Elluna/The_Bootleggers_Anthology/perfumer_the_bootleggers_anthology.png"
    ],
    "reminders": [
        "Poisoned",
        "Betrayed"
    ],
    "name": "Perfumer",
    "team": "outsider",
    "ability": "The 1st time a Minion or Demon is nominated & executed by evil, their Townsfolk neighbors are poisoned (even if you’re dead).",
    "jinxes": [
        {
            "id": "riot",
            "reason": "Players who die by nomination register as being executed to the Perfumer."
        }
    ]
}
zenador commented 1 year ago

+1, this would be a really nice feature :)

Skateside commented 1 year ago

Note to self about where to find some homebrew characters (some of them have jinxes) https://homebrew-script-tool.vercel.app/

zenador commented 11 months ago

Hmm this doesn't seem to work. Attached a json with homebrew jinxes from this tool, e.g. between the homebrew Vessel and the experimental Lil Monsta, but nothing shows up in the jinxes subsection of the grimoire (even when the show jinxes not in play toggle is on), not even the standard jinx between Heretic/Spy, and it doesn't show up in the character sheet either (only the standard jinxes like Heretic/Spy). json.json

Skateside commented 11 months ago

@zenador I think this is being caused by homebrew characters having jinxes with other homebrew characters. I'll take a look into it, but I think that if homebrew characters have jinxes with other homebrew character, at least one of them is badly written

Skateside commented 11 months ago

Hi @zenador I've managed to get the inter-homebrew jinxes working.

zenador commented 10 months ago

Thank you! The jinxes work great now on the grimoire. But with the uploaded json from last time, many of the jinxes are still missing from the character sheet.

Skateside commented 10 months ago

Hi @zenador

I usually forget about the character sheet - sorry about that. The homebrew jinxes should be appearing on the character sheet now.

Due to the way the change needed to be implemented, if you still have a character sheet open on your device and refresh it, you'll notice that the jinxes don't appear to have been fixed. You'll need to re-upload the JSON file to the Pocket Grimoire and get a new character sheet link to see them all.

Cheers Skateside

zenador commented 10 months ago

Works wonderfully now, thank you!

b-boechat commented 1 month ago

Hi! I'm commenting here because there's still an issue with inter-homebrew jinxes on the character sheet. The "trick" character's image doesn't show up properly.

Minimal example json:

[
    {
        "id": "custom_townsfolk",
        "image": "https://i.imgur.com/qccs0Ct.png",
        "firstNight": 0,
        "firstNightReminder": "",
        "otherNight": 49,
        "otherNightReminder": "",
        "reminders": [],
        "remindersGlobal": [],
        "setup": false,
        "name": "Custom Townsfolk",
        "team": "townsfolk",
        "ability": "Custom Townsfolk ability.",
        "jinxes": [
            {
                "id": "drunk",
                "reason": "Custom Townsfolk -> Drunk"
            }
        ]
    },
    "drunk",
    "baron",
    {
        "id": "custom_demon",
        "image": "https://i.imgur.com/h9TIBbo.png",
        "firstNight": 1,
        "firstNightReminder": "",
        "otherNight": 48,
        "otherNightReminder": "",
        "reminders": [],
        "remindersGlobal": [],
        "setup": false,
        "name": "Custom Demon",
        "team": "demon",
        "ability": "Custom Demon ability.",
        "jinxes": [
            {
                "id": "custom_townsfolk",
                "reason": "Custom Demon -> Custom Townsfolk"
            }
        ]
    }
]

There are two jinxes, Custom Townsfolk -> Drunk and Custom Demon -> Custom Townsfolk. Both are correctly displayed on the "jinxes" tab. However, on the character sheet, the inter-homebrew jinx doesn't display the Custom Townsfolk's image (a blue square).

image

I'll take a look into it, but I think that if homebrew characters have jinxes with other homebrew character, at least one of them is badly written

Regarding this, a reasonable use case for inter-homebrew jinxes is a custom script with rethemed official characters.

Skateside commented 1 month ago

Hi @b-boechat

This should be fixed now.

Cheers Skateside