RPTools.net

Discussion and Support

Skip to content

It is currently Fri Feb 23, 2018 1:48 pm 






Reply to topic  [ 88 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6  Next

Previous topic | Next topic 

  Print view

Author Message
User avatar  Offline
Great Wyrm
 
Joined: Sat Jun 21, 2008 12:07 am
Posts: 1950
 Post subject: Re: Stand alone init frame
PostPosted: Thu Jun 17, 2010 10:13 am 
Could you whip up a code-change for the form button idea. I have never used html forms before, so a demo would be handy. The relevant code macros would be primarily "Init Panel HTML" and "Limited Init Panel HTML", though if you just did the former I could port it to the latter.

Can you also expand on pt. 1?

Image-wise, I think I use this one I just purloined from somewhere.


unknown.jpg
unknown.jpg [ 7 KiB | Viewed 903 times ]

_________________
Drop-In Utilities:
My Spell Manager for D&D3.5 and PFRPG
My Inventory Manager for D&D and PFRPG, but more generally useable than that.
My Message Manager -- My Top-Down D&D Token Images
and my Custom Initiative & Status/Spell-Effect Tracker (work in progress, but functional).
Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Nov 10, 2009 6:11 pm
Posts: 8012
Location: Bay Area
 Post subject: Re: Stand alone init frame
PostPosted: Thu Jun 17, 2010 1:46 pm 
When you use onChangeToken in a frame (your init panel) the frame is refreshed whenever any token that you can see or access is changed. So, with data put on a lib file that changes, all the clients will have their frames refreshed.

You can see an application of its use here: PropMonitor. This is still fairly beta, but the guts of it is in frameContent, openDialog and compareChanges.

_________________
Downloads:


Top
 Profile  
 
User avatar  Offline
Great Wyrm
 
Joined: Sat Jun 21, 2008 12:07 am
Posts: 1950
 Post subject: Re: Stand alone init frame
PostPosted: Thu Jun 17, 2010 1:54 pm 
I guess I'm confused because I already have onChangeToken set for the frames, so I know all that, but you seem to suggesting there's something missing in the code. (Or something that needs to be cut out? I left the macro refreshes in because onChangeToken is somewhat unreliable.)

_________________
Drop-In Utilities:
My Spell Manager for D&D3.5 and PFRPG
My Inventory Manager for D&D and PFRPG, but more generally useable than that.
My Message Manager -- My Top-Down D&D Token Images
and my Custom Initiative & Status/Spell-Effect Tracker (work in progress, but functional).


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Nov 10, 2009 6:11 pm
Posts: 8012
Location: Bay Area
 Post subject: Re: Stand alone init frame
PostPosted: Thu Jun 17, 2010 2:18 pm 
plothos wrote:
I guess I'm confused because I already have onChangeToken set for the frames, so I know all that, but you seem to suggesting there's something missing in the code. (Or something that needs to be cut out? I left the macro refreshes in because onChangeToken is somewhat unreliable.)


Why do you post a link to the chat? (I haven't actually looked through your code for that). I'm suggesting to do init panel updates to clients relying only on the onChangeToken hook. I gathered from what you said about the blank line that you're doing the execLink method to update the client init panels.

_________________
Downloads:


Top
 Profile  
 
User avatar  Offline
Great Wyrm
 
Joined: Sat Jun 21, 2008 12:07 am
Posts: 1950
 Post subject: Re: Stand alone init frame
PostPosted: Thu Jun 17, 2010 3:20 pm 
Ah, I see the confusion. No, the execLink is to announce to all players when a PC has received initiative. It was the only way I could figure out how to get the output sent to all in only that instance and nothing else sent otherwise. At least the blank line should only appear for the person clicking Next.

_________________
Drop-In Utilities:
My Spell Manager for D&D3.5 and PFRPG
My Inventory Manager for D&D and PFRPG, but more generally useable than that.
My Message Manager -- My Top-Down D&D Token Images
and my Custom Initiative & Status/Spell-Effect Tracker (work in progress, but functional).


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Nov 10, 2009 6:11 pm
Posts: 8012
Location: Bay Area
 Post subject: Re: Stand alone init frame
PostPosted: Thu Jun 17, 2010 4:12 pm 
I see how to get rid of the blank spaces. Change the "self" to "none" when calling "Advance Init" in the 2 macro calls. You can also change the R to H in "Advance Init" because your output is done as an execLink which has it's own output and is not restricted by the caller.

edit:
Have you been getting that frame error? When I use the macroIO importer, it gives me the error with the init frame is open. I just figured out a fix for that. But it requires adding a line of code to other libs that take certain actions, like use execLink.

_________________
Downloads:


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Nov 10, 2009 6:11 pm
Posts: 8012
Location: Bay Area
 Post subject: Re: Stand alone init frame
PostPosted: Thu Jun 17, 2010 5:12 pm 
I made the change for the blank lines, added the campaign macros, added an onCampaignLoad and a couple of UDFs. Changes are in yellow, UDFs in blue, macro buttons orange.

I try to program all in UDFs myself, so I keep my macro names in variable naming formats. I stole the good idea of using a foreach loop to name my functions from CoveredInFishes.

I'm attaching my version and I'll start working on the form buttons.

Oh, I still don't get the state images to show up... I haven't looked at that part of the code yet.

I added the UDF checkInitPanel() to be used by other programs that use execLink in their code. It will need to go at the bottom of their code (whatever execLink is calling) to avoid the html.frame error.

And I added your image from above after cleaning it up a little.


File comment: MT version 1.3b69
lib_init_alias.rptok [484.83 KiB]
Downloaded 58 times

_________________
Downloads:


Last edited by aliasmask on Thu Jun 17, 2010 6:30 pm, edited 1 time in total.
Top
 Profile  
 
User avatar  Offline
Demigod
 
Joined: Mon Jun 29, 2009 9:37 am
Posts: 3108
Location: Germany
 Post subject: Re: Stand alone init frame
PostPosted: Thu Jun 17, 2010 5:36 pm 
This is a great tool! My compliments ...

You might already now this ... if i drag/drop that token in b63 it throws an exception. If i throw it in b69 it flicker and then there are 3 tokens: "unknown", "compass_rose_silver_beve_bw", "E". None of them contain any macro (and no libtoken at all).

If i use the mt library it works fine in b69 - b63 still throws the exception.



aliasmask wrote:
I stole the good idea of using a foreach loop to name my functions from CoveredInFishes.

Hey, I need that back ;-)

EDIT: Have you thought of ways to integrate this into other macro packages? Is there some kind of interface to add events/token via macro? To advance init?

Have you considered using the MT initiative sytem to benefit from the ini lock? (I think of setting mt-initiatives and advancing it via macro in way that the current token in the S.A.I.F keeps beeing the same as in MT-Init and so the ini-lock would still work. dont invested further thought than this initial idea though)

EDIT2: If i add something to the ini-list it would be nice if non-numbers for initiative count could be evaled, so i could enter "15" as well as "3d6".

_________________
HELP: GETTING STARTED WITH MAPTOOLS - TUTORIALS, DOCS, VIDEOS, TOOLS, ETC.

most complete list of my maptool stuff


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Nov 10, 2009 6:11 pm
Posts: 8012
Location: Bay Area
 Post subject: Re: Stand alone init frame
PostPosted: Thu Jun 17, 2010 6:42 pm 
CoveredInFish wrote:
You might already now this ... if i drag/drop that token in b63 it throws an exception. If i throw it in b69 it flicker and then there are 3 tokens: "unknown", "compass_rose_silver_beve_bw", "E". None of them contain any macro (and no libtoken at all).

Hmm... I was hoping that went away after I saved it in b69... same thing happened when I drag/dropped for myself. Maybe it's a but with the extra images in b69? Saved in b69 which isn't compatible with b63.

CoveredInFish wrote:
EDIT: Have you thought of ways to integrate this into other macro packages? Is there some kind of interface to add events/token via macro? To advance init?

I asked for a general init package so I could integrate with it with a new framework I'm working on.

CoveredInFish wrote:
Have you considered using the MT initiative sytem to benefit from the ini lock? (I think of setting mt-initiatives and advancing it via macro in way that the current token in the S.A.I.F keeps beeing the same as in MT-Init and so the ini-lock would still work. dont invested further thought than this initial idea though)

There are some good things here not easily done with the init panel, but I'm pushing for some kind of syncing between the two. That way, you could use the built in init panel only while others use this init panel (like the GM). So, far plothos has done a lot of great work and I'm only just now starting to dink with it. I'll get him to use UDFs eventually :P

CoveredInFish wrote:
EDIT2: If i add something to the ini-list it would be nice if non-numbers for initiative count could be evaled, so i could enter "15" as well as "3d6".

That would be pretty easy to do, just wrap the variable in an eval(string()).

_________________
Downloads:


Top
 Profile  
 
User avatar  Offline
Great Wyrm
 
Joined: Sat Jun 21, 2008 12:07 am
Posts: 1950
 Post subject: Re: Stand alone init frame
PostPosted: Thu Jun 17, 2010 6:47 pm 
Thanks, Fish. I'm glad you like it. :D

I didn't know about any exception in b63. I haven't seen it. Can you explain?
The b69 thing is a problem with b69, and it happens to any token dragged in with multiple images. Azh has been informed and is working on it.

I have been coding a bunch more and will have an update in a few hours. It will contain a macro to receive info from a framework in the form of a json object with the fields "Name" and "Init". You can code your init rolls however you like and then just call that reception macro.

I will code the current add macro to allow evaluations. That should be easy.

Will update you on what else I've added in a bit.

_________________
Drop-In Utilities:
My Spell Manager for D&D3.5 and PFRPG
My Inventory Manager for D&D and PFRPG, but more generally useable than that.
My Message Manager -- My Top-Down D&D Token Images
and my Custom Initiative & Status/Spell-Effect Tracker (work in progress, but functional).


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Nov 10, 2009 6:11 pm
Posts: 8012
Location: Bay Area
 Post subject: Re: Stand alone init frame
PostPosted: Thu Jun 17, 2010 7:02 pm 
Here's the cleaned up image from above.


unknown.png
unknown.png [ 7.51 KiB | Viewed 874 times ]

_________________
Downloads:
Top
 Profile  
 
User avatar  Offline
Demigod
 
Joined: Mon Jun 29, 2009 9:37 am
Posts: 3108
Location: Germany
 Post subject: Re: Stand alone init frame
PostPosted: Thu Jun 17, 2010 7:08 pm 
plothos wrote:
I didn't know about any exception in b63. I haven't seen it. Can you explain?


I cant explain but i can the stuff mt throws at me ...

Code:
java.lang.InstantiationError: java.util.Map$Entry
   at sun.reflect.GeneratedSerializationConstructorAccessor61.newInstance(Unknown Source)
   at java.lang.reflect.Constructor.newInstance(Unknown Source)
   at com.thoughtworks.xstream.converters.reflection.Sun14ReflectionProvider.newInstance(Sun14ReflectionProvider.java:62)
   at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.instantiateNewInstance(AbstractReflectionConverter.java:257)
   at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:124)
   at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:56)
   at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:45)
   at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:46)
   at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.readItem(AbstractCollectionConverter.java:66)
   at com.thoughtworks.xstream.converters.collections.MapConverter.populateMap(MapConverter.java:63)
   at com.thoughtworks.xstream.converters.collections.MapConverter.unmarshal(MapConverter.java:54)
   at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:56)
   at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:45)
   at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:46)
   at com.thoughtworks.xstream.annotations.AnnotationReflectionConverter.unmarshallField(AnnotationReflectionConverter.java:66)
   at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doUnmarshal(AbstractReflectionConverter.java:188)
   at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:125)
   at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:56)
   at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:45)
   at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:46)
   at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:117)
   at com.thoughtworks.xstream.core.ReferenceByXPathMarshallingStrategy.unmarshal(ReferenceByXPathMarshallingStrategy.java:29)
   at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:846)
   at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:833)
   at com.thoughtworks.xstream.XStream.fromXML(XStream.java:789)
   at net.rptools.lib.io.PackedFile.getContent(PackedFile.java:138)
   at net.rptools.lib.io.PackedFile.getContent(PackedFile.java:123)
   at net.rptools.maptool.util.PersistenceUtil.loadToken(PersistenceUtil.java:400)
   at net.rptools.maptool.client.TransferableHelper.handleFileList(TransferableHelper.java:133)
   at net.rptools.maptool.client.TransferableHelper.getAsset(TransferableHelper.java:76)
   at net.rptools.maptool.client.TransferableHelper.importData(TransferableHelper.java:238)
   at javax.swing.TransferHandler.importData(Unknown Source)
   at javax.swing.TransferHandler$DropHandler.drop(Unknown Source)
   at java.awt.dnd.DropTarget.drop(Unknown Source)
   at javax.swing.TransferHandler$SwingDropTarget.drop(Unknown Source)
   at sun.awt.dnd.SunDropTargetContextPeer.processDropMessage(Unknown Source)
   at sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher.dispatchDropEvent(Unknown Source)
   at sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher.dispatchEvent(Unknown Source)
   at sun.awt.dnd.SunDropTargetEvent.dispatch(Unknown Source)
   at java.awt.Component.dispatchEventImpl(Unknown Source)
   at java.awt.Container.dispatchEventImpl(Unknown Source)
   at java.awt.Component.dispatchEvent(Unknown Source)
   at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
   at java.awt.LightweightDispatcher.processDropTargetEvent(Unknown Source)
   at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
   at java.awt.Container.dispatchEventImpl(Unknown Source)
   at java.awt.Window.dispatchEventImpl(Unknown Source)
   at java.awt.Component.dispatchEvent(Unknown Source)
   at java.awt.EventQueue.dispatchEvent(Unknown Source)
   at net.rptools.maptool.client.swing.MapToolEventQueue.dispatchEvent(MapToolEventQueue.java:24)
   at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
   at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
   at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
   at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
   at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
   at java.awt.EventDispatchThread.run(Unknown Source)


Quote:
I have been coding a bunch more and will have an update in a few hours.

Kewl.

_________________
HELP: GETTING STARTED WITH MAPTOOLS - TUTORIALS, DOCS, VIDEOS, TOOLS, ETC.

most complete list of my maptool stuff


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Nov 10, 2009 6:11 pm
Posts: 8012
Location: Bay Area
 Post subject: Re: Stand alone init frame
PostPosted: Thu Jun 17, 2010 7:18 pm 
@CoveredInFishes
I think you may be talking about my saved file ?? I saved it in b69... so it's not backwards compatible with b63 and plothos explained the b69 bug.

@plothos - if you need a b63 version to see my code changes, I'll go ahead and do that... just let me know.

_________________
Downloads:


Top
 Profile  
 
User avatar  Offline
Great Wyrm
 
Joined: Sat Jun 21, 2008 12:07 am
Posts: 1950
 Post subject: Re: Stand alone init frame
PostPosted: Thu Jun 17, 2010 9:20 pm 
aliasmask wrote:
@plothos - if you need a b63 version to see my code changes, I'll go ahead and do that... just let me know.
I have b69, so I can open it up there and copy anything I need to by b63 instance. (BTW, just saw you're from the bay area. Whereabouts? I grew up in Palo Alto and Mill Valley.)

I probably won't get to it until tomorrow night, but I will def. have a good look then.

@Fish: it's odd that you're getting any exception (and no, I don't get it either) if you're dragging my lib, because I was made and saved in b63 (it has one bit of code that only works in b68, but I've been coding for b63, to keep it viable in older formats). If you were maybe using AM's lib, that might explain it, as I guess it's b69? I'm thinking b68 might be the magic number for this bad boy. :D

Update in a few min.

_________________
Drop-In Utilities:
My Spell Manager for D&D3.5 and PFRPG
My Inventory Manager for D&D and PFRPG, but more generally useable than that.
My Message Manager -- My Top-Down D&D Token Images
and my Custom Initiative & Status/Spell-Effect Tracker (work in progress, but functional).


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Nov 10, 2009 6:11 pm
Posts: 8012
Location: Bay Area
 Post subject: Re: Stand alone init frame
PostPosted: Thu Jun 17, 2010 9:43 pm 
plothos wrote:
(BTW, just saw you're from the bay area. Whereabouts? I grew up in Palo Alto and Mill Valley.)
I grew up in the Bay Area, mostly east bay (Oakland, Alameda, Concord, Richmond, Pleasant Hill, El Cerrito, Union City) then I moved up to the Chico area for college. I stayed there forever, but I have recently moved back to Alameda.

_________________
Downloads:


Top
 Profile  
 
Display posts from previous:  Sort by  
Reply to topic  [ 88 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6  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 is 1 user online :: 0 registered, 0 hidden and 1 guest (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 1 guest





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

Style based on Andreas08 by Andreas Viklund

Style by Elizabeth Shulman