24 Mar, 2010, Sorressean wrote in the 1st comment:
Votes: 0
Hello all,
I'm a bit stumped here, and am hoping someone can push me in the right direction. I'm working on a basic editor for now, that other editors could inherit and work off of. I have a "block editor," that will allow me to just dump text into it and it can be saved, but I'm trying for a way to edit the text that is dumped in, or to get an interactive editor.
One of the main issues is making it work with python, as that's what I'm using for my scripting language in the future. Is there an easier way of doing this? What I do is just set a handler to point to a callback which can parse out text for the editor. My code is open-source, so if looking at it would help, that would work as well; it's at:
The editor isn't even near complete, so I didn't include it in the compilation, but everything else compiles without a problem. Any other comments on the base would be welcome, this is my first really big project that I'm opening up to the community as open source, so ways I can improve systems would be greatly appriciated.
24 Mar, 2010, Scandum wrote in the 2nd comment:
Votes: 0
For a good interactive editor you need to negotiate character mode so the cursor keys can be used, and utilize VT100 to allow the user to visually move the cursor around the block of text on the screen. You could look at simple editors like Pico for inspiration, but this would be quite the undertaking.

Another option is adding a line based editor, most MUDs provide these. What exactly is it you want the editor to be capable of?
24 Mar, 2010, Barm wrote in the 3rd comment:
Votes: 0
Do you need the editor to work over Telnet like OLC or are you looking for a desktop editor that you can invoke using Python? If the latter, I used the text editor built into PyGTK a few years back in a front-end to GNU/Highlight. You pasted code in the left window and got color coded HTML back in the right and were free to edit either:


I haven't played with GTK in a while but it was pretty slick.

24 Mar, 2010, quixadhal wrote in the 4th comment:
Votes: 0
Another option might be to build a web based tool which the game could access. If your game has the ability to act as a simple web server, it could do this directly, or it could be done externally with the data being dumped into a specific directory (or a database), which the game server would scan for updates.
24 Mar, 2010, Sorressean wrote in the 5th comment:
Votes: 0
I guess I just need a line-based editor. I don't see pico working out very well, and I'm only using a basic mud client as are most people, and not an ssh client or something that would support that.. I'll just allow them to remote in to edit the scripts or something, as opposed to adding a huge editor for python. The goal right now is just a line-based editor I can use for olc/help/etc.
24 Mar, 2010, JohnnyStarr wrote in the 6th comment:
Votes: 0
I created a paragraph editor in my Ruby project which has a list of one character commands:

n < line > # adds a new line to the paragraph
i < number > # adds a new line at specified line number
r < number > # removes line at specified line number
s # saves paragraph
c # clears entire paragraph

Right now I'm adding commands so that you can manipulate substrings.
I am interested in switching things over to VT100, but it gets the job done
better than any editor I've used in OLC.
08 Apr, 2010, Hygelac wrote in the 7th comment:
Votes: 0
The year is 2010 and we should not limit ourselves to the teletype infrastructure of the 1950's. We have a vast array of online technologies available: ajax, PHP, WikiWords, SOAP.

Here is my suggestion. Build two editors: a lightweight stream editor, and a workhorse WikiWords editor.

Stream Editor
The stream editor would only accept a single line of input and use escape characters to delimit linebreaks. ie:
  • echo Hygelac is feeling uneasy and confused.

  • bug MXP is seriously broken.\n Unless a codebase is diligent about escaping <> from input and *all* data files, serious snafus result.\n Please fix this.

On the other hand you don't need to handle line breaks at all. Just use a formatting class that wraps lines for display. I've sent you an e-mail about my wrapper class.
bug MXP is seriously broken. Unless a codebase is diligent about escaping <> from…

will display as:
MXP is seriously broken. Unless a codebase is diligent
about escaping <> from input and *all* data files,
serious snafus result. Please fix this.

WikiWords Editor
Install/Package a wiki engine with the mud core. The mud core will read and display the wiki files inside the mud and the wiki web interface will be used by builders/players to edit data. This has several benefits over traditional block editors like pico
  • revision history - want to revert to revision 5 of your area, there you go. So we have a lightweight VCS

  • easy markup - don't remember what color codes &O &D &w do? You don't need to. Just use wiki syntax

  • builtin editor - I typed this entire message into this text box without once using an external editor. Added bonus - Firefox has a built in spell checker. Certainly going to cut down on the errors in your area files
08 Apr, 2010, flumpy wrote in the 8th comment:
Votes: 0
Love the wikiworks idea! Very nice idea I might borrow it :P
08 Apr, 2010, ProjectMoon wrote in the 9th comment:
Votes: 0
Start out small with a simple line based editor. Graduate to something complicated later. Personally, I am a fan of the web interface idea. That's only really because I'm a web developer by trade and that is the easiest way for me to make an interface. It's still online, but it is (in my opinion) much more intuitive than any kind of graphical interface embedded into the MUD itself.