Roll20

Discussions about the 20th Anniversary Edition
Forum rules
No cyber-bullying, no racism, no spam! Keep discussions civil and respectful or you will be banned!
jstomel
Posts: 74
Joined: Thu Jan 09, 2020 2:43 pm

Roll20

Post by jstomel »

Given the whole COVID-19 situation, my group is going online via Roll20 for a bit. Does anyone have or is interested in developing a character sheet and deck of runes for roll20?
User avatar
andrew
Posts: 1265
Joined: Thu Apr 25, 2013 10:39 am
Contact:

Re: Roll20

Post by andrew »

I'm actually going on Roll20 Friday night.

I was reading over the fan built setups on these threads:
http://www.fateofthenorns.com/phpBB3/vi ... ll20#p4314

and
http://www.fateofthenorns.com/phpBB3/vi ... lit=roll20

This will be my first time, so thanks to the fans who have made these tutorials! :) :) :)
User avatar
andrew
Posts: 1265
Joined: Thu Apr 25, 2013 10:39 am
Contact:

Re: Roll20 & Fantasy Grounds

Post by andrew »

I contacted Fantasy Grounds and to get our game on there, we need a developer willing to use their API to create a custom integration for FOTN. Do we have any keen developers interested in this? They said the programmer would get an ongoing commission for the work done, since users would need to subscribe.
jstomel
Posts: 74
Joined: Thu Jan 09, 2020 2:43 pm

Re: Roll20

Post by jstomel »

I made a set of decks with runes and am looking to make some macros, but haven't but haven't really played around with their character sheet builder yet.
User avatar
andrew
Posts: 1265
Joined: Thu Apr 25, 2013 10:39 am
Contact:

Re: Roll20

Post by andrew »

I would love it if someone made a set of macros that recalls played/drawn cards and shuffles all decks. This is a pain in the ass for the Norn right now.

I'm also curious, did anyone make Ragnarok dweller sheets yet?
jstomel
Posts: 74
Joined: Thu Jan 09, 2020 2:43 pm

Re: Roll20

Post by jstomel »

I haven't made dweller sheets yet, looking to get pro access this weekend. As far as I can tell, the macros don't give access to the decks by default, you need access to the API. I am at best a novice programmer and javascript is not my strong suit, but I've signed up at codeacademy to get the basics and will take a swing at the character sheet if no one else does.

FotN is a pretty crunchy system and I can tell that it was built by someone with a coding background. It should be possible to translate it.
User avatar
andrew
Posts: 1265
Joined: Thu Apr 25, 2013 10:39 am
Contact:

Re: Roll20

Post by andrew »

We had our first battle on roll20 last night and discovered that recalling the runes to the deck will wipe out the damage you've taken. AGH! How did others get around this? Our solution was to just have everyone use the mobile rune app, and then synch their playmats on the actual table after wyrding or taking/healing damage. Oh lord I miss playing in person!
jstomel
Posts: 74
Joined: Thu Jan 09, 2020 2:43 pm

Re: Roll20

Post by jstomel »

I've been writing some scripts today. I have one that is usable by players and allows them to weird from their own decks and have the runes appear on their playmat (relies on some strict naming conventions for the playmat and decks).

I'm almost done with one that will allow you to select certain runes and then recall the ones not selected, though I may change it to recall the ones you have selected, now that you mention the damage track. If you PM me your roll20 email I will invite you to my Dev campaign so you can check them out, or I can post the code here if you like
jstomel
Posts: 74
Joined: Thu Jan 09, 2020 2:43 pm

Re: Roll20

Post by jstomel »

Here is a script to weird your destiny in runes. You have to have a deck with name of the character doing the weirding, a playmat named $character_name+" playmat" and attributes in the character journal called Destiny and Essence. It is called with an ability containing:
!weird --@{character_name} --@{Destiny}
Note: my runes are 20x30 pixels and my playmats are 490x560. If you change these dimensions then your runes probably won't end up in the "in hand" section and you will have to move them around yourself.

Code: Select all

on('chat:message', (msg) => {
    if ('api' === msg.type && /!weird\b/i.test(msg.content)) {
            const args = msg.content.split(/\s+--/);
            //getid of deck
            //deck must have the same name as the character
        let theDeck = findObjs({
            _type: "deck",
            name: args[1]
        })[0];
        //test if deck exists
        if (!theDeck) {
            sendChat('Weird', '/w gm Create a deck named ' + args[1]);
            return;
        }
        //Playmat graphic must be named $character_name+" playmat"
        let playmat = findObjs({
            _type: "graphic",
            name: args[1]+" playmat"
        })[0];
        //Check to make sure the playmat exists
        if (!playmat) {
            sendChat('Weird', '/w gm You need to named ' + args[1] + ' playmat');
            return;
        }
        // Get the deck ID and list of cards in it
        let deckID = theDeck.id;
        let deckCards = theDeck.get('_currentDeck');
        var i;
        // Do a number of times equal to the character's destiny
        for (i = 0; i < args[2]; i++) {
            //Draw a card
            let card = findObjs({
                _id: drawCard(deckID)
            })[0];
            //Put the card on the playmat, will stagger cards so they don't all stack on top of eachother
            //These numbers are scaled to put the cards into the in hand area on my playmat. If you change
            //the playmat size you will need to change them
            playCardToTable(card.id, {left: playmat.get("left")+i*20-70, top: playmat.get("top")-110});
            //I don't know why this works, but it seems necessary to change the "controlledby" property
            let cardObj = findObjs({
                cardid: card.id
            })[0];
            //Make it so that anyone can control the cards. If you change "all" to args[1] it should limit
            //control to the initiating player
            cardObj.set("controlledby", "all");
        }
    }
});
        
Last edited by jstomel on Sun Mar 29, 2020 4:18 pm, edited 1 time in total.
jstomel
Posts: 74
Joined: Thu Jan 09, 2020 2:43 pm

Re: Roll20

Post by jstomel »

Here is a script to recall runes to the deck and shuffle during cleanup. As above, you need to have a deck with the same name as the character using it. It will leave in play any runes which you have selected when you call the ability. It is called as an ability with the text:
!cleanup --@{character_name}

Code: Select all

on('chat:message', (msg) => {
    if ('api' === msg.type && /!cleanup\b/i.test(msg.content)) {
        let selectedId = []
            const args = msg.content.split(/\s+--/);
            //getid of deck
        let theDeck = findObjs({
            _type: "deck",
            name: args[1]
        })[0];
        //test if deck exists
        if (!theDeck) {
            sendChat('cleanup', '/w gm Create a deck named ' + args[1]);
            return;
        }
        //If nothing is selected pick up all of the cards
        if (!msg.selected) {
            recallCards(theDeck.id);
            shuffleDeck(theDeck.id);
            log('blarg')
        }
        //If there are selected cards
        else {
            //get the info for cards in play
            let cards = cardInfo({type: "play", deckid: theDeck.id})
            //stick the selected card IDs in an array
            for (i = 0; i < msg.selected.length; i++) {
                selectedId[i] = msg.selected[i]._id;
            }
            //for each card in play
            for (i = 0; i < cards.length; i++) {
            //if it's not selected, pick it up to the hand
                if (!(selectedId.includes(cards[i].id))) {
                    pickUpCard(cards[i].cardid);
                }
            }
            //put the hand in the deck and shuffle
            recallCards(theDeck.id, 'hand');
            shuffleDeck(theDeck.id);
        }
    }
});
        
Post Reply