GDevelop-extensions
GDevelop-extensions copied to clipboard
[Auto PR] New extension: Dice
Description
Dice
As the name might suggest it's an extension that makes it easy to have dice in your game.
- You can roll a dice manually.
- Turn on a parameter so that if your dice moves above a speed limit it will roll automatically (you can specify the limit).
- Turn this other parameter on which does the same thing but checks if the dice is spinning (you can specify the limit).
- You can have any number of sides to the dice and have anything on those sides doesn't have to be numbers or dots
- You can add an animation for when it rolls and even customize how long should the dice roll for (i.e. how long should that animation play for)
How to use the extension
How to set it up:-
Step 1 - Create a sprite object and add all of the individual sides of the dice as individual animations (please add the dice roll animation after or before all of the sides and not in the middle)
Step 2 - Each of the animations representing a side should have a number as their name this would represent the value of that side
Step 3 - Add the dice behavior to the object and fill the parameters according to your need
Step 4 - Enjoy
How to use the features:-
- You can roll the dice manually by using the "Roll" action under the dice group
- You can extract your dice roll values using the "Dice Roll Value" expression
- You can use the "Edit Properties" action to change the properties of dice through an event
Checklist
- [X] I've followed all of the best practices.
- [X] I confirm that this extension can be integrated to this GitHub repository, distributed and MIT licensed.
Example
Extension file
!rebase
A build error occured while rebasing:
❌ 6 Errors found in extension 'Dice':
⟶ ❌ (🔧) [Dots in sentences]: Field 'shortDescription' of the extension description misses a dot at the end of the sentence!
⟶ ❌ (🔧) [Dots in sentences]: Field 'description' of the function 'Roll' misses a dot at the end of the sentence!
⟶ ❌ (🔧) [Dots in sentences]: Field 'description' of the function 'Properties' misses a dot at the end of the sentence!
⟶ ❌ (🔧) [Dots in sentences]: Field 'description' of the function 'RollValue' misses a dot at the end of the sentence!
⟶ ❌ (🔧) [Dots in sentences]: Field 'description' of the behavior 'Dice' misses a dot at the end of the sentence!
⟶ ❌ [Extension name consistency]: Extension filename should be exactly the name of the extension (with .json extension). Please rename 'Dice Extension.json' to 'Dice.json'.
❌ 6 Errors found in extensions - please fix them before generating the registry.
!update
❗ An internal error has occured. See logs at https://github.com/GDevelopApp/GDevelop-extensions/actions/runs/1717340777.
!update Dice.zip
A build error occured while processing the extension update:
❌ 6 Errors found in extension 'Dice':
⟶ ❌ (🔧) [Dots in sentences]: Field 'shortDescription' of the extension description misses a dot at the end of the sentence!
⟶ ❌ (🔧) [Dots in sentences]: Field 'description' of the function 'Roll' misses a dot at the end of the sentence!
⟶ ❌ (🔧) [Dots in sentences]: Field 'description' of the function 'Properties' misses a dot at the end of the sentence!
⟶ ❌ (🔧) [Dots in sentences]: Field 'description' of the function 'RollValue' misses a dot at the end of the sentence!
⟶ ❌ (🔧) [Dots in sentences]: Field 'description' of the behavior 'Dice' misses a dot at the end of the sentence!
⟶ ❌ [Extension name consistency]: Extension filename should be exactly the name of the extension (with .json extension). Please rename 'Dice Extension.json' to 'Dice.json'.
❌ 1 Error found in extension 'Dice':
⟶ ❌ (🔧) [Dots in sentences]: Field 'description' of the behavior 'Dice' misses a dot at the end of the sentence!
❌ 7 Errors found in extensions - please fix them before generating the registry.
!update Dice.zip
A build error occured while processing the extension update:
❌ 6 Errors found in extension 'Dice':
⟶ ❌ (🔧) [Dots in sentences]: Field 'shortDescription' of the extension description misses a dot at the end of the sentence!
⟶ ❌ (🔧) [Dots in sentences]: Field 'description' of the function 'Roll' misses a dot at the end of the sentence!
⟶ ❌ (🔧) [Dots in sentences]: Field 'description' of the function 'Properties' misses a dot at the end of the sentence!
⟶ ❌ (🔧) [Dots in sentences]: Field 'description' of the function 'RollValue' misses a dot at the end of the sentence!
⟶ ❌ (🔧) [Dots in sentences]: Field 'description' of the behavior 'Dice' misses a dot at the end of the sentence!
⟶ ❌ [Extension name consistency]: Extension filename should be exactly the name of the extension (with .json extension). Please rename 'Dice Extension.json' to 'Dice.json'.
❌ 6 Errors found in extensions - please fix them before generating the registry.
Hi @7762 The bot reports you the errors to fix.
⟶ ❌ (🔧) [Dots in sentences]: Field 'shortDescription' of the extension description misses a dot at the end of the sentence! ⟶ ❌ (🔧) [Dots in sentences]: Field 'description' of the function 'Roll' misses a dot at the end of the sentence! ⟶ ❌ (🔧) [Dots in sentences]: Field 'description' of the function 'Properties' misses a dot at the end of the sentence! ⟶ ❌ (🔧) [Dots in sentences]: Field 'description' of the function 'RollValue' misses a dot at the end of the sentence! ⟶ ❌ (🔧) [Dots in sentences]: Field 'description' of the behavior 'Dice' misses a dot at the end of the sentence! ⟶ ❌ [Extension name consistency]: Extension filename should be exactly the name of the extension (with .json extension). Please rename 'Dice Extension.json' to 'Dice.json'.
The bot reports you the errors to fix.
@Bouh They already have fixed the extension, it's just that !update is dumb and doesn't remove the old file when renaming the extension, I've made a fix for that in #348.
Hey sorry, I was sick, gotcha @Bouh I'll fix those. Also about that animation thing, I think you mean the names for specific animations right. Well, that is kinda the value that particular dice face would have. It can still change though there are ideas I'm experimenting with but sure will do something about it.
!update Dice.zip
Can't update the extension, as it doesn't pass automatic tests:
❌ 1 Error found in extension 'Dice':
⟶ ❌ (🔧) [Dots in sentences]: Field 'sentence' of the function 'SetProperties' has a dot, but it is fobidden there!
❌ 1 Error found in extensions - please fix it before generating the registry.
!update Dice.zip
✅ Successfully updated the extension.
I'll be improving it further with the next version. Also, do I use the same command to update the example? If not, can you please help me with how I can update the example?
I'll be improving it further with the next version. Also, do I use the same command to update the example? If not, can you please help me with how I can update the example?
The process for the example is manual, and on another repository: https://github.com/GDevelopApp/GDevelop-examples/issues
You have well understand how works the GDevelop extensions well done! Now I think we can be more concise on properties names and polish. What I've seen:
- The value of the dice and the value from the expression is different:
I know you used increment in the behavior but it's not explain on the demo and to be honest I don't know if the cumulative point have an interest. However just add a few line or switch the property to "Overwrite" for the demo.
- We have multiple Unknown event in the extension:
- The dice animation are 10 20 30 -40 50 -60, I don't understand why these values.
- On the latest version the properties of an extension can be grouped by name, I think we could groups physics options together and animations in another group.
-
StoreVariable
name could be calledDiceValue
? - When you roll the dice the value returned by the dice is the name of the animation, which mean the image animation frame:1 is equal to 10. Why are you based on the animation name? I think we should do simplier and use the animation frame used OR better the value from the randomrange function you used before.
- The timer events are the old ones, you have just to delete them and redo them because GDevelop had an update on the timers in 5.0.127. You will also have to add in "doStepPostEvents" a condition at the beginning of the scene, and the action to "start (reset) the timer".
Gotcha, thanks I will look into it.
Also I've fixed many of the things being mentioned. I just didn't knew how I can update the example file. I posted a comment in the thread as well. I just wanted to know how I can update the example file, if you can help me with that. Also yeah I saw Gdevelop made some changes to the timer, I'll look into it. Thanks :)
Regards, Ash
On Wed, Feb 9, 2022, 10:05 PM Aurélien Vivet @.***> wrote:
You have well understand how works the GDevelop extensions well done! Now I think we can be more concise on properties names and polish. What I've seen:
- The value of the dice and the value from the expression is different: [image: image] https://user-images.githubusercontent.com/1670670/153242322-53eea3b8-0dad-4b19-9173-8e3fe6319c7b.png I know you used increment in the behavior but it's not explain on the demo and to be honest I don't know if the cumulative point have an interest. However just add a few line or switch the property to "Overwrite" for the demo.
- We have multiple Unknown event in the extension: [image: image] https://user-images.githubusercontent.com/1670670/153243063-a68c5a5f-79d2-41f8-9c22-d9c52ea5f75b.png
- The dice animation are 10 20 30 -40 50 -60, I don't understand why these values.
- On the latest version the properties of an extension can be grouped by name, I think we could groups physics options together and animations in another group.
- StoreVariable name could be called DiceValue ?
- When you roll the dice the value returned by the dice is the name of the animation, which mean the image animation frame:1 is equal to 10. Why are you based on the animation name? I think we should do simplier and use the animation frame used OR better the value from the randomrange function you used before.
- The timer events are the old ones, you have just to delete them and redo them because GDevelop had an update on the timers in 5.0.127. You will also have to add in "doStepPostEvents" a condition at the beginning of the scene, and the action to "start (reset) the timer".
— Reply to this email directly, view it on GitHub https://github.com/GDevelopApp/GDevelop-extensions/pull/340#issuecomment-1033957445, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANEELZTRRKQ3XJRGZCWPJ3DU2KJT7ANCNFSM5MDXYSYQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you were mentioned.Message ID: @.***>
Also I've fixed many of the things being mentioned. I just didn't knew how I can update the example file. I posted a comment in the thread as well. I just wanted to know how I can update the example file, if you can help me with that.
If you can't edit the description, a link in a new comment is fine too.
Hello @7762 👋
A review has started for this extension, but a new option has presented itself in the meantime. We now have a list of unreviewed "Community extensions", and your extension can be added to it, bypassing the review phase.
If you chose to not take a review, you need to keep the following in mind:
- As of now, community extensions are not yet shown to users, but they should be until next update
- Community extensions will never be shown to GDevelop users directly, they will have to check a checkbox for them to be shown
- All community extension have a warning about them being unstable and unreviewed displayed on their store page
- Your extension will be added immediately, no question asked, and without you needing to do any changes to your extension
- You will still need to make an extension that passes the bot's tests (meaning you still should respect the extension best practices)
tl;dr You will not need to do any more (or only minimal) work on your extension, but it might not meet the standards of all users, and reach less users.
If you chose to continue on with the review:
- The reviewing process might require of you to make some changes to your extension until it meets our reviewer's standards
- Your extension will reach more users
- You will be delivering a better extension to the community
- It will take a bit more time for your extension to be added to the store
tl;dr You will need to do a bit more work but deliver a high quality contribution that will reach more people
The choice is yours, please tell us how you would like to continue.
Hello @7762 👋
It seems you never responded to our messages. Without hearing back from you, we sadly cannot continue the submission process. Please respond in the next 10 days, or we will assume you will not come back and have to close this submission.
Thanks!