Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(+4)

Thank you guys! If instead you want to use this as a contraption, I spent some time to figure out how to make one with this hehe. Instead of copying the whole card, just copy and paste this code directly in Decker.
https://pastebin.com/zvHRUiUb


Add your rows and characters and select your fonts! It also has text attributes for you to handle the name formatting. "Script names" will be how names are typed in your script. "Dialog names" is how names will show up in the dialog. Keep "%s" but change anything else if you want. By default, script names looks like "%s: " and dialog names looks like "%s\n" (the new line is a literal new line in the text field). If you're feeling adventurous, feel free to go into the contraption prototype code and add more columns if you want to customize more things for you characters.

To get this working for all cards and to get the talk sounds working, here's the working code below that you can copy and paste into your top level deck script. (replace <card1> with the card that the contraption is located in, and <dialogFormatter> with the name of the contraption). After this, just like with the deck code, you just need to call dd_format with dd.say.

on dd_format text hide_command do
 <card1>.widgets.<dialogFormatter>.dd_format[text hide_command]
end
on command x do
 char_table:<card1>.widgets.<dialogFormatter>.characters
 if (sum (extract command from char_table) like x) > 0
  talk:first extract talk where command=x from char_table
  dd.style[dd.getstyle[].tsound:talk]
 else
  pt.command[deck x]
 end
end

You can call the method dd_format[] and get the attribute .characters from the contraption. "characters" returns the table, and dd_format[] runs the formatting script.