dialog area - dynamic height

  • #10, z sebastianSunday, 22. May 2016, 22:31 hodinky 9 years ago
    I edited my post a bit to make it more clear smile

    EDIT:
    Quick question: why do you iterate through the active dialog parts? Can you not use the # or table.maxn() to return the total index value?


    i only have to count up if the dialog is still active. the table.maxn() counts every dialog part, even if its not available anymore...
    --------
    The main problem here is that the dialogbox height ajustment has to be done BEFORE the dialog is shown - so in the dialogs which are pointing to them.
    Thats because changing the dialogbox height doesnt have an effect until redrawing/loading the dialog again.
    The only chance to know the next dialog is
    a) doing it manually (script at the end of the dialog parts action part has specific attributes which point to the next dialog)

    b) getting to know what the next dialog is automatically via "DialogPartReturn" (script at the end of the dialog parts action part knows through the int where the next is)... but i cant use integers as a t_link to the dialog, right?

    Kapitán

    2346 Posts


  • #11, z afrlmeSunday, 22. May 2016, 22:46 hodinky 9 years ago
    Ah I see & sorry, without me testing stuff out myself, I'm not really sure what to suggest.

    Imperátor

    7285 Posts

  • #12, z sebastianSunday, 22. May 2016, 22:48 hodinky 9 years ago
    So what i need to know is how i get access to the content of "eDialogReturnToSame" and "eDialogReturnToUpper". How does Visionaire knows whats its "upper" dialog for example?

    My guessing for "eDialogReturnToSame". This is the current dialog which is also saved in "GameDialog" (Game table)

    My guessing for "eDialogReturnToUpper". ??? <-- i need dis

    Kapitán

    2346 Posts

  • #13, z afrlmeSunday, 22. May 2016, 23:11 hodinky 9 years ago
    I assume the table probably has multiple index values. Have you tried iterating via key & value as opposed to using i?

    You know the for k, v in pairs(whatever)... I rarely use it, so I can't remember exactly how it goes off the top of my head, but a quick google search of "for k, v lua" should provide you with some examples & an explanation of how it works.

    Imperátor

    7285 Posts

  • #14, z sebastianSunday, 22. May 2016, 23:20 hodinky 9 years ago
    I dont know if i get it right.
    Do you mean that there is (possibly) a table inside the DialogPartReturn entry? So that beside 0,1 or 2 also is information like the needed links to the dialogs?

    Kapitán

    2346 Posts

  • #15, z afrlmeSunday, 22. May 2016, 23:38 hodinky 9 years ago
    Yeah, tables can consist of a mixture of data including tables inside of tables, just like the dream inside of a dream inside of a dream... like in the movie "inception". razz

    Imperátor

    7285 Posts

  • #16, z sebastianMonday, 23. May 2016, 00:25 hodinky 9 years ago
    Would love to test it out but before it would be even greater if a dev can confirm what AFRLme said

    Kapitán

    2346 Posts

  • #17, z afrlmeMonday, 23. May 2016, 01:12 hodinky 9 years ago
    I believe it's possible. Just think about character actions. If you were to query how many there are it would only return the amount found in the first index slot. Each action would extend into a sub-table of action parts.

    In theory I assume this might be how the dialog trees work. Index 1 = first level of dialogs, index 2 = next level & so on.

    Imperátor

    7285 Posts

  • #18, z sebastianMonday, 23. May 2016, 18:53 hodinky 9 years ago
    I hope so. I cant find anything plausible in the explorer of VS

    Kapitán

    2346 Posts

  • #19, z sebastianThursday, 26. May 2016, 18:25 hodinky 9 years ago
    Hmm seems that i cant get it running as i wish. Maybe because there isnt an entry behind the ints?
    Could a dev bring light to the darkness here?
    How do i access " DialogPartReturn " and get to know what next dialog is shown?

    Kapitán

    2346 Posts

  • #20, z sebastianFriday, 27. May 2016, 08:54 hodinky 9 years ago
    Okay... I think i will give up here.
    The problem is: the Info i need to get is inside the (selected) dialog part.
    When displaying a dialog with e. g. 3 choices (dialog parts) visionaire cant tell which of them i will click next. By that i dont have a chance to calculate the right height with a generic function.
    I have to get the selected dialogpart which is not possible (only getting the whole dialog).

    Because there is no game.selectedDialogPart i have to call the calculation function everytime with different attributes at the end of an dialog parts action...

    Kapitán

    2346 Posts