Developer Guide (works-in-progress, guidelines, etc)

Thoughts, Help, Feature Requests, Bug Reports, Developing code for...

Moderators: dorpond, trevor, Azhrei

Forum rules
PLEASE don't post images of your entire desktop, attach entire campaign files when only a single file is needed, or generally act in some other anti-social behavior. :)
Post Reply
User avatar
Azhrei
Site Admin
Posts: 12086
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Developer Guide (works-in-progress, guidelines, etc)

Post by Azhrei »

This thread is for MapTool developers. I've suddenly found myself with a lot of time on my hands (all the credit goes to the recession!) and I thought it might be good to have some centralized information available here.

First, I would like to use this thread as a "clearinghouse" for projects that contributors would like to take on. If you've got some Java experience and want to start playing around in MapTool, please see the Bug Reports subforum for a list of needed fixes/features. Once you decide to publicly take on a project, make a single post here and give a description of what you plan to work on. If possible, include a link to the forum post that describes the problem and any discussed solutions.

In order to grab the source code, you might check out this thread in the General Discussion forum. It talks about how to setup Eclipse and what the SVN (subversion) repository URL is for checking out the code.

Each developer should have a single post here. Should you change the list of projects that you're working on, come back here and edit the post. As you complete projects, please DO NOT edit them out unless they've already been included in a build. This can potentially help in determining which threads in the Bug Report forum have been squashed. If possible, use the list BBcode command with a numeric sequence to organize your projects into three groups: work-in-progress, completed (meaning you consider the change "feature complete"), and applied (submitted to Trevor and included in a build). Please put them in that order.

When you get a feature to the point where you think it's ready for public testing, add a link to the patch in your posting (the forum currently allows attachments, but I don't know if that will last). You should ensure that your patch adheres to these guidelines before sending the patch to Trevor for inclusion into the central source pool. (Patches presented here need not comply with the guidelines, but it's recommended that they do, since your patch will receive wider testing.)

If you would like to comment on the above ideas, please use the guidelines thread that I mentioned above. I'm turning on notification for this thread, so I'll find out when additions are made. If the post is to discuss this topic, it will be deleted. Please use the guideline thread for that.

User avatar
Azhrei
Site Admin
Posts: 12086
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Azhrei

Post by Azhrei »

Things I'm working on:
  1. Unified load/save of any object type in MapTool that might conceivably be exported. This is a big one. :) The code is there in SVN but not enabled in the UI. Trevor has indicated he wants a higher-level approach that allows individual maps to be "standalone campaigns" and then to support some type of campaign merging. AFAICT, the existing technique and a "merge" technique would have the same general problems...
  2. Looking at enhancing the text labels by allowing the GM to specify a layer and perhaps using HTML instead of just text (allowing for fonts, images, and so forth).
  3. Moving all text strings to external file(s) to support translation (long-term set of patches)
  4. Some keystrokes are not looked up in the i18n.properties file. Such as "D" for dropping a token when moving via the arrow keys, or "T" to cycle token selection.
  5. Add a list of recently used textures to the drawing panel, similar to the recently used color list
  6. Add a "Recently Used" list of images from the library (similar to the texture note, above)
  7. Add the ability to update a campaign repository in addition to being able to export the campaign repository (currently on hold pending investigation into some testers not being able to upload assets; if you would like to test this, please PM me)
  8. Adding support for auto-saving the chat log on some periodic basis as chosen by the user. Initial UI support is in but does not have support code behind it.
  9. Adding support for the zoom level to be stored with each map. A separate but related issue is that the zoom level between the keyboard and mouse doesn't seem to stay in sync. (Check out this thread and this thread for discussion.)
  10. Disable the rest of the UI while the Test Connection is doing its thing.
  11. Add the ability of the AssetDirectory to detect when directory timestamps have been updated and auto-index new images.
  12. Add an option to auto-select the token that receives the initiative if it's owned by the current user.
  13. Add a checkbox that changes the Search textbox into a global search vs. just the currently library folder.
Completed:

The following patches are pending submission:
  1. Add confirmation dialog to right-click macro menu Reset option.
  2. Add check to Campaign Properties to disallow property names that differ only in their case.
  3. Modify Wiki: getPropertyNames() so that it returns mixed case variable names.
  4. Assets in RPToks were being written out as MIME64 encoded text instead of as binary images.
  5. Don't merge old assets from PackedFile into new PackedFile (unless requested?).
  6. Remove the Macro tab and all references to macros on the token editor dialog.
Last edited by Azhrei on Fri Mar 05, 2010 9:43 pm, edited 20 times in total.
Reason: Updated to latest status

User avatar
gioppo
Giant
Posts: 145
Joined: Tue Dec 16, 2008 9:09 am
Location: Torino (Italy)
Contact:

Luca Gioppo Activity

Post by gioppo »

In progress:
  • Adding import capability to Maptool to get data from PCgen-. this means create a sheet for exporting char from PCgen and a mod to MapTool to add a new menu, a new dialog and the import procedure to add the token; status: implemented, works, patch sent to Trevor and posted here, preparing a example sheet for PCgen to use in test.
Brainstorming and hacking:
  • Working on MBL idea
Completed:
  • Adding topology to token so that each token (not one's in TOKEN layer) can have a personal topology that moves with it and that gets copyed and so ont; you can see the following thread for info; status: implemented, works, sent Trevor the patch.
  • Adding topology to drawings (stuff done with the drawing tool) so that if you draw a rectangle you get automatically a topology rectangle in the same position and overlapped with it); status: implemented, works with all tools, submitted patch to Trevor (possibly for [b51]), updated patch sent.
  • Added change of path color when moved beyond max movement. Have to send the patch to Trevor.
Planning:
  • Adding a TimeManagement functionality in java so that it will be possible to have a calendar with function to keep it in synch with init and to record stuff (using joda_time for the time management ... I'm adding to it the Harptos chronology so that there will be the possibility at campaign level the chance to use a forgotten realm calendar or a normal ISO); plan to add a serialize calendar (or export) also import function, something to display (I'm thinking something like a timeline more than a calendar)
  • Would like to work on movement cost associated to drawing, but still really bogging on some things
Last edited by gioppo on Fri Jun 04, 2010 1:11 pm, edited 7 times in total.

Craig
Great Wyrm
Posts: 2107
Joined: Sun Jun 22, 2008 7:53 pm
Location: Melbourne, Australia

Re: Developer Guide (works-in-progress, guidelines, etc)

Post by Craig »

Edit: Updated Feb 04

Here is a list of the stuff I am doing/still plan to do.
Its a random mismash of bug fixes and requests that have piled up. Normally I would try separate the bug fixes from the new stuff but since a lot of it is all in the same parts of the code any attempt to do so is most likely doomed. I am sure this will conflict with others stuff so I don't mind asking Trevor to try apply this patch last, then when it fails, er I mean if, tell me so I can update latest from SVN and fix up the patch and resend it.

Completed but most of it needs more testing
  • Correcting a lot of null pointer problems in macro code.
  • Correcting a lot of error messages in macro function code (cut and paste has gotten its way in some places, and others need a clean up ;) ).
  • Fixed bug which allows anyone to call removeAllFromInitiative((), removeAllPCsFromInitative(), removeAllNPCsFromInitaitive().
  • Fixed memory leak in edit token macro button dialog.
  • Initiative functions are now trusted macro functions, not GM only.
  • getProperty() now returns the evaluated property or the default (if it exists) if there is no value. (Since everyone wanted to use it that way anyways :))
  • getRawProperty() added to do what getProperty() previously did :)
  • Properties with default values are no longer prompted for in mouse over stat sheet if not set, instead the default value is used.
  • Getting a token property (via either getProperty() or val = prop) will now always return the default value (if there is one) where there is no value for the property. Previously it had depended on if the edit token dialog had been opened or not.
  • Fully trusted macros now work for impersonated panel/selection panel.
  • Preference option to set the foreground/background color for player/token name in fully trusted macro so you can distinguish them.
  • Tooltips now pop up quicker and stay on the screen for longer.
  • Preference option to adjust timing values of tooltips.
  • Added trusted function getInitiativeToken() which returns the ID of the token with initiative.
  • Added trusted function removeMacro() which can remove the macro button from a token.
  • json.contains() now also works for arrays.
  • Added json.sort() to sort arrays.
  • Added json.shuffle() to shuffle arrays.
  • Added function getTokenStates() which returns an enumeration of all the valid token states.
  • Added json.indent() to indent json code for easier viewing/debugging.
  • Added trusted function getDistance() which returns the distance between tokens.
  • Added trusted function getDistanceXY() which returns the distance between a token and a x,y point.
  • Added getLocation() which returns the x,y,z location of a token.
  • json.get() can be used to return array slices.
  • json.get() can be used to return multiple keys in a json object (the return value is another json object).
  • Many macro functions have been modified to accept an optional argument to specify which token to operate on to make life a lot easier (you can only do this when macro is trusted).
  • trusted getTokens() function can accept a json object which specifies multiple conditions for retrieving a list of tokens. (e.g. NPC and state Dead is not set and Visible).
  • getMacroButtonIndex() to return the index of the button that was clicked.
  • Fixed macro functions repaint bugs introduced in b50 with the demise of the auto repaint thread.
Other stuff that has been requested that I still need to do (if it is possible to do without major hacks)
  • Add function moveToken()
  • Add function goto()
  • Add functions getAngle() (or getHeading()) and getMagnitude() (or some better name) for getting a vector representation of distance to token/x,y.
  • Add functions getFacing()/setFacing()
  • Add an argument to getMacros() to return all macros in a group.
  • [gm(): ] [whisper(): ] [twhisper(): ] [self(): ]
  • OnClick call back for objects (synchronization will have to be handled by macro writer at this point)
  • Some sort of macro alias to make on the fly usage of callable macros easier
  • Server Policy for [ ], do they default to [e: ] or [t: ]
  • Make JSON usable for macro links.
  • Make JSON usable or dialog forms.
  • Make trusted/Fully trusted macros work with campaign macros.
Bugs still to fix
  • Parser/JSON conflict for single element JSON arrays.
  • Fix macroLink error messages when macro does not exist
  • macro.args should always default to "" not just when a macro is called.
  • Fix problems in several macro functions where some change in b50 caused them to no longer propagate changes to all clients.
Stuff I would like to add for myself (hey don't I get a chance to add something I want, I promise others will find it useful ;) )
  • User definable tooltips for macro buttons.
  • A new server policy "Lock Player Token Movement to Init" (only some how shorter text), that will allow players to only move the token that currently has initiative if it is set.


Apart from that I would REALLY like to clean up MapToolLineParser, and remove the { } stack overflow bug, but not sure if I will get the time...

I am sure I forgot something and I will get a PM or two as a reminder :)
Last edited by Craig on Tue Feb 03, 2009 11:38 pm, edited 1 time in total.

User avatar
Arael
Cave Troll
Posts: 53
Joined: Tue Jul 01, 2008 9:32 pm

Re: Developer Guide (works-in-progress, guidelines, etc)

Post by Arael »

Here is a list of the stuff I am doing (Is small I start to develop in maptool not long ago):

Almost complete, still more testing
  • Adding the functionality to auto execute a macro when the token gain the initiative
  • Fixing bug in the Macro tab in the Token Edition Dialog

User avatar
applekor
Giant
Posts: 154
Joined: Thu Jul 03, 2008 3:52 pm
Location: Not Here

Re: Developer Guide (works-in-progress, guidelines, etc)

Post by applekor »

I don't remember some of the smaller/older stuff I've worked on but:

Completed Features:
[1.3b49] Editable Common Macros
[1.3b49] Macro Commonality Customization
[1.3b49] Tokens Affected by Macro Halo
[1.3b50] Table Import/Export
[1.3b54] FREQ: Add an option to allow tables to be hidden from players.

Works In Progress (in order of priority):
[1.4b?] FREQ: Allow macros to be specified as hidden. Add a macro visibility toggle to panels that keys off of macro "hidden" flags.
[1.4b?] FREQ: Allow a token to run one or multiple macros when double-clicked, instead of opening the edit dialog (Still getting community opinions on functionality and interface)
[1.4b?] FREQ: Campaign panel revamp. Add a GM panel with macros that reside in campaign properties but are only visible to a GM. The original campaign panel would still hold player accessible macros.
[1.4b?] Third Party Table Import/Export (I am starting with .csv, we'll see where it goes from there)

Completed Personal Stuff That Will Never Be In An Official Release:
JSR223 Scripting Support (in particular, JavaScript)
Token Self Macro Type (outputs only to token owners and GMs)
Last edited by applekor on Fri Apr 17, 2009 8:45 am, edited 3 times in total.
"Should" is the biggest word in the English language.

"Just" is the second biggest word in the English language.

What I'm working on

User avatar
trevor
Codeum Arcanum (RPTools Founder)
Posts: 11311
Joined: Mon Jan 09, 2006 4:16 pm
Location: Austin, Tx
Contact:

Re: Developer Guide (works-in-progress, guidelines, etc)

Post by trevor »

Note
Please note that every developer needs to contact me directly before starting on a feature as I may have a specific implementation method that I'd like to see for that feature, or additional information that may make it easier, or harder.

I can be picky when it comes to patches, so be aware that I won't apply a patch simply because someone writes it.

That said, let the development flurry commence !
Dreaming of a 1.3 release

L P
Cave Troll
Posts: 92
Joined: Wed May 06, 2009 1:35 pm

Re: Developer Guide (works-in-progress, guidelines, etc)

Post by L P »

Well, I'm still a MT newbie but that isn't keeping me from diving in to playing around with development ("hey, I want it to do *this*''') and getting in over my head.

I'm starting with stuff "on my own recognizance" because until I've played around with the code and am more familiar with it, I think it makes sense to let the "old hands" fix/clean up the stuff already "in the queue" from player requests without shoving my oar in. This way, when I screw up by doing something remarkably & obviously stupid (most likely with server-level issues) no one is kept waiting for something they already wanted. :D


My two main interests seem to be:
(1) Interactive objects
(2) Making the environments player-specific (so that each player, even each character, would be able to see/do different things if the GM so chooses... requiring more party interaction, cooperation & communication).


IN PROGRESS:

Clickable objects which run macros when clicked. I've got this working... I need to test/debug it and then expand it to be player-specific (so that some players can click an object, others cannot). (Trevor-approved... no target version set yet).

Macro-editable player note window: basically done (it's actually a subset of the above) but oops, I realize while typing this that I never touched base with Trevor on this. It was the first dev I made when playing around with MT code. Needs more testing/experimenting before it's ready to be submitted to anyone, though it's simple enough that I think it's probably good to go. (The idea here is that, before popping up the hover pane, you could change the "player text" so that different players would see different info.)

Selectively Viewable Objects so that objects (or even PCs/NPCs) can be seen by some players but not others. I've got the basics of this working and have the GM interface up... I need to make support macros for it and then test & debug. Still waiting to hear more back from Trevor on this one though.

On-move macro (i.e. one that automatically is called when a token is moved). Sort of a trivial extension/adaption of what I'm already doing, so I stuck it in to my in-testing code just for fun. No idea if Trevor will want it put into MT or not.

A bunch of minor fixes/tweaks as I discover/need them.


CONSIDERING

These I'm just playing around conceptually with. In many cases, I have some fairly structured ideas already about how to do them. But they all need feedback (and/or vetoes) from Trevor still -- and that feedback after the final version of 1.3 is done, when he'll have time to give them that consideration and indicate how (or even if) he'd want it done.

Selectively audible effects: support for player-tailored "audibility" analogous to the "visibility" we currently have. (NB - this would not be implementing sound per se. I'd put some simple-minded sound routines in for testing purposes, obviously, but the idea would be to get this code conceptualized, debugged, and put in place so that whenever sound was officially put in to MT, this functionality could be dropped in as well. So it needs to be more or less independent of *how* sound is implemented, but ready to call on those 'official' routines if and when they are eventually added to MT.)

MULTIPLE LAYERS: (so not just the background/object/hidden/token presets.) Yeah, this is a biggie. Potentially hugely powerful, but also a real b***h of recoding/repackaging. Again, this needs feedback from Trevor (and probably others as well) -- and, anyway, it may be way beyond my pay grade -- and so I'm not really going to even consider doing anything 'official' on it until after 1.3 is done and Trevor can whup me upside the head for being an impertinent unknown newbie.

I just mention it here 'cause I find myself thinking about it a lot -- there is so much cool stuff that could be done were this in place -- and am curious about what other code tinkerers have thought on the subject.



and that's more than enough to be getting on with, I'm sure. :)
Last edited by L P on Sat May 23, 2009 9:15 pm, edited 2 times in total.

User avatar
galneweinhaw
Dragon
Posts: 481
Joined: Tue Jan 02, 2007 3:03 pm

Re: Developer Guide (works-in-progress, guidelines, etc)

Post by galneweinhaw »

Since there's a sticky post for it, I might as well collaborate =D

Everything below has been previously discussed with trevor.

Currently working through bugs for the release:
galneweinhaw = galileo newton einstein hawking


User avatar
Rumble
Deity
Posts: 6235
Joined: Tue Jul 01, 2008 7:48 pm

Re: Developer Guide (works-in-progress, guidelines, etc)

Post by Rumble »

Last edited by Rumble on Sat Mar 13, 2010 8:25 am, edited 14 times in total.

User avatar
aku
Dragon
Posts: 856
Joined: Wed Nov 15, 2006 9:03 am
Contact:

Re: Developer Guide (works-in-progress, guidelines, etc)

Post by aku »

completely new kid, but i fixed something, kinda sorta... i'll just sorta pick at the lil crumbs of broken stuff as i get my feet wet :D


currently working
Externalization for Localization (of the zation? :D)
Submitted work


applied patches

Clear global macro issues original thread
Opacity breaks over 255 units, original thread
Last edited by aku on Thu Nov 04, 2010 3:31 pm, edited 3 times in total.

gramathy
Kobold
Posts: 9
Joined: Mon May 25, 2009 6:03 am

Re: Developer Guide (works-in-progress, guidelines, etc)

Post by gramathy »

New to Maptool development (Hi, everyone!), started working on some bug fixes.
Working on various bug type fixes.

In Progress:
None

Patch Submitted:
1.3.b59 - Renaming default SightType name breaks vision.

cheesethulhu
Cave Troll
Posts: 26
Joined: Thu Aug 20, 2009 3:21 am

Re: Developer Guide (works-in-progress, guidelines, etc)

Post by cheesethulhu »

Note: Lots of threads apply to 1 and 2. If nobody has a better idea (feel free to PM me), I'll start a thread in "General>Developer Notes>Java Programming Info" with a patch people can try and comment on. Might not happen until after the weekend.
  • In progress:
    1. Modify map properties (background, grid, units per cell, etc.) (needs testing)
    2. Gridless auto-reveal (depends on #1) (needs testing; especially on Mac)
    3. Display units after movement distance (depends on #1)

chubinator
Cave Troll
Posts: 28
Joined: Sat Jan 09, 2010 7:45 pm

Re: Developer Guide (works-in-progress, guidelines, etc)

Post by chubinator »

Hello, MapTool newbie and hope to contribute.

In Progress Planned
  • A visual que when players are typing in chat. Too often, I can't tell if the DM is still typing or if he's now waiting for us. Perhaps just a little bubble icon over the token or line item in the init tracker to start.

Post Reply

Return to “MapTool”