Snippets: Difference between revisions
Jump to navigation
Jump to search
(Created page with "{{stub}} '''Snippets''' are tables that allow for random "madlibs" style tables for procedural text generation. what file in the code to start with? text_snippets.cpp and f...") |
No edit summary |
||
Line 18: | Line 18: | ||
src/suffer.cpp: std::string i_talk = SNIPPET.expand( SNIPPET.random_from_category( "<lets_talk>" ).value_or( | src/suffer.cpp: std::string i_talk = SNIPPET.expand( SNIPPET.random_from_category( "<lets_talk>" ).value_or( | ||
</code> | </code> | ||
[[Category: Snippets]] |
Latest revision as of 01:21, 26 August 2020
This page is not complete enough; please help if you can. |
Snippets are tables that allow for random "madlibs" style tables for procedural text generation.
what file in the code to start with?
text_snippets.cpp and find .expand() being called
JSON snippets for procedural music descriptions
src/basecamp.cpp:bool basecamp::can_expand()
src/basecamp.h: bool can_expand();
src/faction_camp.cpp: if( can_expand() ) {
src/harvest.cpp: return SNIPPET.expand( message_.translated() );
src/iuse.cpp: return SNIPPET.expand( SNIPPET.random_from_category( "<music_description>" ).value_or(
src/npctalk.cpp: phrase = SNIPPET.expand( remove_color_tags( phrase ) );
src/suffer.cpp: std::string i_talk = SNIPPET.expand( SNIPPET.random_from_category( "<lets_talk>" ).value_or(