Page 25 of 31

Re: A text Myst Online project

Posted: Sat Aug 24, 2013 3:42 am
by Pavitra
After meddling with Seltani's interface on and off for some time, I've found the following changes that I consistently like:

1. Using a fixed width font in the editor. (I like "Latin Modern Mono".)

Code: Select all

textarea.BuildPropSubpane {
    font-family: monospace;
}
input.BuildPropKey {
    font-family: monospace;
}
2. Reducing the text size of the links in the booklet.

Code: Select all

li.ToolListButtonish {
    font-size: 85%;
}

Re: A text Myst Online project

Posted: Sat Aug 24, 2013 4:04 pm
by Pavitra
How difficult would it be to allow a limited markup in Event text? Italics would be nice.

(I assume it's more trouble than it's worth, but I might as well check.)

Re: A text Myst Online project

Posted: Sat Aug 24, 2013 6:35 pm
by belford
The "for", "while", "break", and "continue" statements work now.

I've added most of the instance methods on strings, lists, and dicts. However, altering a list or dictionary in place will not work the way you want. (See bug: https://github.com/erkyrath/tworld/issues/97) To change the value of a list or dictionary, you'll have to pull it into a local variable, edit, and then write it back into a property:

Code: Select all

_temp = listprop
_temp.append("foo")
listprop = _temp
To make testing this stuff easier, I've enabled local variables for the debug "/eval" command. If you say "/eval _temp = [1,2,3]" then _temp will retain its value for the rest of your session (but only for /eval commands!)

Re: A text Myst Online project

Posted: Sat Aug 24, 2013 6:38 pm
by belford
How difficult would it be to allow a limited markup in Event text? Italics would be nice.
It would be somewhat difficult. It could also be confused with administrator messages and the new "/shout" command, which use italics to designate special types of messages.

Oh, yeah, I added a "/shout" command. Sends a message audible to anybody in the same instance. (Really it's a booklet function rather than shouting, but "/shout" is the traditional command.)

Re: A text Myst Online project

Posted: Sat Aug 24, 2013 11:05 pm
by Pavitra
Someone said that the documentation on Code (args) was a bit thin, so I've written up a section on it for Working the Example. Belford, would you please check that over quickly to make sure I haven't got it horribly wrong?

Re: A text Myst Online project

Posted: Sun Aug 25, 2013 3:16 pm
by Pavitra
Error: Command may only be invoked by this world's creator: "meta_eval"
Using "creator" to refer to the instance creator was confusing enough, but using it inconsistently is guaranteed to cause a mess. I suggest always using "author" for the world creator and "founder" for the instance creator. (I would have favored "owner" for the instance creator, but apparently that's already in use for something else.)

Re: A text Myst Online project

Posted: Sun Aug 25, 2013 6:47 pm
by belford
Someone said that the documentation on Code (args) was a bit thin, so I've written up a section on it for Working the Example.
That looks good! I rearranged the wording a little bit, but it was accurate.
Using "creator" to refer to the instance creator was confusing enough, but using it inconsistently is guaranteed to cause a mess. I suggest always using "author" for the world creator and "founder" for the instance creator. (I would have favored "owner" for the instance creator, but apparently that's already in use for something else.)
Yeah, it's a mess right now no matter how you slice it...

I like "founder". I will rearrange the code to use that, and then allow "creator" to mean the world creator (synonymous with "author" or "writer").

The difference between "founder" and "owner" is only in potentia right now. Currently the owner and the founder are the same player. Eventually it will be possible for owners to add new owners, so responsibilities can be shared, but founder is a fixed label.

Re: A text Myst Online project

Posted: Mon Aug 26, 2013 12:47 am
by Pavitra
The journals in Tsani-Tsina private instances have been improved. You can edit any page, insert new pages at any point, and delete pages. However, for technical reasons, there is now only one "what page are you on" variable for all players; the navigation links affect everyone's place in the journal.

Edit: The lunar schedule in Tsani-Tsina has also changed; it should now be consistent across instances. Apologies to anyone who was keeping track.

Edit 2: I've released Korvichtav, which is like Basic Library except more so.

Re: A text Myst Online project

Posted: Mon Aug 26, 2013 11:44 am
by KathAveara
Ok, so 3Phen is having a bit of trouble with lists. Namely, despite foo having more than for items, foo[3] = "bar" won't work for him. He gets a NotImplementedError when he tries. Help?

Re: A text Myst Online project

Posted: Mon Aug 26, 2013 4:20 pm
by Pavitra
You can't directly set a specific element of a list. However, you can use list.pop() and list.insert() on a temporary variable containing a list:

Code: Select all

_tempfoo = foo
if len(foo) >= 4:
  _tempfoo.pop(3)
_tempfoo.insert("bar", 3)
foo = _tempfoo