You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The built in log is great but only logs the moves made. Some moves have random consequences (following a dice roll for instance) but there's now way to know that as it's calculated by the game and not sent from the client.
Is there a way to modify the log associated to a move and add whether it's been successful or not, or add arbitrary data to it?
Right now, I have to build in my own log to display to the players what's happened but would love to leverage the existing one.
The text was updated successfully, but these errors were encountered:
There used to be a mechanism to add arbitrary payloads to log messages but I think it got lost after we migrated to a new plugin architecture. Do you think something like this would be helpful?
move: (G,ctx)=>{G.roll=ctx.random.D6();ctx.log.custom({roll: G.roll});// gets added to the log message for this move}
Yes! That would be amazing. Arbitrary payloads feel like the right approach. Is this something I could help with in terms of PR? (not sure when I'll have the time but if you have a pointer for where I could start, I'd happily take a look)
The built in log is great but only logs the moves made. Some moves have random consequences (following a dice roll for instance) but there's now way to know that as it's calculated by the game and not sent from the client.
Is there a way to modify the log associated to a move and add whether it's been successful or not, or add arbitrary data to it?
Right now, I have to build in my own log to display to the players what's happened but would love to leverage the existing one.
The text was updated successfully, but these errors were encountered: