A text Myst Online project

General debates and discussion about the Guild of Writers and Age creation

Re: A text Myst Online project

Postby Pavitra » Mon Aug 12, 2013 4:21 pm

Huzzah! Thank you Belford!
Have Ages, and link to them without bindings. [Words 1:13]
Seltani
User avatar
Pavitra
 
Posts: 226
Joined: Mon Apr 05, 2010 7:11 pm

Re: A text Myst Online project

Postby KathAveara » Tue Aug 13, 2013 8:07 pm

I'll be back in England in 17 hours or so. Then I can build my AIs!
Moula KI: 17967159
DI KI: 00205116
deviantART: kathaveara
tumblr: kaththedragon

Grand Master of the Guild of Linguists
KathAveara
 
Posts: 79
Joined: Mon Jun 10, 2013 2:29 am

Re: A text Myst Online project

Postby Pavitra » Thu Aug 15, 2013 12:39 am

What's the reasoning behind players.player(foo) and players.name(foo)? The distinction seems subtle and confusing, and I don't see the value of having the distinction.
Have Ages, and link to them without bindings. [Words 1:13]
Seltani
User avatar
Pavitra
 
Posts: 226
Joined: Mon Apr 05, 2010 7:11 pm

Re: A text Myst Online project

Postby Pavitra » Thu Aug 15, 2013 12:54 pm

You can now add linking books to the shelves in your personal Tsani-Tsina instance.
Have Ages, and link to them without bindings. [Words 1:13]
Seltani
User avatar
Pavitra
 
Posts: 226
Joined: Mon Apr 05, 2010 7:11 pm

Re: A text Myst Online project

Postby belford » Thu Aug 15, 2013 3:13 pm

What's the reasoning behind players.player(foo) and players.name(foo)?


The first is a player object, and the second is a string. They're not interchangeable. Use a player object to get a player properties, and to pass to other players.xxx() functions. The player name is only for printing.
belford
 
Posts: 344
Joined: Sat Sep 29, 2007 7:18 pm

Re: A text Myst Online project

Postby belford » Thu Aug 15, 2013 3:21 pm

You can now set the focus to a code property, although it's not automatic. It would look like:

Code: Select all
setfocus("sign")


...where sign is a code property that calls print() to generate output.

The behavior of print() is not yet as general as I'd like, but it works for this case.

Other changes today:

The unfocus() function is documented.

Invoking a code property can be done either with or without parentheses. That is, the following are equivalent:

Code: Select all
dosomething
dosomething()


(You cannot yet pass arguments to a code property, but I'll get there.)

http://seltani.net/doc/ now refers to the wiki. The wiki is the primary documentation at this point.

I've added a section on books and bookshelves to the wiki. (http://seltani.shoutwiki.com/wiki/Writi ... _bookshelf)

In the build interface, when you enter a text or code property, the syntax is validated before it's saved.

In the build interface, the "create portal to this location" now creates a global link rather than a personal link. (Unless the world is marked solo, of course.)
belford
 
Posts: 344
Joined: Sat Sep 29, 2007 7:18 pm

Re: A text Myst Online project

Postby Pavitra » Thu Aug 15, 2013 5:36 pm

belford wrote:
What's the reasoning behind players.player(foo) and players.name(foo)?


The first is a player object, and the second is a string. They're not interchangeable. Use a player object to get a player properties, and to pass to other players.xxx() functions. The player name is only for printing.


the wiki wrote:players.player()
players.player(player)
Returns the name of the acting player, or the player with the given database key (an ObjectId). If the argument is a player object, this returns it unchanged.

Should this read "Returns the player object of the acting player[...]"?
Have Ages, and link to them without bindings. [Words 1:13]
Seltani
User avatar
Pavitra
 
Posts: 226
Joined: Mon Apr 05, 2010 7:11 pm

Re: A text Myst Online project

Postby belford » Thu Aug 15, 2013 6:55 pm

Yes, right. Thanks.

Could you set me to have main-page editing access on the wiki?
belford
 
Posts: 344
Joined: Sat Sep 29, 2007 7:18 pm

Re: A text Myst Online project

Postby Pavitra » Fri Aug 16, 2013 2:08 am

Done, I think. I don't know of a way for me to test whether I did it correctly.
Have Ages, and link to them without bindings. [Words 1:13]
Seltani
User avatar
Pavitra
 
Posts: 226
Joined: Mon Apr 05, 2010 7:11 pm

Re: A text Myst Online project

Postby KathAveara » Fri Aug 16, 2013 9:43 am

Hey, Belford, could we have for loops enabled, please? I have some code (below) as part of my snake AI that could really do with a for loop.

The current code is:
Code: Select all
if snakepos == 1:
  if foodpos % 2 < 1:
    foodpos -= 1
    snakehunger += 3
elif snakepos == 2:
  if foodpos % 4 < 2:
    foodpos -= 2
    snakehunger += 3
elif snakepos == 3:
  if foodpos % 8 < 4:
    foodpos -= 4
    snakehunger += 3
elif snakepos == 4:
  if foodpos < 8:
    foodpos -= 8
    snakehunger += 3

and with a for loop, I could reduce it to one-quarter the size.
Moula KI: 17967159
DI KI: 00205116
deviantART: kathaveara
tumblr: kaththedragon

Grand Master of the Guild of Linguists
KathAveara
 
Posts: 79
Joined: Mon Jun 10, 2013 2:29 am

PreviousNext

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 2 guests

cron