[Mote] Tools to make tools

If you have an idea for a new feature, please discuss it in the main MapTool forum first, then post a summary of the discussion here. Use the first Sticky as a template.

Moderators: dorpond, trevor, Azhrei, giliath, jay, Mr.Ice

User avatar
wolph42
Winter Wolph
Posts: 9999
Joined: Fri Mar 20, 2009 5:40 am
Location: Netherlands
Contact:

[Mote] Tools to make tools

Post by wolph42 »

Now that Mote can officially get to work on their project I thought it nice to make a feature list consisting out of functions we still miss. Basically adding these will allow me and others to create new tools for e.g. the bag of tricks or personal frameworks.

I know some things are currently being worked on and/or could be worked on by people outside of mote. Im hoping that Lee's team allows for patches that add these functionalities.

Here's the list:
note that functions that can be emulated by macros (and thus already exists as such) are marked with a *.

My personal favourites:
- setImageWidth() / setImageHight (I believe Jamztheman is working on these)
- getViewPortX() / getViewPortY() / getViewPortZ()
- setZoomLevel() or better: update Wiki: goto()(x,y) to goto(x,y,z, pixels/cellcount). Currently its cell count only.
these all should get one boolean as parameter: dimension in pixels (1) or number of cells (0), defaulting to 1 (pixels)
- extend Wiki: getCurrentMapName() to getCurrentMapName("Username") (defaulting to current user/client as it currently does)
And in some not too far future:
- createLightSource(Name, Group, Range, shape, color, personal, lumens [can also be negative], rangeOffset, angle[in case of arc], angleOffset[so not centered on facing of token])
Given the high number of parameters I guess its better to go for a json object. Similar to copyToken. Also but not sure how light sources work at all in MT, if this function exists than they're not really required to be created in the same manner as they're now. Which would mean that if a source is created this way it does not need to show up in the campaign properties. But just as a lightsource on that token. In that case the function and parameters would become simpler:
lightSource(range[, properties]) where "properties" is a json object with optional parameters (default values): shape (circle), color (#FFFFFF), personal(0), lumens(0) , rangeOffset(0), angle(30), angleOffset(0)
edit:
onTimeEvent()
ramble
not sure what form this should take but an event that is triggered at a certain point in time, whether that is 'after 5 seconds' or 'at 12:30' is open for debate as also the implementation form, but its usefull eitherway. Its particularly useful for certain bordgames e.g. chess where you show a clock and ofcourse 'times up'. But also to limit the time for someones turn during a rpg game. For that reason some counter would be nice but the onTimeEvent can help there as well. I guess that IF you ever get this far it would be prudent to discuss the eventual form.
Full Bleed:
- setMapVisible(mapname, true/false)
- renameMap(oldmapname, newmapname OR currentmapname, newmapname)
- setMapVision(range)
- setMapFow(true/false)
*- pause("var1","var2",etc)
*- watch("var1","var2",etc)
*- debugInfo(vars [, oneLine, showTok, pause, macroName, macroLocation])
parameters

Code: Select all

broadcasts all the listed variables and their current values either on one line (1) or beneath eachother (0) 
  - vars: list of variables you want to track while debuggin 
  Optional Arguments 
  - oneLine: (0) all variables in one column; (1) (default) all variables on one line 
  - showTok: (0) show nothing; (1) (default) show current token and impersonated token 
  - pause: (0) dont pause on debug line; (1) pause on debug line AND show a frame with the debug results 
  - macroName: to make use of this you need to enter getMacroName() as argument 
  - macroLocation: to make use of this you need to enter getMacroLocation() as argument 
  Example use: [bot_debugInfo( 'X, Y, Name, Strength', 0, 1, 1, getMacroName(), getMacroLocation() )]
*- diagnose()
Map diagnosis. This function checks ALL maps and ALL (lib)tokens for potential issues. It checks whether token names contain non-alphanumerical characters and checks the libs for the same and ownership and visibility. Any errors are rendered in a frame with hyperlinks that lead you to the token. I guess if you create this function you can add even more functionality to it.

Jamz:
*- sleep(ms)

Aliasmask:
- CreateUUID() create unique identifier
- encrypt("string") MD5 encryption

Bone White:
- A boolean parameter for Wiki: input() to disable forced focus (if possible).
- A non-hack onMouseOver event triggered macro.

Badsequal
- Functionality for JSON-WSP : http://en.wikipedia.org/wiki/Jsonwsp

Bhoritz
- isFlipped(token) returns boolean value whether the image is flipped or not, maybe it should be:
- isHFlipped and isVFlipped to differentiate between horizontal and vertical...not sure though.
- flipToken(token) flips the token
- group(groupName, ["token1", "token2", etc.]) thus an array of tokens
- unGroup(groupName, optional: array of tokens to ungroup defaults to all tokens in the group)
- getImageNativeWidth() getImageNativeHeight() returns native sizes in pixels, which again can be fed to setImageWidth/Height

RPTroll
- table/database/sql(?) functions.

Dracones
- extend Wiki: getTokens()/Wiki: getTokenNames() to allow mapname as well. Not sure if this is feasible. So basically add 'map' to the conditions. Potential pitfall when use icw e.g. 'range' condition.

User avatar
JamzTheMan
Great Wyrm
Posts: 1872
Joined: Mon May 10, 2010 12:59 pm
Location: Chicagoland
Contact:

Re: [Mote] Tools to make tools

Post by JamzTheMan »

A sleep(milliseconds) function would be nice.

But tricky I'm sure. To properly thread the macro's would be needed but nice as well. Could allow for some better/smoother animation effects via macro's.
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork

User avatar
Full Bleed
Demigod
Posts: 4736
Joined: Sun Feb 25, 2007 11:53 am
Location: FL

Re: [Mote] Tools to make tools

Post by Full Bleed »

Nice list.

I think some built-in debug functions like some of what you and Alias have done with UDF's would be good:

pause()
watch()
debugInfo()
diagnose()


Maybe some combined functionality?
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."

User avatar
aliasmask
RPTools Team
Posts: 9024
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: [Mote] Tools to make tools

Post by aliasmask »

I would like to have CreateUUID() - unique identifier and also expand the getInfo() data to include who the server is. Also some MD5 encryption functions would be nice.

User avatar
Bone White
Great Wyrm
Posts: 1124
Joined: Tue Aug 23, 2011 11:41 am
Location: Cornwall, UK

Re: [Mote] Tools to make tools

Post by Bone White »

  • A boolean parameter for Wiki: input() to disable forced focus (if possible).
  • A non-hack onMouseOver event triggered macro.

badsequel
Giant
Posts: 115
Joined: Thu May 31, 2012 3:13 am

Re: [Mote] Tools to make tools

Post by badsequel »

Probably out of scope...

Functionality for JSON-WSP
http://en.wikipedia.org/wiki/Jsonwsp
My shared rpg stuff:
(exe)TokenNameChanger3: https://www.dropbox.com/s/cqsof54v3dl2k ... 3.zip?dl=0
Tiddly Spell Wiki: https://www.dropbox.com/s/53pya4k68mnvc ... ddly01.htm

Stuff to check out:
Mote Kickstarter(back it): https://www.kickstarter.com/projects/74 ... abletop-ev

User avatar
wolph42
Winter Wolph
Posts: 9999
Joined: Fri Mar 20, 2009 5:40 am
Location: Netherlands
Contact:

Re: [Mote] Tools to make tools

Post by wolph42 »

nice suggestions! ill update the op later. Some questions remarks:
badsequel wrote:Probably out of scope...

Functionality for JSON-WSP
http://en.wikipedia.org/wiki/Jsonwsp
I had a short look but was a bit overwhelmed. Could you give a specific example of when this is useful? Also IRC lee's team is working on a database implementation which might be in this direction.
Bone White wrote:
  • A boolean parameter for Wiki: input() to disable forced focus (if possible).
  • A non-hack onMouseOver event triggered macro.
IRC events are on the list, so good point to make this part of it.
aliasmask wrote:I would like to have CreateUUID() - unique identifier and also expand the getInfo() data to include who the server is. Also some MD5 encryption functions would be nice.
for what purpose would the createuuid be? Same question for the MD5
Full Bleed wrote:Nice list.

I think some built-in debug functions like some of what you and Alias have done with UDF's would be good:

pause()
watch()
debugInfo()
diagnose()


Maybe some combined functionality?
another IRC: i believe that debug functionality within the editor itself was mentioned as well so this makes a fair chance. The diagnose() are you referring to the one i created in the BoT? Or some other purpose? Edit: nvm, I should learn to read.
JamzTheMan wrote:A sleep(milliseconds) function would be nice.

But tricky I'm sure. To properly thread the macro's would be needed but nice as well. Could allow for some better/smoother animation effects via macro's.

+1 (note that it actually already exists as a macro! CIF wrote one). By the way *are* you working on the setImageWidth/Height functions?

User avatar
aliasmask
RPTools Team
Posts: 9024
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: [Mote] Tools to make tools

Post by aliasmask »

wolph42 wrote:
aliasmask wrote:I would like to have CreateUUID() - unique identifier and also expand the getInfo() data to include who the server is. Also some MD5 encryption functions would be nice.
for what purpose would the createuuid be? Same question for the MD5
An easy way to create a unique identifier is just a needed staple in programming and its faster than maintaining a variable counter. MD5 encryption is good if you want to store data that a lot of people have access to, but you don't want them knowing what it is, like passwords and private data. You have two keys, one defined by the program and one by the user and you can't get the data without both.

I plan to update my Players lib to hold player profiles. It's probably no big deal to save unencrypted passwords, but I'd rather do it right.

User avatar
Bhoritz
Giant
Posts: 130
Joined: Wed Jul 21, 2010 10:31 am
Contact:

Re: [Mote] Tools to make tools

Post by Bhoritz »

A few functions about graphical assets (tokens, portraits, states images....) would be nice. Whilst maptool is a graphic gaming interface, the graphic part is a little under developed.

User avatar
wolph42
Winter Wolph
Posts: 9999
Joined: Fri Mar 20, 2009 5:40 am
Location: Netherlands
Contact:

Re: [Mote] Tools to make tools

Post by wolph42 »

Bhoritz wrote:A few functions about graphical assets (tokens, portraits, states images....) would be nice. Whilst maptool is a graphic gaming interface, the graphic part is a little under developed.
care to elaborate? We're talking functions() here, so what kind of functions are you thinking of.
For me the biggest and direly needed functions are the setTokenWidth/height as i sorely miss that, but beyond that...?

User avatar
Bhoritz
Giant
Posts: 130
Joined: Wed Jul 21, 2010 10:31 am
Contact:

Re: [Mote] Tools to make tools

Post by Bhoritz »

For new functions, I would say flipping a token, exchanging the token image (I know that I can exchange between the token image and portrait, but that's not a function, and it fudges sizes), grouping and ungrouping several tokens to let them not only move together (just selecting them is enough for that) but also pivot around a common center (imagine several tokens on a vehicle).

Setting Height and Width is also a function I would like to see, instead of having to do with D&D sizes, but for me, the most important size setting choice would be to be able to set any graphic asset to its native size. It is easy to prepare your graphic stuff at the size you want it to appear, and it is always irritating to have to second guess a program (not only Maptool, mind you) to obtain what you want because it tries to crop, resize or change your stuff. But that goes beyond functions.

Indeed, some of the things about graphics I would like to see are not functions. For exemple, I would prefer to have states and bars on the portrait instead of on the token, but that's another story.

User avatar
RPTroll
TheBard
Posts: 3159
Joined: Tue Mar 21, 2006 7:26 pm
Location: Austin, Tx
Contact:

Re: [Mote] Tools to make tools

Post by RPTroll »

I'd like database table-like functions. The ability to define a data structure to hold things like weapons, spells, and the like with the ability to query it. Yes, you can do this with JSON objects but I would want something a little more robust with a query ability to return an array of JSON objects from a data set. Don't get me wrong, I love JSON, I just wish manipulation and selection of the data was easier. Also, I'd like it persisted to the campaign without resorting to the token properties.

There are several approaches but I would like something like the table window now that allowed for user defined elements and no need for a roll.
ImageImage ImageImageImageImage
Support RPTools by shopping
Image
Image

Enoch
Kobold
Posts: 5
Joined: Fri Mar 29, 2013 7:24 am

Re: [Mote] Tools to make tools

Post by Enoch »

RPTroll wrote:I'd like database table-like functions. The ability to define a data structure to hold things like weapons, spells, and the like with the ability to query it. Yes, you can do this with JSON objects but I would want something a little more robust with a query ability to return an array of JSON objects from a data set. Don't get me wrong, I love JSON, I just wish manipulation and selection of the data was easier. Also, I'd like it persisted to the campaign without resorting to the token properties.

There are several approaches but I would like something like the table window now that allowed for user defined elements and no need for a roll.
Isn't this already implemented in MOTE? The Kickstarter page even shows him using the functions.

Or are you talking about being able to bring up a frame with a table interface right there? Like populating a list and being able to sort it like a spreadsheet or something.

badsequel
Giant
Posts: 115
Joined: Thu May 31, 2012 3:13 am

Re: [Mote] Tools to make tools

Post by badsequel »

RPTroll wrote:I'd like database table-like functions. The ability to define a data structure to hold things like weapons, spells, and the like with the ability to query it. Yes, you can do this with JSON objects but I would want something a little more robust with a query ability to return an array of JSON objects from a data set. Don't get me wrong, I love JSON, I just wish manipulation and selection of the data was easier. Also, I'd like it persisted to the campaign without resorting to the token properties.

There are several approaches but I would like something like the table window now that allowed for user defined elements and no need for a roll.
This will be handled by Motes implementation of the relational database H2, if I recall correctly.

http://www.h2database.com/html/main.html
My shared rpg stuff:
(exe)TokenNameChanger3: https://www.dropbox.com/s/cqsof54v3dl2k ... 3.zip?dl=0
Tiddly Spell Wiki: https://www.dropbox.com/s/53pya4k68mnvc ... ddly01.htm

Stuff to check out:
Mote Kickstarter(back it): https://www.kickstarter.com/projects/74 ... abletop-ev

User avatar
JML
Dragon
Posts: 515
Joined: Mon May 31, 2010 7:03 am
Location: Blagnac, France

Re: [Mote] Tools to make tools

Post by JML »

Well, SQL is the most wide spread database system and is very well known among IT professionals, thus there's a zillion online documentation and help, and, if it's going to disappear someday, we'll be all dead by then. This being said, I'm still wondering if it's the easier and most performance safe system regarding beginners.

Is there an educated someone around here who could enlighten me on this mater (beginner="non coder" friendliness) ?

Post Reply

Return to “Feature Requests”