RPTools.net

Discussion and Support

Skip to content

It is currently Thu Jan 18, 2018 11:09 am 






Reply to topic  [ 1102 posts ]  Go to page Previous  1 ... 70, 71, 72, 73, 74

Previous topic | Next topic 

  Print view

Author Message
User avatar  Offline
Demigod
 
Joined: Sun Feb 25, 2007 11:53 am
Posts: 3799
Location: MD
 Post subject: Re: The MacroPolicebox: Second Regeneration (D&D 4E Framewor
PostPosted: Sun Jan 07, 2018 2:59 am 
Xun wrote:
btw, I already tried a lot changing the memory settings, also what Full Bleed suggested (I ran on Java 64bit with a 8192/4096/4 tuning it up tp 8192/4096/8) I get the overflow in each and every combination
...
Only with step three, I was able to reduce the memory to (1024/64/2) without stack overflow, for options 1 and 2, I still get the overflow with these settings. So 1./2. were maybe only prominent contributers to the issue, but there seem to be others.

The one central question - of course - remains unanswered: why me? :(

Not sure... and I doubt this is the problem... but why are you using a 4096 min mem with your failed example? I'd suggest something like 4096/64/4 (or a 5 stack since Starman recommended it.)

_________________
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."


Top
 Profile  
 
 Offline
Kobold
 
Joined: Mon Nov 22, 2010 2:11 pm
Posts: 13
 Post subject: Re: The MacroPolicebox: Second Regeneration (D&D 4E Framewor
PostPosted: Sun Jan 07, 2018 4:23 am 
You proposed assigning half of my mem to java, so I did, hence the 8192.
For min mem - not knowing better - I just took half of that, hence the 4096.
For stack, I gradually increased it, starting at 4 (up to 8 ).
Nothing worked.
I now did the same with 4096/64/x (x=4,5,6,7,8) - always stack overflow.

So with Starman's 'Setup player Token' function, I could get rid of the error by avoiding evalMacro().
I am now checking the same for the power import function - which still gives me a stack overflow. My guess is, replacing evalMacro() here will also do the trick.

If so, I just remain wondering, why I am the only one having issues with evalMacro/stack overflow - and I am having it on two different computers - one 32 bit Java, one 64 bit java...

Let's see, what comes out...


Top
 Profile  
 
User avatar  Offline
Dragon
 
Joined: Mon Jul 18, 2011 12:10 pm
Posts: 710
Location: Toronto
 Post subject: Re: The MacroPolicebox: Second Regeneration (D&D 4E Framewor
PostPosted: Sun Jan 07, 2018 2:00 pm 
Xun wrote:
So with Starman's 'Setup player Token' function, I could get rid of the error by avoiding evalMacro().
I think the reason I used that for running Create Button Group is because doing so with a straight MACRO call caused the macro buttons to be created on the Lib token ... which is wrong. Please share your code and I'll see if I can incorporate in SL 183!
StarMan wrote:
Basically, Setup Player Token analyses the text you paste in and calls dnd4e to Notes for importing CB files and Parse Monster Stats for monsters. For summoned creatures it still calls Parse Monster Stats. It just needs to arrange the input text into proper MM1 format first. As for dnd4e to Notes, that cycles through all the XML blocks in your dnd4e file and arranges each block into a text stream that will be accepted by the associated Import macro. As it goes along, it adds each block to the Output variable which is then written to your Notes tab.

In short, Setup Player Token does an ENORMOUS amount of work putting together a data stream which can be used by Import dnd4e Powers (or Import Monster Power for NPCs).
To continue this explanation, these last two macros iterate through the hash-tagged records in your Notes tab and figures out what each record is (i.e. power, weapon, magic item etc) and then sends the record to that specific import macro. That macro then reads the text it has been given, arranges it into PH1 power format and then sends it to Import PC Power which gives you the power editor form. After you hit OK on that, the fields are validated and Construct Rumble States is called for the entered Hit, Miss and Effect text. All of that is then packaged into a JSON variable and sent to the RACK which then decodes it and generates the final macro.

BTW, getting back to the earlier RegEx comment, I should explain I use minuscule amounts of RegEx in my code (i.e. only when I absolutely have to). Trying to understand RegEx gives me a headache so I wrote my Get Field macro which works beautifully for all my purposes. Sure you can argue Regex is more versatile and requires smaller amounts of code. My response to this is simple: Just look at Rumble's fw. He used vast amounts of RegEx and the results IMO are awful. I don't know if you ever tried his work but his import routines pop up cryptic "Value for M?123x567" prompts when the RegEx fails. Very sloppy coding, even if you will be fine most times if you hit OK.

I did get a post from the guy in my group using Windows and he said he only started getting overflow problems when he moved up to Java 8. Against my and Full Bleed's advice, he is using a whopping 20Mb stack size!!! He says it solved all his overflow problems but that's a crazy high price to pay. I told him the rest of us (except you, of course) are having no issues under 8. You may want to try downgrading to 7 anyway just to see as per my earlier suggestion.

_________________
StarMan - The MacroPolicebox D&D 4E Framework: Import ANYTHING!


Top
 Profile  
 
 Offline
Kobold
 
Joined: Mon Nov 22, 2010 2:11 pm
Posts: 13
 Post subject: Re: The MacroPolicebox: Second Regeneration (D&D 4E Framewor
PostPosted: Sun Jan 07, 2018 3:26 pm 
Sure, I can PM you the modified code. I did this on SL 181, so I would do the changes again with the SL 182 code, if you'd changed anything...
The macros I had to adapt, were:
    'Setup Player Token'
    'dnd4e to Notes'
    'create button group'
    'Refresh menu tooltips'
    'Get Encounter and Daily Lists'
    'Update Tooltip'

-> Please check, if you have updated any of them in SL 182 and if so, let me know which.

Please additionaly check if any of those mentioned macros are also called from other macros, other than the ones mentioned directly above them in my list. These then also need to be updated (I so far only tested/used a tiny part of MPB and would not know...)


Top
 Profile  
 
User avatar  Offline
Dragon
 
Joined: Mon Jul 18, 2011 12:10 pm
Posts: 710
Location: Toronto
 Post subject: Re: The MacroPolicebox: Second Regeneration (D&D 4E Framewor
PostPosted: Sun Jan 07, 2018 9:15 pm 
I very rarely modify the first one and pretty much don't touch the rest anymore since they all work the way I want them to. All my changes can be found on this page. I think the best thing for you to do is to keep adding your changes to the SLs I release until you come across an edition that works. SL 183's (which I will likely put up on Tuesday morning) edition of Import PC Power will have a couple hundred more bytes of code but other than that I don't think there will be significant changes to the importer ... but ya never know.

Again, I still think a better idea would be to try Java 7 64-bit as I suggested and/or ask one of your friends to try. The problem has to do with the way MT is talking to the JVM but if I have time I will try to do some research on how evalMacro upwardly impacts stack usage.

_________________
StarMan - The MacroPolicebox D&D 4E Framework: Import ANYTHING!


Top
 Profile  
 
User avatar  Offline
Dragon
 
Joined: Mon Jul 18, 2011 12:10 pm
Posts: 710
Location: Toronto
 Post subject: 183/184
PostPosted: Thu Jan 11, 2018 9:59 am 
The rapid pace of development continues so it's time for another double announcement! 183 and 184 have seen the transformation of Create Effect restricting editing of the Duration and Property fields. As of now, you can no longer modify these for certain effects. For example, for Prone effects both of these will be greyed out because they must be set to Encounter and AC respectively. You also can't modify the Name field for this or ANY State=Reminder{x} effects the importer generates. Even if you try by going in outside the importer routines, upon clicking OK Create Effect will simply change the fields back to what they should be.

Format to PC Power should now get Sustain text from MM3 powers, Attack has now stopped giving an Error when displaying Critical lists, Processing Block no longer fails if you select No for creating an OFS (don't know why anybody would not want an OFS, but anyway ...), Import PC Power will now eliminate extra numbers from the beginning of the Damage field for NPCs, Move to Token will force you prone regardless of whether you make or fail the save vs forced movement (as per the rules), striker damage will no longer be maxed for criticals (again as per the rules), NPC Powers to Notes will now get rid of the # in front of the word "Each" and Import Magic Item will do a better job of detecting attack specs. I used the Greater Horn of Blasting for this last test and it's working much better now although you need to adjust the blast range for higher levels.

Improvements include dnd4e to Notes now setting non-power PC elements to Encounter and Daily if appropriate and support for Charging triggers. Trigger effects applied to monsters while in combat will no longer be visible in the pop-up stats sheet (as per request from my group's current DM). The remaining changes are all very minor efficiency improvements. Enjoy!

_________________
StarMan - The MacroPolicebox D&D 4E Framework: Import ANYTHING!


Top
 Profile  
 
User avatar  Offline
Dragon
 
Joined: Mon Jul 18, 2011 12:10 pm
Posts: 710
Location: Toronto
 Post subject: 185
PostPosted: Mon Jan 15, 2018 7:47 pm 
SL 185 is now out and fixes a couple of fairly serious issues. Any import that involves detection of a special feature such as d20 Choice Mode will crash. This has been fixed along with Opportunity Attack breaking by prompting for Token. Setup Player Token was never creating Encounter or Daily macro buttons and Import Magic Item needed a lot more work with respect to detected attack powers.

Improvements include better handling of turning dead tokens invisible and Create Effect generally runs more smoothly now. Most other adjustments have to do with streamlining code such as Construct Rumble States making better use of Set Search Vars which itself is now a bit easier for me to use. There have also been a few places where evalMacro calls have been consolidated so it runs less often. Sorry Xun (if you're still reading) but none of those places have been in the importer code, I don't think. :oops: Enjoy!

_________________
StarMan - The MacroPolicebox D&D 4E Framework: Import ANYTHING!


Top
 Profile  
 
Display posts from previous:  Sort by  
Reply to topic  [ 1102 posts ]  Go to page Previous  1 ... 70, 71, 72, 73, 74

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