Easy Module #1 - Dialog module (Templates)

Discuss Scirra's 2D Asset Store

Post » Wed Mar 18, 2015 2:09 pm

Easy Module #1 - Dialog module — Now for sale in the Scirra Store!
https://www.scirra.com/store/royalty-free-game-templates/easy-module-1-dialog-module-776

Tired of plain, flat, instylish browser alert box?

If you are tired of using browser dialog box, this module is what you looking for! Use our eModule dialog box to create complex dialog box with just one simple function call. And all the fancy built-in effects can be turned on through parameter settings. You can also customize your own dialog theme. Come to try the demo now.

Can this make RPG conversation dialog?

YES. And there are RPG dialog example codes in our example file.

Feature list

  • One function call to start dialog
  • Zoom effect
  • Opacity tween effect
  • Color background with Opacity tween effect
  • 2 Default buttons (can change to 1 or none)
  • 4 ready to use themes
  • Easy installation guide


Use this topic to leave comments, ask questions and talk about Easy Module #1 - Dialog module
B
66
S
13
G
4
Posts: 187
Reputation: 7,085

Post » Sat Apr 25, 2015 6:15 pm

Hi @kmsravindra ,

Thank you for interesting in my product! Please find my answers below:

1. Wanted to know if this will work on iOS platforms as well and there will not be any issues while exporting and packaging with Cordova iOS platform?

[Ans]: Not sure. I haven't tried this product on iOS before because I'll need to buy an iPhone first (maybe I'll do it in 2015/May).

2. Can I have buttons, multiple texts / text fonts , multiple images etc., inside this dialogue box? Do I need to create such sprites and buttons, text etc., on top of the dialogue layer?

[Ans]: Yes, you'll need to create extra components by yourself. By default, this dialog module contains 1 icon, 2 text( title & content), 3 buttons( OK & Cancel & Close). If you want to put some extra components, you can create them by <create object> action on "dialog" layer. Every tween effects will apply to this layer. You can find some technical info in below links:

https://dl.dropboxusercontent.com/u/209 ... nstall.pdf
https://dl.dropboxusercontent.com/u/209 ... ledges.pdf

3. Can I replace the text on ok and cancel buttons to something that I want? And place them wherever I want?

[Ans]: Yes. You can replace "txt_ok" and "txt_cancel" parameter when calling "create_dialog" function. You can try the following demo and replace the <text for ok> and <text for cancel > fields.

http://www.memoryabc.com/c2_example/dialogTemplate/

4. Can I add more buttons?

[Ans] Yes, you can put your custom buttons on "dialog" layer. And you can call "btn_close" function to close your dialog with tween effect.
Image
Image
B
66
S
13
G
4
Posts: 187
Reputation: 7,085

Post » Sun Apr 26, 2015 6:02 am

Thanks for the response. I am currently creating a dialogue box using functions in C2 itself (with the needed buttons and logic in a separate layout & including that eventsheet across my apps) but that does not come with tweening. So this plugin sounds useful to me. One more question is does it allow the user to customize the position and size of the dialogue window? Thanks!
B
78
S
20
G
3
Posts: 334
Reputation: 7,212

Post » Sun Apr 26, 2015 6:34 pm

Hi @kmsravindra ,
Actually this product is not a plugin. It is composed of several eventsheets with complex events/actions and predefined function calls. User needs to copy those events to his project and include them to your own eventsheet. Of course, this product contains my experiences and knowledge about tween effects, so you can learn my experience by jumping to the codes if you have time.

As a C2 tutor, I will suggest everybody try to learn how to use <liteTween> plugin first, then move onto @rexrainbow 's <TweenTasks> plugin. All tween effects in this product are made by <TweenTasks>. It would be a little bit hard to control <TweenTasks>. If you can master <liteTween>/<TweenTasks> plugin then you can realize the same effect without help of this product.

And Yes, you can set dialog box position and size by assigning parameters of "create_dialog" function.
B
66
S
13
G
4
Posts: 187
Reputation: 7,085

Post » Fri Jun 12, 2015 8:40 pm

Hey there Jomo. Im really interested in your asset.

One thing I would like to know is how do you handle large quantities of text?
Also it would be great if you could shared the tutorial pdf you have.
It would be great to have an idea of how the workflow works.
Image
B
19
S
5
G
2
Posts: 60
Reputation: 1,639

Post » Mon Jun 15, 2015 12:38 pm

fremachuca wrote:Hey there Jomo. Im really interested in your asset.

One thing I would like to know is how do you handle large quantities of text?
Also it would be great if you could shared the tutorial pdf you have.
It would be great to have an idea of how the workflow works.


@fremachuca The page switch is done by @rexrainbow 's <Text Scrolling> behavior.

The pdf is part of the product so I would be very happy if you can support me and buy this product. The work flow is simple:

1. Create a prototype dialog box.
2. Replace things on it.

The most difficult part is how to design code structure to allows user customizing/selecting what they want at the dialog creating moment. And, the tween effect.
B
66
S
13
G
4
Posts: 187
Reputation: 7,085

Post » Sun Jul 12, 2015 3:09 pm

Hi Jomo!
I got your nice module and the manual, and happily tuning it for my project, but here I found some issues:

1. Is it impossible to show a variable's value(e.g. player's name which the user gave) in the dialog content?
It seems the Scenario object's 'MEM' feature can do that, but if I enable the 'MEM' feature (setting the Scenario's 'Eval mode' to 'Yes',) it disables showing every strings(Only numbers can be shown then.) Is there any way to show a variable's value in the lines?

2. How should I change line of the content manually?
In the .csv script, I tried using '& newline &' but seems it doesn't work there: "ABC" & newline & "DEF" shows just "ABC"...

3. How can I pause the typing for a moment(set typing speed lower while typing)...?
I'm struggling with the 'set special font class custom2' group, adding new tags and actions about typing, just to watch error messages says "Javascript error!Uncaught TypeError Cannot read property 'IsActive' of null ..." I think it's not here to add this kind of option, can you give us some tips?

That's huge questions at once... Just some advices or tips would be much appreciated.
Thanks!
B
13
S
2
Posts: 31
Reputation: 862

Post » Mon Jul 13, 2015 2:48 am

Hi @Hajin ,

I'm happy that this module could be a help! As for your questions, please find my replies as below:

1. Yes. you can enable EVAL mode and use MEM['index'] expression. But if you enalbe EVAL mode, you'll need to add double primes for each parameter. You can find an example image below. It's a tedious work and the reason why I disable EVAL mode in the begging. And please note that you'll need to use plus sign(+) to connect strings.
Image

2. Yes. You can push <ctrl>+<enter> to add a line feed in editor. And you can see the last sentence of my example. The below image is taken from Openoffice. MS Excel uses the same combination key.

Image

3. OK. If you want to pause <Typing> and <Scenario>, please add an new eventsheet and write the following codes(I name it e_pause_typing). After that, includes this new eventsheet in <e_AVG> of my AVG example. Then run the layout, push <P>/<G> keys on keyboard to test.
Image
B
66
S
13
G
4
Posts: 187
Reputation: 7,085

Post » Tue Jul 14, 2015 8:13 am

You amazed me Jomo, such instructions with screenshots! I followed the way you've shown.
(It took more time than I expected, trying new Open Office and struggling with the fullwidth“”s, and trying to add new tags to enable the pausing in .csv, etc...)

First, the issue 1, 2 are successfully solved! I must thank you for introducing this fine open-source office software as I've been using only Notepad++ and Hancell(which is a native Korean Excel-like software) to edit csvs. At first I tried to add "s in C2's (Scenario) Load command directly but had to see Syntax errors, then tried with those familiar programs but failed, and tried with the Open Office, and finally succeeded!

And now, the remaining is, the issue 3.
The events work well (pausing & resuming the lines) as you've instructed (using the keyboard trigger to test), but the problem is...: As I tried to apply it as a tag(like <class='p'></class> makes pausing, <class='g'></class> gives resuming... by making the events Functions), it never works.

Maybe this kind of applied work is too difficult to a novice like me, but if there could be any further advices, I would try again till success, unless it tires you too much.

Thank you for the kind support!
B
13
S
2
Posts: 31
Reputation: 862

Post » Thu Jul 16, 2015 3:37 am

Hi @Hajin ,

Are you going to pause the conversation and let player to make some choice? If that is want you want, please see the updated v1.2 version. Please refer to <DialogTemplate_Tutorial#2-Advanced_CutSceneAPIs.pdf> . On page#2 there is a flow chart showing a typical cutscene flow. I guess what you are trying to do is what I called "Pause Scene" in this tutorial.

By simply assigning a non-zero value in column#E makes that line enter Pause Scene after the content is shown. :)
B
66
S
13
G
4
Posts: 187
Reputation: 7,085

Next

Return to Scirra Store

Who is online

Users browsing this forum: No registered users and 1 guest