Javascript API

159 views
Skip to first unread message

Idle Ideas Inc.

unread,
Feb 19, 2018, 5:11:15 AM2/19/18
to idle_...@googlegroups.com
It will take some time to integrate Javascript with the underpinnings of the existing scripting system.

In order to make it relevant and usable, asap, we're asking community input to guide which parts of the API we should tackle first. Currently, we're working on the Token, Library, and Client sections. 

Do note that some sections will not tackled, since there are existing counterparts in JS e.g. math functions.

As of 13/03/2018, these are the functions that have been converted so far:

Audio
audio.hold
audio.list
audio.play
audio.stop

Blocking
block.addRule
block.clearRules
block.removeRule
block.rule
block.ruled
block.rules
block.setRuled
block.setType
block.type

Client
client.tell

Facing
facing.clear
facing.degrees
facing.setDegrees
facing.setLock

Initiative
initiative.add
initiative.addAll
initiative.addPcs
initiative.addNpcs
initiative.current
initiative.drop
initiative.dropAll
initiative.dropPcs
initiative.dropNpcs
initiative.get
initiative.held
initiative.hold
initiative.list
initiative.next
initiative.round
initiative.set
initiative.setCurrent
initiative.setRound
initiative.size
initiative.sort
initiative.token

Library
lib.get
lib.set

Macro (formerly Function group)
macro.create
macro.command
macro.define
macro.defined
macro.delete
macro.deleteAll
macro.deleteGroup
macro.exists
macro.index
macro.indices
macro.list
macro.location
macro.group
macro.groups
macro.groupIndices
macro.properties
macro.setCommand
macro.setProperties

Macro Link
link.fire
link.macro
link.text

Map
map.background
map.copy
map.contains
map.delete
map.deselect
map.hidden
map.images
map.list
map.listVisible
map.npcs
map.objects
map.pcs
map.select
map.selected
map.statused
map.switch
map.tokens
map.transfer
 
Path
path.count
path.crossedToken
path.crossedPoints
path.get

Token Properties
props.get
props.set
props.keys
props.rawKeys

States
states.get
states.list
states.set
states.setAll

String
string.format

Tables
tables.addEntry
tables.audio
tables.clear
tables.copy
tables.create
tables.entries
tables.image
tables.list
tables.play
tables.queriable
tables.remove
tables.removeAll
tables.removeEntry
tables.result
tables.roll
tables.setDisplayImage
tables.setImage
tables.setName
tables.setQueriable
tables.setResult
tables.setRoll

Token
token.copy
token.delete
token.image
token.imageId
token.layer
token.portrait
token.setImage
token.setLayer
token.setPortrait
token.setX
token.setY
token.toTop
token.toBottom
token.x
token.y

View
view.enforce
view.linkClients
view.setZoom
view.zoom

Window
window.close
window.closeAll
window.data
window.input
window.list
window.make
window.open
window.update

* - available on next release

James Murrell

unread,
Feb 21, 2018, 2:26:21 PM2/21/18
to Home of our Idle Ideas
Those are probably the most crucial sections. I'd also argue for the Initiative API.

I assume that the standard stuff like math and string management are just going to be JS native?

Idle Ideas Inc.

unread,
Feb 22, 2018, 5:30:20 AM2/22/18
to idle_...@googlegroups.com
Initiative too, yes. 

Yes, if there is a JS native function/API, we defer to that.

Edit: Note that we are not converting the current API in one go. We're going to do rolling releases until everything gets done, so people can start tooling around with it, and hopefully, provide feedback.
Reply all
Reply to author
Forward
0 new messages