playMaker

Author Topic: Dialogue System[SOLVED]  (Read 9221 times)

Bjakuja

  • Junior Playmaker
  • **
  • Posts: 75
Dialogue System[SOLVED]
« on: October 04, 2013, 07:38:17 AM »
Hi! I am currently working on dialogue system and i created one with Playmaker! I tried Unity dialogue Engine and it's cool asset but as always i want complete control over the system and that's why i decided to create my own. It's working system i made and text is animated by HoTween and displayed well in time depends on how mych character i have in text....

Here is the example image of how it's working and everything is fine when using action Split Text to Array List and set split char / or any other single char like @ # ... But my problem is that when i use that action,i want text to be split by paragraphs like this:

aaaaaa aaaaaa aaaaaaaaaaaa aaaa a aaaaaaa a a aaa a aa
aaaa a aaaaa aa   aaaaaaa a aaaaaaa aaaaaaaaaaa a a a
aaaaaa aa aaaaaaaaaaa a a   a aaaaa aaa a a aaaaaaaaa

bbbbbbbb bbbbbb b bb b   bbbbbbb  bbbb  b b bbbbbbb bb
bbbbb bbbbb bbbbb b b b bbbbbbbbb  bbbbbbbb bb b bbbb b

ccccccccc cccccccc ccc cccc cc cccccc c  cccccccccccc c
ccccc c c ccc

Using split by line isn't going to work because lines would be way to long and i though for that i should use split by tab and when i use it i get only first paragraph in Array List, others paragraphs aren't stored in Array List proxy idk why.
Then i tried to use split by char and i define string variable for that but it will only accept one single char and it will use other chars as next separators which is not what i want, i want to define for example this  {<next>}  and to split text by this separator inside the brackets and to use words with other chars for separating text
so my text would be like this:

<next> Aaaaa aaa a aaa a  aaaaa a aaaaa
aaa  a a  aaaaaa a aaa aa

<next> bbbbBbb bb bb bbbb b b bbb b bb

<next>cc c  cc cccccccccccccc  cc cc c
cc c c c c cccccccccc c cc

<next> dddddd  dd and so on....

So can anybody help with this and change this action or create new one instead for splitting text like this and modify this action Split Text to Array List to split text this way?

I like this approach of Dialogue and i have other Action request as well which will help a lot of us to work with string variables (i think it's one of the best solutions for making dialogue system) it's related to Jurassic at least it should be looking like Jurassic Execute editor.

Because Playmaker is State based it's born for systems like Dialogues and if you look at the Jurassic image you will see what i mean. I want to create text in current state with editor like that Jean made for Jurassic Execute, store it in String variable and animate/display with HoTween....

So this action can be called Text Maker or String Maker or something like that. This can be done with normal strings but those strings are created in single line and they are not really visible as a whole text so i think this will be better solution.

Thanks in advance!
Cheers!
« Last Edit: October 07, 2013, 02:50:10 AM by jeanfabre »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15594
  • Official Playmaker Support
Re: Dialogue System
« Reply #1 on: October 04, 2013, 08:36:11 AM »
Hi,

 For this you need to use xml to define your dialog with meta information such as your tag.

habe you tried defining your dialog using xml?

Bye,

 Jean
 

Bjakuja

  • Junior Playmaker
  • **
  • Posts: 75
Re: Dialogue System
« Reply #2 on: October 04, 2013, 09:14:05 AM »
Tried xml but it didn't go well cause i don't undersrand very well and that example of data maker not showing much to me. Can you explain here how to use xml data maker and hiw to use those sintaxes in xml because i don't uderstan them well so i can try?
And what about this action i requested, that string maker, can you make that?
That action would be useful for many things i guess.
Thanks Jean

Bjakuja

  • Junior Playmaker
  • **
  • Posts: 75
Re: Dialogue System
« Reply #3 on: October 04, 2013, 07:21:25 PM »
UPDATE
Here is one update, I did understand how xml and xpath works and how to display desired text with Playmaker by defining nodes and elements from root, it was confusing when I first look at the xml but I understand now and it's pretty logical now to me and I can continue with my dialogue system.
Thanks Jean for pointing me in right direction, helpful as always.
If you ask me this thread can be marked as solved but still I would like to have such action in Playmaker as I mentioned StringMaker with bigger field for strings like in xml, just to be simpler and quicker way in case we want some bigger string variables without xml and xpath/query elements, what do you think Jean?
« Last Edit: October 05, 2013, 04:23:55 AM by Bjakuja »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15594
  • Official Playmaker Support
Re: Dialogue System
« Reply #4 on: October 07, 2013, 02:49:58 AM »
Hi,

 ok, simply point to me which actions you woul dlike to have bigger fields, and I'll add them to my todos :)

bye,

Jean

Bjakuja

  • Junior Playmaker
  • **
  • Posts: 75
Re: Dialogue System[SOLVED]
« Reply #5 on: October 07, 2013, 07:34:57 AM »
Hi Jean!
Well if I can choose what action should have bigger text for editing that would be Set String value. So when you choose to set string value and you use variable it should look same as it looks now so nothing to be changed, but when you choose to write string value in that small field it should turn into bigger text editor like I mentioned in my update message.
Have a look at the image provided.
Thanks!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15594
  • Official Playmaker Support
Re: Dialogue System[SOLVED]
« Reply #6 on: October 10, 2013, 08:27:08 AM »
Hi,

 Cany ou test this, if it works for you, I'll make it as a new thread on the new custom action section.

 you get a proper treat with this, as I worked out how to automatically scroll down as you type! something not really documented within Unity! So, very cool as I will spread that change to xmlMaker and other custom actions where I have big textArea for editing

 Bye,

 Jean

Flying Robot

  • Sr. Member
  • ****
  • Posts: 293
  • Od ton yebo redro
    • Flying Robot Studios
Re: Dialogue System[SOLVED]
« Reply #7 on: October 11, 2013, 02:00:04 AM »
Awesome, Jean!

Bjakuja

  • Junior Playmaker
  • **
  • Posts: 75
Re: Dialogue System[SOLVED]
« Reply #8 on: October 11, 2013, 08:24:26 AM »
Hi,

 Cany ou test this, if it works for you, I'll make it as a new thread on the new custom action section.

 you get a proper treat with this, as I worked out how to automatically scroll down as you type! something not really documented within Unity! So, very cool as I will spread that change to xmlMaker and other custom actions where I have big textArea for editing

 Bye,

 Jean

Hi Jean! Thanks for this editor, this is just what I wanted, however there are some errors and problems when I use this new string action:

Error 1
ArgumentException: Getting control 5's position in a group with only 5 controls when doing ExecuteCommand
Aborting

Problem 1 is when click open text edit mode text editor will open but when I click on empty text nothing happened until I click multiple times or click on something else and then click again on editor.

Problem 2 : I have a feel when using this action everything working  slower, not too smooth, maybe something checking constantly and those errors causing slowdown?

One suggestion I have:
Is it possible to create a button in this editor for word wrap on/off?
What I want is that when you turn on word wrap then text will be automatically in next row when reach end of the editor tab.
When word wrap turned off then it will be used the way it is now.
So what do you think Jean?

That's pretty much it, overall that editor is great and I think it will help many users when defining strings. 
Thanks!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15594
  • Official Playmaker Support
Re: Dialogue System[SOLVED]
« Reply #9 on: October 14, 2013, 07:58:54 AM »
Hi,

 I am not sure how to fix the error you get, I get it too. I'll investigate. but you should not worry about this, it's certainly due to the error handling of the action required properties or something.

 Do you feel it slows down during editing or during the game play?

Wrapper is not going to happen I am afraid. I have tried but never find the way to do it properly. I'll give it another go this week, I'll possible find the trick!

Bye,

 Jean

Bjakuja

  • Junior Playmaker
  • **
  • Posts: 75
Re: Dialogue System[SOLVED]
« Reply #10 on: October 14, 2013, 02:42:02 PM »
During editiing but that slow down is not something to wory, it's not there anymore, prob gone after i restarted unity. So wraping is the problem, it would be cool feature but whatever if not possible we will survive  it ;)