Char input sneak peek

Started by Zefk, October 07, 2016, 04:16:13 AM

Previous topic - Next topic
October 07, 2016, 04:16:13 AM Last Edit: October 07, 2016, 04:19:19 AM by Zefk
My char input goes up to 15 places. I fixed the error with "3" in the gif. I forgot to remove a comment in the script due to test reasons. I will add capitals and fix the coordinate errors or it might be a space in the char image.


October 08, 2016, 08:17:37 AM #1 Last Edit: October 08, 2016, 09:37:04 AM by Zefk
Added:
-Switch from shift to lower case
-Able to mix lowercase and uppercase characters
-The ability to delete or backspace

The lag slows the gif a little. Not caused by the script. It is super fast.


Bugs:
-Space errors that need minor adjusting

Enhancements in progress:
-Passing the char to a name variable($v) for Christopho's text box. That way the char input can be used for names.
-Name tag. The char input passed on to a name plate that will be moved above the text box.
-Space input (space bar)

Besides those enhancements it can be used for word puzzles. For example, beating a boss or enemy can reward the player with an input space to prevent guessing.

Interesting script for example to name the hero at the beginning of the game.
It seems in your .gif that it is possible to go from left to right. But, I don't understand why the cursor goes from "A" to "Enter" and not to "Cancel". Bug or lag or missing frame in the .gif?
Is it also possible to loop vertically (e.g. from "v" to "4" or from "4" to "v")?

October 08, 2016, 08:48:54 PM #3 Last Edit: October 08, 2016, 08:51:46 PM by Zefk
QuoteBut, I don't understand why the cursor goes from "A" to "Enter" and not to "Cancel".

Enter is browse 24 and "a" is browse 25. Basically, it goes from around browse 1 - 48 for normal left and right browsing. I have it skip by 12 for up and down browsing. Number "1" and exclamation "!" mark (for shift or capital) do what you want, but it was because I was too lazy to scroll down and left to get to backspace.

QuoteIs it also possible to loop vertically (e.g. from "v" to "4" or from "4" to "v")?
It does indeed do that. I have it add and minus 48 for browsing looping to the other side with up and down.





I added similar calculation controllers as I did for "browse 1" for left and right looping. I think this is what you wanted froggy77?


This is the result I wanted expected. This allows a better and faster navigation.
Bravo!  8)

Glad you like it.

Besides that. I decided that naming 15 characters would be enough. I think the programmer can set the names manually with code for beyond 15 characters. Who really wants to name more that 4 characters anyway?

-Hero
-Rival
-Best friend
-Pet

Unless in the case of a monster game like Pokemon, but I never named them when playing those games.

October 10, 2016, 02:08:23 AM #7 Last Edit: October 10, 2016, 03:36:08 AM by Zefk
I have completed some tests with passing char on from text box input and removing them. The "wp" is a random test. The character being named is activated with true or false. In this case both are true, so both characters are being named at the same time and that is why I added the random "wp" instead of "12" for character_2.

Code ( lua) Select

text_box.naming_character[1] = true
text_box.naming_character[2] = true




Bug fixed:
-Fixed green block "browse 1" from showing on character movement. Set to browse 0 at start of script and browse 1 on activation of text box.

I did massive improvements for the script using arrays. It is quite easy to exceed 15 characters with number changes.

Added:
-Char input for capital and lowercase
-Clear all char images
-Clear concat string
-Removed limits with arrays (shortened the script by more than 75%)
-The ability name as many characters as one wants at one time. Name 150 monsters if you want. Otherwise, small pieces of code will have to be added for naming at different times or something along those lines.
---Changing the below will change the limits of the script.
-local char_limit = 15
-local char_amount = 16
-local char_image_num = 15
-local character_limit = 15
-local max_char = 15

Bugs:
-Space image errors that need minor adjusting, but has absolutely nothing to do with the script.
-Audio is lowered when skipping. Most likely due to rapid playing. Not 100% sure, but it kinda is a nice effect.

Bugs fixed:
-Backspace caused string deleting in reverse.
-skipping characters and marking them nil due to missing "break"

Enhancements in progress:
-Name tag. The char input passed on to a name plate that will be moved above the text box. (Similar to the bank script wallet number display)
-Picking of manually coded names. For example, Pokemon red, blue, yellow, has a list of names to choose from for names.
-Space input (space bar)
-Cancel (clear everything and repeat on some decision.)


October 17, 2016, 04:11:50 AM #9 Last Edit: October 17, 2016, 04:18:09 AM by Zefk
I added a few things today. I added the space input and manually coded names.



Added:
-Space input
-Picking of manually coded names. For example, Pokemon red, blue, yellow, has a list of names to choose from for names.

Enhancements in progress:
-Name tag. The char input passed on to a name plate that will be moved above the text box. (Similar to the bank script wallet number display)
-Cancel (clear everything and repeat on some decision.)

Bugs:
-Space image errors that need minor adjusting, but has absolutely nothing to do with the script.
-Audio is lowered when skipping. Most likely due to rapid playing. Not 100% sure, but it kinda is a nice effect.

Bugs fixed:
-Green box still shows on zefk after enter. You will notice the error in the gif.

Clever, nice inclusion of this system into the dialog box system

This could be nice for some puzzles

The enhancement I am adding will turn a string into image text, but the images can really be anything. I might make it into a dialog system later, but my plans are to go do the easy scripts on my list and shorten existing scripts with arrays.

I finished the string to image text. I added a feature where there is sorta a wrap text, but it will be limited to three lines because I do not see three characters speaking at the same time unless they all say the same sentence. You know those moments.

What's weird in your last post is that the box is drawn bellow entities, otherwize there is nothing more to say except it's a nice feature

One thing the moderator should do is, add a new subforum where there would be only scripts for Solarus

@Zefk:
It is good to see that you have progressed a lot with this script. Your work looks promising and may be useful to other people.

And I agree: you are grand! ;D
"If you make people think they're thinking, they'll love you. But if you really make them think, they'll hate you."