Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New extension: SecretCode #776

Merged
merged 3 commits into from
Sep 28, 2023
Merged

New extension: SecretCode #776

merged 3 commits into from
Sep 28, 2023

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Feb 9, 2023

Description

Allows to input a secret code for cheats and easter eggs.

How to use the extension

Put SecretCode behavior on any object, and check code entered correctly condition if the code was entered correctly. There is also an action to reset code entered status.

Checklist

  • I've followed all of the best practices.
  • I confirm that this extension can be integrated to this GitHub repository, distributed and MIT licensed.
  • I am aware that the extension may be updated by anyone, and do not need my explicit consent to do so.

What tier of review do you aim for your extension?

Community (Unreviewed)

Example file

Secret Code Example.zip

Extension file

SecretCode.zip

@github-actions github-actions bot requested a review from a team as a code owner February 9, 2023 04:42
@github-actions github-actions bot added the ✨ New extension A new extension label Feb 9, 2023
@github-actions github-actions bot mentioned this pull request Feb 9, 2023
3 tasks
Copy link
Member

@Oxey405 Oxey405 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So the extension is pretty cool that's for sure but I have a few questions and problems :

  1. Can you make the StringToStringListObjectVar function private (right click -> private). This means the function will only be usable internally for the extension has the goal of your extension isn't to split a string into a list of strings.
  2. I think there is a need for more actions and conditions to be added. Namely
    • There should be a way for the game creator to check if the code is being inputted or isn't being inputted to avoid triggering a "code false" event by accident or repeatedly
    • There should be an action to start and stop recording the inputs (other than just disabling the behaviour)
    • It should also be possible to enter a code with an action. An action like : "enter a new input in the code"
    • Finally, it should be possible to set the code in the events as the code may be dynamic !
  3. As a bonus you should consider writing some documentation on it just to be sure

Overall this is a good concept but it needs some improvements.
Take your time and it will become a great extension👍

@george-gca
Copy link
Contributor

Sorry for the delay. I will address all these issues and upload it again. But I don't know if I understood some parts:

There should be a way for the game creator to check if the code is being inputted or isn't being inputted to avoid triggering a "code false" event by accident or repeatedly

You mean, for example, every time the player entered one of the code keys correctly, trigger a condition? If so, what should be the condition? EnteredKeyCorrectly for example?

Currently, the handling of the code keys are done inside, and once entered in the correct order they trigger that the code was entered, but only once. It only triggers again if the user resets the status of the verification.

Also, what you mean by

It should also be possible to enter a code with an action. An action like : "enter a new input in the code"

You mean, editing the code? Or just setting the flag that the code was entered correctly?

For the documentation, sure. Where should I do this?

@Oxey405
Copy link
Member

Oxey405 commented Mar 25, 2023

Hey ! What I mean by

There should be a way for the game creator to check if the code is being inputted or isn't being inputted to avoid triggering a "code false" event by accident or repeatedly

Is that : you should be able to check if the code is starting to be inputted with an string expression called : LastValidInput.
This expression should return the last valid input.
There should be a condition named Is the code currently being entered that will be false by default unless at least one key is entered correctly.
It should be possible to reset the code input using an action on the object something like : Reset inputted code.
Calling this action should also result in the condition called Is the code currently being entered to be false.

That's all I hope it's not too much take your time :)

@george-gca
Copy link
Contributor

I decided to create 2 behaviors:

  • SecretCode: attach this to any object, set the code property and it handles everything inside
  • ManualSecretCode: you have to do some of the process manually, like insert the key

Question: how do I update the zips when already in the PR?
Also, as soon as the final version is submitted, I will create its documentation page. I added the path to it in the extension.

@VegeTato VegeTato added the 👨‍👩‍👧‍👦 Community extension An extension submission to be merged ASAP with a lightweight review. label Jun 13, 2023
@VegeTato VegeTato mentioned this pull request Jun 13, 2023
3 tasks
@george-gca
Copy link
Contributor

@VegeTato how do I update the zips when already in the PR?

@VegeTato
Copy link
Contributor

VegeTato commented Jul 2, 2023

@VegeTato how do I update the zips when already in the PR?

Write !update then space, then upload your new version of the extension

example:
!update [extension.zip]

@GDevelopApp GDevelopApp deleted a comment from github-actions bot Jul 2, 2023
@george-gca
Copy link
Contributor

!update SecretCode.zip Secret Code Example.zip

@github-actions
Copy link
Contributor Author

github-actions bot commented Jul 2, 2023

Can't update the extension, as it doesn't pass automatic tests:

❌ 15 Errors found in extension 'SecretCode':

  ⟶ ❌ (🔧) [Dots in sentences]: Field 'description' of the function 'ResetCodeEntered' misses a dot at the end of the sentence!
  ⟶ ❌ (🔧) [Dots in sentences]: Field 'description' of the function 'IsAcceptingCode' misses a dot at the end of the sentence!
  ⟶ ❌ (🔧) [Dots in sentences]: Field 'description' of the function 'AcceptCode' misses a dot at the end of the sentence!
  ⟶ ❌ (🔧) [Dots in sentences]: Field 'description' of the function 'ChangeCode' misses a dot at the end of the sentence!
  ⟶ ❌ (🔧) [Dots in sentences]: Field 'description' of the function 'ResetCodeEntered' misses a dot at the end of the sentence!
  ⟶ ❌ (🔧) [Dots in sentences]: Field 'description' of the function 'IsAcceptingCode' misses a dot at the end of the sentence!
  ⟶ ❌ (🔧) [Dots in sentences]: Field 'description' of the function 'AcceptCode' misses a dot at the end of the sentence!
  ⟶ ❌ (🔧) [Dots in sentences]: Field 'description' of the function 'ChangeCode' misses a dot at the end of the sentence!
  ⟶ ❌ (🔧) [Dots in sentences]: Field 'description' of the function 'CodeBeingEntered' misses a dot at the end of the sentence!
  ⟶ ❌ (🔧) [Dots in sentences]: Field 'description' of the function 'ResetInputtedCode' misses a dot at the end of the sentence!
  ⟶ ❌ (🔧) [Dots in sentences]: Field 'description' of the function 'InputKey' misses a dot at the end of the sentence!
  ⟶ ❌ (🔧) [Dots in sentences]: Field 'description' of the function 'LastValidKey' misses a dot at the end of the sentence!
  ⟶ ❌ (🔧) [Dots in sentences]: Field 'description' of the function 'LastValidIndex' misses a dot at the end of the sentence!
  ⟶ ❌ [Filled out names and descriptions]: Required field 'description' of the function 'AcceptCode parameter 'Accepting' is not filled out!
  ⟶ ❌ [Filled out names and descriptions]: Required field 'description' of the function 'AcceptCode parameter 'Accepting' is not filled out!


❌ 15 Errors found in extensions - please fix them before generating the registry.

@george-gca
Copy link
Contributor

!update SecretCode.zip Secret Code Example.zip

@github-actions
Copy link
Contributor Author

github-actions bot commented Jul 2, 2023

✅ Successfully updated the extension.

@arthuro555
Copy link
Member

I added an icon to the extension, i believe that's a requirement. Sorry for the delay, merging this now!

@arthuro555 arthuro555 merged commit 8775cb6 into main Sep 28, 2023
5 checks passed
@arthuro555 arthuro555 deleted the extension/george-gca/775 branch September 28, 2023 17:56
@george-gca
Copy link
Contributor

@arthuro555 how could I add the docs for my extension?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
👨‍👩‍👧‍👦 Community extension An extension submission to be merged ASAP with a lightweight review. ✨ New extension A new extension
Projects
Status: Added to GDevelop
Development

Successfully merging this pull request may close these issues.

4 participants