DN's D&D4e Character Sheet Framework

Framework(s) for D&D 4e, including Veggiesama's.

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

jffdougan
Cave Troll
Posts: 55
Joined: Mon Jan 04, 2010 1:50 pm
Location: Central IL

Re: DN's D&D4e Character Sheet Framework

Post by jffdougan »

I suspect the answer is probably not, but....

Is there a straightforward way to attach a macro to one token that calls on properties of another token? For example, can I attach the attack power of a summons to the summoned creature and have it refer back to my statistics to keep the calculating up to date?
LFR Characters:

Tiernan, Vestige'lock 9
[spoiler=Tiernan's adventure wishlist]CORE 1-12 (H3), AGLA 2-1 (H3)[/spoiler]
Calisto, Arcas, Ganymede, & Thalia, Half-elf Sentinel Druid 2 and wall of fur
Knossos, Minotaur Lifespirit Warden 1

DeviantNull
Dragon
Posts: 685
Joined: Wed Sep 03, 2008 12:34 pm
Location: The Junkyard

Re: DN's D&D4e Character Sheet Framework

Post by DeviantNull »

Merkuri wrote:I seem to have done something wrong to a power (I was experimenting with using variables like =(INT)) and now I can't edit it. When I click on it on the sheet I get a null pointer exception.

Is there a way I can strip out that power or just clear the "Effect" section of it so it becomes usable again? I'd prefer to be able to recover it so I don't have to recreate it, but if there's a way I can just delete it that would be okay.


I've been really busy and not actively playing lately, which is why I haven't been around... Thankfully most of the stuff that's been asked can be resolved/figured out/fixed by others who either know how this thing works by using it or understand the MT code.

But this Q might be a bit harder for other folks to answer. Ultimately, the answer is yes. The easiest solution is to use the framework itself and copy all the OTHER powers to a new power group and then delete the old group with the broken power. This could be a little time consuming but the alternative, while possibly faster, requires using MT macro code by hand...

First, there is DNA_PowerGroupIndex which holds a list of all the index numbers for the different power groups on a token - getProperty("DNA_PowerGroupIndex") will return it. Then you have to match the index to the right power group, they should be in the same listed order as the groups on the sheet (since it just iterates through the list itself). Then once you have the group index you can use it to retrieve its index of all the powers it holds which is stored in DNA_PowerGroup# where # is the index # for that group. That will be a list of all the index numbers for all the powers stored in that group - it should be in the same order as the powers are listed in the group. Each power is then individually stored as DNA_Power# where # is the index number; thus you could use json.get(getProperty("DNA_Power#"), "Name") to return the name of the power stored in that index slot. To remove a power you need to remove it's index # from the power group index it's stored in. Lastly there's a DNA_PowerIndex which is a master index list of all powers on a token, it's mainly there to prevent powers from having the same index # and overwriting each other - optimally you'll want to remove the power index # from there as well and possibly delete the DNA_Power# property for complete clean up of power removal.

However, aside from simply deleting and removing the power from the list, if you know what you're doing and can read and unravel the json object that makes up the power you can likely remove the offending bit directly and make a new DNA_Power# repairing it.

DeviantNull
Dragon
Posts: 685
Joined: Wed Sep 03, 2008 12:34 pm
Location: The Junkyard

Re: DN's D&D4e Character Sheet Framework

Post by DeviantNull »

jffdougan wrote:I suspect the answer is probably not, but....

Is there a straightforward way to attach a macro to one token that calls on properties of another token? For example, can I attach the attack power of a summons to the summoned creature and have it refer back to my statistics to keep the calculating up to date?


While it is possible for one token to access and modify the properties on another token, doing this sorta thing is messy and hard last I was aware of it. Basically it's a limitation of the Maptools macrocode as the internal ID #'s for tokens change every time they change map so there is no permanent way to reference them.

Easiest cheese solution is to just make its powers a group of powers on the summoners token since the powers are based on the summoners stats and not the summoned critter.

jffdougan
Cave Troll
Posts: 55
Joined: Mon Jan 04, 2010 1:50 pm
Location: Central IL

Re: DN's D&D4e Character Sheet Framework

Post by jffdougan »

DeviantNull wrote:Easiest cheese solution is to just make its powers a group of powers on the summoners token since the powers are based on the summoners stats and not the summoned critter.


That's about what I expected. Thanks.
LFR Characters:

Tiernan, Vestige'lock 9
[spoiler=Tiernan's adventure wishlist]CORE 1-12 (H3), AGLA 2-1 (H3)[/spoiler]
Calisto, Arcas, Ganymede, & Thalia, Half-elf Sentinel Druid 2 and wall of fur
Knossos, Minotaur Lifespirit Warden 1

User avatar
PinkRose
Dragon
Posts: 732
Joined: Sat Nov 15, 2008 2:28 pm
Location: The City of Roses, Oregon

Re: DN's D&D4e Character Sheet Framework

Post by PinkRose »

Easiest cheese solution is to just make its powers a group of powers on the summoners token since the powers are based on the summoners stats and not the summoned critter.


OMG (that's an actual word now, http://mashable.com/2011/03/24/oed-omg-lol/) that is such a great idea DN, I can't believe that didn't occur to me.
I am a special snowflake!

Kannon
Kobold
Posts: 3
Joined: Sat Apr 02, 2011 11:03 am

Re: DN's D&D4e Character Sheet Framework

Post by Kannon »

First, have to say, I love the framework. Blows the pants off of Fantasy Grounds.

Just out of curiosity, I'm wondering about adding a feature. (Apologies if this has been suggested and shot down before, I may have skimmed a bit.) Something to have a generic, tweak-able power, that'll show up like a normal power would in the chat box. Maybe a link to click right before the power lists that'll bring up a target window as typical, with another header above it for which stay, plus/minus what, against what defense, and how much of what type of damage on a hit.

It'd help me out a bit, since I'm one of those DMs that tends to use the attack pattern to do crazy things like: Want to jump over the table and kick the cultist in the jimmies to stun him? Acrobatics check, then strength versus fortitude attack, stun on hit. I also like terrain powers, and it'd make them easier for a player to use. I can add the conditions manually, so that's not a big deal, (Maybe version 1.2, if it works.)

Most importantly, I'm willing to take a crack at implementing it... but I'm lost in the fog about where and what exactly to look at. Maybe somewhere in Lib:Sheet, under the powers section? The main questions I have are:

If I wanted to add a button to the powers page to do this, where would I add it, and could I add it without breaking everything?

Second, where is the target window implemented? I'm pretty sure I can work out the window-y-ness and setting modifiers from there. I just have no idea where there is.

If I'm missing TFM, feel free to tell me to go read it, because I must have overlooked it, I won't be offended. (Or just tell me it's an idiotic idea that wouldn't work, I'd be okay with that, too.)

DeviantNull
Dragon
Posts: 685
Joined: Wed Sep 03, 2008 12:34 pm
Location: The Junkyard

Re: DN's D&D4e Character Sheet Framework

Post by DeviantNull »

Kannon wrote:If I'm missing TFM, feel free to tell me to go read it, because I must have overlooked it, I won't be offended. (Or just tell me it's an idiotic idea that wouldn't work, I'd be okay with that, too.)


Crap, I've been meaning to reply to this for like 2 days now, sorry. There isn't really a manual aside from the gonzo first few posts where I try to explain how things work and my in macro comments are garbage in a lot of places.

Previously I had an option to make the attack & damage attributes for powers variable (to help simulate Rangers and similar), but IIRC (and a quick look at the code) indicates I stripped it out... likely because it added a bit of overhead to the execution and there weren't a lot of powers that used it so I nixed it. However, such a thing is do-able - basically, IIRC, it's just a matter of adding in an extra option on the drop down for power building and again on the targeting box and then using THAT selection in execution. A similar thing could be done for Defense if one really wanted to.

Damage wouldn't need to be modded much as I'm pretty sure the Attack & Damage modifier boxes already except and evaluate MT dice codes; though they suffer from the limitation of not being able to break down the specifics of the roll.

If one is wanting to hack at the code, typically macros oriented towards entry and management of things ON the sheet are on lib:sheet, things that execute are stored on lib:dice. The pages typically have 'Sheet' at the start of their name and the sub lists tend to be appended with 'List'. So to add to the Powers Page (or tab or whatever you want to call it) would be 'SheetPowers' but if you wanted to modify the entry for the way powers are displayed you want 'PowersList'. If you want a generic entry that is always displayed you'll probably want to modify the SheetPowers page itself and likely do it by copying the format for power entries off PowersList.

I tried to have a universal naming scheme for the macros, typically if it's an entry dialog box of some sort it'll end in 'Entry' (since there's a universal macro that builds the box), if it displays in the info box it ends in 'Info' (for similar reasons), macros that save information to the token end in 'Edit', and macros that do things are 'Use'. If more then one macro is needed due to {} cascade limits it'll have a # instead of Entry or whatever. There are also 'Sort' macros that tend to be IF statements to figure out which Entry type macro needs to load or similar. Macros that actually roll dice typically have 'Check' at the end.

So... The target entry dialog is probably the most complex as PowerUseSort figures out the bits of the power and what dialogs it'll need and then assuming it doesn't need multiple attacks OR has NO attacks, calls PowerUseModsEntry (cause Mods for Modifiers) which builds the basic dialog but calls PowerUseMods2 to build the attack & damage entry portion due to it needing to be in a loop for multiple attacks; however there is also PowerUseModsDamage for cases where no attack is needed but target & damage is. Then that dialog box calls PowerUseCheck on Lib:Dice to perform the actual Power execution (which, in turn, also usually needs to call PowerUseAttacks on Lib:Dice to run the actual attack&damage code). Simple, neh? ;)

paperbard
Kobold
Posts: 3
Joined: Mon Apr 11, 2011 1:13 pm

Re: DN's D&D4e Character Sheet Framework

Post by paperbard »

Hi there, I have a newb questions. Your framework mentions initiative, and it says that a character is already part of the initiative order when I roll it more than once. The question I have is, as a DM or as a player, how do I see the initiative order?

EDIT: Nevermind, saw that there was an initiative dialogue menu.

User avatar
PinkRose
Dragon
Posts: 732
Joined: Sat Nov 15, 2008 2:28 pm
Location: The City of Roses, Oregon

Re: DN's D&D4e Character Sheet Framework

Post by PinkRose »

Oh, I got a new request.

Is there a way to get the Traits and Powers Group to default to always be open for monsters?
I am a special snowflake!

caliber
Kobold
Posts: 6
Joined: Mon Apr 11, 2011 12:27 pm

Re: DN's D&D4e Character Sheet Framework

Post by caliber »

Hello! Awesome framework! I have a few questions re: it though, that I fully admit might be 100% retarded. My apologies for this; I'm a complete n00b when it comes to MapTools despite having used it for quite some time.

Anyway:

1) Is there a way to keep my players from being able to click an NPC token and see the stats page for it? I'd be ok if they could see it if I granted them permission (say, after a sufficiently high knowledge check) but I don't like it as a default.

2) How do I setup a player's token to have their stats on all maps? That is, I have edited my player's characters stats into tokens on one map, but when I switch to the next map and bring their token images from the library, the stats are not attached. How do I make the library tokens retain the stats I assign?

3) How do I disable the roll behind GM Screen feature? I've looked but cannot find the location of the macro to do so.

Thanks again for this awesome framework. My mind boggles at the effort building this thing must have taken!

User avatar
PinkRose
Dragon
Posts: 732
Joined: Sat Nov 15, 2008 2:28 pm
Location: The City of Roses, Oregon

Re: DN's D&D4e Character Sheet Framework

Post by PinkRose »

1) Is there a way to keep my players from being able to click an NPC token and see the stats page for it? I'd be ok if they could see it if I granted them permission (say, after a sufficiently high knowledge check) but I don't like it as a default.
Are you talking about the sheet itself, or the little float-over pop-up that is attached to the portrait?

2) How do I setup a player's token to have their stats on all maps? That is, I have edited my player's characters stats into tokens on one map, but when I switch to the next map and bring their token images from the library, the stats are not attached. How do I make the library tokens retain the stats I assign?
This one I don't understand. If you take the tokens you edited, or even copies of the tokens you edit, they should have all the the stats. I've never had them not keep the stats.

3) How do I disable the roll behind GM Screen feature? I've looked but cannot find the location of the macro to do so.
On the Lib:Information Token, under 1.Utilities, Click GMScreen
I am a special snowflake!

caliber
Kobold
Posts: 6
Joined: Mon Apr 11, 2011 12:27 pm

Re: DN's D&D4e Character Sheet Framework

Post by caliber »

PinkRose wrote:1) Is there a way to keep my players from being able to click an NPC token and see the stats page for it? I'd be ok if they could see it if I granted them permission (say, after a sufficiently high knowledge check) but I don't like it as a default.
Are you talking about the sheet itself, or the little float-over pop-up that is attached to the portrait?


Both, honestly, although the sheet itself is more problematic then the pop-up in my view.

PinkRose wrote:2) How do I setup a player's token to have their stats on all maps? That is, I have edited my player's characters stats into tokens on one map, but when I switch to the next map and bring their token images from the library, the stats are not attached. How do I make the library tokens retain the stats I assign?
This one I don't understand. If you take the tokens you edited, or even copies of the tokens you edit, they should have all the the stats. I've never had them not keep the stats.


Hmm, perhaps I'm going about this the wrong way then. Instead of adding tokens from the resource library on new maps, should I be highlighting edited tokens and copy+pasting? I'll try to experiment some more this evening to make sure I really understood the behavior I was seeing.

PinkRose wrote:3) How do I disable the roll behind GM Screen feature? I've looked but cannot find the location of the macro to do so.
On the Lib:Information Token, under 1.Utilities, Click GMScreen


Thanks! :D

User avatar
Merkuri
Giant
Posts: 194
Joined: Sat Feb 28, 2009 3:20 pm
Location: Massachusetts, USA

Re: DN's D&D4e Character Sheet Framework

Post by Merkuri »

caliber wrote:1) Is there a way to keep my players from being able to click an NPC token and see the stats page for it? I'd be ok if they could see it if I granted them permission (say, after a sufficiently high knowledge check) but I don't like it as a default.
Are you talking about the sheet itself, or the little float-over pop-up that is attached to the portrait?

Both, honestly, although the sheet itself is more problematic then the pop-up in my view.


If your players do not own a token then they cannot see its sheet or the full stats popup. Make sure when you start the server that you have individual token ownership turned on (whatever that option is called - I can't check at the moment).

caliber wrote:2) How do I setup a player's token to have their stats on all maps? That is, I have edited my player's characters stats into tokens on one map, but when I switch to the next map and bring their token images from the library, the stats are not attached. How do I make the library tokens retain the stats I assign?
This one I don't understand. If you take the tokens you edited, or even copies of the tokens you edit, they should have all the the stats. I've never had them not keep the stats.

Hmm, perhaps I'm going about this the wrong way then. Instead of adding tokens from the resource library on new maps, should I be highlighting edited tokens and copy+pasting? I'll try to experiment some more this evening to make sure I really understood the behavior I was seeing.


Were you saving the tokens after you added the sheet to them? That has worked for me. Right-click on the fully set-up token and click Save. Save it somewhere in your library. Now, when you drag it out of your library again it should have the sheet attached.

There's no link between an item in the library and an item on your map. When you drag something from the library into your map you're making a copy of it. You can change it all you want in the map, but if you don't save it back into your library then the next time you copy it out of your library it'll look just like it did when you first copied it. You'll lose the changes you made to it in MapTool.
Adventure is not outside; it is within.
--Found in a fortune cookie on game night

MapTool Framework for Sufficiently Advanced

caliber
Kobold
Posts: 6
Joined: Mon Apr 11, 2011 12:27 pm

Re: DN's D&D4e Character Sheet Framework

Post by caliber »

Merkuri wrote:
caliber wrote:1) Is there a way to keep my players from being able to click an NPC token and see the stats page for it? I'd be ok if they could see it if I granted them permission (say, after a sufficiently high knowledge check) but I don't like it as a default.
Are you talking about the sheet itself, or the little float-over pop-up that is attached to the portrait?

Both, honestly, although the sheet itself is more problematic then the pop-up in my view.


If your players do not own a token then they cannot see its sheet or the full stats popup. Make sure when you start the server that you have individual token ownership turned on (whatever that option is called - I can't check at the moment).


Hmm interesting. I can't honestly say whether I was clicking that option or not; will double check! Thanks for the tip though. As an aside, is there a way to let players move my NPC tokens (preferably without having to give them ownership, and thus all of my secrets?) I ask because one player is running a very pushy Psion and it'd be a lot easier to let him just move the monsters to where his character is shoving them ...

Merkuri wrote:
caliber wrote:2) How do I setup a player's token to have their stats on all maps? That is, I have edited my player's characters stats into tokens on one map, but when I switch to the next map and bring their token images from the library, the stats are not attached. How do I make the library tokens retain the stats I assign?
This one I don't understand. If you take the tokens you edited, or even copies of the tokens you edit, they should have all the the stats. I've never had them not keep the stats.

Hmm, perhaps I'm going about this the wrong way then. Instead of adding tokens from the resource library on new maps, should I be highlighting edited tokens and copy+pasting? I'll try to experiment some more this evening to make sure I really understood the behavior I was seeing.


Were you saving the tokens after you added the sheet to them? That has worked for me. Right-click on the fully set-up token and click Save. Save it somewhere in your library. Now, when you drag it out of your library again it should have the sheet attached.

There's no link between an item in the library and an item on your map. When you drag something from the library into your map you're making a copy of it. You can change it all you want in the map, but if you don't save it back into your library then the next time you copy it out of your library it'll look just like it did when you first copied it. You'll lose the changes you made to it in MapTool.


Ah hah! This sounds like what I was doing wrong. I ... uh ... didn't know I could click on an edited token and save it back to the library. :oops: Did I mention I was a MapTools n00b?

User avatar
Merkuri
Giant
Posts: 194
Joined: Sat Feb 28, 2009 3:20 pm
Location: Massachusetts, USA

Re: DN's D&D4e Character Sheet Framework

Post by Merkuri »

Well, you can let them move the tokens if they own them, but then they can see the sheet. I don't think you can move without ownership.

Do you know that you can hold down the space bar over the map to show an arrow? Your "pushy" player can use that to show you where he's pushing the NPCs.

You don't need to apologize for being a "newb". We've all been there. :)
Adventure is not outside; it is within.
--Found in a fortune cookie on game night

MapTool Framework for Sufficiently Advanced

Post Reply

Return to “D&D 4e Frameworks”