Huaben 話本 texts were master scripts for storytellers. They originate in sketched outlines of stories during the Tang period 唐 (618-907) that were known under the names of shuohua 說話 "talks" or simply hua 話. The word occurs, for instance, in remarks to Yuan Zhen's 元稹 poems like Yizhihua hua 一枝花話 "The story of (the courtesan) Yizhihua", or in the Dunhuang manuscript 敦煌 stories Lushan yuangong hua 廬山遠公話 "Master Huiyuan's 慧遠 travel to Mt. Lushan" or Han qin hu hua 韓擒虎話 "A tiger was cought in Han".
Huaben texts flourished during the Song period 宋 (960-1279), when they found a larger distribution by the newly invented technique of book printing. The content of huaben texts were short stories, stories from history, or such with a Buddhist background. Yet the term huaben was also used for the scripts of puppet plays (kuileixi 傀儡戲), shadow plays (yingxi 影戲) or "operas" (better: singspiel, zaju 雜劇), as well as for music plays (zhugongdiao 諸宮調).
These scripts were so popular during the Song and Yuan periods that later writers of the Ming 明 (1368-1644) and Qing 清 (1644-1911) periods continued to use this genre (as so-called ni huaben 擬話本 "imitation story scripts") to find a larger readership of their novellas, most of which were written in vernacular language, and not in classical Chinese. Sometimes the term huaben is also used in the meaning of a first draft for a romance.
Huaben texts consisted mainly of narrative sprose, with interspersed poems of the shi 詩 or ci 詞 genres in which the plot was reflected or commented. It can be assumed that the ci poems were sung during performances. During the Ming period this kind of stories were called pinghua 評話 "critically commented stories" or cihua 詞話 "stories with songs" (not to be confused with cihua 詞話, critique and theory of ci poems).
There are only a few Song and Yuan period huaben stories surviving. The most important historical stories are Wudaishi pinghua 五代史平話, a story of the Five Dynasties 五代 (907-960), and Quanxiang pinghua 全相平話, whose plots take place during the Three Kingdoms period 三國 (220-280). The Wudaishi pinghua was probably written by Yin Changmai 尹常賣. The text is not preserved in total, but the surviving parts give a clear insight into the composition and language of historical novels, with its long prose parts that are interspersed with poems. The author of the Menglianglu 夢粱錄 says that the text was based on the history Wudaishi 五代史, and only half of it was fiction.
Huo Sijiu 霍四究 is credited with the authorship of the so-called Sanfen 三分 "Three parts", the stories about the Three Kingdoms, namely Sanfen shilüe 三分事略 and Sanguozhi pinghua 三國志平話. These texts are also not surviving in its original shape. The huaben text Da-Song Xuanhe yishi 大宋宣和遺事 (also called Xinjuan pinghua xuanhe yishi 新鐫平話宣和遺事 or shortly Xuanhe yishi 宣和遺事) appear to have been compiled during the "Great Song" period, as the title goes, but it is rather probable that it is a Yuan period product. These novels are divided into juan "scrolls", but bibliographies speak of a number of chapters (hui 回). It can be so seen that the arrangement in hui chapters became custom already during the Song period.
Fictional stories were often called xiaoshuo 小說, like the Xinbian Baihong zhizhu xiaoshuo 新編紅白蜘蛛小說 "New story of the red and the white spider". Parts of a Yuan period print of this story have survived. An important collection of old huaben stories is Hong Pian's 洪楩 Liushijia xiaoshuo 六十家小說 that was during the Qing period reprinted as Qing Pingshantang huaben 清平山堂話本). Fictional huaben stories are generally shorter than such of historiographical content.
Luo Ye's 羅燁 book Zuiweng tanlu 醉翁談錄 lists eight fields that fictional huaben stories were talking about: ghost stories or supernatural things (lingguai 靈怪), love stories (yanfen 煙粉), strange events (chuanqi 傳奇), law cases (gong'an 公案), "crude swords" (pudao 樸刀), "halberds" (ganbang 杆棒), i.e. stories of so-called errant knights (wuxia 武俠), immortals (shenxian 神仙), and magic (yaoshu 妖術). Luo also lists the titles of more than one hundred huaben stories, of which unfortunately only a few have survived, like the above-mentioned Hongzhizhu 紅蜘蛛 "The red spider", Shitiaolong 十條龍 "Ten dragons" (in the late Ming collection Jingshi tongyan 警世通言 as Wanxiuniang choubao Shanting'er 萬秀娘酬報山亭兒), or Lanluhu 攔路虎 that has survived in Hong Pian's Liushijia xiaoshuo. This collection, as well as the collection Gujin xiaoshuo 古今小說, also include some other huaben texts that are mentioned in the bibliographies Yeshiyuan shumu 也是園書目 and Shugutang shumu 述古堂書目.
In total, between thirty and fourty Song and Yuan period huaben texts have survived. All of them were printed during the Ming period, so that it can hardly be assumed that the publishers did not carry out revisions of the original texts. Of the sixty stories in the Liushijia xiaoshuo only twenty-odd survive, like Jiantie heshang 簡帖和尚, Xihu santa ji 西湖三塔記 or Hetong wenzi ji 合同文字記. Other stories are preserved in the Ming period collection Xiong Longfeng si zhong xiaoshuo 熊龍峰四種小說, like Zhang sheng cailuan deng zhuan 張生彩鸞燈傳 or Su Changgong Zhang Tailiu zhuan 蘇長公章台柳傳.
The collection Jingben tongsu xiaoshuo 京本通俗小說 was probably compiled during the late Ming period. In 1913 Miao Quansun 繆荃孫 selected seven stories, of which Nianyu guanyin 碾玉觀音, Pusa man 菩薩蠻, Zhicheng Zhang zhuguan 志誠張主管, Xishan yi ku gui 西山一窟鬼 and Cuo zhan Cui Ning 錯斬崔寧 are thought to be original Song period huaben stories, while Aoxianggong 拗相公 and Feng Yumei tuanyuan 馮玉梅團圓 are Ming products.
About thirty stories in Feng Menglong's 馮夢龍 late Ming collections Yushi mingyan 喻世明言, Jingshi tongyan 警世通言 and Xingshi hengyan 醒世恒言 (the famous Sanyan stories 三言) might be Song or Yuan period stories, like Nao fanlou duoqing Zhou sheng xian 鬧樊樓多情周勝仙, San xian shen bao long tu duan yuan 三現身包龍圖斷冤 or the already mentioned Shanting'er. The Ming period encyclopeaedia Yongle dadian 永樂大典 originally quoted 26 juan of pinghua texts. These are all lost.
Some few huaben stories are called shihua 詩話 "stories with poems" (not to be confused with the shihua 話本, critique and theory of shi poems), like Da-Tang Sanzang fashi qujing shihua 大唐三藏法師取經詩話 "Master Sanzang's (i.e. Xuanzang's 玄奘) travels to get the sutras during the Tang period". This is also the only surviving larger story with Buddhist content, and it served as the bluepint for the famous romance Xiyouji 西遊記. Three shorter stories of with Buddhist background have survived, namely Pusa man, Huadeng jiaoliang nv cheng Fo ji 花燈轎蓮女成佛記, and Wendalu 問答錄 "Questions (of Su Dongpo 蘇東坡) and answers (of Foyin 佛印)".
The literary elaboration of huaben stories differs greatly. Some are written as texts with a fluid language that is not far away from real novels, while others are only written in a very brief and sketchy style, like the story Lanqiaoji 藍橋記 in the collection Liushijia xiaoshuo that is an adaption of the story Pei hang 裴航 in Pei Xing's 裴銒 collection Chuanqi 傳奇. Most Song and Yuan huaben stories are of this brief type, but some have been expanded by later authors of publishers.
Huaben stories were very popular and can be seen as the forerunners of the great novels and romances (yanyi 演義) of the Ming and Qing periods.
The term ni huaben "imitation story scripts" was first used by the Republican writer and scholar Lu Xun 魯迅. He used the term to designate the Da-Tang sanzang fashi qujing ji and Xuanhe yishi that are formally belonging to the proper huaben, with the many poems introducing and closing each chapter, and the use of vernacular language, but that are much closer to histories than to fictional stories. Scholars of the People's Republic use the term ni huaben for script-style stories that were written during the Ming and Qing periods by professional writers, in imitation of the more popular style of the Song and Yuan period huaben stories. Such are Feng Menglong's thee Sanyan collections, Ling Mengchu's 凌濛初 two Erpai collections 二拍 (Chuke pai'an jingqi 初刻拍案驚奇 and Erke pai'an jingqi 二刻拍案驚奇), Zhou Ji's 周楫 Xihu erji 西湖二集, Qingyezhong 清夜鍾, or the stories Shidiantou 石點頭, Zuixingshi 醉醒石 or Huanying 幻影.