Template talk:Dialogue2

From Dreamlight Valley Wiki
Jump to navigation Jump to search

The purpose of this page is my attempt to play around with creating a dialogue template that allows for the character image thumbnail to appear multiple times for every screen/bubble of text, which is currently not possible (to my knowledge) for a response to an answer. The way I've currently been representing page breaks in the Daily Discussions page is by using " / " in the text content, which is fine, but looks ugly, and makes it harder to read, particularly for long/multi-page responses. I'm not familiar with MediaWiki syntax, hence separating my trials into a separate template, to avoid impacting templates used throughout the wiki.

The current status of my attempts is that I seem to be able to get 2 responses to look okay, but if I try to use the exact same code to extend to 3 (or 4), it looks bad - lines of dialogue that don't have the text2 or text3 param don't seem to correctly recognize the if clause, so they add additional vertical space as well, making the lines of dialogue unnecessarily tall and spaced out. Lizz (talk) 23:35, 23 December 2022 (UTC)

I agree it gets a bit messy when it's nested all together. Would it maybe be easier to rework to have each 'line' be for dialog and setup a parameter to indent per line so it would change from this...
{{dialogue2|character=Stitch | text=dialogue2}}
{{dialogue2|character=Anna |text=ResponseToYes| answer=Yes}}
{{dialogue2|character=Player | answer=Maybe| text=ResponseToMaybeFirst}}
{{dialogue2|character=Player | text=ResponseToMaybeSecond | answer=Maybe }}
{{dialogue2|answer=No?|character=Merlin|text=ResponseToNo|text2=AnotherPageOfResponseToNo|text3="Yet another page"}}
to something like this...
{{dialogue2|character=Stitch | text=dialogue2}}
{{dialogue2|character=Anna |text=ResponseToYes| answer=Yes}}
{{dialogue2|character=Player | answer=Maybe| text=ResponseToMaybeFirst}}
{{dialogue2|character=Player | text=ResponseToMaybeSecond | answer=Maybe }}
{{dialogue2|answer=No?|character=Merlin|text=ResponseToNo}}
{{dialogue2|indent=yes|character=Merlin|text=AnotherPageOfResponseToNo}}
{{dialogue2|indent=yes|character=Merlin|text="Yet another page"}}
Then the template line can just be indented manually to format multi-response (or provide additional indentation if needed, could set indent to 1 for one tab, 2 for two). If the issue is that the line spacing is off too we can assume any 'indent' lines would be responses and set some conditional css. A 'toggle' for indentation like this would be easy to setup, do you think that'd do? -- Marblemadmax (talk) 01:47, 24 December 2022 (UTC)