PyMUD 帮助文档¶
有关链接¶
QQ交流群: 554672580
GitHub地址: https://github.com/crapex/pymud
PyPi地址: https://pypi.org/project/pymud
北侠wiki地址: https://www.pkuxkx.net/wiki/tools/pymud
北侠地址: https://www.pkuxkx.net/
deepwiki自动生成的项目理解文档地址: https://deepwiki.com/crapex/pymud
PyMUD用户shanghua写的入门教程文档: https://www.pkuxkx.net/forum/forum.php?mod=viewthread&tid=49999&forumuid=12067
写在最前面的话¶
最早想要自己写MUD客户端的念头,还是在几年前。但前几年事情太多,人太忙,我记得自20年疫情之后,到今年年初就没有再登陆过北侠了。 23年春节之后空闲一些,于2023年2月19日重启MUD客户端的计划,2023年5月29日形成第一个发布版(0.05b),2023年12月5日发布首个支持 pip安装的package版本(0.15),目前发布pip安装的最新版为0.22.0。
在自己写客户端之前,我主要用过zmud和mushclient两个客户端,北大侠客行一直是用mushclient(玩的那会儿还没有mudlet)。 我认为mushclient是一个功能非常强大的客户端,唯一缺点是不支持跨平台。由于工作原因,上班的地方不能上网,手机玩的话, 确实没有特别适合的跨平台客户端(tintint--倒是支持,但一直不想重学然后重写我在mushclient里的所有python脚本), 加上我是一个程序爱好者,所以决定自己干起,正好在游戏之中学习了。
因为我要综合平衡工作、生活、写代码、当然还有自己玩,所以整个更新节奏不会很快,但我认为我会一直更新下去的。 感谢北大侠客行巫师团队的努力,北侠吸引我玩的动力,也是我不断更新完善客户端的动力!
特点¶
原生Python开发,除 prompt-toolkit <https://python-prompt-toolkit.readthedocs.io> 及其依赖库 wcwidth, pygment, pyperclip 外,不需要其他第三方库支持
原生Python的asyncio实现的通信协议处理,支持async/await语法在脚本中直接应用,脚本实现的同步异步两种模式由你自己选择
基于控制台的全屏UI界面设计,支持鼠标操作(Android上支持触摸屏操作),极低资源需求,在单核1GB内存的Linux VPS上也可流畅运行
支持分屏显示,在数据快速滚动的时候,上半屏保持不动,以确保不错过信息
解决了99%情况下,北大侠客行中文对不齐,也就是看不清字符画的问题
真正的支持多session会话,支持命令或鼠标切换会话
原生支持多种服务器端编码方式,不论是GBK、BIG5、还是UTF-8
支持NWAS、MTTS协商,支持GMCP、MSDP、MSSP协议
一次脚本开发,多平台运行。只要能在该平台上运行python,就可以运行PyMUD客户端
脚本所有语法均采用Python原生语法,因此你只要会用Python,就可以自己写脚本,免去了再去学习lua、熟悉各类APP的使用的难处
全开源代码,因此脚本也可以很方便的使用visual studio code等工具进行调试,可以设置断点、查看变量等
Python拥有极为强大的文字处理能力,用于处理文本的MUD最为合适
Python拥有极为丰富的第三方库,能支持的第三方库,就能在PyMUD中支持
多语言支持框架已搭好,目前提供中文、英文支持,可以自己增加翻译后的其他语言版本
我自己还在玩,所以本客户端会持续进行更新:)
美化对齐的字符画
滚动时自动分屏
目录
- 1 需求、安装与运行
- 2 界面和操作
- 3 应用配置及本地化
- 4 系统命令
#action#ali#alias#all#clear#cls#close#command#con#connect#cmd#dis#disconnect#echo#error#exit#gag#global#gmcp#help#ig#ignore#load#mess#message#mods#modules#num#plugins#py#reload#replace#reset#save#session#show#t+#t-#task#test#ti#timer#tri#trigger#unload#var#variable#wa#wait#warning#info#log
- 5 快捷键
- 6 脚本
- 7 插件
- 8 类参考 class references
PyMudAppPyMudApp.act_about()PyMudApp.act_autoreconnect()PyMudApp.act_beautify()PyMudApp.act_clearsession()PyMudApp.act_close_session()PyMudApp.act_connect()PyMudApp.act_copy()PyMudApp.act_copyraw()PyMudApp.act_discon()PyMudApp.act_echoinput()PyMudApp.act_exit()PyMudApp.act_new()PyMudApp.act_nosplit()PyMudApp.act_reload()PyMudApp.activate_session()PyMudApp.addTimerTickCallback()PyMudApp.btn_title_clicked()PyMudApp.change_session()PyMudApp.close_session()PyMudApp.copy()PyMudApp.copy_selection()PyMudApp.create_background_task()PyMudApp.create_session()PyMudApp.create_world_menus()PyMudApp.custom_key_press()PyMudApp.del_globals()PyMudApp.enter_pressed()PyMudApp.get_frame_title()PyMudApp.get_globals()PyMudApp.get_height()PyMudApp.get_input_prompt()PyMudApp.get_statusbar_right_text()PyMudApp.get_statusbar_text()PyMudApp.get_statuswindow_text()PyMudApp.get_width()PyMudApp.globalsPyMudApp.handle_session()PyMudApp.hide_history()PyMudApp.initUI()PyMudApp.invalidate()PyMudApp.load_plugins()PyMudApp.page_down()PyMudApp.page_up()PyMudApp.pluginsPyMudApp.reload_plugin()PyMudApp.removeTimerTickCallback()PyMudApp.run()PyMudApp.run_async()PyMudApp.scroll()PyMudApp.set_globals()PyMudApp.set_status()PyMudApp.showLogInTab()PyMudApp.show_dialog()PyMudApp.show_dialog_as_float()PyMudApp.show_message()PyMudApp.split_screen()PyMudApp.toggle_mousesupport()
SessionSession.addAlias()Session.addAliases()Session.addCommand()Session.addCommands()Session.addGMCP()Session.addGMCPs()Session.addObject()Session.addObjects()Session.addTimer()Session.addTimers()Session.addTrigger()Session.addTriggers()Session.alisSession.clean()Session.closeLoggers()Session.cmdsSession.commandHistorySession.connect()Session.connectedSession.create_task()Session.delAlias()Session.delAliases()Session.delCommand()Session.delCommands()Session.delGMCP()Session.delGMCPs()Session.delGlobal()Session.delObject()Session.delObjects()Session.delTimer()Session.delTimers()Session.delTrigger()Session.delTriggers()Session.delVariable()Session.deleteGroup()Session.disconnect()Session.durationSession.enableGroup()Session.error()Session.event_connectedSession.event_disconnectedSession.exec()Session.exec_async()Session.exec_code()Session.exec_code_async()Session.exec_command()Session.exec_command_after()Session.exec_command_async()Session.exec_text()Session.exec_text_async()Session.feed_data()Session.feed_eof()Session.feed_gmcp()Session.feed_msdp()Session.feed_mssp()Session.getGlobal()Session.getLogger()Session.getPlainText()Session.getUniqueID()Session.getUniqueNumber()Session.getVariable()Session.getVariables()Session.get_status()Session.globalsSession.gmcpSession.go_ahead()Session.handle_alias()Session.handle_all()Session.handle_clear()Session.handle_close()Session.handle_command()Session.handle_connect()Session.handle_disconnect()Session.handle_error()Session.handle_exit()Session.handle_gag()Session.handle_global()Session.handle_gmcp()Session.handle_help()Session.handle_ignore()Session.handle_info()Session.handle_load()Session.handle_log()Session.handle_message()Session.handle_modules()Session.handle_num()Session.handle_plugins()Session.handle_py()Session.handle_reload()Session.handle_repeat()Session.handle_replace()Session.handle_reset()Session.handle_save()Session.handle_task()Session.handle_test()Session.handle_timer()Session.handle_trigger()Session.handle_unload()Session.handle_variable()Session.handle_wait()Session.handle_warning()Session.idletimeSession.info()Session.initialize()Session.load_module()Session.modulesSession.onConnected()Session.onDisconnected()Session.open()Session.pluginsSession.reconnect()Session.record_command()Session.reload_module()Session.remove_task()Session.replace()Session.reset()Session.setGlobal()Session.setVariable()Session.setVariables()Session.set_exception()Session.status_makerSession.timersSession.trisSession.unload_module()Session.updateVariables()Session.varsSession.wait_triggers()Session.waitfor()Session.warning()Session.write()Session.write_eof()Session.writeline()Session.writetobuffer()
CodeBlockBaseObjectMatchObjectAliasSimpleAliasTriggerSimpleTriggerGMCPTriggerTimerSimpleTimerCommandSimpleCommandDotDictPluginIConfigModuleInfoLogger
- 附录: 更新历史
- 0.22.1 (2025-09-01)
- 0.22.0 (2025-08-23)
- 0.21.8 (2025-08-08)
- 0.21.7 (2025-08-02)
- 0.21.6 (2025-06-29)
- 0.21.5post2 (2025-06-10)
- 0.21.4 (2025-06-08)
- 0.21.3 (2025-06-02)
- 0.21.2 (2025-06-01)
- 0.21.0 (2025-05-20)
- 0.20.4 (2025-03-30)
- 0.20.3 (2025-03-05)
- 0.20.2 (2024-11-26)
- 0.20.1 (2024-11-16)
- 0.20.0 (2024-08-25)
- 0.19.4 (2024-04-20)
- 0.19.3post2 (2024-04-05)
- 0.19.2post2 (2024-03-24)
- 0.19.1 (2024-03-06)
- 0.19.0 (2024-03-01)
- 0.18.4post4 (2024-02-23)
- 0.18.3 (2024-02-07)
- 0.18.2 (2024-02-06)
- 0.18.1 (2024-02-05)
- 0.18.0 (2024-01-24)
- 0.17.4 (2024-01-08)
- 0.17.3 (2024-01-02)
- 0.17.2post4 (2023-12-29)
- 0.17.1post1 (2023-12-27)
- 0.17.0 (2023-12-24)
- 0.16.2 (2023-12-19)
- 0.16.1.post2 (2023-12-12)
- 0.15.8 (2023-12-05)