Dialog option text length limitation? Max text characters in a dialog option?

Started by Dr.Bart Keeple, Sat 28/01/2017 10:33:08

Previous topic - Next topic

Dr.Bart Keeple

Hello everyone!
First I would like to express my admiration for this community ...;-D

And then I have a question of course:
I have a dialog topic with several options ..., one of these options contains more than 200 characters of text ...,
and when "GetOptionText" gives me this long option, and I display it, then the text of this option is cut to 150 characters,
and strangely the rest of the text of this option contains the text of the next option...:confused:
Is it a limitation or a small mistake?
Is the number of characters that GetOptionText can get limited?

Thank you all!
sorry for my English

Danvzare

Quote from: Dr.Bart Keeple on Sat 28/01/2017 10:33:08
I have a dialog topic with several options ..., one of these options contains more than 200 characters of text ...,
Woah that's a lot of text for one dialog option. It must cover half the screen! 8-0

If I had to take a guess, I'd say your problem was due to a limitation of the engine (don't quote me on that though, I could be wrong).
But if I had to suggest one way to fix your problem, it would be to cut down on the amount of text in that dialog option. Cut it in half, and put the other half in a follow-up text from the character. I'm sure there's got to be a full stop somewhere in that dialog option where you can split it.

Dr.Bart Keeple

Indeed, I may be obliged to...
But, you know, I want to know ...
If the limit is not in "GetOptionText", but in the dialog editor, then a "SetOptionText" might be useful in this case ,)
Thanks anyway Danvzare ! :wink:
I like the constraints but ..., you know, not the limitations,) I would search in the sources if it should ...
Ty bro!

Crimson Wizard

There is a hardcoded limit of 150 characters in the engine. The only reason is just the legacy of the old programming ways which did not use dynamic resizable arrays. It should have been fixed, but this is rarely a serious issue, so no one got to there yet.

Aside from modifying the engine, and the workaround Danvzare suggested, another workaround I can think of is to -
1) Store actual text in the script (in the array of strings)
2) Put some kind of ID in the dialog option
3) Script custom dialog rendering, and instead of dialog option text draw your own text, using ID stored in the dialog.

Dr.Bart Keeple

Quote from: Crimson Wizard on Sat 28/01/2017 12:40:24
There is a hardcoded limit of 150 characters in the engine. The only reason is just the legacy of the old programming ways which did not use dynamic resizable arrays. It should have been fixed, but this is rarely a serious issue, so no one got to there yet.

Aside from modifying the engine, and the workaround Danvzare suggested, another workaround I can think of is to -
1) Store actual text in the script (in the array of strings)
2) Put some kind of ID in the dialog option
3) Script custom dialog rendering, and instead of dialog option text draw your own text, using ID stored in the dialog.
Thank you for your answers!
Ah yes..., I will try what you propose Crimson..., right now!
I'll keep you informed,
You're great guys!


EDIT:
I'm going to get there!
But I understood that there was a simple "noob" way:
Since in my option4, after the 150 characters, it is the string of option5 that appears afterwards in option4,
I shift my options and I paste in the option5 the normal suite of my option4 which did not want to display,
the old option5 became option6 and I unchecked "Show" of the new option5 which served me to complete my option4...
The illusion is perfect, I think ...

Note:
For the "noob method" to work, we must keep a number of characters greater than 150 in the option to display ...

SMF spam blocked by CleanTalk