Hi Zobeid,
No, Evennia does not offer softcode support out of the box. The original reasons for this is outlined
here. If you really, really want MUF-like softcode support, there are a few options:
- Implement MUF/softcode/other in Python. This has been partially done by one of our users as part of converting an existing MUCK to Evennia, before realizing that coding all that functionality in Python using Evennia's normal methods was faster and easer on all accounts. If you hit the chat room, ask user Kelketek about it, I'm sure you'd have a lot to talk about. :)
- Use a restricted Python dialect, stripping away all "unsafe" functions so an untrusted user can code with it. Python's otherwise awesome intropspection abilities work against us here - there is no well-tried recipe for running cPython in a "sandbox" mode and the 'net is full with arguments why you could not trust it even if you did. PyPy, the alternative Python implementation has a sandbox mode which is supposedly good, that might be worth experimenting with (it requires some extra setup though). If you nevertheless want to try with cPython, Evennia's contrib folder comes with "Evlang", which is an experimental very cut-down version of Python for user in-game coding. It needs mroe work and should be considered only a starting point, see e.g. Issue 339 and Issue 353. Extra work and help on those would be appreciated.
Here are Evennia's recommended approaches:
- Use a heavily expanded build system with more advanced build commands that users get access to. This is Evennia's recommended, safe approach. The command system of Evennia is so flexible that you should allow users to add all sorts of pizazz when crafting objects or describing their homes of what have you. It's not formally "coding", but the majority of users probably don't really want to do anything more advanced anyway.
- If you really want users to be able to code new systems or features for your game, set up a Mercurial/GIT/whatever DVCS repository and let people contribute code to that. Safer cleaner and easy to revert and manage. People get to use full Python (allowing the game to be expanded in pure Python is after all Evennia's forte) and they may use the text editor of their choice. And you can safely review the additions before them going live.
If you have more ideas, I/we are always interested in discussing them. :)
.
Griatch
On Monday, June 3, 2013 3:47:48 AM UTC+2, Zobeid Zuma wrote:
I'm wondering if Evennia has any provision for user-level coding, such as most MUCKs support with MUF and MPI? I don't see it mentioned on the website. I've long been interested in bringing a more modern and user-friendly language like Python to the users (i.e. builders), but it has to be done with multiple access and restriction levels, such as MUF has.