Author Topic: Char input sneak peek  (Read 16348 times)

0 Members and 1 Guest are viewing this topic.

Zefk

  • Hero Member
  • *****
  • Posts: 535
  • Just helping Solarus
    • View Profile
    • Zefk Design
Char input sneak peek
« on: October 07, 2016, 04:16:13 AM »
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.


Zefk

  • Hero Member
  • *****
  • Posts: 535
  • Just helping Solarus
    • View Profile
    • Zefk Design
Re: Char input sneak peek
« Reply #1 on: October 08, 2016, 08:17:37 AM »
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.

froggy77

  • Full Member
  • ***
  • Posts: 151
    • View Profile
Re: Char input sneak peek
« Reply #2 on: October 08, 2016, 07:44:42 PM »
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")?

Zefk

  • Hero Member
  • *****
  • Posts: 535
  • Just helping Solarus
    • View Profile
    • Zefk Design
Re: Char input sneak peek
« Reply #3 on: October 08, 2016, 08:48:54 PM »
Quote
But, 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.

Quote
Is 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.





Zefk

  • Hero Member
  • *****
  • Posts: 535
  • Just helping Solarus
    • View Profile
    • Zefk Design
Re: Char input sneak peek
« Reply #4 on: October 09, 2016, 12:03:16 AM »
I added similar calculation controllers as I did for "browse 1" for left and right looping. I think this is what you wanted froggy77?


froggy77

  • Full Member
  • ***
  • Posts: 151
    • View Profile
Re: Char input sneak peek
« Reply #5 on: October 09, 2016, 12:50:10 PM »
This is the result I wanted expected. This allows a better and faster navigation.
Bravo!  8)

Zefk

  • Hero Member
  • *****
  • Posts: 535
  • Just helping Solarus
    • View Profile
    • Zefk Design
Re: Char input sneak peek
« Reply #6 on: October 09, 2016, 11:35:22 PM »
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.

Zefk

  • Hero Member
  • *****
  • Posts: 535
  • Just helping Solarus
    • View Profile
    • Zefk Design
Re: Char input sneak peek
« Reply #7 on: October 10, 2016, 02:08:23 AM »
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.

Zefk

  • Hero Member
  • *****
  • Posts: 535
  • Just helping Solarus
    • View Profile
    • Zefk Design
Re: Char input sneak peek
« Reply #8 on: October 14, 2016, 12:30:30 PM »
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.)


Zefk

  • Hero Member
  • *****
  • Posts: 535
  • Just helping Solarus
    • View Profile
    • Zefk Design
Re: Char input sneak peek
« Reply #9 on: October 17, 2016, 04:11:50 AM »
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.

MetalZelda

  • Hero Member
  • *****
  • Posts: 551
    • View Profile
Re: Char input sneak peek
« Reply #10 on: October 17, 2016, 01:25:39 PM »
Clever, nice inclusion of this system into the dialog box system

This could be nice for some puzzles

Zefk

  • Hero Member
  • *****
  • Posts: 535
  • Just helping Solarus
    • View Profile
    • Zefk Design
Re: Char input sneak peek
« Reply #11 on: October 17, 2016, 03:11:45 PM »
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.

Zefk

  • Hero Member
  • *****
  • Posts: 535
  • Just helping Solarus
    • View Profile
    • Zefk Design
Re: Char input sneak peek
« Reply #12 on: October 18, 2016, 10:07:58 AM »
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.

MetalZelda

  • Hero Member
  • *****
  • Posts: 551
    • View Profile
Re: Char input sneak peek
« Reply #13 on: October 18, 2016, 08:43:45 PM »
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

Diarandor

  • Hero Member
  • *****
  • Posts: 1062
  • Cats are cool! (ΦωΦ)
    • View Profile
Re: Char input sneak peek
« Reply #14 on: October 18, 2016, 08:56:50 PM »
@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.”