#DsN integration problem

1 messages ยท Page 1 of 1 (latest)

desert hatch
#

Ah, sorry. I have little expertise in this area :/
Is this what you are looking for?

nova trail
#

Yup

#

Is that a Pool or a single Roll?

#

because this should not be empty :

#

ChatMessage in v9 can only contains a single Roll

#

Attaching a pool will become possible in v10 afaik

desert hatch
#

I'm not sure what the right answer is. I simply created a roll from the roll formula and that's it.

#

Just checked the same thing but with the Foundry's roll class. _dice array is empty there too.

nova trail
#

Ok indeed, sorry I forgot about the getter "dice".
Can you click on the "dice: (...)" in your object and show me the screenshot please?

desert hatch
#

This is a d12 explosion

nova trail
#

Ok, do you see the first .faces at the start of a SKDie object? That's what determines the number of face on a dice

#

every results in this SKDie are expected to have the same number of face

#

I guess this is not the case in your system?

desert hatch
#

Nope. But this value is overwritten to the higher face value. At this point I don't really mind if an incorrect die starts rolling as long as no errors happen and the value shown is the value that was rolled.

#

FYI, this is the error DsN throws:

nova trail
#

Yes because DsN can't roll a d4 that rolls a 8 ๐Ÿ˜„

desert hatch
#

No matter what dice is being rolled, the DicePreset always has .shape = d4

nova trail
#

I'll add a feature in the backlog to check for this kind of unexpected result

desert hatch
#

Even if I type in chat /r d20, DsN will error out on values > 4

nova trail
desert hatch
#

It really looks like I have configured something wrong or not configured at all, but I can't figure out what exactly

nova trail
desert hatch
nova trail
#

No problem, do not hesitate to come back to me if you need further help!

desert hatch
#

I suspect this is the place where I'm lacking some configuration...

nova trail
#

No, really I assure you. Compare your result with one from core foundry. Like just roll a d20 and show me the ".dice"

#

It should look like this

desert hatch
#

Umm... it does look like this.

console.log(g);```
nova trail
#

that should work perfectly fine

#

Is your system available on github or gitlab so I could test?

desert hatch
#

that should work perfectly fine
It doesn't ๐Ÿ˜›
Is your system available on github or gitlab so I could test?
It's on github in a private repo. I guess I can open it up.

nova trail
#

If that's fine for you then that's probably the easiest way to find out what's wrong

desert hatch
#

I hope the system is more or less in a working condition ๐Ÿ˜„

nova trail
#

Ooooh I found the issue, ok. This was on my side. I guess you are the first person that override the base Die class. I recently made DsN compatible with custom Roll class but not with custom Die class.
Therefore it was not able to parse the "d20"

#

changed it to this and now it works

#

I'll add this to v4.5.0 that release today or tomorrow

#

That won't fix your issue with exploding dice that change their faces number however :<

desert hatch
#

I'll add this to v4.5.0 that release today or tomorrow
Yay!
I though I was going insane ๐Ÿ˜„
That won't fix your issue with exploding dice that change their faces number however :<
Well, I'll survive that. Not a game breaking issue.

Thanks a lot.

nova trail
#

I found a workaround if you want to integrate Dice So Nice tho, by recreating a Roll object from all your results, just for DsN:

let dice = [];
let roll = await new SKRoll("{{1d8xkh[base], {d6xkh, d4xkh}kl[penalty]}kl, {d4xkh, d12xkh}kh[bonus]}kh").evaluate();

roll.dice.forEach((die) => {
    die.results.forEach((result) =>{
        let newDie = new SKDie({faces:result.faces, number:1});
        newDie.results = [result];
        dice.push(newDie);
    });
});
let dsnRoll = new Roll("1");
dsnRoll.terms = dice;
game.dice3d.showForRoll(dsnRoll, game.user, true);
#

hmm nvm it would not respect the exploding order

#

Well ยฏ_(ใƒ„)_/ยฏ

desert hatch
#

hmm nvm it would not respect the exploding order
But it will show a die with the correct number of faces?

nova trail
#

yes

#

If you were to integrate dsn this way, you would need to toggle on and off the automated message hook before and after rolling your system-specific rolls.

game.dice3d.messageHookDisabled = true;
//do your roll here, create your message, and then once the message has been created
game.dice3d.messageHookDisabled = false;

#

or else it would show the 3D dice twice