Any ideas for extensions (preferably ones that can be reusable in several projects, not something project-specific) ?
(Also not something hard to do)
Any ideas for extensions (preferably ones that can be reusable in several projects, not something project-specific) ?
(Also not something hard to do)
I know a lot of people ask for a way to format text with commas. I created a basic function in another thread but it would need some checks and balances and other options. Along with testing. Or you could make it without Javascript.
Surely I will try that out and come here with the result.
Edit: Before starting, I donāt know if I make it just a separated extension or I implement it to the āExtended Mathā extension.
I donāt know. Probably seperate or both. I donāt know if people would find it in a math extension. It would have to return a string. So, maybe itās more a text manipulation. Like the reg ex (regular expressions)
The regional setting is the tough part. Javascript handles that. France uses space instead of commas and commas instead of periods. IDK what other countries use.
Iām making so the user actually chooses the separator, and when I finish making the expression, I will try to find where it will belong.
Update: It works fine, I will make it being a new extension because of some reasons:
I will add another expression that converts it to the ānumber+letterā format (1m, 1b, 1t)
And another that converts to ānumber+wordā (1 million, 1 billion, 1 trillion)
In those, I wanna make so the user actually inputs a scene variable array that contains all the words/letter to display as it childs (ordered), incase they want to translate their game.
Also I will surely use all of this in my game too lol
Edit 2: Actually, it will be only āFormatNumberā and ānumber+wordā, because since the user is the one actually writing the array childs, they can just write letters in the childs.
Sounds good. I know some people need the large number format for games like clickers that use exaggerated values.
The number+word expression is almost done, I only must make so the user can choose the number of decimal houses to be displayed (in a range of 0 and 3)
Update 2: I think its done now I just need to create an example project.
Opps, sorry. I didnāt mean to flag this.
I spent like 10 minutes trying to find an image for the extension in the asset store and this slow search is not helping
Edit: search got better, now Iām seeking for an image that most fits the extension.
Edit 2: Wait a minute I just found an image that is literally ,0 with an arrow pointing to the comma.
Problems so far:
Gdevelop canāt handle multiplicating a large number by 10 (Its a GDevelop issue unrelated to the extension so thats ok)
GDevelop starts using scientific notation past 1e+21, and it breaks my code, so I have to find a workaround (I saw there is an expression that can convert it to a large number)
Edit: I got scammed, LargeNumberToString(number) still results the number in scientific notation, I think thats a bug and when Iām sure I will report it later
I canāt do that, it would require a lot of knowledge in javascript probably.
An extention idea : A random generator which can get a seed.
I would definitelly use than to make daily challenges.
I donāt get it, you want a random number?
A seed lets you repeat a sequence of random numbers. An example would be for a game level where you want cards or a puzzle of some sort to be random but consistent for each player of that level.
It looks like something I did for my game, this formula āfloor(((Seed + 1) * 56 / 9999998 + 256) / 16) * 16ā results in a number between 256 and 312 when āSeedā is a number between 0 and 9999999
So you will basically generate the same terrain if you input the same seed twice
How would that work? Would you increase the seed each time after the initial value?
The player will insert a seed which is a number between 0 and 9999999, and this expression (which is called āmap number from one range to anotherā) will convert it to a number between 256 and 312, and then I will create objects from external layout with a offset of the result of the expression, and increase the offset by every layout created (Iām still coding this part)
Btw about the format number extension, Iām waiting for the devs to fix the issue with LargeNumberToString() not working, because my code breaks after 1.000.000.000.000.000.000.000 because GDevelop starts using scientific notation (1e+21) and LargeNumberToString is supposed to make it not occur, but it still occurs.