The MacroPolicebox: Second Regeneration (D&D 4E Framework)

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

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

User avatar
StarMan
Dragon
Posts: 939
Joined: Mon Jul 18, 2011 1:10 pm
Location: Toronto

356/357

Post by StarMan »

I am happy to report the latest pair of SLs are mostly bolt-tightening stuff so it's unlikely users will notice much change. Apply Functional Template has had a few bugs fixed so it's at least functional now for the case where the original non-color token is not available. Get Prop Names has been acting strangely but I will try to finalize it in SL 358. For some reason I no longer remember I was blanking the Race prop on the ABOS before assert lines so those have been removed. Most significantly, the importer as a whole has been made a little more efficient code-wise. Enjoy!
StarMan - The MacroPolicebox D&D 4E Framework: Import ANYTHING!

User avatar
StarMan
Dragon
Posts: 939
Joined: Mon Jul 18, 2011 1:10 pm
Location: Toronto

358/359

Post by StarMan »

Once again, the latest pair of SLs mostly differs by tiny adjustments. Beyond that, 358 fixes Make Active not setting owner, Get Prop Names not returning DC properties, Sanitize Name needing to truncate after 50 characters, Setup Player Token not properly repairing non standard monster blocks, Attack giving getProperty error for blank token name and Create Quick Button failing when making for m Melee Basic.

359 fixes Start My Turn needing to assimilate code from Recharge which can be deleted, Configure Targeting erroneously including AllyLS in IncludeSelf calculation, Setup Player Token needing to show Regeneration stop options as radio mode list, Toggle Aura needlessly using setProperty and var def to set Race, Register Effect needing to enforce absolute value Mod for Penalty effects, Door token needing to use Facing feature to indicate affected side, Begin Encounter needlessly validating aura existence (can just call Toggle directly, Fall not checking if rider and mount are same size and Damage needing to only offer "Knock out" option for MaxHP>0 tokens. Enjoy!
StarMan - The MacroPolicebox D&D 4E Framework: Import ANYTHING!

Xun
Cave Troll
Posts: 29
Joined: Mon Nov 22, 2010 2:11 pm

Re: The MacroPolicebox: Second Regeneration (D&D 4E Framework)

Post by Xun »

Hi Starman, long time... :D
Once in a while I try to really dig in into your MPB, but it seems I am cursed with always hitting roadblocks :cry:
Not that my overflow issue was ever solved (at least I seem to be able to import 6lv dnd4e with 12M stack), but now I additionally run into the following error while importing a character:
   
Invalid condition in IF(macro.return*!Exists) roll option.       
Statement options (if any): IF(macro.return*!Exists)       
Statement Body : Recs=Recs+"#"+ImportText
It is somewhere in the middle of 'dnd4e to notes' in the weapon section. Ever encountered this?
FYI, the character has a Fullblade(equipped) as well as a Longbow and dagger in inventory.

BR,
Xun

User avatar
StarMan
Dragon
Posts: 939
Joined: Mon Jul 18, 2011 1:10 pm
Location: Toronto

Casting issue

Post by StarMan »

Long time indeed, Xun! Good to hear from you and glad you're making some progress however small. You didn't mention versions but I assume you are using MT 1.5.4 or later and have SL 360 loaded. It's been a while since I last worked on dnd4e to notes and even longer since I touched those lines. The error suggests macro.return is not numeric ... which shouldn't be possible given the FM=2 parameter used in the MACRO(GF) call above it. Needless to say my group has never had this difficulty but then again none of us have ever used a fullblade (not that the weapon type should matter). I was able to import one by pasting the Compendium entry into Vani's Notes tab and running Import dnd4e Powers. That is just a workaround because dnd4e to notes is not called during that process. You can also delete that weapon from your inventory in CB, export the file and then add it like this after the token is made.

What you need to do is force macro.return to be a number if it isn't. This is a technique known as "casting" (i.e. turning one data type into another). We can do that by setting line 97 in dnd4e to notes (which is blank) to this:

Code: Select all

[IF(!isNumber(macro.return)): macro.return=1]
Again, this shouldn't be necessary as the source data in the XML (i.e. the "count" variable) should already be a number. If you want to send me your dnd4e file then I can take a look to see where WotC screwed up. I am assuming other characters import OK? Hope about the other members of your group?

As for stack size, I honestly thought the fact that external JVMs are no longer used should put us on the same playing field. Because we are using the same versions, we should be getting the same results. The interesting thing is the MT gods have done an about-face on these guidelines. A member of my group live-chatted with some of them on Discord about a month ago. They said values of 16Mb or even higher is perfectly normal these days!!! I still have no trouble using 6Mb on my Windows machine when GMing my games but need to go up to at least double that when doing any import work or playing a PC. On my OS X machine 4Mb works fine for both! :wink: OK for some monsters I need to go up to 5 (weird, I don't know what makes those different) but that's fairly rare.
StarMan - The MacroPolicebox D&D 4E Framework: Import ANYTHING!

Xun
Cave Troll
Posts: 29
Joined: Mon Nov 22, 2010 2:11 pm

Re: The MacroPolicebox: Second Regeneration (D&D 4E Framework)

Post by Xun »

Yeah, I guess I am not starting to change your code when your are issueing regular updates....
And yes, I am running pretty much the actual stuff here (MT 1.5.7 and MPB SL 359). I revied PC which gave the errror and saw I had some weapons 'customized' within DDI. I took this back and now I have no issue importing it.

So I again watched all your videos and wanted to start a dry run on an encounter, I prepared.
I ran into a few issues, I wanted to check/share with you:
  • I created a Monster and made some copies. Later on, I wanted to create some more, but the copy-macro was gone.
  • After the first combat action, I got an error stating that there was a token on the map with a 'comma' in its name. So I searched and I found one of my background images having a lot of special chars in its name.
  • I cast a close burst 2 with one of the monsters, but it only targetted enemies within distance one. In the power description it says NominalRange and MaximumRange = 2. I did not use ABOS, though. (do I have to for close burst?)
  • How is attack and damage bonus taken into account? I only see the enhancement-bonus of the item. I am missing the attribute bonus (e.g., Wis) being taken into account, though it is stated in the macro code

    Code: Select all

    Range=10; Select=All; Single=1; AttackAdjustment=Wis; Damage=1d4+Wis; CritDamage=4+Wis
    Additionally, I am missing the half-level bonus to attack.

User avatar
StarMan
Dragon
Posts: 939
Joined: Mon Jul 18, 2011 1:10 pm
Location: Toronto

Answers

Post by StarMan »

Answers in order of bullet points:

1) Correct. The Create Duplicates macro will not appear in the FL menu if the token you are running it on has any effects registered. Run Health->Extended Rest and it should work. I coded Run Power (line 83) this way to prevent effects being copied to the new token. That could lead to some nasty problems so it isn't allowed.
2) Commas are evil!!! Don't use them in any names!!! This includes tokens, powers, map names, etc. It's OK to use them in skill tracks and fields in the power editor (like Hit Text) because those are descriptions, not names.
3) Hmmm, that sounds very strange. Make sure there is a Range=2 in the Attack Power call and no DistToABOS parameter (in which case you need to use the ABOS). The only time you need to use the ABOS is for macros whose name ends with "-ABOS".
4) Which item? I will try to import myself to see what's wrong. Don't forget, properties with a value of 0 will not be shown in the Rumble Eval dialog. If you have a Wis value of 10 or 11 then you won't see it at the rolling stage. If character level is 1 then you won't see HalfLevel either.
StarMan - The MacroPolicebox D&D 4E Framework: Import ANYTHING!

User avatar
StarMan
Dragon
Posts: 939
Joined: Mon Jul 18, 2011 1:10 pm
Location: Toronto

360/361

Post by StarMan »

Once again, the latest pair of SLs mostly consist of tiny efficiency tweaks. Even so, SL 360 fixes the trap's Import not searching for non-standard types properly, Get Titles not using full stop word list for NPCs, Edit Power should not look at Special field when constructing Effect states, Construct Rumble States not properly detecting Mark action, Validate Campaign need to run System Token Check and Run Power need to call No Action again after turn start.

SL 361 fixes Run Power not properly checking for Action Taken effect, Filter Metacharacters need to return 0 if number is not viable for Charging=2 (Xun this is for your weapon import issue), Edit Current Main Weapon needs to set OHCrit for two-handed weapon, Import dnd4e Powers asks for import of one record despite confirming its existence, MK Checks needs to check for NULL selection possibility, Resurrect needs to prompt for Act Now action and a Reveal NVtP root macro has been added for showing secret doors, traps and other hidden objects. Add this to Perception success tracks! Enjoy ...
StarMan - The MacroPolicebox D&D 4E Framework: Import ANYTHING!

Xun
Cave Troll
Posts: 29
Joined: Mon Nov 22, 2010 2:11 pm

Re: Answers

Post by Xun »

StarMan wrote:
Sat Nov 30, 2019 2:30 pm
Answers in order of bullet points:

1) Correct. The Create Duplicates macro will not appear in the FL menu if the token you are running it on has any effects registered. Run Health->Extended Rest and it should work. I coded Run Power (line 83) this way to prevent effects being copied to the new token. That could lead to some nasty problems so it isn't allowed.
2) Commas are evil!!! Don't use them in any names!!! This includes tokens, powers, map names, etc. It's OK to use them in skill tracks and fields in the power editor (like Hit Text) because those are descriptions, not names.
3) Hmmm, that sounds very strange. Make sure there is a Range=2 in the Attack Power call and no DistToABOS parameter (in which case you need to use the ABOS). The only time you need to use the ABOS is for macros whose name ends with "-ABOS".
4) Which item? I will try to import myself to see what's wrong. Don't forget, properties with a value of 0 will not be shown in the Rumble Eval dialog. If you have a Wis value of 10 or 11 then you won't see it at the rolling stage. If character level is 1 then you won't see HalfLevel either.
Hi again,
regarding 2) Just wondering, why the background-map image is subject to MPB...
regarding 3) I tried again, and I have to specify my finding: It was not the issue that the enemy in range 2 was not targetted, the issue is: only one enemy is targeted - then the attack stops. I have no idea why. I ran Spectral Barrage from a 4th lv specter...
regarding 4) I will PM the .dnd4e file to you, if you'd like to check. It is a hybrid character (?!). Anyway, none of the powers take into account the wis mod (5) and half-level (3) (=+8) bonus to attack.

User avatar
StarMan
Dragon
Posts: 939
Joined: Mon Jul 18, 2011 1:10 pm
Location: Toronto

Re: The MacroPolicebox: Second Regeneration (D&D 4E Framework)

Post by StarMan »

To be honest, I never considered that it would check tokens (which is what a background image essentially is if dragged onto the map) on that layer. Again, it's easier to just tell people to not use commas in token names.

OK I imported the MM3 Specter under the SL 362 beta with prompting off and didn't have any issues attacking my present party:
Chat wrote:Spectral Barrage only choice available. Auto-selecting for Encounter Power
Spectral Barrage processing by Specter commencing ...
No only choice available. Auto-selecting for Did you charge?
Spectral Barrage vs Mindartis
Specter missed my Will defense with a Mindartis=14. Margin was -7
Spectral Barrage vs Booster
Specter missed my Will defense with a Booster=16. Margin was -9
Spectral Barrage vs Angle
Specter missed my Will defense with a Angle=10. Margin was -10
Spectral Barrage vs Elaine
Specter missed my Will defense with a Elaine=11. Margin was -14
Spectral Barrage vs Drakkar
Specter missed my Will defense with a Drakkar=9. Margin was -12

Specter:

Spectral Barrage
Lurker Attack 4
Totally bad-donkey Specter Close burst 2 Psychic, Illusion attack. Recharge ♦ Psychic, Illusion Standard, Close burst 2 Description: close vs. Will
Misses
Roll
Mindartis
14
Booster
16
Angle
10
Elaine
11
Drakkar
9
Effect Registrations and Removals: Effect: Illusion, Psychic Close burst 2, enemies in the burst
Are you sure the other tokens are set to "PC" in the upper right corner of the Config tab?

The HalfLevel property should be used automatically by all PCs running Attack Power and will NOT appear in the macro code for that reason. Your weapon adjustments will not appear in your character's token either but Wis should. Yes, send me the dnd4e and I'll take a look. This site may not let you send anything that big so you may need to ZIP first.
StarMan - The MacroPolicebox D&D 4E Framework: Import ANYTHING!

User avatar
StarMan
Dragon
Posts: 939
Joined: Mon Jul 18, 2011 1:10 pm
Location: Toronto

362/363

Post by StarMan »

The main thrust of the latest pair of SLs is the transference of the main initiative JSON to the Dummy token. This data structure is used to track introduction of tokens to the Initiative Panel during the first and "Act Now" rounds. I'm pretty sure all bugs have been ironed out but remember you can use Restart Round in case something weird happens. More importantly, if the Dummy gets renamed then it is now doubly crucial to run Disengage and Reset on this token.

SL 362 fixes Edit Properties copying current effects, Attack needing to send PowersSpecs to {type}Attack triggers, Construct Rumble States recognizing all bonus types as Save/not setting GenSkillMod property for those effects, Parse Monster Stats giving Speed=0 for monsters with a fly speed, Add Skill Track needing to force Reveal NVtP run for tracks with "hidden" or "secret" and onTokenMove needs to track init tokens only.

SL 363 fixes Get Prop Names still not delivering proper list for new tokens, Edit Current Main Weapon prompting for single-handed weapon when prompting off, old Rumble props still on MPB, Edit Properties needing to assert if run from MPB, Tally Map NPC XP giving cast error if token found with blank XP property, Choose Macro not properly picking up basic powers, onTokenMove needing to check for MaxHP when restricting movement and Skill Check failing on ModSpec line when Skill not set. Enjoy!
StarMan - The MacroPolicebox D&D 4E Framework: Import ANYTHING!

User avatar
StarMan
Dragon
Posts: 939
Joined: Mon Jul 18, 2011 1:10 pm
Location: Toronto

364/365

Post by StarMan »

This pair of SLs focuses on totally revamping the disease and skill track mechanics. Most of the work is finished but I still need to clean up some loose ends for SL 366. I have tested mummy rot and things seem to be working correctly.

364 fixes Construct Rumble States need to radio prompt for state bonus mods, Parse Monster Stats and dnd4e to Notes needs to prompt for deletion of existing, Register Effect not properly testing for hidden properties, Healers Brooch on MMHoF needs to specify HealingBonus, onTokenMove checking distance moved when combat not in progress, Shift need to have an MBA option and Import PC Power need to set DT for "when missed" trigger.

365 fixes Create Effect sometimes prompting for "plussign" reference from Mod, Construct Rumble States need to use first Mod value when prompting is off, Processing Block not inserting parameters into Surge send macro call, Spend Action Point needlessly displaying Action Taken registration, Add Skill Track need to stop using UserData for track macro storage, Register Effect need to record "Disease_Level" for Mummy Rot, MK Checks sometimes uses "Abort" as monster name, Remove Effect need to record Endurance track and RunDCs for diseases, Disease - Worsen needs to remove Giant specifier for Mummy Rot, Status needs to display disease, Edit Properties needs to allow Disease_Level as transient and Grab crashing if attempt fails ({} nesting). Enjoy ...
StarMan - The MacroPolicebox D&D 4E Framework: Import ANYTHING!

User avatar
StarMan
Dragon
Posts: 939
Joined: Mon Jul 18, 2011 1:10 pm
Location: Toronto

366/367

Post by StarMan »

This pair of SLs hopefully solves the very old problem of the power locking functionality interfering with auras and trigger execution. During our Thursday session, my mummy radiated his Despair aura very nicely indeed! :twisted: Many import tweaks have been incorporated as I will now explain.

SL 366 fixes Add Skill Track failing when called by SC's Import, Make Active not resetting label, Import PC Power sometimes defaulting to Action=Immediate incorrectly, NPC Powers to Notes sometimes giving blank activation word for Aura, Finish Import crashing when setting Initiative triggers, Create Effect sometimes not inserting Link, Construct Rumble States not packaging Link into JSON, Convert Rumble States not inserting Link, Reset MPB Props not resetting Class in Dummy block and List States not showing heading bar.

SL 377 addresses Import on SC not finding number from track text, Send Macro not clearing ABOS Race, Parse Monster Stats not excluding VulText for Resist testing, Get Import Text needlessly filtering out square brackets, Import PC Power setting Prompt option for numerical Recharge powers, Reset MPB Props needlessly setting ABOS's Z prop to empty JSON and Add Skill Track needing to use default phrases for short Result submissions. Enjoy!
StarMan - The MacroPolicebox D&D 4E Framework: Import ANYTHING!

User avatar
StarMan
Dragon
Posts: 939
Joined: Mon Jul 18, 2011 1:10 pm
Location: Toronto

No DDI in the new decade!/368/369

Post by StarMan »

It's hard to believe the 10-day countdown until the end of the 2010s begins tomorrow! It's even harder to believe that's the same amount of time we have to download everything we need from our DDI accounts. :cry: Yes that dark day we have all been dreading shall soon be upon us, my fellow 4e fans. I recommend you use this short amount of time to create as many PCs in the online CB as you possibly can. You must then export them to dnd4e files for later import. Thus have I instructed the four guys I am leading as we try to assign DMing duties for the next couple of years, at least. All this needs to be done before Jan 1st! Actually, I'm pleasantly surprised Digital River went as far as they did with this so it's all good.

But don't fret! The wheels have already been in motion as to how best to utilize the offline (i.e. app-based) builder for our purposes. SL 369 is now available sporting an F4 function that will accept your dnd4e from this first version of CB. Unfortunately because power data is not encoded in the older dnd4e files, the importer will ask you to do so from the Compendium. Toward this end I strongly advise my entire user base to follow the directions at https://www.youtube.com/watch?v=aNDze9Ok5fE . I have done so but the process was far from painless on my iMac. On the bright side, you only need to do so once. I am looking at ways to improve PC imports but for now this is the best I can do. I haven't tested it yet so hopefully it works.

SL 368 fixes Run Power asking about continuing after spending an AP, various Toggle macros not registering when run through Toggles menu, Toggle Targetability needing to call Exclude Target instead of Register Effect and Healing Potion for Ally needing to use AutoRun=1 for its Send Macro call. The other fixes are just little tweaks here and there.

SL 369 fixes Import on the SC token not getting XP, Register Effect needing to set Token=getName() if set blank, Fall needing to use Duration=End for Stand up trigger, Shift not showing MBA output, Bull Rush-ABOS doing an extra unneeded RE at the beginning, dnd4e to Notes needing to accommodate offline CB for 3 properties, Reset MPB Props needs to allow house ruled by default, Parse Monster Stats not asserting properly for found duplicate and onTokenMove giving CT error when moving the MPB. Enjoy!
StarMan - The MacroPolicebox D&D 4E Framework: Import ANYTHING!

User avatar
StarMan
Dragon
Posts: 939
Joined: Mon Jul 18, 2011 1:10 pm
Location: Toronto

370/371

Post by StarMan »

The SL 37x series is off with a bang! This past weekend I was able to get a really good jump on making the MPB's import facilities compatible with the PDFs generated by the app-based CB. You may now paste your PDF text into F4 just like you did with your 4e files. It will crunch the data and a) populate your stats, b) setup the first weapon in your Attack Workspace section and c) generate all your powers (but without flavour text as explained below). Watch the Arsenal training video to find out how to get more of your equipment onto your token.

Now for the bad news! First of all, it will not do any of your feats or class features ... yet. I will try to add this functionality in a future SL but even when I do it won't be at anywhere near the level of detail we enjoyed with the online CB. This is because only one line of descriptive text is given for each. Remember, if it isn't on your PDF then I can't import it. That's the harsh reality we now have to get used to.

When printing your PDF to a file, remember to leave the Player Name field blank and do not include spaces in your character name. For example, if your character's name is "Brave Brave Sir Robin" then it needs to be entered as "BraveBraveSirRobin". The importer looks in specific places for the data it needs. Including spaces will skew this approach and result in corrupted properties. It's ok to use the Rename This Token macro to put the spaces back in after the import is done. I will document more restrictions as they come to light.

SL 370 fixes Extended Rest resetting ActionPoints on Dummy, Toggle Aura needlessly calling clearLights, Skill Closing failing with MDE if Skills prop is blank, Skill Opening not formulating Options list properly/making change to SC label, Import on Trap fails with macro location error, Skill Challenge needing image buttons and group layout change, Move Party to Info facility needed for multi-Info token maps and Place Spell needlessly asking about attack-ability.

SL 371 fixes Move Party to Info giving CT error due to Select Mode, Skill Opening needing to dynamically generate track list, Setup Player Token needing to detect PDF in imported text, PDF to Notes facility needed to dissect old CB data, End Encounter needing to reference PCs only, Replace Token facility needed, Undo group on SC needing to move to Skill Challenge on MPB, Skill Challenge quick button group needing to be regenerated on that token, Edit Properties broadcasting tracks to DM and Status needing to show skill tracks. Enjoy!
StarMan - The MacroPolicebox D&D 4E Framework: Import ANYTHING!

User avatar
StarMan
Dragon
Posts: 939
Joined: Mon Jul 18, 2011 1:10 pm
Location: Toronto

372/373

Post by StarMan »

I am very happy to report the CB PDF importer is now complete! It consists of two steps, the first of which is described in the post above. You can then post your PDF into the Notes tab again and run Import Features from the FL menu to get your feats, class features and racial traits. The full process will be documented at http://macropolicebox.advancedfreeweb.c ... characters soon so keep watching that space!

SL 372 fixes Setup Player Token needing to check whether PDF text is multi-page, Get Import Text needing to strip out metacharacters from Compendium text, Adjust Settings needing to allow editing of "Skill Tracks and Hidden", the need for a View Encoded Notes facility, Choose Lib Token displaying TOKEN, Run Power/Send Macro still calling the now defunct Immediates Allowed, Group Check St* macros needing to be moved to MPB and Skill Challenge, Trap and Door tokens needing image buttons.

SL 373 resolves "At" needing to be dropped as a stop word, Construct Rumble States needing to treat dying as that state, Move Party to Info should run goto command after move, Status not showing dynamic monster trigger refs, Disengage setting Resist of new monsters to blank and Validate Token Ownerships needing to switch to hard search if LoS one fails. Enjoy!
StarMan - The MacroPolicebox D&D 4E Framework: Import ANYTHING!

Post Reply

Return to “D&D 4e Frameworks”