4e interactive sheet & utilities

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

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

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

Re: 4e interactive sheet & utilities

Post by DeviantNull »

Natha wrote:I edit equiped gear, choose a weapon, and an armor that I entered previously and save => it's ok
Then I edit again to add a neck thing : the weapon is still there but I have to re-choose the armor.
I edit again after that : the weapon is still selected but not the armor nor the neck.
Hrm. So it was just on equipping and de-equipping items? I gather it would show the selected items in the drop down as selected but when you saved your selections it only equipped a few things?

I'll look into this ASAP as the equipment DNA_Equipped string is a JSON and it can cause errors in either defense calculation or powers if it breaks. If by some chance you think it might be borked because you can't view an attack power or when you try to save a characters stats and it errors, setProperty("DNA_Equipped", getDefaultProperty("DNA_Equipped")) will revert it to no equipment and should allow it to proceed.

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

Re: 4e interactive sheet & utilities

Post by DeviantNull »

Darakonis wrote:I've created an NPC token, and when I click what I believe to be the Edit button, I get this error:

Unknown macro StatsEdit@Lib:Sheet.
Doh! The NPC version is still making a call to the old macro name, I forgot to change it (easy fix for me). For ya'll, the easiest thing to do is find the Sheet Pages subgroup of macros on the Lib:Sheet, find the macro StatsEditPage and duplicate it. Then rename 1 of them to StatsEdit. That should allow the NPC version of the sheet to call the stats editing page.

User avatar
Natha
Dragon
Posts: 733
Joined: Sat Oct 11, 2008 3:37 am
Location: Limoges/Guéret, France
Contact:

Re: 4e interactive sheet & utilities

Post by Natha »

Yeah the condition tracker is simply brilliant !
ImageImageImageImage

User avatar
Venatius
Dragon
Posts: 256
Joined: Mon Feb 16, 2009 7:12 pm

Re: 4e interactive sheet & utilities

Post by Venatius »

Fantastic! Two small issues though. Power-use buttons seem to be appearing beside items with no powers, like a plain "+1 Bastard Sword". This is, of course, not any major harm, just a rough spot to perhaps buff out. However, wealth, consumables, and equipment (that is, items from the old "equipment" field like tents, misc. items, etc.) don't seem to transfer over on updated characters. Not the end of the world, since you can replicate it from your old copy, but inconvenient.
Also, for anyone initially thrown as I was: All your updated characters' equipment is dumped into a "Backpack" container. You can find it there. You may end up with more than one backpack copy, but the edit button will let you delete the extras.
This may be a unique problem, but for some reason my paladin's shield isn't showing up anywhere but in the equippable dropdowns. Since said paladin ended up with two backpacks, there are also two copies of the shield in the dropdown. It's not in the backpack container or anywhere else I can detect.

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

Re: 4e interactive sheet & utilities

Post by DeviantNull »

Venatius wrote:Fantastic! Two small issues though. Power-use buttons seem to be appearing beside items with no powers, like a plain "+1 Bastard Sword". This is, of course, not any major harm, just a rough spot to perhaps buff out. However, wealth, consumables, and equipment (that is, items from the old "equipment" field like tents, misc. items, etc.) don't seem to transfer over on updated characters. Not the end of the world, since you can replicate it from your old copy, but inconvenient.
Also, for anyone initially thrown as I was: All your updated characters' equipment is dumped into a "Backpack" container. You can find it there. You may end up with more than one backpack copy, but the edit button will let you delete the extras.
This may be a unique problem, but for some reason my paladin's shield isn't showing up anywhere but in the equippable dropdowns. Since said paladin ended up with two backpacks, there are also two copies of the shield in the dropdown. It's not in the backpack container or anywhere else I can detect.
The buttons are there... cause... well it was easier then making checks to see if there were powers or a magic property and turning them off. So regular items can be used... and not do much except act like a "show entry" thing.

I can fix the equipment field easy enough, it should have been copied but may have been left off the list. It's just a raw text field so no conversion is really necessary. Infact a straight setProperty("DNA_EquipmentNotes", getProperty("Equipment")) should snag it. I also left DNA_EquipmentNotes off the property list... I'll add it in as well.

Consumables... crap. Yeah, I forgot them. Hrm. I think I can build an updater that pulls them in as Items. Unfortunately semi-low priority... but I'll see what I can do.

The shield issue though... double crap. Yeah, that's not good. It was somehow added to the DNA_ItemIndexShields list (so it shows up in the equip drop down) but didn't get added to the bag index. Likely an error in my updater macro.

All items (everything actually) has an index # that points to the item/power/feat whatever. Items have 3 lists that need the item# in it; DNA_ItemIndex (the master list of all items), DNA_ItemIndexShields (A list of all your shield items, one for each equipable slot plus a wondrous and consumables) and DNA_BagIndexXXXXXX that is the index for a given bag. DNA_BagIndex is a list of all the bags you have. You need to use getProperty("DNA_BagIndexXXXXXX") to retrieve the index of the items in THAT particular bag.

Likely the shield is in DNA_ItemIndex and DNA_ItemIndexShields but not in the DNA_BagIndexXXXXXX. So, for the moment you could do the following...

#1 check DNA_ItemIndexShields and you should have 2 entries (one for each shield that is showing up). Doing a getProperty("DNA_ItemXXXXXX") where XXXXXXX is the index number should return a JSON object of that item. If either returns an empty property, delete that entry from the DNA_ShieldIndexList.

#2 the entries in the DNA_ItemIndexShields list should also be in the DNA_ItemIndex list as well. If they're not, add them. With out them there a future item could overwrite the shield entry.

#3 check your DNA_BagIndex list for a list of all your bag indexes. If you have just 1, you should just have 1 number. Then use getProperty("DNA_BagIndexXXXXXX") to retrieve the index list for that bag. It's likely missing your shield index numbers. Add them to the bag index, easiest way is to do setProperty("DNA_BagIndexXXXXXXX", listAppend(getProperty("DNA_BagIndexXXXXXX"), SHIELDINDEXNUMBER)) and then they should show up in the bag.

Do this for both shields (or when you do the list append make both #'s) and they should both show up in your bag and one can be deleted. Or you could remove the index # for 1 from the DNA_ItemIndexShields and DNA_ItemIndex (might want to clear the DNA_ItemXXXXXX entry as well if you do it manually).

User avatar
Natha
Dragon
Posts: 733
Joined: Sat Oct 11, 2008 3:37 am
Location: Limoges/Guéret, France
Contact:

Re: 4e interactive sheet & utilities

Post by Natha »

Another small bug : creating a power with no attack nor damage but "Surge" selected in the "special" list, in the damage line.
When trying to modify again the same power, the "surge" value isn't selected in the list.

Well, all things considered, I just finished creating from scratch my level 7 dwarf invoker and except for a power or two that has "special" varying damage when targeting one or more creatures, it has been really easy to reproduce all the mechanics.
Entering data is much faster and simpler to get and to do (imho) than previous versions, and the sheet and other frames look beautifull !

I might add some <hr/> in the power's chat output (as did before) to clarify a little bit each section (hit/damage/effect ...) but that's all.


The equipment handling is brilliant. The "number of attack/damage ..." for powers is really powerfull.

And top of it all, the ability to apply damage, surges, healing, conditions on targets will be really accelerating the play, I believe.

DN, I won't ask you to marry me as another MapTooler did it before me :mrgreen: (and the fact that my wife will disagree about that) but you deserve a huge amounts of rounds of beer on me ....

EDIT : aonther bug ? or question : a PC sheet can't switch from the "compact"/NPC display to the normal/PC display by clicking on the portrait, anymore ?
ImageImageImageImage

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

Re: 4e interactive sheet & utilities

Post by DeviantNull »

Natha wrote:Another small bug : creating a power with no attack nor damage but "Surge" selected in the "special" list, in the damage line.
When trying to modify again the same power, the "surge" value isn't selected in the list.
I'll check it. That's weird since it's stored as a number and simply checks to see if the json key in the power property matches and adds a "selected" to the option line. I might have a typo though or something.
The equipment handling is brilliant. The "number of attack/damage ..." for powers is really powerfull.
Once I cracked the multi dialog input issue this was a snap to do. The execution loop is WAY more powerful over all. It can get a little spammy, I personally prefer players only output the vital stuff or stuff thats frequently forgotten, otherwise the link is clickable for more details. But now not only can you do things like simple 2 or 3 hit chain attacks you can do multi-attacks -> single attack -> additional conditional damage -> healing provided from the power. Or a battlerager could put his tempHP gain on a hit on a second hit line and quickly add them to himself. Or psionic powers can all be combined into the same power and you just read whichever attack/hit line is relevant to the usage.

Items are similarly nifty. I'm pretty sure you could mock up an artifact with the system by simply modeling each favor level as a new power on the item. The list entry will be huge, but it's still do-able.
And top of it all, the ability to apply damage, surges, healing, conditions on targets will be really accelerating the play, I believe.
Just incase folks didn't know, typically you can only apply damage and states to tokens you own. Thus players shouldn't be able to apply damage to badguys. It's not an auto-apply it's an auto-fill. I tried autoapply via macro link and it got a little ugly with multi-clicks and other stuff. This strikes me as the best solution because you can still adjust it before apply it.

Addition awesome feature, if you have a Save Ends condition when you make a Saving Throw you can select it and if it succeeds it auto-removes it.
EDIT : aonther bug ? or question : a PC sheet can't switch from the "compact"/NPC display to the normal/PC display by clicking on the portrait, anymore ?
This was sacrificed on the alter of needing some way to force a refresh on the sheet. With a sheet only refreshing when you switch tokens or when told to by a macro, if it falls out of sync for some reason a player with no other token needs some quick and simple way to refresh without having to change pages. The block on the refresh is there to help speed up token usage, this way if you click on the map or select another non-token non-owned object it doesn't try to refresh when you go back to your token to move it or something and thus causing a lag in time between selection and the time you can actually move it.

I can likely add back in a button macrolink to force a toggle though. I'll add it to the bottom of the to-do list.

User avatar
Venatius
Dragon
Posts: 256
Joined: Mon Feb 16, 2009 7:12 pm

Re: 4e interactive sheet & utilities

Post by Venatius »

Thanks, DN! The shield fixes worked fine. The servants of Bahamut thank you. The only other thing approximating a problem I've seen is that ritual components also don't seem to update correctly, though rituals themselves (thank goodness) look fine. I was skeptical about the near total abolishment of the campaign macro buttons, but now I see how the current setup more or less renders them obsolete! It's a fine, smooth setup, and I look forward to seeing how it works in play.
Oh, just noticed, forcing multiple tokens to rest doesn't seem to work. Only one of them actually rests. Also, setting items to just "surge" without putting in a damage value in item powers causes the surge not to show up at all. It might look a little nicer if you select surge and have no value set to just display the surge, instead of 0+Surge.

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

Re: 4e interactive sheet & utilities

Post by PinkRose »

I'm loving this of course.
I can't imagine how much blood, sweat & TEARS went into this.
But the code is so clean and neat, I'm having no trouble adjusting it to work the way I want it.

One error I see is that you have a +2 bonus in History in your default Campaign Properties so it shows up for every character built.
Not an issue but if someone doesn't notice, it could give a player an added bonus and we wouldn't want that.
I am a special snowflake!

User avatar
Natha
Dragon
Posts: 733
Joined: Sat Oct 11, 2008 3:37 am
Location: Limoges/Guéret, France
Contact:

Re: 4e interactive sheet & utilities

Post by Natha »

DeviantNull wrote: This was sacrificed on the alter of needing some way to force a refresh on the sheet. With a sheet only refreshing when you switch tokens or when told to by a macro, if it falls out of sync for some reason a player with no other token needs some quick and simple way to refresh without having to change pages. The block on the refresh is there to help speed up token usage, this way if you click on the map or select another non-token non-owned object it doesn't try to refresh when you go back to your token to move it or something and thus causing a lag in time between selection and the time you can actually move it.

I can likely add back in a button macrolink to force a toggle though. I'll add it to the bottom of the to-do list.
Well that was just a question, this feature is not really "needed" compared to the fast "non refresh" selection you choose.

PinkRose wrote:I'm loving this of course.
One error I see is that you have a +2 bonus in History in your default Campaign Properties so it shows up for every character built.
That's right, forgot to report it.
ImageImageImageImage

User avatar
Natha
Dragon
Posts: 733
Joined: Sat Oct 11, 2008 3:37 am
Location: Limoges/Guéret, France
Contact:

Re: 4e interactive sheet & utilities

Post by Natha »

Another bug.

I tried to add a power to a magic weapon, with a condition (immobilized).
If I don't tick it, it goes well.
If I do (sorry I had to roughly translate the error message):

Code: Select all

    Error in the roll.       Declaration Options (if any): R, for(DNT_PowerSlot, 1, DNT_NumberOfPowers + 1, 1, ""), CODE       Corps de la déclaration (200 premiers caractères): { [H: DNT_PowerConditions = json.get(DNT_NewEntry, "PowerConditions" + DNT_PowerSlot)] [R, forEach(DNT_Condition, DNT_PowerConditions, ""), CODE: {
ImageImageImageImage

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

Re: 4e interactive sheet & utilities

Post by DeviantNull »

Natha wrote:Another bug.

I tried to add a power to a magic weapon, with a condition (immobilized).
If I don't tick it, it goes well.
If I do (sorry I had to roughly translate the error message):
Hmmm... it looks like it doesn't like the of the loops, likely the condition one. I'll fix it if i can replicate it.

And I can replicate it. Must have snuck in when I made a change and likely copied it from the power version. The two are similar but a slight bit different, I'm likely trying to read out the wrong variable.

Actually I was half right. It was copied code from the power version when I moved durations to a outside json in order to facilitate easy modification (I decided on this when I realized I had originally forgotten 'end of my next turn'). However I didn't account for the fact items do 2 loops on their own, one for the powers and one for each condition, unlike powers which just loop once for all conditions the the power has. That ment I had 3 nested code blocks and that's a no-no. Thankfully it wasn't a required code block and was mainly a code block out of convience so I swapped it to a strformat.

Given the nature of the error here's the temp fix. Replace the ItemConditionsEntry macro in the Items macro group with the following:
Replacement Code

Code: Select all

<!-- ItemConditionsEntry-->
[H: DNT_NewEntry = getProperty("DNA_MacroTempStorage" + getPlayerName())]

[H: DNT_Slot = json.get(DNT_NewEntry, "Slot")]
[H: DNT_StorageGroup = json.get(DNT_NewEntry, "StorageGroup")]
[H: DNT_NumberOfPowers = json.get(DNT_NewEntry, "NumberOfPowers")]

[H, if(DNT_Slot == "New"), CODE:{[H: DNT_Entry = '{}']};{[H: DNT_Entry = getProperty(DNT_storageGroup + DNT_slot)]}]

[H: DNT_RowColor = "DBD9C0"]
[H: DNT_DurationList = getLibProperty("ConditionDurations", "Lib:Information")]
[H: DNT_DurationOption = '<option value="%{DNT_Duration}" %s>%s</option>']

<head>
	<meta name="input" content = "true">
	<title>Conditions</title>
</head>
<body><form method="json" name="ConditionStats" action="[R: macroLinkText('ItemEdit@Lib:Sheet', if(isGM() == 1, 'GM', 'GM-Self'), '', currentToken())]">
<table width="100%" nowrap="Nowrap">
	<tr bgcolor="black">
		<th style="color:white" align="left" colspan="2">Condition</th>
		<th style="color:white">Duration</th>
		<th style="color:white">Damage</th>
		<th style="color:white">Save Modifier</th>
	</tr>
	
[R, for(DNT_PowerSlot, 1, DNT_NumberOfPowers + 1, 1, ""), CODE:
	{
		[H: DNT_PowerConditions = json.get(DNT_NewEntry, "PowerConditions" + DNT_PowerSlot)]
		
		[R, forEach(DNT_Condition, DNT_PowerConditions, ""), CODE:
			{
				
	<tr bgcolor="[R: DNT_RowColor]">
		<td><b>[R: DNT_Condition]</b></td>
		<td align="center"><select name="ConditionEnd[R: DNT_PowerSlot][R: DNT_Condition]">
			<option value=""></option>
		[R, forEach(DNT_Duration, DNT_DurationList, ""): strformat(DNT_DurationOption, if(json.get(DNT_Entry, "ConditionEnd" + DNT_PowerSlot + DNT_Condition) == DNT_Duration, "selected", ""), json.get(DNT_DurationList, DNT_Duration))]
		</select></td>
		<td align="center"><input type="text" size="5" name="ConditionDamage[R: DNT_PowerSlot][R: DNT_Condition]" value="[R: json.get(DNT_Entry, 'ConditionDamage' + DNT_PowerSlot + DNT_Condition)]"></input></td>
		<td align="center"><input type="text" size="5" name="ConditionPenalty[R: DNT_PowerSlot][R: DNT_Condition]" value="[R: json.get(DNT_Entry, 'ConditionPenalty' + DNT_PowerSlot + DNT_Condition)]"></input></td>
	</tr>
	<tr bgcolor="[R: DNT_rowColor]">
		<td>Notes:</td>
		<td colspan="4"><input type="text" size="70" name="ConditionNotes[R: DNT_PowerSlot][R: DNT_Condition]" value="[R: json.get(DNT_Entry, 'ConditionNotes' + DNT_PowerSlot + DNT_Condition)]"></input></td>			

				[H: DNT_RowColor = if(DNT_RowColor == "DBD9C0", "B3AF94", "DBD9C0")]
			}
		]
	}
]
	<tr bgcolor="DBD9C0">
		<td colspan="5" align="center">
			<input id="savebutton" type="submit" name="SaveEntry" value="Save"></input>
		</td>
	</tr>
</table>
</form></body>

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

Re: 4e interactive sheet & utilities

Post by PinkRose »

DeviantNull, because I want to contribute, PLEASE let me contribute, I'm working on updating the conditions to match the compendium.

When I get them done, I'll upload them somewhere.
I am a special snowflake!

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

Re: 4e interactive sheet & utilities

Post by DeviantNull »

PinkRose wrote:DeviantNull, because I want to contribute, PLEASE let me contribute, I'm working on updating the conditions to match the compendium.

When I get them done, I'll upload them somewhere.
awesome. I think I still have the first set you updated for me, but then I went and changed the HTML cause I'm a jerk like that.

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

Re: 4e interactive sheet & utilities

Post by DeviantNull »

Heres a list of what I've fixed for the Monday/Tuesday release.

*fixed* +2 history bonus in default props
*fixed* Temporary HP spelling error in health/damage macro
*fixed* Multi token Rest not applying to multiple
*fixed* Multi token healing surge not applying to multiple
*fixed* Feet slot spelled feat on equipping
*fixed* Languages not saving
*fixed* NPC edit macro calling wrong statsedit macro
*fixed* equipment selection not selecting previously equipped items
*fixed* Item conditions error on item input
*fixed* Shields not copying correctly
*fixed* Equipment field not copying - also add to properties
*fixed* consumables update
*fixed* Passive not updating
*fixed* item with no powers usage not working
*fixed* components not updating

Post Reply

Return to “D&D 4e Frameworks”