crnormand / gurps

Implementing a GURPS 4e game aid for Foundry VTT
MIT License
105 stars 49 forks source link

Problem communicating with Mythic Game Master Emulator (GME) when using Dice so Nice #1414

Closed LordNigel closed 2 years ago

LordNigel commented 2 years ago

I've been starting to mess with Mything Game Master Emulator (GME) and it seems to be an amazing tool to help me improvise while GMing. I am particularly interested in making this work to help me in my next campaign, allowing me to truly play off the cuff when needed, and using it on the side for an extra zing. My eyes glittered when I saw that someone had made an actual full module for GME and it's amazing! Unfortunately, however, due to the way that she GURPS Game Aid deals with dice (or something like that), the GME module doesn't work properly everytime Dice So Nice is active. And that's a bummer because we all love to see the dice, right? Anyway, the maker of the aforementioned module saw the problems shown on the attached image image He told me that it looks like someone that has to be solved on GURPS's side Apparently I'm not the first person to have issues with this, but it seem that the person mentioned this on another GitHub so it was not seen by you guys. It's clear that everything works as it should when Dice so Nice is deactivated, but the GME module is made to work with it, so it should have something to do with how the GURPS module deals with dice or something. I remember that when I started using GURPS Game Aid I wanted to use "dotted" d6's but they always came with numbers, until something was patched. This makes me believe that the fact that GURPS basically just uses d6's makes the module deal differently with the code behind rolling things. I'm a complete amateur when it comes to programming and stuff, so I'm literally just trying to guess. That's probably not useful at all, so I'll just shut up, haha.

LordNigel commented 2 years ago

Just to make things clear. The problem is not with the dice themselves. When Dice so Nice is active, the dice are rolled and show up, it's the MACROS that stop working. Answers which should show up on the chat don't show up at all.

crnormand commented 2 years ago

Thanks for the issue. When I get back from vacation, I'll take a look at it.

We want to support as many 3rd party modules as we can 😄

LordNigel commented 2 years ago

Thanks! It's great to know that the support between modules is a goal as well!

I must say, getting this to work it a huge game changer! GURPS is particularly famous (and useful) for allowing us to change and mix genres as we please. This is especially fascinating when dealing with crazy settings like Banestorm and Infinite Worlds. But it's also useful for, say, Space games, where the party can go from a booming ultra-tech metropolis to an ice age planet, to a dinosaur-infested planet. This Game Master emulator is brilliant for Game Masters themselves to use, because it allows us to create twists and turns which are surprising to the GM as well. It allows us to quickly answer crazy questions that the PCs and making the world more immersive. Of course it's also fun to use for solo or GM-less coop sessions (great in GURPS as well), but it's using it as a GMing aid that has been fascinating me!

Needless to say, this is equally useful for traditional fantasy roleplay, dungeon crawling and whatnot. "We decide to ask a random person in the streets", then you can get a clue about this person and have the NPC up and running in seconds with those tools, without it sounding like a generic cardboard placeholder.

If only the 3D dice worked with it.... hahahah

Calmquist commented 2 years ago

When using the Foundry VTT Electron application on Linux, I get the Action Meaning, Event Focus, Subject Meaning and Backstory Focus table results that appear correct. I don't see the 3d dice on the table rolls, but the dice appear with normal rolls.

@LordNigel Could you provide other details?

I tested on Foundry: 9 build 269, GGA 0.13.19, Dice So Nice!: 4.5.0 and Mythic GME Tools 2.4.6. I had no other modules active.

Calmquist commented 2 years ago

I can confirm my results on Firefox: 100.0.1 and Chromium: 101,0.4951.64.

LordNigel commented 2 years ago

Thanks for testing, @Calmquist! And also thanks for all the details. It's very good to know that not everybody will suffer from this, but I confess that I'm frustrated for being "unlucky", haha. I hope we can find out what's happening... And one extra comment: Jeansen Vaars, the creator of the GME module, tested and had the same problem, so we know it's not completely isolated to me. image

Calmquist commented 2 years ago

@LordNigel Can you provide the specific Foundry, module and browser version numbers and specific steps to reproduce the error? Can you reproduce the problem with new world and a minimal set of modules?

saif-ellafi commented 2 years ago

Hi @Calmquist - remember to configure Dice so Nice! for the first time, following this chat entry (Just click it and press Save) image

Then simply drag the Macro Random Event from the Mythic GME Macros Compendium.

If you don't see 3D dice rolling, it is already an issue. But I get just this: image

New world. Not sure what is GGA 0.13.19 but I am in GURPS system 0.14.0

Calmquist commented 2 years ago

I am able to replicate the error with the Random Even macro specifically.

LordNigel commented 2 years ago

@LordNigel Can you provide the specific Foundry, module and browser version numbers and specific steps to reproduce the error? Can you reproduce the problem with new world and a minimal set of modules?

Yes, I had the same problemas when creating a new world (using GURPS) and ZERO other modules except for the GME tools and Dice So Nice. As for the information that you mentioned: Foundry version 9 - Builds 269 GURPS Game Aid vesrion 0.14.0 Mythic GME Tools version 2.4.6 Dice So Nice version 4.5.0 Lordu's Custom Dice for Dice so Nice version 0.33 (the problem persists with this on or off) Browser: I don't play on a browser, I use the Foundry standalone UI. Nevertheless, I tried opening a new player using my two Browsers (Firefox and Vivaldi) and had the same issue.

LordNigel commented 2 years ago

You asked for the steps: I just installed the module, then tried to use in my GURPS campaign with the problems already described. Then I tried creating a new world, just to be sure, and the same thing happens. Some funcions do work, like the Fate Chart Question, which gives me an answer of Yes, No, Exceptional Yes or Exceptional No. However, whenever a roll a double number that would trigger a Random Event, the event words are not shown (Exacly like @saif-ellafi showed). The same happens with other Macros that should show words coming from different rolltables (like the Complex Question Macro, from Mythic Variations 1). Other, simpler macros, work, like showing the Chaos Level and the ones for raising and lowering such level.

LordNigel commented 2 years ago

Another piece of information that might be relevant: I don't actually need to turn OFF the Dice so Nice module for my world. I just need to go to the settings for Dice So Nice and turn the 3D dice off for me ONLY. Here's a print of the chat log, showing the non-working Random Event Roll when the 3D dice were ON, followed by a roll when the 3D dice were off (and then it worked): image

This at least allows me to let my PLAYERS use their cool dice during the session, and I can use Mythic (apparently) without issues. The problem, obviously, is that I DO want to see my dice as well, haha.

LordNigel commented 2 years ago

Here are some other prints. The first one shows the chat log and terminal while rolling Random Events and Complex Questions with 3D dice turned OFF, but with Dice So Nice turned ON as a module (available for other players): image

Now, here's the terminal and chat log showing what happens when I roll Fate Chart Questions, Random Event and Complex Question. As you can see, Fate Chart Questions work properly (and I can see the 3D dice rolling) image

LordNigel commented 2 years ago

Here is my regular word, where my campaign is happening and where I will start using Mythic GME for the first time. Here we can see Mythic GME working, even for Scene Alterations that roll an "interruption" result, because I have 3D dice DISABLED (but Dice so Nice is ON as a module). image

LordNigel commented 2 years ago

Here I roll the Backstory Generation macro, asking for a sequence of 7 Backstories. Again no issues with 3D dice DISABLED.

image

LordNigel commented 2 years ago

Now trying to roll 7 Backstories again, but with 3D dice ACTIVATED.

image

As you can see, it doesn't even continue after the first problem.

LordNigel commented 2 years ago

Now trying to use 3 other complex rolls, Action Questions, Description Questions and Detail Check (with BOTH checkboxes on)

image

LordNigel commented 2 years ago

And now, my last one, the same three Macros from the test above, but working with 3D dice DISABLED: image

crnormand commented 2 years ago

Wow, thank you for all the information! I will definitely look into this when I get back from vacation.

LordNigel commented 2 years ago

Wow, thank you for all the information! I will definitely look into this when I get back from vacation.

Thank you for caring and trying to help! =)

Lothex91 commented 2 years ago

Hello there! I was pointed to this thread by Jeansen Vaars, the creator of the GME module. I'm having the same exact issue @LordNigel has described, and was wondering if there's any news on this? Currently I had to turn off Dice so Nice so that I could use the GME module with the GURPS Aid

And - by the way - thank you so much for such an amazing Aid!

LordNigel commented 2 years ago

Hey there!

Hello there! I was pointed to this thread by Jeansen Vaars, the creator of the GME module. I'm having the same exact issue @LordNigel has described, and was wondering if there's any news on this? Currently I had to turn off Dice so Nice so that I could use the GME module with the GURPS Aid

And - by the way - thank you so much for such an amazing Aid!

Hey there! No news yet. As for the moment, since I'm always using Mythic in my GURPS campaigns, I activate the Dice so Nice as a module, so that my players can see the pretty dice, but then I go to the module settings and deactivate it for me only. It's a shame that I can't see my dice rolling, but at least I can use the tools I want and my players can have fun with the dice. Also, when I roll, they see my dice rolling as well, which is a plus. Only the person actively using the Mythic Macros needs to "lose" this feature. Of course that if the idea is to play a GM-less co-op game, then everybody would have access to Mythic, and that will be a problem (if everybody wants to see the dice rolling, which they should, because who wouldn't?).

Lothex91 commented 2 years ago

Hey there!

Hello there! I was pointed to this thread by Jeansen Vaars, the creator of the GME module. I'm having the same exact issue @LordNigel has described, and was wondering if there's any news on this? Currently I had to turn off Dice so Nice so that I could use the GME module with the GURPS Aid And - by the way - thank you so much for such an amazing Aid!

Hey there! No news yet. As for the moment, since I'm always using Mythic in my GURPS campaigns, I activate the Dice so Nice as a module, so that my players can see the pretty dice, but then I go to the module settings and deactivate it for me only. It's a shame that I can't see my dice rolling, but at least I can use the tools I want and my players can have fun with the dice. Also, when I roll, they see my dice rolling as well, which is a plus. Only the person actively using the Mythic Macros needs to "lose" this feature. Of course that if the idea is to play a GM-less co-op game, then everybody would have access to Mythic, and that will be a problem (if everybody wants to see the dice rolling, which they should, because who wouldn't?).

Ah I see, thank you for your reply! I'm using Mythic to play solo, so I just turned off Dice so Nice, although I hope to see some dice in the future xD

saif-ellafi commented 2 years ago

Hi @LordNigel @Lothex91 will take a look at this in a moment from Mythic tools side. Perhaps I can do something to hack this until @crnormand can help us.

Lothex91 commented 2 years ago

Hi @LordNigel @Lothex91 will take a look at this in a moment from Mythic tools side. Perhaps I can do something to hack this until @crnormand can help us.

Thank you so much Jeansen! Hope you find a way!

saif-ellafi commented 2 years ago

Alright, so @crnormand - basically something in GURPS is incompatible with Dice so Nice. As part of their API, there is an explicit method for showing the 3D dice on roll instances.

With these simple two lines you can reproduce the error in GURPS. Still not sure why it is failing on GURPS. Since in Mythic I delay some rolls to produce "slow motion", I use this function to roll 3d dice whenever needed.

let myroll = await new Roll('1d6').roll()
await game.dice3d.showForRoll(myroll)

This snippet throws an error. The showForRoll is documented here https://gitlab.com/riccisi/foundryvtt-dice-so-nice/-/wikis/API/Roll#roll-api

saif-ellafi commented 2 years ago

@LordNigel @Lothex91 Mythic version 2.4.9 has a hotfix for this. It is not a solution, only temporary so you can see 3D Dice. But we really need @crnormand to fix this in order to have the "tension feeling" of rolling 3D dice one at a time. But at least no errors.

Lothex91 commented 2 years ago

@LordNigel @Lothex91 Mythic version 2.4.9 has a hotfix for this. It is not a solution, only temporary so you can see 3D Dice. But we really need @crnormand to fix this in order to have the "tension feeling" of rolling 3D dice one at a time. But at least no errors.

Thank you so much Jeansen!

crnormand commented 2 years ago

Hey all, I think I found it. I will be making a release today, and let's hope ;-)

LordNigel commented 2 years ago

Hey all, I think I found it. I will be making a release today, and let's hope ;-)

That is GREAAAT news!!! I'm hyped!

crnormand commented 2 years ago

https://github.com/crnormand/gurps/pull/1458

LordNigel commented 2 years ago

GREAT NEWS and also not so great news. It started to WORK! The fate checks are working, also the random events and complex questions. However, some rolls that depend on other tables/macros still don't work (Backstory Generator, Detail Check) image

crnormand commented 2 years ago

Well, at least we are further along. We did not properly replace the 'Die' with the 'GurpsDie' class, which was causing the error in Dice so nice. With that resolved, now the error seems to be in m-gme. Possible we did not implement enough information in GurpsDie.

LordNigel commented 2 years ago

Well, at least we are further along. We did not properly replace the 'Die' with the 'GurpsDie' class, which was causing the error in Dice so nice. With that resolved, now the error seems to be in m-gme. Possible we did not implement enough information in GurpsDie.

We are certainly further along! This is super great. I guess that now that the first part was fixed you apparently know what needs to be changed as well. Hopefully this will help with future integrations between modules, Dice so Nice and GGA!

saif-ellafi commented 2 years ago

Thank you @crnormand - tried your fix and works perfectly. Issue is now on Mythic side indeed, I messed up to workaround GURPS in the meantime. Just bad timing, now I will revert my workaround and GURPS is all good and Mythic too Releasing Mythic in a moment FYI @LordNigel @Lothex91 Cheers

Lothex91 commented 2 years ago

Thank you both so much @crnormand @saif-ellafi !