Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(1 edit)

I don't know if this really has anything to do with lil, it's about the dialog contraption, so it's still a programming question. I am making a game in Swedish, so i need to use the letters Åå, Ää and Öö. Since Decker doesn't support them, I have made a custom font, replacing other less used symbols with them, though this, of course, requires rich text. When using r:dd.ask, is it possible for the alternatives to be rich text? I made this attempt, where field6, 8 and 9 all contain rich text:

r:dd.ask[   
field6.value   
(field8.value, field9.value)  
] 
if r~0     
 dd.say["placeholder"]     
 dd.close[]  
else       
 dd.say["placeholder"]       
 dd.close[] 
end

Decker would, however, display 8 and 9 in plain text and like this:


Menu is the font name. Do you have any ideas what could cause this?

(+1)

The ideal place to ask questions or submit bug reports about Dialogizer is the Dialogizer thread.

Rich text is represented as a table. While the "," operator applied to a pair of strings will form a list of strings, it will concatenate the rows of a pair of tables into a single table. We need to be a little more careful when we want to create a list of tables.

The "list" operator can solve this problem; it wraps any value in a length-1 list. The "," operator will join those length-1 lists together instead of the values they contain. Try constructing your list of choices for dd.ask[] like so:

(list field8.value),(list field9.value)

If the only special thing about the rtexts is the use of a single particular font, you could alternatively give the choices as plain strings and set the "bfont" option when you set up dialogizer; this will apply the specified font as the default for all the dd.ask[] choices:

o.bfont:"swedishFontName"
dd.open[deck o]
...

For general dialogs there's also "tfont" for the default font of the body text in dd.say[] and dd.ask[] boxes.

Ah! Thank you. I guess it makes sense.