简单项目生成器。
rpg-namer的Python项目详细描述
rpg名称
这是一个简单的包,可以从预先编译的描述和项类型列表中生成随机项名称
生成的一些示例名称:
Lusca's Fists
Consternation Dress
The Intimidation Footpads
Kushtaka's Spangenhelm
The Actual Nasal Helmet
Yuki-Onna's Greaves
Footguards of the Edged Antaeus
Trepidity Warboots of the Svartálfar
Possible Anklet
Horrible Trousers
Tanktop of the Shikoku
Legwraps of the Dismay Familiar Spirit
Suit of the Real Suangi
Devilish Gloves of the Heikegani
安装和使用
安装
^{pr2}$升级
python -m pip install rpg_namer --upgrade
基本用法
fromrpg_namerimportRPGItemsgen=RPGItems()print(gen.random_item())# Output: Horrible Trousers
项目、形容词和目标名词的附加覆盖作为关键字和支持列表提供 功能:
fromrpg_namerimportRPGItemsoverride_items=['buckler']override_nouns=['serpent']override_adjectives=['flaming']gen=RPGItems(items=override_items,adjectives=override_adjectives,nouns=override_nouns)print(gen.random_item())# Output: Flaming Buckler of the Serpent
项目名称的生成将使用每个列表中的随机选择完成,并由静态项目格式生成 在班上。对于其他建议格式或新单词列表,请通过branch/PR添加建议
词表生成
在examples目录下可以找到从源代码生成单词列表或剥离工具,其中包括 一些用于生成单词列表和格式化python列表以供使用的基本代码。这在新列表中有帮助 一代人。在
- 项目
标签: