RPTools.net

Discussion and Support

Skip to content

It is currently Wed Nov 22, 2017 2:25 am 






Reply to topic  [ 524 posts ]  Go to page Previous  1 ... 27, 28, 29, 30, 31, 32, 33 ... 35  Next

Previous topic | Next topic 

  Print view

Author Message
User avatar  Offline
Cave Troll
 
Joined: Wed Oct 12, 2011 1:28 am
Posts: 78
 Post subject: Re: DN's D&D4e Character Sheet Framework
PostPosted: Sat Dec 10, 2011 6:44 pm 
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.

_________________
My Stuff:
-- Easy navigation Maptool macro function doc
-- Bracket Checker
-- Notepad++ code completion for maptool macro language


Ramblings of a Dead Marshal: http://louis-davout.blogspot.com/


Top
 Profile  
 
User avatar  Offline
Cave Troll
 
Joined: Thu Feb 02, 2006 1:06 pm
Posts: 66
Location: Mordor
 Post subject: Re: DN's D&D4e Character Sheet Framework
PostPosted: Tue Jan 03, 2012 9:49 pm 
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)


Top
 Profile  
 
User avatar  Offline
Dragon
 
Joined: Sat Nov 15, 2008 2:28 pm
Posts: 820
Location: The City of Roses, Oregon
 Post subject: Re: DN's D&D4e Character Sheet Framework
PostPosted: Wed Jan 04, 2012 8:24 pm 
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!


Top
 Profile  
 
User avatar  Offline
Cave Troll
 
Joined: Thu Feb 02, 2006 1:06 pm
Posts: 66
Location: Mordor
 Post subject: Re: DN's D&D4e Character Sheet Framework
PostPosted: Sat Jan 21, 2012 2:58 am 
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? :(


Top
 Profile  
 
User avatar  Offline
Cave Troll
 
Joined: Sat Mar 28, 2009 2:43 pm
Posts: 55
 Post subject: Re: DN's D&D4e Character Sheet Framework
PostPosted: Mon Jan 23, 2012 7:06 am 
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.

Code:
<!-- 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]}].


Top
 Profile  
 
User avatar  Offline
Cave Troll
 
Joined: Thu Feb 02, 2006 1:06 pm
Posts: 66
Location: Mordor
 Post subject: Re: DN's D&D4e Character Sheet Framework
PostPosted: Mon Jan 23, 2012 9:19 am 
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.

Code:
<!-- 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!!


Top
 Profile  
 
 Offline
Kobold
 
Joined: Thu Feb 02, 2012 4:07 pm
Posts: 1
 Post subject: Re: DN's D&D4e Character Sheet Framework
PostPosted: Thu Feb 02, 2012 4:21 pm 
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 !


Top
 Profile  
 
 Offline
Kobold
 
Joined: Mon Apr 05, 2010 6:38 pm
Posts: 17
 Post subject: Re: DN's D&D4e Character Sheet Framework
PostPosted: Thu Feb 02, 2012 6:18 pm 
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.


Top
 Profile  
 
User avatar  Offline
Dragon
 
Joined: Sat Nov 15, 2008 2:28 pm
Posts: 820
Location: The City of Roses, Oregon
 Post subject: Re: DN's D&D4e Character Sheet Framework
PostPosted: Fri Feb 03, 2012 7:37 pm 
@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!


Top
 Profile  
 
User avatar  Offline
Cave Troll
 
Joined: Sat Mar 28, 2009 2:43 pm
Posts: 55
 Post subject: Re: DN's D&D4e Character Sheet Framework
PostPosted: Sun Feb 05, 2012 1:14 pm 
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:

Code:
<!--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)]


Code:
<!--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.

Code:
<!--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)]

Code:
<!--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)]

Code:
<!--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)]


Top
 Profile  
 
 Offline
Kobold
 
Joined: Mon Apr 05, 2010 6:38 pm
Posts: 17
 Post subject: Re: DN's D&D4e Character Sheet Framework
PostPosted: Mon Feb 06, 2012 9:25 pm 
MadJoker, those work perfectly.

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

Thanks!


Top
 Profile  
 
 Offline
Kobold
 
Joined: Mon Apr 05, 2010 6:38 pm
Posts: 17
 Post subject: Re: DN's D&D4e Character Sheet Framework
PostPosted: Wed Feb 08, 2012 3:01 pm 
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 > :)


Top
 Profile  
 
User avatar  Offline
Cave Troll
 
Joined: Sat Mar 28, 2009 2:43 pm
Posts: 55
 Post subject: Re: DN's D&D4e Character Sheet Framework
PostPosted: Wed Feb 08, 2012 6:44 pm 
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:

Code:
<!-- 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: ""]
   }
]


Top
 Profile  
 
 Offline
Cave Troll
 
Joined: Mon Jul 18, 2011 1:37 pm
Posts: 74
 Post subject: Re: DN's D&D4e Character Sheet Framework
PostPosted: Thu Feb 09, 2012 3:32 pm 
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?


Top
 Profile  
 
 Offline
Giant
 
Joined: Mon Dec 26, 2011 12:53 am
Posts: 115
 Post subject: Re: DN's D&D4e Character Sheet Framework
PostPosted: Wed Feb 15, 2012 5:47 pm 
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Reply to topic  [ 524 posts ]  Go to page Previous  1 ... 27, 28, 29, 30, 31, 32, 33 ... 35  Next

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:

Who is online

In total there are 2 users online :: 0 registered, 0 hidden and 2 guests (based on users active over the past 5 minutes)
Most users ever online was 243 on Sun Nov 04, 2012 6:14 am

Users browsing this forum: No registered users and 2 guests





Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

Style based on Andreas08 by Andreas Viklund

Style by Elizabeth Shulman