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

User avatar
davout
Cave Troll
Posts: 78
Joined: Wed Oct 12, 2011 2:28 am

Re: DN's D&D4e Character Sheet Framework

Post by davout »

I've been changing the framework to meet my needs. So far so good until recently. When the char sheet is "activate/drawn what have you" I perform quite a bit of processes to update the sheet. In actuality I only need to run these process when something changes (conditions, feats, attributes, etc). So I want to run the processes only when something changes rather than every activation.

So each token has these two properties: modVer and sheetVer. Whenever something is changed modVer is incremented. Whenever sheet is activated is compare modVer and sheetVer. If they're different then the sheet needs to be reloaded.

When adding a feat it works. However, I can't get it to work when adding/removing conditions. The values in the properties are updated, but the sheet is not updated with the new values.

Anyway, my question is what should I do to insure the sheet is reloaded when adding/removing conditions?

I've tried putting [H, macro("Sheet@this"): json.set("", "Reload", 1)] in a couple different places but with no luck.

Thanks for any help.

And thanks for such an awesome system.

User avatar
francogp
Cave Troll
Posts: 66
Joined: Thu Feb 02, 2006 1:06 pm
Location: Mordor

Re: DN's D&D4e Character Sheet Framework

Post by francogp »

hi! great job with this framework!

I have a question. I use the official "alternative" rule for critic skill check (if you roll 20, add +5 to the final result, if you roll 1, substract 5 to the final result). What code line should I modify to do this? (I need a label saying "Critic" too)

Another thing.... for atl AC ability, you forgot INT (psych class)

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 »

I believe that AC already takes the best of DEX or INT.
So it wasn't needed as an option.
I am a special snowflake!

User avatar
francogp
Cave Troll
Posts: 66
Joined: Thu Feb 02, 2006 1:06 pm
Location: Mordor

Re: DN's D&D4e Character Sheet Framework

Post by francogp »

francogp wrote: I have a question. I use the official "alternative" rule for critic skill check (if you roll 20, add +5 to the final result, if you roll 1, substract 5 to the final result). What code line should I modify to do this? (I need a label saying "Critic" too)
nobody? :(

User avatar
MadJoker
Cave Troll
Posts: 55
Joined: Sat Mar 28, 2009 3:43 pm

Re: DN's D&D4e Character Sheet Framework

Post by MadJoker »

francogp wrote:
francogp wrote: I have a question. I use the official "alternative" rule for critic skill check (if you roll 20, add +5 to the final result, if you roll 1, substract 5 to the final result). What code line should I modify to do this? (I need a label saying "Critic" too)
nobody? :(
Assuming this rule is used only for Ability- and Skill-checks here is some code that does what you want. Just replace the "d20Check" macro on the "Lib:Execute" lib token with the code below.
d20Check@Lib:Execute

Code: Select all

<!-- d20Check-->
[H: DNT_Skill = json.get(macro.args, "Skill")]
[H: DNT_Ability = json.get(macro.args, "Ability")]
[H: DNT_AidTarget = json.get(macro.args, "Target")]
[H: DNT_RawMod = if(json.get(macro.args, "Mod") == "", 0, json.get(macro.args, "Mod"))]
[H: DNT_Mod = eval(string(DNT_RawMod))]
[H: DNT_ModFormat = "%{DNT_RawMod}(%{DNT_Mod})"]

<!-- Determines skill and ability to use-->
[H, if(DNT_Ability == "" && DNT_Skill != ""): DNT_Ability = json.get(json.get(DNA_SkillsList, DNT_Skill), 3)]
[H, if(DNT_Skill == ""): DNT_CheckPenalty = 0; DNT_CheckPenalty = if(json.get(json.get(DNA_AbilityScores, DNT_Ability), 3) == 1, if(DNA_CheckPenalty == "", 0, DNA_CheckPenalty), 0)]
[h, if(DNT_Skill == ""): DNT_SkillRating = 0; DNT_SkillRating = json.get(json.get(DNA_SkillsList, DNT_Skill), 2)]
[H: DNT_AbilityRating = json.get(json.get(DNA_AbilityScores, DNT_Ability), 2)]
[H: DNT_LvlBonusAdd = if(DNT_Ability == "", 0, DNA_LevelBonus)]

<!-- Assembles the Output numers-->
[H: Die = if(json.get(macro.args, "GMDieRoll") == "", 1d20, json.get(macro.args, "GMDieRoll"))] 
[H: Rating = DNT_AbilityRating + DNT_SkillRating + DNT_CheckPenalty + DNT_LvlBonusAdd + if(Die == 20,5,if(Die == 1,-5,0))]
[H: Mod = if(isNumber(DNT_RawMod) == 1, DNT_RawMod, strformat(DNT_ModFormat))]

<!-- Output Names-->
[H, if(DNT_Ability == ""): DNT_AbilityName = ""; DNT_AbilityName = json.get(json.get(getProperty("DNA_AbilityScores"), DNT_Ability), 0)]
[H, if(DNT_Skill == ""): DNT_SkillName = ""; DNT_SkillName = json.get(json.get(getProperty("DNA_SkillsList"), DNT_Skill), 0)]

[R: if(isGM() == 1 && getLibProperty("GMScreen", "Lib:Information") == 1, "<b>[Rolls behind the GM Screen]</b><br>", "")]
[R: getLibProperty("GameMessage", "Lib:Information")] [R: if(json.get(macro.args, "Output") == "", "", token.name + ":")] I make a [R: if(DNT_SkillName == "", DNT_AbilityName, "")] <span color="black">[R: macroLink(DNT_SkillName, "Info@Lib:Sheet", "none", json.set("", "WindowType", "Skill", "Skill", DNT_SkillName), currentToken())]</span> check [R: if(DNT_Skill != "" && json.get(macro.args, "Ability") != "", "together with " + DNT_AbilityName, "")] [R, if(DNT_AidTarget != ""), CODE:{to aid [R: getName(DNT_AidTarget)]};{[H: ""]}] and get a [R: if(Die == 20 || Die == 1,"<b>critical</b> ","")][R, if(json.get(macro.args, "HideRoll") == "1"), CODE:{[gt, st, t(Die + Rating + DNT_Mod): Die + Rating + Mod]};{[t(Die + Rating + DNT_Mod): Die + Rating + Mod]}].

User avatar
francogp
Cave Troll
Posts: 66
Joined: Thu Feb 02, 2006 1:06 pm
Location: Mordor

Re: DN's D&D4e Character Sheet Framework

Post by francogp »

MadJoker wrote:
francogp wrote:
francogp wrote: I have a question. I use the official "alternative" rule for critic skill check (if you roll 20, add +5 to the final result, if you roll 1, substract 5 to the final result). What code line should I modify to do this? (I need a label saying "Critic" too)
nobody? :(
Assuming this rule is used only for Ability- and Skill-checks here is some code that does what you want. Just replace the "d20Check" macro on the "Lib:Execute" lib token with the code below.
d20Check@Lib:Execute

Code: Select all

<!-- d20Check-->
[H: DNT_Skill = json.get(macro.args, "Skill")]
[H: DNT_Ability = json.get(macro.args, "Ability")]
[H: DNT_AidTarget = json.get(macro.args, "Target")]
[H: DNT_RawMod = if(json.get(macro.args, "Mod") == "", 0, json.get(macro.args, "Mod"))]
[H: DNT_Mod = eval(string(DNT_RawMod))]
[H: DNT_ModFormat = "%{DNT_RawMod}(%{DNT_Mod})"]

<!-- Determines skill and ability to use-->
[H, if(DNT_Ability == "" && DNT_Skill != ""): DNT_Ability = json.get(json.get(DNA_SkillsList, DNT_Skill), 3)]
[H, if(DNT_Skill == ""): DNT_CheckPenalty = 0; DNT_CheckPenalty = if(json.get(json.get(DNA_AbilityScores, DNT_Ability), 3) == 1, if(DNA_CheckPenalty == "", 0, DNA_CheckPenalty), 0)]
[h, if(DNT_Skill == ""): DNT_SkillRating = 0; DNT_SkillRating = json.get(json.get(DNA_SkillsList, DNT_Skill), 2)]
[H: DNT_AbilityRating = json.get(json.get(DNA_AbilityScores, DNT_Ability), 2)]
[H: DNT_LvlBonusAdd = if(DNT_Ability == "", 0, DNA_LevelBonus)]

<!-- Assembles the Output numers-->
[H: Die = if(json.get(macro.args, "GMDieRoll") == "", 1d20, json.get(macro.args, "GMDieRoll"))] 
[H: Rating = DNT_AbilityRating + DNT_SkillRating + DNT_CheckPenalty + DNT_LvlBonusAdd + if(Die == 20,5,if(Die == 1,-5,0))]
[H: Mod = if(isNumber(DNT_RawMod) == 1, DNT_RawMod, strformat(DNT_ModFormat))]

<!-- Output Names-->
[H, if(DNT_Ability == ""): DNT_AbilityName = ""; DNT_AbilityName = json.get(json.get(getProperty("DNA_AbilityScores"), DNT_Ability), 0)]
[H, if(DNT_Skill == ""): DNT_SkillName = ""; DNT_SkillName = json.get(json.get(getProperty("DNA_SkillsList"), DNT_Skill), 0)]

[R: if(isGM() == 1 && getLibProperty("GMScreen", "Lib:Information") == 1, "<b>[Rolls behind the GM Screen]</b><br>", "")]
[R: getLibProperty("GameMessage", "Lib:Information")] [R: if(json.get(macro.args, "Output") == "", "", token.name + ":")] I make a [R: if(DNT_SkillName == "", DNT_AbilityName, "")] <span color="black">[R: macroLink(DNT_SkillName, "Info@Lib:Sheet", "none", json.set("", "WindowType", "Skill", "Skill", DNT_SkillName), currentToken())]</span> check [R: if(DNT_Skill != "" && json.get(macro.args, "Ability") != "", "together with " + DNT_AbilityName, "")] [R, if(DNT_AidTarget != ""), CODE:{to aid [R: getName(DNT_AidTarget)]};{[H: ""]}] and get a [R: if(Die == 20 || Die == 1,"<b>critical</b> ","")][R, if(json.get(macro.args, "HideRoll") == "1"), CODE:{[gt, st, t(Die + Rating + DNT_Mod): Die + Rating + Mod]};{[t(Die + Rating + DNT_Mod): Die + Rating + Mod]}].
Thanks!!

Strat
Kobold
Posts: 1
Joined: Thu Feb 02, 2012 4:07 pm

Re: DN's D&D4e Character Sheet Framework

Post by Strat »

Hi DeviantNull !

First of all, a GREAT thanks for your work !
I know, this is not a one / single shot, but nevertheless, this a a great work !

Well, I start to use MapTool since yesterday and I have to admit that I'm a "little bit" lost with your framework.

I'm fact I'm using a framework slightly as yours as this is the v2.5 translated in French (thanks to Natha !).

Perhaps someone will be able to help me for few little problem which are :
- How can I create a new player ? I try to edit one, it work, but I cannot remove the skills. It mean that at the end the character is totaly wrong. So I try to create one from scratch, mean to choose all the option (I have a copy of the character with D&D4E Character Editor).
- How does a player can see his characteer sheet ? I did a test, mean I assigned a token to one player, this one can move it but cannot see the character seet.
- How can the player roll the dice ? Yeah, very basic question, but the player do not see the campagin toolbox, where the link to the character sheet/roll dice appears !

I'll say "that's it" !

I took a look to your first post of this topic, the FAQ, but I didn't found any help for my very basic question so thanks a lot to the one which will reply to me !

Jaxom
Kobold
Posts: 17
Joined: Mon Apr 05, 2010 7:38 pm

Re: DN's D&D4e Character Sheet Framework

Post by Jaxom »

This is probably an easy one...

How can I create a macro placed in the Campaign window that will perform the MacroLinks on the Character Sheet for selected token of the following functions "Hit Points" "Surge" "Initiative" "Rest" and "Conditions"

The reason:
I have an XP laptop that I run the games on and when changing from one selected token to another causes a delay as the information is being retrieved. On another computer running windows vista there's no delay at all, but this computer isn't portable. I may be upgrading to a new laptop but wanted a quick fix in case I don't get in time for the next game... the quick fix is to run the game with the Character Sheet closed.

Hope someone can help.

Thanks.

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 »

@Strat, 2.5 is nowhere close to the version that this thread talks about.

Some small answers would be, to roll dice just type in {1d20} but replace the { with [
I don't use the dice roll button.

As for the character sheet, if I remember right, you have to enable campaign macros when you start the server.
It's one of the options where you put in server name and password and enable uPNP and such.

That about all I can help you with if it helps at all.
I am a special snowflake!

User avatar
MadJoker
Cave Troll
Posts: 55
Joined: Sat Mar 28, 2009 3:43 pm

Re: DN's D&D4e Character Sheet Framework

Post by MadJoker »

Jaxom wrote:This is probably an easy one...

How can I create a macro placed in the Campaign window that will perform the MacroLinks on the Character Sheet for selected token of the following functions "Hit Points" "Surge" "Initiative" "Rest" and "Conditions"

The reason:
I have an XP laptop that I run the games on and when changing from one selected token to another causes a delay as the information is being retrieved. On another computer running windows vista there's no delay at all, but this computer isn't portable. I may be upgrading to a new laptop but wanted a quick fix in case I don't get in time for the next game... the quick fix is to run the game with the Character Sheet closed.

Hope someone can help.

Thanks.
There was a similar question already, which I answered. You can see my answer below. I added the rest as well.
MadJoker wrote:
mystara wrote:It gets rather annoying to repeatedly click on a user's character sheet and find/click the HP or conditions button to find/edit hit points and conditions.

Okay okay, I'm lazy and I want to maximise my screen space.

Is there any way I can add a campaign macro to pop up the relevant dialog boxes for editing HP/conditions when a character token is selected?
Well, to see the hit points you don't need to click the char sheet, the info is displayed in the stat sheet when you hover over a token. This way you don't even need to click it and the char sheet won't load. If you want to do it with a campaign macro you would still need to select the token, which loads the char sheet. So from here it would be one click either way. But if you have the charsheet hidden, then of course its more clicks. Anyway, here's a macro that does what you want:
Adjust Health

Code: Select all

<!--Adjust Health-->
[H: args = if(json.length(getSelected("json")) > 1, json.set("", "WindowType", "Health", "MacroTarget", "Multiple"), json.set("", "WindowType", "Health"))]
[H: adjustHP = macrolinktext("Entry@Lib:Sheet", "none", args, currentToken())]
[H: execLink(adjustHP)]
[H: abort(0)]
Add Conditions

Code: Select all

<!--Add Conditions-->
[H: selectedCount = json.length(getSelected("json"))]
[H, if(selectedCount > 1), CODE: {[H: abort(0)]}]
[H: addConditions = macrolinktext("HeaderConditionHeightSort@Lib:Sheet", "none", "", currentToken())]
[H: execLink(addConditions)]
[H: abort(0)]
Don't forget to check apply to selected tokens. The HP macro works for single or multiple tokens, the condition macro only for single tokens.
Surge

Code: Select all

<!--Surge-->
[H: selectedCount = json.length(getSelected("json"))]
[H, if(selectedCount > 1), CODE: {[H: abort(0)]}]
[H: usesurges = macroLinktext("Entry@Lib:Sheet", "none", json.set("", "WindowType", "HealingSurge"), currentToken())]
[H: execLink(usesurges)]
[H: abort(0)]
Initiative

Code: Select all

<!--Initiative-->
[H: args = if(json.length(getSelected("json")) > 1, json.set("", "WindowType", "InitiativeCheck", "MacroTarget", "Multiple"), json.set("", "WindowType", "InitiativeCheck"))]
[H: initiative = macrolinktext("Entry@Lib:Sheet", "none",args, currentToken())]
[H: execLink(initiative)]
[H: abort(0)]
Rest

Code: Select all

<!--Rest-->
[H: args = if(json.length(getSelected("json")) > 1, json.set("", "WindowType", "Rest", "MacroTarget", "Multiple"), json.set("", "WindowType", "Rest"))]
[H: rest = macrolinktext("Entry@Lib:Sheet", "none",args, currentToken())]
[H: execLink(rest)]
[H: abort(0)]

Jaxom
Kobold
Posts: 17
Joined: Mon Apr 05, 2010 7:38 pm

Re: DN's D&D4e Character Sheet Framework

Post by Jaxom »

MadJoker, those work perfectly.

I tried to scan through all the posts figuring someone had written code for them.

Thanks!

Jaxom
Kobold
Posts: 17
Joined: Mon Apr 05, 2010 7:38 pm

Re: DN's D&D4e Character Sheet Framework

Post by Jaxom »

I'm searching the thread for this one but someone might be able to find it quickly.

MadJoker's macro buttons work great, but one problem... after closing the dialog box the character sheet automatically opens back up and causing the delay I was hoping to get rid of.

My Fix:
I deleted (Exported) the code in Lib:Sheet under "Sheet Loader" Section "SheetLoadCheck" I just have to (import) the code back in when I want to use the character sheet.

Any suggestions for an easier workaround?

Thanks,

< Currently shopping for a new laptop which will help alleviate all this trouble I'm currently going through > :)

User avatar
MadJoker
Cave Troll
Posts: 55
Joined: Sat Mar 28, 2009 3:43 pm

Re: DN's D&D4e Character Sheet Framework

Post by MadJoker »

Jaxom wrote:I'm searching the thread for this one but someone might be able to find it quickly.

MadJoker's macro buttons work great, but one problem... after closing the dialog box the character sheet automatically opens back up and causing the delay I was hoping to get rid of.

My Fix:
I deleted (Exported) the code in Lib:Sheet under "Sheet Loader" Section "SheetLoadCheck" I just have to (import) the code back in when I want to use the character sheet.

Any suggestions for an easier workaround?

Thanks,

< Currently shopping for a new laptop which will help alleviate all this trouble I'm currently going through > :)
There is a very easy fix. Just replace Sheet@Lib:Sheet with the version below:
Sheet@Lib:Sheet

Code: Select all

<!-- Sheet-->
<!-- Macro to make sure that a selected token is actually owned by a player or the player is a GM to allow for a sheet redraw, otherwise the macro does nothing. Secondary check prevents reload if a dialog entry window is open this allows a GM to target tokens without their sheet changing

The forceload is to allow the campaign load to get far enough into the macro chain to allow the frame to be built and the onChangeSelection to start, otherwise the macro won't start unless on a token you own-->

[H: DNT_OwnedCurrent = listContains(getOwned(getPlayerName()), currentToken())]
[H: DNT_OwnedSelected = listContains(getOwned(getPlayerName()), getSelected())]

[H: DNT_CharacterType = isNumber(getProperty("DNA_CharacterType"))]

[H, if(json.isEmpty(macro.args) == 1): DNT_ForceLoad = 0; DNT_ForceLoad = json.get(macro.args, "ForceLoad")]

[R, if(	DNT_OwnedCurrent == 1 && isDialogVisible("EntryWindow") == 0 && isFrameVisible("Sheet") == 1 && DNT_CharacterType == 1 ||
		DNT_OwnedSelected == 1 && isDialogVisible("EntryWindow") == 0 && isFrameVisible("Sheet") == 1 && DNT_CharacterType == 1 || 
		isGM() == 1 && isDialogVisible("EntryWindow") == 0 && isFrameVisible("Sheet") == 1 && DNT_CharacterType == 1 || 
		DNT_ForceLoad == 1), CODE:
	{
		[H, macro("SheetLoadCheck@Lib:Sheet"): macro.args]
	};{
		[H: ""]
	}
]

Hidden Voice
Kobold
Posts: 3
Joined: Mon Jul 18, 2011 2:37 pm

Re: DN's D&D4e Character Sheet Framework

Post by Hidden Voice »

Really cool framework, but my problem is that I have no idea how to create new such as weapons, armor etc.

Could someone help me please?

Esheon
Giant
Posts: 115
Joined: Mon Dec 26, 2011 12:53 am

Re: DN's D&D4e Character Sheet Framework

Post by Esheon »

Hidden Voice wrote:Really cool framework, but my problem is that I have no idea how to create new such as weapons, armor etc.

Could someone help me please?
On the character sheet frame, go to the Equipment tab.
Click the icon to the right of "Create Item Container", and name the container. I typically use "Gear" for stuff that is worn or carried (like weapons and armour).
In the container you created, click "Add a Item", select the item type, then click "Save"

Fill in the window that pops up and save it, then you can equip the item in the "Equipped Items" section (if it is equippable, of course).

For mundane gear like rope/flint/torch/etc, I would just stick it in the "Equipment" section at the bottom.

Post Reply

Return to “D&D 4e Frameworks”