PDA

View Full Version : Coin Flip Extension for CoreRPG



SAVeira
January 16th, 2021, 03:34
This is the first extension that I have ever created. It is an extension for CoreRPG that adds a coin (a penny) to the dice row. When clicked the coin is flipped with either heads or tails been show in the chat.

Now listed on the Forge:

Coin Flip 2.0: https//forge.fantasygrounds.com/shop/items/830/view (https://forge.fantasygrounds.com/shop/items/830/view)

Created with use of the Ruleset Wizard (https://www.rulesetwizard.com).

54229

2021-01-20:
Updated extension to be a more universal. Not limited to only CoreRPG.

2021-02-26
Updated extension so there are multiple versions so the coin's location on the bottom is different depending on the ruleset. Also you can now just type "/flip" into the Chat and it will do the coin flip.

2021-10-31
Posted Forge links for extensions.

2022-09-06
Update to new universal extension that will allow Coin to move around the desktop as well let one select type of coin to use.

madman
January 16th, 2021, 03:38
Nice Job! Thanks for sharing it.

Madman..

Three of Swords
January 20th, 2021, 00:16
This could be very useful in a game that uses coin flips often. As madman said, ty for sharing!

damned
January 20th, 2021, 08:35
Good stuff SAVeira

eriktedesco
January 20th, 2021, 19:43
ok, probably I'm the only one having this issue...I downloaded the extension in the right folder but it cannot be activated in the launcher screen.

I just don't see the extension...sorry about that!

SAVeira
January 20th, 2021, 20:17
ok, probably I'm the only one having this issue...I downloaded the extension in the right folder but it cannot be activated in the launcher screen.

I just don't see the extension...sorry about that!

First, which ruleset are you attempting to use it with? It was designed to be used with CoreRPG. It would not show for another ruleset. I have updated the extension so it will not be hardcoded to only CoreRPG.

Beware, it does not work in all rulesets.

eriktedesco
January 20th, 2021, 20:41
5e, FGU 4.0.7

SAVeira
January 20th, 2021, 21:42
5e, FGU 4.0.7

Should be able to see the latest version. Please note that you will need to move the penny's location as 5E shift the normal dice over and this extension was created for CoreRPG.

SAVeira
February 26th, 2021, 19:17
Please note that I have updated extension. So, there are multiple versions so the coin's location on the bottom is different depending on the ruleset.

Also, you can now just type "/flip" into the Chat and it will do the coin flip.

Before anyone asks, there is no version for Savage Worlds as much I would like one as my code does not appear to work with that ruleset.

SmackDaddy
October 29th, 2021, 16:09
So, I have an odd error....I got the 5e specific Coin Flip extension from the forge. I am the DM and have it enabled. Myself and four of my players don't have a problem with it at all. My wife (and one other player) get the attached error everytime they try to use it -- and nothing happens for them, just the console error. Any ideas on how to fix/resolve this?

49713

My players LOVE this extension by the way! ;) Thank you in advance for your time!

damned
October 29th, 2021, 23:39
Are these two players on the same FG build?
check Chat when they connect to your server.

SAVeira
October 31st, 2021, 15:52
So, I have an odd error....I got the 5e specific Coin Flip extension from the forge. I am the DM and have it enabled. Myself and four of my players don't have a problem with it at all. My wife (and one other player) get the attached error everytime they try to use it -- and nothing happens for them, just the console error. Any ideas on how to fix/resolve this?

49713

My players LOVE this extension by the way! ;) Thank you in advance for your time!

Hello SmackDaddy, going to need some more information. As damned stated, do the two players having issues on the same FG build. Please note that I have only every test/used the extension on FGU.

If you do the /console command, you will see the Compile Logs button. The logs of two players and yourself, would be very valuable to see what if any differences there might be causing the problem.

SmackDaddy
November 3rd, 2021, 17:44
Hello SmackDaddy, going to need some more information. As damned stated, do the two players having issues on the same FG build. Please note that I have only every test/used the extension on FGU.

If you do the /console command, you will see the Compile Logs button. The logs of two players and yourself, would be very valuable to see what if any differences there might be causing the problem.

I will try and get that next session when both are connected. Thank you.

SmackDaddy
November 6th, 2021, 00:38
Hello SmackDaddy, going to need some more information. As damned stated, do the two players having issues on the same FG build. Please note that I have only every test/used the extension on FGU.

If you do the /console command, you will see the Compile Logs button. The logs of two players and yourself, would be very valuable to see what if any differences there might be causing the problem.

I have the dm logs and the logs of one of the players where every time they try and do the coin flip, it produces and error (every time) and no result ever shows in the chat. As the DM I don't see (or get) the error. Let me know if there's anything further you need.

49831
49832

SmackDaddy
November 14th, 2021, 03:43
Are these two players on the same FG build?
check Chat when they connect to your server.

Yes, all players are on the same build. The message before this I replied with some logs. The player's machine having the issue is my wife's machine, so anything I would need to do to assist in providing more information, just let me know. Thanks.

SAVeira
November 14th, 2021, 22:46
I am looking at the logs currently. Currently dealing with an emergency for a client at work. Hope that I will have free time next weekend to go in depth.

SmackDaddy
November 15th, 2021, 04:54
I am looking at the logs currently. Currently dealing with an emergency for a client at work. Hope that I will have free time next weekend to go in depth.

Thank you very much for your time.

SAVeira
November 22nd, 2021, 22:19
Just a note to SmackDaddy, still investigating.

SmackDaddy
November 24th, 2021, 16:56
Just a note to SmackDaddy, still investigating.

Thank you very much for the update. I have been checking daily and didn't want to be a pest :)

SAVeira
December 27th, 2021, 21:46
Hello SmackDaddy,

Sorry about delay. Had been rebuilding three computers. Long story.

Anyway, I have been through your logs, and I am still unsure what could be causing your issue. However, I did notice that I have some code that the deprecated actor manager calls. So, I have updated all the version of Coin Flip.

Now, it will be a while before the latest version goes live on the Forge. A couple of days tops. Also, I do not think it will solve your issue, but your never know. Might suggest that your players with the problem check their extensions and remove it, then let the updated version be installed.

Anyway, let me know if the problem remains. If it is still there, then I will try to enlist from help of other users of the Ruleset Wizard. That is what I used to help code the extension.

Merecraft
March 10th, 2022, 15:25
HI, I've started getting the following error with this extension:

ActorManager.getActor - DEPRECATED - 2021-01-01 - Contact forge/extension author

Which is odd because I don't think your extension calls that function, it seems to use resolveActor() instead...

Any ideas?

Nevermind, looks like a conflict - it doesn't happen with only this extension loaded - time to start adding them all back one by one!

SAVeira
March 10th, 2022, 15:39
HI, I've started getting the following error with this extension:

ActorManager.getActor - DEPRECATED - 2021-01-01 - Contact forge/extension author

Which is odd because I don't think your extension calls that function, it seems to use resolveActor() instead...

Any ideas?

Nevermind, looks like a conflict - it doesn't happen with only this extension loaded - time to start adding them all back one by one!

Ok. Figured as I cannot cause that error and it would be strange for that error to happened. Let me know if there is a conflict with this extension and another one.

Merecraft
March 10th, 2022, 16:40
Found it! It appears as though Mad Nomad's Party Combat Stats is still calling getActor. I've let him know on his Discord :-)

Sorry for the bother again, my players love playing with the Coin Flip extension!

Thakeria Jamison
August 31st, 2022, 15:49
Hi, new user to FGU and going through the learning curve of a new system.

I really like the idea of the Coin Flip and it's implementation but I do have a small issue as far as it's placement on the screen.

I have also implemented Rob2E's 5E Modifier Buttons and I am choosing the option B layout. When doing so the coin appears a bit further away from the die than expected. As a size (distance) reference, it is nearly 2 die distance away from the end of the row of die. (I have attempted to attach an image for a better visual).

Is there a way to modify it actual location that I am overlooking?

Regards


54166

EllivasKram
August 31st, 2022, 16:26
It’s a 50/50 thing. But I use option A and everything lines up properly

Thakeria Jamison
August 31st, 2022, 18:52
Not sure I understand the 50/50 statement. Could you elaborate?

I have tried both the A and B option with trying to match to the B layout option of the Rob2E extension and neither line up correctly.

Now if you are stating that the A option lines up with the Rob2E option A layout (which is the default die location and layout without any extension) then I agree but that is not the request at hand.

I am using the Rob2E option B layout and trying to determine if there is an adjustment to have the Coin position of option B to line up correctly either by default or if there is a tweak to modify it's position.

To be honest, it would be better if the coin position could be unlocked and placed in a desired position and then locked in place in its new location.

Otherwise, it's just as easy to roll any die and have LOW for heads and HI for tail (or vice-versa). It is just a nicety to have the coin token and the result automatically stated.

Regards

SAVeira
August 31st, 2022, 19:09
Hi, new user to FGU and going through the learning curve of a new system.

I really like the idea of the Coin Flip and it's implementation but I do have a small issue as far as it's placement on the screen.

I have also implemented Rob2E's 5E Modifier Buttons and I am choosing the option B layout. When doing so the coin appears a bit further away from the die than expected. As a size (distance) reference, it is nearly 2 die distance away from the end of the row of die. (I have attempted to attach an image for a better visual).

Is there a way to modify it actual location that I am overlooking?

Regards


54166

You are not using it with the dice tower turned on. If you do would show up with that great space. There is currently no way to move the coin. This was one of the first extensions I created and was limited by my knowledge at the time. Been thinking about redoing the extension to give a little more flexible to where it is placed on the desktop (figure out how to make it moveable). Also thinking about finding a way to let GM select type of coin, so it better fits the theme of the game.

Thakeria Jamison
August 31st, 2022, 20:02
You are not using it with the dice tower turned on. If you do would show up with that great space...

Not quite true. The tower would cover buttons above the die area and would be touching both the d4 and coin.

Don't get me wrong. I like the idea of the coin and it is functions as expected and sits properly for the default settings. It just needs a bit of work on the positioning system for a customizable location.

Otherwise, kudos for a first time extension.

Regards.

SAVeira
September 4th, 2022, 13:33
Not quite true. The tower would cover buttons above the die area and would be touching both the d4 and coin.

Don't get me wrong. I like the idea of the coin and it is functions as expected and sits properly for the default settings. It just needs a bit of work on the positioning system for a customizable location.

Otherwise, kudos for a first time extension.

Regards.

Looks like they update something. I will do a quick fix for now. Then I will see about a complete update.

SAVeira
September 4th, 2022, 20:17
I have uploaded a new build. There would be also a build for button layout B without dice tower too. However, I hope out a much build 2.0, if life does not get in the way.

SAVeira
September 6th, 2022, 20:21
I have updated an updated version to the Forge that will allow the coin to moved and you now can select the type of coin you would like used.
https://forge.fantasygrounds.com/shop/items/830/view

Thakeria Jamison
September 6th, 2022, 21:38
I have updated an updated version to the Forge that will allow the coin to moved and you now can select the type of coin you would like used.
https://forge.fantasygrounds.com/shop/items/830/view

Downloaded the new version of the extension.

So close. I really like the idea of the different coin style. I would be neat to be able to upload a custom image.

As far as the positioning, that's not working. I right click and choose unlock position but to no avail, I can only get a drag and drop to roll function occurring. Upon trying the right click again, it was a bit odd to realize that I had to click the close button to get the option to either close or lock the position (I did discover that the hover tip made that a more clear direction). Also, if you happen to click 'close' the coin is gone with no obvious way of having it return to the screen other than to close and then reload the session.

FYI, I did update the older extension and having the three choices in the older version of the extension did resolve the placement of the coin even though that is a fixed position type choice.

Regards

SAVeira
September 6th, 2022, 22:53
Downloaded the new version of the extension.

So close. I really like the idea of the different coin style. I would be neat to be able to upload a custom image.

As far as the positioning, that's not working. I right click and choose unlock position but to no avail, I can only get a drag and drop to roll function occurring. Upon trying the right click again, it was a bit odd to realize that I had to click the close button to get the option to either close or lock the position (I did discover that the hover tip made that a more clear direction). Also, if you happen to click 'close' the coin is gone with no obvious way of having it return to the screen other than to close and then reload the session.

FYI, I did update the older extension and having the three choices in the older version of the extension did resolve the placement of the coin even though that is a fixed position type choice.

Regards

You have carefully select just off the coin itself, not the coin directly. If you see the point change to a hand, you are over the coin. So, position the point over the coin, when it turns to a hand, slow move off, then when it is a pointer again, then left click. There is no way stop the function of the coin being draggable or flip able when trying to move. There are two part to the coin, the visible coin, and an invisible larger area around it. That area around the coin is what is movable part.

I can disable the close part. Just not one to remove options when given. Close is working as designed (function built into FGU).

As for a custom image. That would take more programing time that I am able to devote at this time. I am open to add coins if they are something in the public domain. People can just hack the extension to put in their own images. It is quite simple. The extension should not be in vault, so you can rename "Coin Flip.ext to "Coin Flip.zip". Replace a couple of images (coinheads.png & cointails.png to change the default image) then rename the zip folder back to ext. They will need to be 50x50 pixels, at 32bit.

Thakeria Jamison
September 6th, 2022, 23:14
You have carefully select just off the coin itself, not the coin directly. If you see the point change to a hand, you are over the coin. So, position the point over the coin, when it turns to a hand, slow move off, then when it is a pointer again, then left click. There is no way stop the function of the coin being draggable or flip able when trying to move. There are two part to the coin, the visible coin, and an invisible larger area around it. That area around the coin is what is movable part.

I can disable the close part. Just not one to remove options when given. Close is working as designed (function built into FGU).

As for a custom image. That would take more programing time that I am able to devote at this time. I am open to add coins if they are something in the public domain. People can just hack the extension to put in their own images. It is quite simple. The extension should not be in vault, so you can rename "Coin Flip.ext to "Coin Flip.zip". Replace a couple of images (coinheads.png & cointails.png to change the default image) then rename the zip folder back to ext. They will need to be 50x50 pixels, at 32bit.

Gotcha. While that is not too bad on a desktop with a mouse, it is a real challenge on a laptop with the touchpad. With a mix of hardware amongst players some may find it easy and others not so much.

It was a bit of an expectation that the positioning would operate like the other widgets when they are in movement mode.

You may want to post these precise targeting for movement instructions in the Forge description for the extension. Just a thought.

Also, completely understandable on the custom coin image. It's just a germ thought for ideas later down the road.

Regards

SAVeira
September 8th, 2022, 21:36
I have submitted a minor update. How in options, you can turn on a background for the widget. That should make it easier to figure out what to click on to move the coin.