TokenMaker

We are always looking for new tools to create to help facilitate the table top gaming experience. Let us know if you have an idea for a new gaming tool you'd like to see. (Note: this is NOT for feature requests on existing tools!)

Moderators: dorpond, trevor, Azhrei

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

Re: TokenMaker

Post by Rumble »

The click-to-select targets capability is really growing on me. I haven't looked at TokenMaker for a while (I got caught up in my own projects; especially in importing Monster Manual 3 monsters), but I'm really liking the unowned selection feature in general (if I do say so myself).

I use it in conjunction with a targeting dialog that updates to show who is targeted and modifiers to be applied (I can't resist the urge to let people click checkboxes) but it's far simpler than the coding required for the various targeting options. One of the other reasons I use the popup is so I can remember who is attacking - that way, as a GM, I don't have to impersonate every token before I start selecting targets (I think yours works similarly).

User avatar
Blakey
Dragon
Posts: 778
Joined: Fri Mar 23, 2007 11:27 am
Location: Sussex, UK.

Re: TokenMaker

Post by Blakey »

Yeah, mine is dead simple - and wouldn't work without the players being able to select the monsters, so thanks for that! All they do is select themselves, press F12 to pop up their character sheet and then they are good to go. They then select the targets for their power, and simply click the weapon name under the power they want to use and it fires off that attack against each target selected.

We have chosen not to have dialog boxes pop up asking for conditional mods to attack and damage, but rather just have the framework tell us what AC etc we hit and how much we hit or missed by. That way it is easy to tell at a glance if you would have hit if you had combat advantage etc. It also tells us the damage done but doesn't auto apply it as there are too many times when you realise you got the damage wrong or should have missed when you thought you hit, etc. It works for us which is the main thing.

The biggest problem so far is that my PC token generation is restricted to what is in the DDi save file. For example, they recently decided to remove Healers Lore cleric feature from the all the healing spells. Not a great idea as in some of them like Healing Word, it should always be included. As my program can only go by what it sees in the save file it can't add this on, so we have to always remember healing lore when it's applicable.

Likewise the save file has no info about what happens on a miss, or about effects of powers so we need to deal with all that by hand.
The guy in the green hat.

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

Re: TokenMaker

Post by Rumble »

The lack of details to a power in the dnd4e file is frustrating; that's mostly why I haven't gone down the route of trying to parse one (also, the dnd4e files are very large, so it would probably take forever using a macro parser like I have). Importing from the compendium and applying the right modifiers on the fly has worked (but then, your approach and mine are very different!).

I'm thinking on how you could get the effect/miss/etc. data into your tokens, though - one thought is to create a property (you'd have to edit this manually, so it's a 'downtime' kind of thing) on the token that stores them as a JSON object - each key is a power name, and each value is just "Hit: blah blah<br>Miss: blah blah<br>Effect: blah blah". To create this, just have a simple input dialog with 4 fields: power name, hit, miss, effect. Or you could have a lot of fields (I think there's...hit, miss, effect, special, requirement, trigger, and sustain, actually).

Then, when the power is clicked on it, have part of the logic involved in rolling dice and displaying the result also say "oh, it's this power, let me fetch the relevant power details." It's not as clean as if it was all parsed from the beginning, but it would be there as a reminder when the results popped up. Anyway, just a thought - it wouldn't be "instant complete power info" but as you played and had time to enter these details, they'd be there for the future. Although...you replace the token every time it changes, right? If you level up, your workflow is to create a new token at that level? In that case, it wouldn't work unless you transfer the property over before replacing the older token.

User avatar
Blakey
Dragon
Posts: 778
Joined: Fri Mar 23, 2007 11:27 am
Location: Sussex, UK.

Re: TokenMaker

Post by Blakey »

Yeah, I've thought about some sort of property on the token that can be fiddled about with. It's definitely a good way to customise tokens but I really want to avoid it. I really want TokenMaker to take a DDi save file and instantly build a token that knows everything about the character.

I'm thinking that, longer term the way to go is to start parsing each power card (I get the power's HTML from the compendium for every power the character has) and then maybe adding things like status changes as a result. Again, one of the troubles with this is that although I calculate if you hit or miss, I don't want to auto force statuses on targets as there are no situational mods in play so you can't guarantee if you hit or missed.
The guy in the green hat.

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

Re: TokenMaker

Post by Rumble »

Blakey wrote:Yeah, I've thought about some sort of property on the token that can be fiddled about with. It's definitely a good way to customise tokens but I really want to avoid it. I really want TokenMaker to take a DDi save file and instantly build a token that knows everything about the character.

I'm thinking that, longer term the way to go is to start parsing each power card (I get the power's HTML from the compendium for every power the character has) and then maybe adding things like status changes as a result. Again, one of the troubles with this is that although I calculate if you hit or miss, I don't want to auto force statuses on targets as there are no situational mods in play so you can't guarantee if you hit or missed.
I agree - a single, one-time solution is better than having to enter stuff by hand afterwards.

I'd bypass automatic status changes in favor of simply displaying the "what happens next" text (a macro to set states is wickedly easy to write anyway, so you can just have that ready for the GM to use). Power cards from the compendium are very predictable, fortunately: regularly laid out and small, so it should be relatively simple and quick (and since you won't need to do any calculations on attack bonuses, you can just focus on the various info bits like hit, miss, and effect).

Please feel free to raid my frameworks for any regex expressions you're interested in, but really they should be pretty trivial to generate inside Java to extract the Effect text, for instance, and write that into the character sheet as well.

User avatar
Hawke
Great Wyrm
Posts: 2261
Joined: Sat Apr 21, 2007 12:12 am
Location: Albuquerque, NM

Re: TokenMaker

Post by Hawke »

Now that you're pretty far along in your process for your own FW, I'm wondering if there's chunks of code you've got fetching stuff from the compendium that couldn't be dropped into MapTool itself. Not necessarily all the details of token creation etc, but if there were macros attached to functions like

SetCompendiumLogin(username,password)
CompendiumPower(powername)
CompendiumFeat(Featname)

Then for something like Rumble's framework that already does character import, it could look at the list of powers it is already parsing and simply look them up for you using the compendium functions.

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

Re: TokenMaker

Post by Rumble »

Hawke, I'm not sure I'm following: how could java code be dropped into MapTool? And, since MapTool doesn't have any means to access the outside world (like the compendium), how would those functions...um...function?

What Blakey's tool does is take a dnd4e file or download a monster and create an RPTOK out of it, which you then drop into his framework; it doesn't run from inside MapTool.

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

Re: TokenMaker

Post by RPTroll »

I'm interested in doing something similar for Savage Worlds. From the folks that have read the code is this a simple or highly complex task?
ImageImage ImageImageImageImage
Support RPTools by shopping
Image
Image

User avatar
Hawke
Great Wyrm
Posts: 2261
Joined: Sat Apr 21, 2007 12:12 am
Location: Albuquerque, NM

Re: TokenMaker

Post by Hawke »

I mean add the tokenmaker java code for the compendium.called to maptools source code.

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

Re: TokenMaker

Post by Rumble »

Hawke wrote:I mean add the tokenmaker java code for the compendium.called to maptools source code.
Ahh...I misunderstood your post.

Blakey's tool could port that stuff, but I wouldn't do it, honestly. Wizards already C&D'd Masterplan for its compendium integration (where you could download the compendium data and keep it in libraries in Masterplan). Now, integrating it into MapTool wouldn't be to the same scale as Masterplan (Masterplan could download all the monsters, for instance) it would be the same basic activity - automating the download and storage the data in a file associated with MapTool, such activity made possible by MapTool.

I'd be leery about that.

User avatar
Hawke
Great Wyrm
Posts: 2261
Joined: Sat Apr 21, 2007 12:12 am
Location: Albuquerque, NM

Re: TokenMaker

Post by Hawke »

Yeah - sorry I ended my last post early too. I think the big issue with MP was the storage of the stuff w/o requiring a reconnect to the server. I wonder if there might be solutions to that. I also wonder if we built it such that if an invalid user/pass were sent the popup provided a link to DDI. I know we can look at it as a means to increase DDI sales and a positive thing, but I understand that wotc lawyers might not seem the same. Is it worth the work to integrate some of those generic classes/functions for calling the compendium and then rip it out of we get C&D'd?

I'll have to read up on the subject a little bit more, I think strongly that if wotc is playing the game consistently, this could be a huge integration point even if it was setup to require a DDI connection each time you play. I mean, they did setup the compendium to be externally webservice callable for a reason, we just have to figure out exactly the guidelines around it.

Blakey - sorry if I'm threadjacking here... if you're completely uninterested in the idea we can move it elsewhere.

User avatar
Blakey
Dragon
Posts: 778
Joined: Fri Mar 23, 2007 11:27 am
Location: Sussex, UK.

Re: TokenMaker

Post by Blakey »

No worries about discussing this here, it's all relevant.

Some massive issues with even considering putting TM code into MT:

1. MT is currently totally system agnostic. Adding TM into it would be only useful for D&D.
2. Parts of TM could be used to get stuff from the Compendium or Character Save files (that's what it does) but that is pretty much useless unless this info is used to build tokens and when you build tokens they are framework specific. I'm not even sure that the info I am currently getting is enough to populate a Rumble token or a Veggie token etc - although that could of course be expanded and improved.
3. The whole legal side of things. At the moment only I'm really using this and TM is only useful for creating tokens for my framework - so it's very specific. I am not sure how legal it becomes if it goes out there into the real world in a big way.

The discussion is interesting however!

Blakey
The guy in the green hat.

User avatar
Hawke
Great Wyrm
Posts: 2261
Joined: Sat Apr 21, 2007 12:12 am
Location: Albuquerque, NM

Re: TokenMaker

Post by Hawke »

Blakey wrote:1. MT is currently totally system agnostic. Adding TM into it would be only useful for D&D.
Agreed - initially it would only benefit the D&D community... though a template for how MapTool handles webservice calls could be used by other programmers to expand it to any similar services out there. Are there any similar types of services or reasons for webservice calls beyond DDI? Don't know if any indie folks have picked anything like this up.

I would suggest that system specific is okay if: 1) It doesn't interfere with agnostic elements... this clearly wouldn't as you could completely ignore the macros if you weren't interested.

2) System specific improvements should take a back seat to agnostic elements where a developer is looking at a choice... if you're doing this already, it may not be a huge choice.
2. Parts of TM could be used to get stuff from the Compendium or Character Save files (that's what it does) but that is pretty much useless unless this info is used to build tokens and when you build tokens they are framework specific. I'm not even sure that the info I am currently getting is enough to populate a Rumble token or a Veggie token etc - although that could of course be expanded and improved.
My vision would be to have the basic webservice calls built into MapTool via macros - only the things needed to capture the login information and then a few macros that would take in the request and reply back with a JSON object (is that redundent? what is the proper usage of that?) with the info. (or a string list as maybe an option).

That's it - how a person chose to take that info and interact with their own framework, create tokens, etc would be up to them to use that. It would be taking the legwork you went through to learn how java handles webservice calls to the Compendium API and make that aspect available to other developers who may not know java but could manipulate the macro code to get exactly the info they want.

Things like the parsing of the dnd4e file and the like wouldn't be included... it'd be up to the fw developer to do that (Rumble does a good job with his) and then use the functions to gather the info needed to populate rather than pasting in each individual power.
3. The whole legal side of things. At the moment only I'm really using this and TM is only useful for creating tokens for my framework - so it's very specific. I am not sure how legal it becomes if it goes out there into the real world in a big way.
I don't think it would be fundamentally different than your current project, and if one is C&D-able then the other is. Depending on the workload involved, I think worse comes to worse the compendium stuff could be removed - lost time. I think a code of conduct requiring all rptools-linked frameworks using compendium-created tokens require a fresh compendium login or something could be achieved, and any MT scripts expressly used to attempt to mass-download and store the compendium info would be removed. Frameworks would not locally store lists of weapons and powers downloaded, though the tokens would have the relevant information - but if you created a new token you couldn't go in and select from powers w/o a new compendium connection.

User avatar
jfrazierjr
Deity
Posts: 5176
Joined: Tue Sep 11, 2007 7:31 pm

Re: TokenMaker

Post by jfrazierjr »

Hawke wrote: My vision would be to have the basic webservice calls built into MapTool via macros - only the things needed to capture the login information and then a few macros that would take in the request and reply back with a JSON object (is that redundent? what is the proper usage of that?) with the info. (or a string list as maybe an option).

That's it - how a person chose to take that info and interact with their own framework, create tokens, etc would be up to them to use that. It would be taking the legwork you went through to learn how java handles webservice calls to the Compendium API and make that aspect available to other developers who may not know java but could manipulate the macro code to get exactly the info they want.
While web services are not extremely hard, I really don't think that they are easy enough to fit int any macro based paradigm. There are just way to many possible options that this sort of thing really needs to be implemented via direct java coding. One a side note, one of the most important things in 1.4 is plugin architecture which would be exactly where something like this should reside if someone wanted to plug it into MT.
I save all my Campaign Files to DropBox. Not only can I access a campaign file from pretty much any OS that will run Maptool(Win,OSX, linux), but each file is versioned, so if something goes crazy wild, I can always roll back to a previous version of the same file.

Get your Dropbox 2GB via my referral link, and as a bonus, I get an extra 250 MB of space. Even if you don't don't use my link, I still enthusiastically recommend Dropbox..

User avatar
Hawke
Great Wyrm
Posts: 2261
Joined: Sat Apr 21, 2007 12:12 am
Location: Albuquerque, NM

Re: TokenMaker

Post by Hawke »

jfrazierjr wrote:While web services are not extremely hard, I really don't think that they are easy enough to fit int any macro based paradigm. There are just way to many possible options that this sort of thing really needs to be implemented via direct java coding. One a side note, one of the most important things in 1.4 is plugin architecture which would be exactly where something like this should reside if someone wanted to plug it into MT.
Maybe I'm misunderstanding the compendium... but...

1) CompendiumSearch("Power","Cleave")
2) Looks up http://www.wizards.com/dndinsider/compe ... &tab=power
3) Returns the ID(s) or for the one I want 992
4) CompendiumPower(992,"json")
5) Looks up http://www.wizards.com/dndinsider/compe ... spx?id=992
6) returns JSON verson of the above

The framework developer can then strip what it needs to from that. Now obviously I'm using the GET methods in the above example, but there you have it.

Post Reply

Return to “Ideas for New Applications”