4e interactive sheet & utilities

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

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

Darakonis
Cave Troll
Posts: 98
Joined: Sun Apr 19, 2009 5:49 pm
Contact:

Re: 4e interactive sheet & utilities

Post by Darakonis »

DeviantNull wrote:Just an update, I finished a 90% working build that had all the important parts in it... And it was a nightmarish disaster.

Something, likely the table images, absolutely grinds everything to a halt and makes it unplayable over a net connection. I've tested by myself or with 1 or 2 other people but never 5 and from greatly differing locals.

I'm perplexed and not sure what I'm going to do. I've got a lot of improvements all over the place, but I'll have to completely rewrite the UI.

Alas... maybe another few weeks worth of work.
Sorry to hear that... Please feel free to come vent here any time you need to; I can't imagine how frustrated you must feel. We're all here to give you a pat on the back and a thumbs up.

Peace,
-Darakonis
Visit the D&D Digest for RPG tips & reviews.

Listen to the adventures of a live MapTool voice-chat group: Dungeons & Drogans

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:Can you share it so that we try ourselves ?
I could, but I don't exactly have something presentable. It's to the point where the lib tokens can be dropped into a campaign, the properties switched over, and an older tokens properties converted (more or less, rituals crapped out and missing current damage or temp hp locks it up) and it's fickle and I'm not entirely sure what might crap out. Hence the 90% done.

It was done enough for me to plug it in and see what it would do... which was be unusable. It was also making maptools throw Java errors, which was baffling.

I'm guessing it has to be 1 of two things. Given that it works relatively fine speed wise for me on my own server or with one or two connections it has to be related to multiple connects and either a bandwidth/transfer related issue or synchronization. I don't know how maptools works and that sort of stuff is beyond my understanding.

Issue 1 is the table image stuff. Each section of the sheet does multiple table reads, like, a BUNCH of them. I'm thinking it doesn't like having to transfer that many and it slows up, moreso then I'd like. This is the major difference between the old and new version.

Issue 2 was actually a suggestion to help speed things up. It didn't draw the sheet directly, it stored it and eval'd it when needed to be redrawn. If a change to the sheet was made, it update the stored version and then drew it. This ment it didn't need to re-evaluate everything on the sheet every single time it needed to be shown and was limited to only doing it if changes were made. This made token selection pretty speedy... however, it stored the images on the token... and any changes to the stored info need to be propagated to the other players. The sheet is not small (It's also not huge all things considered) and I think this transfer was causing things to choke.

I've removed the second (it's not as necessary with out the super fancy html and table reads) as the sheet resolves pretty quickly on it's own when it's just effectively raw text and simple html, and I've still included a few fancy checks built atop the token ownership checks to limit when it redraws. This way it won't try to redraw if you select the map or unowned token and then select the token again... I think... this is sort of hard to TS in GM mode since you own everything.

I'm in the process of removing the first. I've done everything up through items and have that nearly done. It's actually a rather fast process since I can template things and copy and paste the actual Maptool code from the old into the new layout. In the process I've actually built a few functions to use instead of code that I originally wrote since it's easier to just slap in a single function then whole blocks.

I'm pretty sure it'll work then since it's effectively what it was before, just with a whole bunch of better stuff under the hood and way more options.

There is one thing I'm still a little unsure about... I want icons. Entire parts of the new sheet are built around the idea of using icons instead of text for things like buttons or power information. This is sorta a big huge deal. But they're still table image reads and I'm worried it might choke out on big huge lists that make use of a lot of them (like the vitally important Powers list). I'm keeping my fingers crossed Maptools won't throw a fit if it has to do 5-40 table image reads to render things.

Lines of code reviewed and cleaned up: aprox 5300

I'll find out here shortly.

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

Re: 4e interactive sheet & utilities

Post by Venatius »

DeviantNull wrote: this is sort of hard to TS in GM mode since you own everything.
I've found it's easiest to start a server and then just fire up another instance of Maptool and connect to yourself with the LAN tab. That way you can have a GM view and a player view both. Alternatively, you can just start a server as a player. Having that "third person perspective" can be vitally important in testing many sorts of code. Just wanted to mention it in case by some chance the thought hadn't occurred to you.

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:I've found it's easiest to start a server and then just fire up another instance of Maptool and connect to yourself with the LAN tab. That way you can have a GM view and a player view both. Alternatively, you can just start a server as a player. Having that "third person perspective" can be vitally important in testing many sorts of code. Just wanted to mention it in case by some chance the thought hadn't occurred to you.
I do that for testing the the stuff that is player dependent. I've got MOST of that worked out, but sometimes I'll make a tweak or change and not fire up the second instance to double check it and it goes unnoticed. I got blindsided by the tokenselect change because of this. I've had a few other various run ins as well; some of them were very very frustrating.

I've removed the swanky tables and gone back to far less swanky tables. I was sad to see them go, but I've stripped everything down as bare as I want to get it. Took me a whole week, working in every spare moment I had; there's nearly 10,000 lines of code in this darn thing. Tomorrow is my game day and I'll be trying it again.

At this point, either it works and I'm a genius or it doesn't and I go down in flames. Expect a post containing the beta very shortly either way. Even if it doesn't work, some folks might find it interesting to see what I attempted and how.

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 »

DN, thanks for sharing.
Let us know what's what and let's stop the drooling ;)
ImageImageImageImage

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

Re: 4e interactive sheet & utilities

Post by Merkuri »

Has anybody tried this framework with b72? My group's getting errors whenever we mouse over tokens.
Adventure is not outside; it is within.
--Found in a fortune cookie on game night

MapTool Framework for Sufficiently Advanced

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

Re: 4e interactive sheet & utilities

Post by DeviantNull »

Merkuri wrote:Has anybody tried this framework with b72? My group's getting errors whenever we mouse over tokens.
Yeah, I dunno what's up with that. I tried with 72 and it threw an error and I immediately bailed and went back to b70. I have enough problems as it is without MT itself breaking crap on me. I'm rather... unhappy about that.

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

Re: 4e interactive sheet & utilities

Post by DeviantNull »

As for the new version, it wasn't a TOTAL disaster. Something is still not right, likely something to do with synchronization of the tokens when it comes to page changes and editing. This MAY have been the issue all a long and it wasn't prominent because of other issues. I'm going to try to fine tune a few things to fix it.

I had a few issues updating older tokens and a few bits and bobs fell off. This is somewhat to be expected so it didn't overly bother me much. I have a few missnamed variables scattered in a few places that caused much grief but are easy enough to fix so no problem there. Ran into a huge issue with modifier input boxes not liking dice codes and causing all sorts of errors and they were refusing to eval() out for some reason. This sort of thing has caused me endless grief in the past, but I can likely just borrow older code to fix it since obviously it worked at one time.

I'm expecting 1 to 2 days before posting it. These aren't huge issues and I should have them hammered out shortly. Overall, it seems to work.

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

Re: 4e interactive sheet & utilities

Post by Merkuri »

I'm guessing it has something to do with the tooltips. I got something weird like this when I was making my own framework and I had an error in the calculation I used in my tooltips. I might look into it later if I have time. (Can't now, in the middle of our weekly game.)
Adventure is not outside; it is within.
--Found in a fortune cookie on game night

MapTool Framework for Sufficiently Advanced

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 »

DN, stop posting!!

Every time you post I get all excited, only to run over here to the thread and not see this amazing upgrade and then it makes me sad.

So forget all the nice things I've said before, I want the new update now!
Or in the next few days. Whatever works for you.
I am a special snowflake!

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

Re: 4e interactive sheet & utilities

Post by Rumble »

Merkuri wrote:Has anybody tried this framework with b72? My group's getting errors whenever we mouse over tokens.
What error are you receiving? I don't see any errors in the Example Campaign when I mouse over tokens (runnong 1024MB memory, 2MB stack, on Windows 7)

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

Re: 4e interactive sheet & utilities

Post by Merkuri »

It only happens when connected as a client to another server. It's a null pointer exception. I couldn't copy it because the error is spammed so much it's impossible to give anything focus for more than a few seconds.

I think this may be bigger than this framework, so I'm gonna post about it in the announcements thread for b72.

Edit: Somebody beat me to it. Apparently it's a problem with vision.
Adventure is not outside; it is within.
--Found in a fortune cookie on game night

MapTool Framework for Sufficiently Advanced

User avatar
wolph42
Winter Wolph
Posts: 9999
Joined: Fri Mar 20, 2009 5:40 am
Location: Netherlands
Contact:

Re: 4e interactive sheet & utilities

Post by wolph42 »

Merkuri wrote:It only happens when connected as a client to another server. It's a null pointer exception. I couldn't copy it because the error is spammed so much it's impossible to give anything focus for more than a few seconds.

I think this may be bigger than this framework, so I'm gonna post about it in the announcements thread for b72.

Edit: Somebody beat me to it. Apparently it's a problem with vision.
yup its a MT bug and its fixed in b73 (for the win!)

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

Re: 4e interactive sheet & utilities

Post by DeviantNull »

This took way longer to write then I initially thought, months longer. I can't believe how long I've been writing this thing, working on it in my spare time has become a fixture of my life. It's frankly insane.

But it's done. More or less. I need to clean up the conditions info and I think put in the errata versions. And there might need to be a little nip or tuck here and there as well potentially adding minor things such as an Aftereffects line or a way to flag a token as going up and down different elevations as well as the eventual removal of global daily item use tracking and other tweaking to match errata. But all the big moving parts and intricate little pieces should be in place and working.

No, I haven't tested all of it. It's so darn complex at this point I have a hard time keeping track of all the potential interactions, but the basics have been and they seem to work. Hence the beta. I'm kicking the tires on it again Monday and after that if it still seems to work I'm going to make a brand new thread. This one has come a long way but I'd like to start fresh.

The example is just the lib tokens (plus Rumbles die roller because I think it's nifty) and the properties and tables and everything it needs to run; no example tokens yet as I haven't had time to build them or update the old ones.

Important bits to know updating
You no longer need a Character State on a token, simply setting it to the DNA Property list is enough for the sheet to tell it's an approved token. The State is still in the state list because I forgot to delete it.

Set a token to the DNA property set BEFORE running the updater, even though it may appear to run on a non-switched token. There is one global updater and one updater for each page. The global calls the individual ones on the Lib:Information token. The individual ones are incase it craps out, you can usually rerun each one individually and if it was previously run either delete the old groups/containers it tried to make or it simply overwrites the first attempt depending on which page it was. Typically it's the DNA_Equipped property that craps out if it's not changed first, for some reason it won't set the default property if not on DNA first. I might need to try and tweak the updater.

DO NOT do a whole bunch of tokens at once. This is a heft chunk of code it has to plow through since nearly the entire storage structure is different. I'm not sure if it'll choke. I've had luck with about 4-5 at a time and I haven't pressed my luck further.

Some old things do not have equal things in the new system. I tried to match as close as I could, it's not 100%. You will likely need to do some fine tuning by hand. And example is the old Psionic usages, they'll default to at-will now, and some ranges went away. Also any custom stuff will likely get nixed and try to default. It should convert things well enough that you can then edit the power or item in the system and make adjustments.

Editing Items & Powers
These can have multiple entry dialogs. Items will ask for how many powers something has and powers ask for how many attack/damage routines a power has. Also, if these have conditions selected they'll go to a condition entry screen where extra details can be filled in.

Typically if something is BOLD on the sheet it means it has a mechanical effect within the framework, some keywords or types are bolded. This is to flag the power as implement based or an item as 2 handed or a psionic power as augmentable.

I'm pretty sure it gets grumpy if a whole bunch of people try to edit tokens all at the exact same time over a connection. To make the multi-dialog boxes work information has to be temporarily stored on the token, and there is not an inconsequential amount of it. Having 5 players trying to ram this thorugh MT all at once can cause lag and slowdown. It's best to edit offline, though it can handle it just fine if it's just one or two people doing it.

It can take it a few seconds to process things, magnified by lag if connected to multiple players. There are several calculations and checks that need to be done for the more complex things such as saving an edited power or giving an entire bag of 20 items to another token. Don't panic. Power execution and HP management tends to be zippy though.

DO NOT try and have 2 people edit the same token at the same time. This causes problems and tends to revert BOTH changes.

General Info
When a player first connects for the first time to a campaign they'll likely get ? for the buttons and icons until they've DLed the assets from the tables. The assets are small (LordAelfric did an awesome job, BTW) so it shouldn't take long. However if you've got 5 players all trying to snag them at once it can take a bit.

The sheet will not refresh unless a different eligible token is selected or it is told to by a macro (often by using something). This means if a GM makes a change to a player token the player will not see the change right away. I had a fix for this, but I think it was slowing things down. Clicking on the icon/picture on the sheet forces a refresh of the sheet to reflect any changes that may have happened like this.

The sheet will not change focus if a dialog box it spawned is open. This is a feature, not a bug. Most targeting windows will have the target default to the selected token. However, GM's sheets would always change if not stopped since they own everything.

For item and power use targeting, there is a white crosshairs. This refreshes the dialog box with the selected tokens as the selected targets. You can not use this to select the same token twice, but it does go in order of token selection. It will wipe any other selections so target first then enter mods and check boxes. You also can't target the triggering token with it (otherwise you'd always be first in your attack list and that's not cool!) but the triggering token is first in the list.

The up and down arrows change the order of items in a list. Bags and groups can't be reordered like this... yet.

Linked Powers are gone. There is no need for them working the way they did anymore. Any power can have any number of attack and damage routines stuck on it in any combination of single, multi, or no hit attacks. It remains solely as a tracking system for powers that link together in global usage. You can either link the two powers directly together or if more then 2 link them to a controlling global power that marks as used when either are used.

I left the vast majority of properties visible on a token. I wanted to use getProperty() wherever possible, but this recent round of speeding it up I went with regular calls instead since I'm unsure if they're the same speed. If you don't know what you're doing, don't screw with them. Stuff will break.

The little undo circle arrow is Recharge. Items and Powers have them. Items get them next to their individual power entries and only appear if the power is expended. Powers get them in their toolbar if expended. Powers that normally recharge also get a link on hte list though it appears to be a regular icon, it is a macro link.

For GM's
The Lib:Info sheet has a few special things.
System events can have a line tag added, for things like editing a token or similar. This is held in the SystemMessage Prop in the Information properties list and is a simple text string.
Game events can be similarly tagged. They're in the GameEvents prop.

GMScreen is if the GM screen is up. 1 is up empty is off. There's a macro to toggle it. While up GM's gain the ability to input a die roll for d20 rolls. All such rolls will be flagged "Rolls behind GM screen" so the players know you rolled behind it. They can not tell if you fudged or not beyond that.

SaveTN is simply the TN for saving throws. House rule I use. Defaults to 10 if you leave it alone. I set it to 11 and use the following...
AltSaveBonus. If set to 1, each failed save grants a +1 on the next save.

Just for PinkRose
Don't know if you still need WildSoul but I still support it. Same =() entry as before but the token needs an entry for the DNA_WildSoulRange. This is the type of die to roll, which is a 1d10 (it technically supports any, future expansion maybe). You need to put this in by hand. No quotes or anything, just 1d10.


That's everything I can think off the top of my head. Here you go:

http://www.mediafire.com/file/riai5can5 ... Beta.cmpgn

I'm happy to answer questions or put out fires from the wheels falling off but otherwise, with that, you can stick a fork in me, I'm done.




...for now.

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 »

Congrats DN.

And thank you for your hard work, whatever the resuslts will be.

I'll test it ASAP.
ImageImageImageImage

Post Reply

Return to “D&D 4e Frameworks”