Joined: 28 Jul 2006
|Posted: Wed Jul 11, 2012 17:47 Post subject: embedded serverside js: user-scriptable persistent worlds
This is another side project idea of mine. The basic idea is to allow players/users/anybody edit and scripts, which would be able to act on ingame objects and events.
* Github Wiki
The project is in it's early stages, and the concept a moving target. But there's code! (which depends on nwnx_jvm)
|script.set "message", (from, message) ->
this.log "Got message from " + from + ": " + message
script.set "creature.sees", (other) ->
this.log "I am seeing: " + this.getPerceivedCreatures(50.0)
this.taskFollow(other, 5) if other.objectId() == 4
script.set "creature.hb", () ->
this.log "my tasks: " + this.taskList().length
cn = (num for num in [0..100000])
As it is currently, running the code is only of interest to people versed in Scala and too much time on their hands. If you're interested in participating with development, ideas, and/or running this as it grows (as a test bed), feel free to ask for specifics.
As always: ideas and comments welcome.