Achievements plugin

Linebreaks are "\n". You can't insert real linebreaks in JSON files, since that causes them to break, but i might give you the option to supply an array of strings, instead, which get automatically joined with linbreaks, like i did for my Note Files plugin.


I don't fully get, what you mean by "wrap the test", though.
Linebreaks are "\n". You can't insert real linebreaks in JSON files, since that causes them to break, but i might give you the option to supply an array of strings, instead, which get automatically joined with linbreaks, like i did for my Note Files plugin.

I don't fully get, what you mean by "wrap the test", though.
No, thats exactly what I meant, thank you!!
@Iavra: by wrap the text, what ismeant is an automatic line break when text reaches the width of the window, mandatory if the game changes size.
@Iavra: by wrap the text, what is meant is an automatic line break when text reaches the width of the window, mandatory if the game changes size.
Yes but \n isn't hard to add, so a word wrap isn't necessary. Although to be honest it would be kinda useful.
Let us imagine the game size is 500 by 500. You add \n around the text to fit that. Now what happens if the game changes to 800 by 800?
Let us imagine the game size is 500 by 500. You add \n around the text to fit that. Now what happens if the game changes to 800 by 800?
Yeah, I see that could be pretty cool!
It's why word wrapping is just a standard these days, you shouldn't have to add \n unless it is a new paragraph or sentence.

In any case, I'll check the actual plugin out later.
It's why word wrapping is just a standard these days, you shouldn't have to add \n unless it is a new paragraph or sentence.

In any case, I'll check the actual plugin out later.
Well its in a .json file (the settings I mean) so it would be very hard to add word wrapping, to my understanding.
The json is parsed by the engine though, Yanfly et al have word wrapping scripts for text boxes already. Everything in the engine is basically either a json or js file. I believe text boxes are in json files, but I haven't used MV enough to dig into that. It is possible, though.
The json is parsed by the engine though, Yanfly et al have word wrapping scripts for text boxes already. Everything in the engine is basically either a json or js file. I believe text boxes are in json files, but I haven't used MV enough to dig into that. It is possible, though.
But Iavra said: 

 

Linebreaks are "\n". You can't insert real linebreaks in JSON files, since that causes them to break, but i might give you the option to supply an array of strings, instead, which get automatically joined with linbreaks, like i did for my Note Files plugin.

I don't fully get, what you mean by "wrap the test", though.

 
So I thought it was impossible...
I'll see what i can do. If i can't find a way, the plugin should still be compatible with Yanfly's (or other) wordwrap, since the achievement list is just a window like everything else.

/edit:

So I thought it was impossible...
What i mean is, you can't add real linebreaks in JSON files, like this:
Code:
{    "someKey":"some textwith linebreak"}
I'll see what i can do. If i can't find a way, the plugin should still be compatible with Yanfly's (or other) wordwrap, since the achievement list is just a window like everything else.

/edit:

What i mean is, you can't add real linebreaks in JSON files, like this:

{ "someKey":"some textwith linebreak"}
Oh! Ok... Well it doesnt word wrap when using Yanfly Message, but what you say seems right, I dont know a lot about Javascript though.
Let us imagine the game size is 500 by 500. You add \n around the text to fit that. Now what happens if the game changes to 800 by 800?
Am i not getting a point or something? I mean, if you'll increase the game's screen size... well, don't wrap the text, till it hits it's increased range.
Am i not getting a point or something? I mean, if you'll increase the game's screen size... well, don't wrap the text, till it hits it's bigger range.
You might as well just automatically wrap the text so you don't ever have to worry about putting in all of the line breaks!
You can do rewards via events, if you checking them manually.

It could if you pressed F8 during testing. But now it's fixed, try to downolad it again.
how can i check them manually?  I don't think that this plugin can check if a certain achievement is completed and then run the event (at least not at this moment)
Well, you can, like this:

var achievements = IAVRA.ACHIEVEMENT.achievements();for(var i = 0, max = achievements.length; i < max; ++i) { if(achievements.id === 'Your id here' && achievements.completed) { return true; }};return false;This is basically, what the API function will do internally, anyway. Only less to write ^^About all that text wrapping etc: This is why i hate doing GUI or graphical stuff...background systems are much easier to do, since you don't have to care about aesthetics or screen resolution ^^
About all that text wrapping etc: This is why i hate doing GUI or graphical stuff...background systems are much easier to do, since you don't have to care about aesthetics or screen resolution ^^
Yup, graphics are hard... and everyone likes them being ever so slightly different to everyone else!  BD
Well, you can, like this:

var achievements = IAVRA.ACHIEVEMENT.achievements();for(var i = 0, max = achievements.length; i < max; ++i) { if(achievements.id === 'Your id here' && achievements.completed) { return true; }};return false;This is basically, what the API function will do internally, anyway. Only less to write ^^About all that text wrapping etc: This is why i hate doing GUI or graphical stuff...background systems are much easier to do, since you don't have to care about aesthetics or screen resolution ^^

sorry but i don't really understand how to use this... where do I need any script/plugin calls?
You might as well just automatically wrap the text so you don't ever have to worry about putting in all of the line breaks!
What if i want that my text line went beyond the borders? To confuse a player or maybe to made something like "Broken achievement". Or maybe to engage a visual tricks like those:

4a5800315528aad91beff74cbaf6c2d0.jpg


It can be used, actually.

...About all that text wrapping etc: This is why i hate doing GUI or graphical stuff...background systems are much easier to do, since you don't have to care about aesthetics or screen resolution ^^
I really think you don't need to program an automatic line breaks. Especially if it's a headache for you. Just leaving a space for two strings and giving us a possibility to break a line by ourselves sounds pretty enough.
What if i want that my text line went beyond the borders? To confuse a player or maybe to made something like "Broken achievement". Or maybe to engage a visual tricks like those:
Then you simply turn off linebreak before that achievement string, then turn it on again at the end of the string.

Original thread: https://forums.rpgmakerweb.com/threads/achievements-plugin.50855/