How do I change the line separation for normal dialogue? I was able to make dialogue choices appear as I wanted them to appear but for some reason I can't find anywhere I can tweak the regular line spacing to not have an entire solar system's worth between them. I got this problem by changing the sprite for the dialogue box and changing the scale down to 0.4 as the dialogue box sprite was that large.
Is there a way to make the wave effect each character independently, rather than the whole string going up and down? I'm trying to achieve more of a ripple effect.
[GMS2 2022.3] I had a little problem with DialogueSystem_v121.yyz, when I started the Demo an error ocurred after the first textbox, I could fix it by changing line 10 of Create Event of obj_camera from [ [1,1, 9,2, 16,4], -1, [1,3]], to [ [1,1, 9,2, 16,4], [-1], [1,3]], search [CTRL + SHIFT + F] for the word "Welcome" to find it.
does anyone know how to change the default font color? i know it says to just change "default_col" in obj_textbox but that does nothing at all. i know ive fixed it in projects ive used this for before, but i cant remember how i did it and cant figure it out this time.
EDIT: leaving this up for both future me and anyone with a similar problem. in the actual create_dialogue script it sets the default text color as c_white directly, which seems to overwrite whatever youve set in the textbox. i know the default_col variable does get used in the code of the textbox object but i dont really have the attention span to figure out exactly why it doesnt take effect. i just changed the default in the script.
hey, in case anyone was trying to get this to work on html5: the issue is that sometimes, when pulling from the dialogue youve defined from your speaker, you can leave it blank - since html5 is stricter, this undefined value youve passed in is an error rather than being detected as a 0 and not being passed on
say for example youve not defined colours for a line, instead of it looking like [0,0,0..] (i.e. default colours), it will look like this [undefined,undefined,undefined...]. the main solution is to add a !is_undefined(...) to the value youve passed in from the speaker. i hope this helps somebody!
hey, thanks for posting this -- i know you commented this a long time ago, but i was hoping to get some clarification, if you dont mind, since im having this problem.
when you say "add !is_undefined(...)", where are you actually putting it? i tried to use this solution and i couldnt quite figure it out.
(using GMS 1, so if youre using 2 idk if this will help)
hey! i think i finally figured this one out, though its not a complete solution it looks like. its in the create_dialogue script, down in the switch(arg_count-1) statement.
at the end of each case youll see an if statement that checks if(a[i] != 0) . i added && !is_undefined(a[i]) to each one, and from a quick test it looks like that worked, at least in the base project.
since the text events use a different script than the normal dialogue, however, those are still broken.
In my project I made an option for players to choose their game target FPS (for different monitors and performance setups) and I adjusted all my object animations and move speeds using delta_time dependent global variable, just a simple multiplier that adjusts all speeds to the selected FPS. So in 144 FPS everything moves and animates at the same relative speed than in 60 or any other FPS (just more smoothly) . It works perfectly. But I can't find how I can adjust character drawing speed in the FC's textbox object. So at high FPS my dialogues are typing too fast.
Is there somewhere a variable or a forgotten magic number in the code that sets up a global typewriter speed or maybe somebody has another idea in mind how to adjust the typewriter's speed?
Edit: Also, how to set up a long dialogue text on multiple pages without breaking it in lots of "Lines"?
OK, I figured it out. I made a kind of step manager that counts steps and authorizes the typewriter to go when necessary delta_time relative value is reached. It is not perfect, because it can work with whole numbers only, but it's overall OK at least for 60-144 FPS setups. For lower framerate it slows down, hélas. Now I need something similar to adapt portrait and mouth animations and I'm kinda stuck with it. Whatever I do, the animation is too fast like if it is not related to my delta_time multipliers at all T_T
Kinda solved the animation problem. The solution was to not link talking mouth animation to vowels and to not link talking animation with typewriter's delta at all. The problem was relative to typewriter's delta-relative counter that works perfectly with characters, but switched on and off too fast for any chosen sprite speed.
Could someone…..anyone…. do a step by step tutorial of implementing this into your project. As a noob I’m having lots of trouble trying to understand this. Also does anyone know of a video tutorial? I’m simply too dumb for the written instructions
If FC won't do it herself the best thing you can do is to follow her Farming RPG series. You will not get the very same result, but you can learn the logic she uses.
Has anyone successfully managed to add gamepad inputs to the dialogue system? Every time I try and use a gamepad input (either via gamepad_button_check_pressed or a similar script value) I either get nothing at all or it instantly triggers all the text at super speed!
You have to modify the step event in the obj_textbox object to accept more than just keyboard inputs. My recommendation to avoid the instant trigger issue would be to use a script which checks at that instant whether or not a button was pressed, and returns true or false, like this:
function checkInteract() {
if (keyboard_check_pressed(global.interact_key) || gamepad_button_check_pressed(0, global.gp_interact_key))
return true;
else
return false;
}
If anyone who sees this needs anymore guidance, just reply.
There should be a variable somewhere that controls when its day and night. I haven't watched this tutorial but in my game I have a variable called value_ and it goes from 0.0 to 1.0. 0.5 is noon and 1.0 is midnight. I'm sure it's something similar and all you do is update that variable when the game starts.
anybody encounter this error here and know what's up?
likely a 2.3 issue.
EDIT: oh I see someone below posted a solution to this already my bad:
In GMS v2.3.2, there's been a bugfix where array_length returns undefined instead of 0 when you pass in non-array values.
Replace line 16 in Alarm 0 with effects_al = effects[page] != -1 ? array_length(effects[page])/2 : -infinity;
thx toronto!
EDIT2: Looks like I finally get to view the demo project, but some of the text is showing up 'black' instead of with its appropriate style. unless that's just how that portion is supposed to draw :D
hello man I love you unfortunately I don't have the money to reward you for creating this tool, so I ask you to come into my house and eat the ass of my whole family as payment =)
← Return to asset pack
Comments
Log in with itch.io to leave a comment.
How do I change the line separation for normal dialogue? I was able to make dialogue choices appear as I wanted them to appear but for some reason I can't find anywhere I can tweak the regular line spacing to not have an entire solar system's worth between them. I got this problem by changing the sprite for the dialogue box and changing the scale down to 0.4 as the dialogue box sprite was that large.
Update: I figured it out
doesn't work in gm 1 anymore :(
(or at least for me)
Is there a way to make the wave effect each character independently, rather than the whole string going up and down? I'm trying to achieve more of a ripple effect.
Does anyone know a way to get this to work with non-monospaced fonts?
I banged my head over this for a solid month and found no solution. Sorry, mate!
I ran into an error when running the demo in a new project:
ERROR in
action number 1
of Alarm Event for alarm 0
for object obj_textbox:
DoDiv :2: undefined value
at gml_Object_obj_textbox_Alarm_0 (line 16) - effects_al = array_length_1d(effects[page])/2;
############################################################################################
gml_Object_obj_textbox_Alarm_0 (line 16)
gml_Object_obj_textbox_Step_0 (line 20)
This happens right after hitting "E" to go to the next page, at the first dialogue box.
I have IDE version 2022.5.1.16
same issue
[GMS2 2022.3]
I had a little problem with DialogueSystem_v121.yyz,
when I started the Demo an error ocurred after the first textbox, I could fix it by changing line 10 of Create Event of obj_camera from
[ [1,1, 9,2, 16,4], -1, [1,3]],
to
[ [1,1, 9,2, 16,4], [-1], [1,3]],
search [CTRL + SHIFT + F] for the word "Welcome" to find it.
(GMS 1)
does anyone know how to change the default font color? i know it says to just change "default_col" in obj_textbox but that does nothing at all. i know ive fixed it in projects ive used this for before, but i cant remember how i did it and cant figure it out this time.
EDIT: leaving this up for both future me and anyone with a similar problem. in the actual create_dialogue script it sets the default text color as c_white directly, which seems to overwrite whatever youve set in the textbox. i know the default_col variable does get used in the code of the textbox object but i dont really have the attention span to figure out exactly why it doesnt take effect. i just changed the default in the script.
I wish you still supported this project.
can someone please explain to me how to use the script_execute_alt function
better yet, please explain how do i execute 2 or more different scripts at the same time after going through the dialogue line like:
i++;
myText[i] = "lets go!"
mySpeaker[i] = id;
myScripts[i] = [script_room_goto, room_2]
I want two scripts to happen - room_goto which is working fine but also another script for switching the image_index, how do I do that?
Hey there!
A simple way to do this is use the script event to trigger multiple actions by setting up the condition within the dialog child.
// create
nextroom2 = 0;
//step
if (nextroom2 == 1)
{room_goto(room_2); image_index = new_index; nextroom2 = 0}
//User Event 0 (your dialog script)
[ChooseVariable,object_name,"nextroom2","1"]
did you mean to say "change_variable" for the function name here?
I think you're right! I had changed the default script name for myself and forgot about that.
hey, in case anyone was trying to get this to work on html5: the issue is that sometimes, when pulling from the dialogue youve defined from your speaker, you can leave it blank - since html5 is stricter, this undefined value youve passed in is an error rather than being detected as a 0 and not being passed on
say for example youve not defined colours for a line, instead of it looking like [0,0,0..] (i.e. default colours), it will look like this [undefined,undefined,undefined...]. the main solution is to add a !is_undefined(...) to the value youve passed in from the speaker. i hope this helps somebody!
hey, thanks for posting this -- i know you commented this a long time ago, but i was hoping to get some clarification, if you dont mind, since im having this problem.
when you say "add !is_undefined(...)", where are you actually putting it? i tried to use this solution and i couldnt quite figure it out.
Hey did anyone ever figure this out? I'm getting the same error!
(using GMS 1, so if youre using 2 idk if this will help)
hey! i think i finally figured this one out, though its not a complete solution it looks like. its in the create_dialogue script, down in the switch(arg_count-1) statement.
at the end of each case youll see an if statement that checks if(a[i] != 0) . i added && !is_undefined(a[i]) to each one, and from a quick test it looks like that worked, at least in the base project.
since the text events use a different script than the normal dialogue, however, those are still broken.
OK, I have an issue.
In my project I made an option for players to choose their game target FPS (for different monitors and performance setups) and I adjusted all my object animations and move speeds using delta_time dependent global variable, just a simple multiplier that adjusts all speeds to the selected FPS. So in 144 FPS everything moves and animates at the same relative speed than in 60 or any other FPS (just more smoothly) . It works perfectly. But I can't find how I can adjust character drawing speed in the FC's textbox object. So at high FPS my dialogues are typing too fast.
Is there somewhere a variable or a forgotten magic number in the code that sets up a global typewriter speed or maybe somebody has another idea in mind how to adjust the typewriter's speed?
Edit: Also, how to set up a long dialogue text on multiple pages without breaking it in lots of "Lines"?
OK, I figured it out. I made a kind of step manager that counts steps and authorizes the typewriter to go when necessary delta_time relative value is reached. It is not perfect, because it can work with whole numbers only, but it's overall OK at least for 60-144 FPS setups. For lower framerate it slows down, hélas. Now I need something similar to adapt portrait and mouth animations and I'm kinda stuck with it. Whatever I do, the animation is too fast like if it is not related to my delta_time multipliers at all T_T
Kinda solved the animation problem. The solution was to not link talking mouth animation to vowels and to not link talking animation with typewriter's delta at all. The problem was relative to typewriter's delta-relative counter that works perfectly with characters, but switched on and off too fast for any chosen sprite speed.
Could someone…..anyone…. do a step by step tutorial of implementing this into your project. As a noob I’m having lots of trouble trying to understand this. Also does anyone know of a video tutorial? I’m simply too dumb for the written instructions
If FC won't do it herself the best thing you can do is to follow her Farming RPG series. You will not get the very same result, but you can learn the logic she uses.
Has anyone successfully managed to add gamepad inputs to the dialogue system? Every time I try and use a gamepad input (either via gamepad_button_check_pressed or a similar script value) I either get nothing at all or it instantly triggers all the text at super speed!
I was able to do this!! its a stupid solution, but it mostly works.
if you still need the solution i can tell ya. sorry about how late this is
you might as well tell us the solution, you never know if you can help someone else with the same problem :)
You have to modify the step event in the obj_textbox object to accept more than just keyboard inputs. My recommendation to avoid the instant trigger issue would be to use a script which checks at that instant whether or not a button was pressed, and returns true or false, like this:
If anyone who sees this needs anymore guidance, just reply.There should be a variable somewhere that controls when its day and night. I haven't watched this tutorial but in my game I have a variable called value_ and it goes from 0.0 to 1.0. 0.5 is noon and 1.0 is midnight. I'm sure it's something similar and all you do is update that variable when the game starts.
Darkness variable should be it. I'm guessing 0.7 is the darkest, try changing it to 0.4 or something.
hey the font is too big for my text box, how do i make it smaller?
i fixed it, no worries. got another font, edited it a bit and changed the spacing added borders and everything looks sweet
anybody encounter this error here and know what's up?
likely a 2.3 issue.
EDIT: oh I see someone below posted a solution to this already my bad:
In GMS v2.3.2, there's been a bugfix where array_length returns undefined instead of 0 when you pass in non-array values.
Replace line 16 in Alarm 0 with effects_al = effects[page] != -1 ? array_length(effects[page])/2 : -infinity;
thx toronto!
EDIT2: Looks like I finally get to view the demo project, but some of the text is showing up 'black' instead of with its appropriate style. unless that's just how that portion is supposed to draw :D
Thank you so much! I was stymied by this. Now I can poke around properly!
I tried this, but it's still giving me the same error! I'm on v2.3.6
This was really cool until I broke it and don't know what this error means
This error seems to be related to the 2.3 update. Also can't figure out how to fix it. Did you fix it?
Try to put brackets like this
create_textevent(
[ //myText
load_string_json(global.LANGUAGE, "forest0"),
load_string_json(global.LANGUAGE, "forest1"),
load_string_json(global.LANGUAGE, "forest2"),
load_string_json(global.LANGUAGE, "forest3"),
[load_string_json(global.LANGUAGE, "forest4"), load_string_json(global.LANGUAGE, "forest5")],
load_string_json(global.LANGUAGE, "forest6"),
load_string_json(global.LANGUAGE, "forest7"),
load_string_json(global.LANGUAGE, "forest8"),
load_string_json(global.LANGUAGE, "forest9")
],
[ob, og, og, ob, op, ob, og, og, ob], //mySpeakers
[ [28,4, 42,0], [7,1, 11,0], [21,1, 29,0], [-1], [-1], [1,5, 5,0], [-1], [1,6, 3,0], [-1] ], //myEffects
-1, //myTextSpeed
[0, 0, 0, 0, 1, 0, 0, 0, 0], //myTypes
[0, 0, 0, 0, [5, 7], 0, -1 ,0, -1], //myNextLine
-1, //myScripts
-1, //myTextCol
[0, 3, 2, 1, 0, 5, 3, 1, 2], //myEmotion
-1 //myEmote
);
hello man I love you unfortunately I don't have the money to reward you for creating this tool, so I ask you to come into my house and eat the ass of my whole family as payment =)
In GMS v2.3.2, there's been a bugfix where array_length returns undefined instead of 0 when you pass in non-array values.
Replace line 16 in Alarm 0 with effects_al = effects[page] != -1 ? array_length(effects[page])/2 : -infinity; as a stopgap solution