Fully Managed 4e Token

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

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

Post Reply
User avatar
PyroMancer2k
Dragon
Posts: 925
Joined: Thu Sep 11, 2008 2:04 pm

Fully Managed 4e Token

Post by PyroMancer2k »

Update for b67+
Fix Drag n Drop Error b67+. If the older tokens are given you unexpected error messages these ones should solve the problem. File includes all 3 tokens and campaign props.
http://rapidshare.com/files/394636247/4eTokens_b68.zip
or
http://dl.dropbox.com/u/6399047/4eTokens_b68.zip


Pre-B52 Tokens (If you have b52+ see update below.)

http://www.savefile.com/files/1973157
or
http://rapidshare.com/files/207024189/4eTokens.zip

B52+ UPDATE: Due to parsing changes in MT as of B51+ several macros no longer work. I have fixed and you will need to get the newest version of only the DM token from the link below(Rest of tokens are still in link above). Only get this version if you are using B51 or later.
http://www.savefile.com/files/2031414
or
http://rapidshare.com/files/207052969/4 ... _1_2.rptok

EDIT B49: Newest Versions of Lib:DM Token found Here
Newest Version of Monster Token Here
Newest Version of Player Token Here
Newest Campaign Settings file for token Lib:DM v1.1, Player v1.3 and Monster v1.6 Here
IMPORTANT NOTE:
Current Tokens require b49+ to run. Also to new MT users make sure you go into your MT preferences and uncheck insert smiles. This causes problems for a lot of macros not just mine.

UPDATE: I've updated the documentation to include all the tokens as current pics as of Basic Token v2.1, Player Token v1.1, and Monster Token v1.4

Basic Token & Player Token
I'll go over the Basic and Player Tokens first. The two tokens are very similar and from a players point of view they are not that different. From a coding side though they are very different and handle how they keep track of things differently. The Basic Token was named as such because it was the first token I made and as such has a bit less complex macros. Since much of their details are similar I will cover them at the same time at point out those differences as I go along.

We'll go down the Token's Macro panel and cover each section.

1:Combat
The combat group holds much of the generic macros everyone will need for combat.
Image
I'll start off by pointing out that here like in many areas I have multiple versions of macros that do the same thing so people can choose how they to set things up.

Let's cover the Check macros. There are 4 available one that handles Save Checks, another for Ability Checks, and yet another for Skill Checks. Then there is one that does all three for those who want fewer macros on their panel. The macros allow you to pick which Check to and automatically apply any bonuses or penalties from Level/Ability/Armor as well as allowing you to enter in a Temporary Bonus. Each one saves the last options you entered, both which item was picked and the bonus you entered for those times when you need to do repeated skill checks and conditional bonuses are not changing.
Image
Next up is the all things HP related in combat. There are 5 Macros that deal with HP and Temp HP in this section. First off we have one for each Healing, Damage, and Temp HP. Then there are two macros which handle all three. The one called HP Manager was the original and is a big prompt that allows you to do all 3 at the same time if you were so inclined. The other one called HP Manager Mini lets you select which one to use via radio buttons.

These macros are very versatile in that they allow you to enter dice rolls like 1d6 as well as numbers. The display will then show how many HP you gained/lost as well as your remaining total. When you enter a number it simply shows the result but when you enter a dice roll it like 1d6 it displays the result as well as the dice so that people know you are not simply entering a number.

Individual Macros
Image
HP Manager & HP Manager Mini & Condition Manager
Image
Now to cover last 3 macros in this section. The condition Manger is knizia.fan's Apply State Macro slightly modified. It requires AidyBaby's cool state images in order to work. You can choose to pick which states to apply/remove from the list but now it saves which options you chose last so to remove a state you just added you don't need to select it from the drop down list again.

The last 2 macros in the section are Init Roll and Set Elevation. These are pretty straight forward with Init Roll making an initiative roll plus allowing for a temporary bonus to be added. The Set Elevation is simply a prompt that lets you enter the new elevation of your character for though who need to keep track of in in cases like flight or unleveled terrain.

1:Combat Stats
The next area is a very small one which doesn't need much explaining. The Combat Stats has macros that mark the token state as having used those ability that can only be used once per turn. And a macro to clear those states at the start of the person's turn.
Image

At-Will
This section holds several example powers as well as the templates to make your own powers.
Image
Here is an example of some of the Prompts for the powers.
Image
The attack display for the powers if rather uniform across all powers. You'll notice it list the Name, Primary Ability, Targeted Defense, #W + Ability Modifier in the prompts. For implement powers of course it doesn't display #W but rather the damage amount. Also any weapon or implement bonuses are not taken into account. You can choose the CA, Concealment, and Cover options and it will automatically apply their modifiers. There is also a spot to enter your own amount of bonus to Attack or Damage rolls should you have some kind of temporary bonus.

The token saves your last options on any power in a single spot. This means that if you enter a 2 on the Temporary attack Bonus the next time you run any other the other powers it will have a 2 already enter there for you. This can be very handy for long term bonuses that apply throughout combat. And if the bonus has ended simply enter a 0 in it's place.

The ammo attack is new and as you can see from the picture you simply need to choose which ammo you wish to use. The attack automatically reduces the ammo left by 1 when the power is used and it gives a prompt warning you are out of ammo then aborts if you choose an ammo you don't have any left in. The ammo it self can be edited in the Consumables Manager which we'll get to later.

There are some differences between the Player and Basic Tokens here so I'll go over them now. First off unlike the Basic Token the Player Token keeps track of what type of item is in each hand. This means there is a chance you will not have a weapon or implement in your had when you try to run a power. In order to prevent a huge number of errors suddenly appearing the macro does a check first to see what you have in your hands. Thus if you don't have a weapon it won't run a power that uses a weapon but instead give you a warning message. Though not really much of a problem for someone who simply wants to run then them I figured you should be aware of it.

Now that we have covered the basics of the powers its time to get into the nitty gritty macro code. First off the macros are all very similar and they have their own uses as starting ground for making your own powers. Making your own powers can be fairly easy if you know what to edit and which macros to edit them in. Here is a section of code from the Basic Weapon Attack macro.

Code: Select all

<!-- Name of the Power for display Purposes -->
[H:PowerName = "Basic Weapon Attack"]

<!-- Setup Ability use and Defense .. Ability Choices and it is case sensative(Str, Con, Dex, Int, Wis, Cha) -->
[H:AbilityUsed="Str")] 
[H:Defense = "AC"]

<!-- AbilityDamageUsed is set to 1 if you also do damage with primary ability like most powers. Set to 0 if you don't use ability modifier damage like in Ranger Twin Strike -->
[H:AbilityDamageUsed=1]

<!-- ExtraAbilityUsed is which aditional ability is used for an attack. ExtraAbilityDamageUsed is set to 1 if you use an additional ability damage modifier like Rogue Sly Flourish. -->
[H:ExtraAbilityUsed="Cha"]
[H:ExtraAbilityDamageUsed=0]

<!-- ExtraAttackAbility is extra ability used in Attack roll. ExtraAttackAbilityUsed is set to 1 if you use it like Fighter Combat Superiority-->
[H: ExtraAttackAbility = "Wis"]
[H: ExtraAttackAbilityUsed = 0]

<!-- Set the Damage Type such as Necrotic, Fire, Cold, and etc. -->
[H:DamageType = " "]

<!-- HitEffect is addition effects such as ongoing that happen in addition to the hit. PowerEffect or effects that happen regardless of weather the power hits -->
[H:HitEffect = " "]
[H:PowerEffect = " "]

<!-- MultiAttacks is set to 1 if the power can target multiple creatures. This will change the prompt to user to enter number of targets. AtkCount is the default number of attacks that will run unless the user changes in the prompt. WCount is the #W of a power -->
[H:MultiAttacks = 0]
[H:AtkCount=1]
[H:WCount = ceiling(Level/20)]

<!-- If attack uses Damage Rolls that are seperate like with Twin Strike or other Multi-Attack powers then enter 1. If attack uses one damage roll like with Burst and Blast attacks then enter 0 -->
[H:SeparateDamage=0]
You'll notice this kind of section is found in all my attack macros. Though some have more options then others. Each section has a description on what those variables do and for the most part when creating powers you don't need to change anything other then what is found in these sections at the start of the macro. This makes creating new powers extremely quick and easy.

As for which macros are good for the starting ground for what types of powers here is a list.
Basic Weapon Attack - Powers that involve Weapon attacks
Basic Implement Attack - Power that involve Implement Attacks
Basic Generic Attack - Powers that don't use equipment for any bonuses such as racial power Dragon's Breath
Basic Weapon Attack(Ammo) - Any power that uses a weapon and ammo Or simply for those who want their players to keep track of arrows/bolts/etc.
Basic Implement Attack(Ammo) - Power that uses implement and ammo(Non that I know of yet)
Basic Attack & Twin Strike - Powers that allow you to choose between two different ability scores for the attack/damage rolls.

I should point out that Basic Attack & Twin Strike don't quite handle the choice of abilities in an "Obvious" manner. You note the [H:AbilityUsed="Str or Dex")] line where you set ability for other powers. This is NOT a valid option and won't work if you tried to put it in other powers. It's only set that way so it displays that in the prompt. Where the real ability pick is set is shortly after the prompt when the user picks which to do Melee/Range. [H:AbilityUsed=if(AttackType==0, "Str", "Dex")] is the line and it appears right after the section where it saves the choices made in the prompt. If you want it to pick between two different Abilities you need to change it there. After that point the rest of the code makes the correct reference to it both in values and Text name on the display.

Encounter & Daily
These two sections are very similar so I'll cover them both at the same time.
Image
The macros themselves only track powers and don't actually run themselves. There is a line marked Insert Macro Code Here where you can put in your own macro code. It's setup like this so you can use your own macros with the power tracking and not confined to use mine. If you want to use my attack macros with the Tracker then simply copy the whole macro into the that spot.

Each power is identified by a list of numbers at that start of the macro. These numbers should be different for each power otherwise when you use one power any other that have that same number will be considered to be used. The number is set as part of a list so you can have multiple numbers assigned to a single power and it won't be marked as used until all numbers in the list have been used. If you try and run a macro that has been used it will display a prompt that warns you have already used this power.

The new feature that changes the color of the macro's font when the power is used is based of the macro's name. You need to copy the exact name of the macro and paste it at the bottom of the macro where it changes the color. There is a note in the macro so it's easy to find. If you don't do this when you use it then it won't change colors. Also the rest macros check for macros in these groups so if you don't have the macro in the correct group they won't be set back to white font. You don't need to charge anything in the rest macro since it looks for macros in that group and not by name.

Two new Macro examples were created in this section do to request. The first one prompts you if you want to use the macro before it actually runs. The second one when you click on a power that has been used besides displaying the warning that it has already been used it also has a check box which lets you reuse the power.

Z:Daily Use Tracker
Image
Again there are several versions of each macro to allow players to choose whichever they prefer. These macros handle AP, Milestone, and Daily Item Uses Tracking. The macros marked (Auto) simply run when you click on them. The ones marked (Prompt) have a check box verify option before they run. The only two macros in this section that don't do only one thing are the Short/Extended Rest and AP/MS/IP Manager(Rest). The first one simply lets you choose which type of rest you wish to do. The second allows you to handle all the options in this section with one prompt.

AP/MS/IP Manager(Rest) & Short/Extended Rest
Image

ZZ:Char Sheet Macros
Image
This section has macros that deal with char stats, feats, and Display equipment.

First let's start with the char setup.
Image
The first let's you enter the level, ability scores, Max HP, HS Per Day, HS Bonus such as the dragonborn's racial ability, speed, and an preferment bonuses to init. The next prompt allows you to enter Various bonuses from your class/feat/misc to each of the defenses. These are kept in separate so you know where the bonuses are coming from and don't just have one total. At the bottom are various DR effects which appear on the char statsheet. This is handy for items that add these effects to your char since their isn't really a good way to do it otherwise. The last page is skills which allow you to put any bonuses or penalty you have to each skill. You don't need to add level or ability bonuses because they are done automatically. The last option is for those who have a static bonus to saving throws like Humans.

Next up is the Feat Manager and Display. These macros allow you to add/remove an number of feats you want to the list. You can then display them all for review.
Image

Since Display Consumables & Equiped Items Power covered two items I left it in this section. Obviously it displays your Consumables in your inventory and a list of powers on your equipped items.
Image

The last macro is Setup Statsheet. The options on this macro are different for both the Player and Basic Tokens. On the Basic Token the only real options are to how defenses are displayed. You can Choose to display Armor name as well as How defenses are totaled. The Player token has a lot more options in this area and you can set how several things are displayed on your Statsheet.

Here are some examples of Basic Token Statsheet choices
Image
Here are some examples of Player Token Statsheet choices.
Image

ZZ:Combat Inventory
Image
On the Basic Token this section is just called Inventory. Also the Basic token also has fewer macros because the Player Token allows you to have individual macros for each item slot. The picture is from the Player Token.

The Inventory Editor lets you first pick which type of item to edit followed by which item of that type then the item itself. The image of the various prompts in the editor are taken from the Basic Token's Macro which you are only allowed a set number of items. The Player Token prompts look very similar except when picking an item there is a New item on the list which lets you add another item of that type. It also has a check on the item stat prompt to delete the item from your inventory.
Image

Equip Char Macro works basically the same for both tokens but displays differently because of the way each handles Inventory. Simply pick which item you want to equip from the drop down list. The player's macro has individual macros for each slot if you only want to change one thing or prefer individual macros.
Image

The Display Equipped Item Powers macro is just like the one in Char Sheet section except it doesn't show Consumables.

ZZ:Consumables Inventory
Image

The Consumables Manager works very similar to the Inventory Editor in the Previous section. The only difference is that you use it to edit the Consumable items. Also both tokens allow you to add/remove consumables from your inventory without limit.
Image

The Use Consumables macro makes a list of all consumable items. You then can select which item you want to use. It will display the item's Power and reduce the amount in your inventory by one.
Image

Display Consumables Inventory is the same as the one in the Char Sheet section except it doesn't display the equipped item powers.

ZZ:Non-Combat Inventory
Image
The Non-Combat Inventory section macros are basically the same as the Combat Inventory section except it handles all the other equipment items like Head, Arms, Hands, Rings, Waist, Feet, and Wondrous.
Image
The macros allow you to add/remove as many of each item type that you want. And both Tokens use the same macros in this section.

ZZ:TK Examples
Image
This section has examples of how to use TK's Macros with my token. It quite simply has a block of code which you can copy and paste to the front of TK's macros and it will convert the variables I use into the ones his macros use. This doesn't effect the logic of how his macros work it only converts the variable names and includes the fancy prompt I use with my attack macros.

There are multiple examples in this section because you need to use different code for if it is a Implement or Weapon based attack.

ZZZ:Dialog Boxes
This section takes advantage of the brand new Dialog box features. And odds are since they are better and you can do other things while Dialog Boxes are up I'll end up remove the other Display Macros from the old Prompt which won't let you do anything else while they are up.

Anyhow the Macros pretty much do what they say and best shown off with a lot of pictures rather then descriptions.

Char Sheet with and without Borders
Image
Consumables Bold and Non-Bold versions.
Image
List of all Equipment Bold
Image
Feat List Bold/UnBold & List of currently Equipped weapons Powers.
Image
Displays all currently equipped Items in Bold
Image
Displays Picture and name of Token States
Image

ZZZ:DM Tools
Image
As the name of this section implies they are simple DM tools. They allow the DM to add/remove HS on the fly. They also allow the DM to give an extra AP or Daily Item use without need for the MileStone which gives both. There isn't really any pictures to show cause the macros simply do what they say and display the message in chat box.

ZZZ:Token Tools
Image
The basic token does not have the Inventory set because it's Inventory system for combat equipment is hard coded to the token props. All of the systems work the same way they simply run for which ever inventory they mention. This section is for those looking to expand on what is available in each section of the inventories.

Now for what they do. First it displays the list of all types of items which you can then either add or remove items from the list. Next you are given a properties list of each item type. You can either add or remove properties to the list for each item type as you see fit.
Image
The equipment system is very versatile and any new types or properties added will automatically show up in the editors because they create their prompts dynamically. This can be very useful like in the case of consumables you can add a new type of consumables and the Use Consumables, Display Consumables, and Consumables Manager macros will all recognize it right away.

The Setup Editor does have some "risk" with it though. All types should have the Name Property because most macros look for the "Name" when they display it in the prompt. A consumable should also have an Amt property otherwise the Use Consumables won't list it because it doesn't have any left. Also while you can remove Properties this could be problematic if you remove a property that other macros need such as EnchantBonus. And lastly just because you add a new type of item doesn't mean it will let you equip it in a slot you want. Bad news is for this you have to manual edit the macro yourself. The good news it's extremely easy to do. Take the main hand for example you'll notice this line at the top of the macro to equip just the main hand on the player [H:MainHandTypes="Weapon, Implement"]. This list the types available for use in that slot all you need to do is add the type to the list.

Lastly is the "Setup Cleaner" which for lack of a better description cleans out the inventory. This does not mean that it removes all the items but instead removes any Types or Properties no longer in use. Say for example you add a new type of consumable but then later decide you don't want it. Well just because you remove it with the Setup Editor just means that it won't appear in the prompts anymore it's still actually saved on the token so to clear up the space this macro removes all the clutter. In testing I even found it is handy for correcting mistakes or errors cause when manually editing the strProp or bad macro commands that screw up the strProp. You can run it and it won't effect your current items as it only removes Types/Properties no longer in use.

That concludes the Basic/Player Tokens section. If you have any questions, comments, suggestions, or etc. let me know. I can also of course update the information to give more detail on specific sections if needed.

Monster Token
In an effort to keep things the same there are some things on the monster token that are similar to the Basic/Player Tokens in which case I'll refer back to them. The most obvious is the first section.

1:Combat
The combat group holds much of the generic macros everyone will need for combat.
Image
This section is completely the same with one small difference. The HP Manager is now the HP/AP Manager with an option to spend an AP in case the monster has any.

1:Combat Stats
Image
The macros without prompt in the name simply add the state to the token of a preset color which you can change in the macro itself. The ones with the prompt let you pick which color to use from a simple prompt. This is handy if you need to keep track of things from multiple sources. Of course the states were always there but now they are in quick handy macros.
Image

At-Will
Image
Just like the PC tokens these powers are here as templates to help make your own powers quick and easy. They have a list of variables at the start of the macro with a description of what each one is for. As for what each power template is best suited I'll cover that now.

Power Macro Template - A power that uses the pregenerated Attack bonus based on the monsters type and role.
Power Macro Template With Ammo - The same as the above except it also handles the use of ammo which some monsters have.
(Generic) Power Macro Template - Unlike the other macros this one allows you to enter your own value for the attack bonus and doesn't generate it on it's own.

These Macros also contain the same attack display as the PC tokens which let you choose CA, Concealment, Cover, and add Temp Bonuses.

Encounter & Recharge
Image
The Encounter power is identical to the one found on the PC tokens. You simply edit which numbers are assigned to the power and copy your Power Macro code into the spot indicated by the comment.

The recharge power on the other hand is a bit different. It to has you pick a number to assign to the power and it's tracking is different from encounter powers so you don't have to worry about the two different types overlapping. But in addition the power has a variable at the start which you can set to determine what you need to roll in order for the power to recharge. When the power is used and you click on it a prompt will appear asking if you want to make a recharge roll. If you do it displays what you needed to roll and what you did roll if you fail. If you are successful the power is recharge and the prompt tells you so.
Image

ZZ:Char Sheet Macros
Image
The Setup Monster macro allows you to setup all the monsters stats through a series of prompts.

The first prompt lets you set the level of the monster as well as Role/Type, Ability Scores, and speed. From there several things are generated on the second prompt. At the top it displays what the default Defenses for a monster of that Level/Role are followed by 4 boxes that allow you to enter a modifier to either add or decrease what their end result would be. This is handy for beefing up Elites and Solos since their extra defense is not automatic. As well as making monsters more unique and not simply standard cookie cutter. Next up is the default HP for a monster of that Level/Role/Type which means it will calculate Elite and Solo HP correctly. From there you can choose to give your NPC more or less HP then the standard type of their Level/Role/Type. This trend of displaying the default value and allowing for a modifier continues their Init, Attack vs AC, and Attack vs Non-AC. In the case of the Attacks this is the value that the Attack Macros get when they look for to hit bonus.

The last part of the 2nd prompt has a section that allows you to enter any details the monster might have pertaining to DR. Left as a 0 and they won't show up on the monsters statsheet. The final option on the page is reset monster. This is useful as it restores the monsters HP, HS, AP, and macros the Encounter/Recharge powers as unused again.

The 3rd prompt displays a list of all the ability modifiers at the top and includes a list of all the skills. Here you enter the bonus needed to reach the desired amount. For example say you want to have Stealth at 12 on the monster so you look at the top and see it says Bonus to Dex based skills is 7 then you should even 5 in the spot next to the skill. And at the bottom you'll notice a similar setup for Saving throws. It automatically adds the bonus for Elite and Solos which it will show but if you want a monster to have a different bonus to saving throws then you can enter a modifier value in the spot.
Image

The next 2 macros in this section have to do with Notes. They work pretty much like the Feat Macros on the PC tokens and allow the DM to right up a bunch of notes and then display them.
Image

ZZ:Consumables Inventory
Image
This section is the same as the PC tokens. You can add/remove/edit the consumables. Display them all. And use them.

ZZZ:Dialog Boxes
Image
This section has several macros that allow you to Display things with the new Dialog boxes. It's easier to just show them off then describe them so that's what I'll do.

CharSheet with and without border
Image
Bold and Normal versions of Display Notes and Consumables
Image
There is also a Display of the States which is the same as the one on the PC tokens.

ZZZ:DM Tools
Image
This section includes several handy DM Tools. First off the ability to add an AP to a monster that you want to since the setup macro doesn't provide for this. Macros to add/remove HS from the monster for those that have powers which use them. And lastly a quick way to reset the Encounter and Recharge powers. I must warn you though the Reset Powers macro will reset the tracking numbers no matter where the macros are located but just like the Daily/Encounter Powers on PC tokens it looks in those groups in order to change their font color back to white.

ZZZ:Token Tools
Image
Just like in the PC tokens these macros let you edit the type of items and the property list of those types. The monster token only has one type of inventory though and that is Consumables which is why it only has a setup editor for that Inventory.

That covers it for the monster token. Any questions, comments, suggestions, or etc just let me know.


The Most recent version of all tokens can be found Here.

WOLead made some additional power macros that display in the same style as TK's macros which can be found here.
http://forums.rptools.net/viewtopic.php?f=8&t=4476

Previous Versions:
Basic Token(No Longer Supported):
v2.1 http://forums.rptools.net/viewtopic.php ... 875#p72884
v2.0 http://forums.rptools.net/viewtopic.php?p=71848#71848
v1.9 http://forums.rptools.net/viewtopic.php?p=70780#70780
v1.8 http://forums.rptools.net/viewtopic.php?p=70543#70543
v1.7 http://forums.rptools.net/viewtopic.php?p=70340#70340
v1.6 http://forums.rptools.net/viewtopic.php?p=67466#67466
v1.5 http://forums.rptools.net/viewtopic.php?p=67466#67466
v1.4 http://forums.rptools.net/viewtopic.php?p=65991#65991
v1.3 http://forums.rptools.net/viewtopic.php?p=65991#65991
v1.2 http://forums.rptools.net/viewtopic.php?p=65831#65831
v1.1 http://forums.rptools.net/viewtopic.php?p=64797#64797

Monster Token:
v1.6 http://forums.rptools.net/viewtopic.php?p=76519#p76519
v1.5 http://forums.rptools.net/viewtopic.php?p=73887#p73887
v1.4 http://forums.rptools.net/viewtopic.php ... 875#p72884
v1.3 http://forums.rptools.net/viewtopic.php?p=71848#71848
v1.2 http://forums.rptools.net/viewtopic.php?p=67456#67456
v1.1 http://forums.rptools.net/viewtopic.php?p=67466#67466
v1.0 http://forums.rptools.net/viewtopic.php?p=65831#65831

Player Token:
v1.3 http://forums.rptools.net/viewtopic.php?p=76519#p76519
v1.2 http://forums.rptools.net/viewtopic.php?p=73887#p73887
v1.1 http://forums.rptools.net/viewtopic.php ... 875#p72884
v1.0 http://forums.rptools.net/viewtopic.php?p=71848#71848
v0.4 http://forums.rptools.net/viewtopic.php?p=71183#71183
v0.3 http://forums.rptools.net/viewtopic.php?p=71061#71061

Lib:DM Token:
v1.1 http://forums.rptools.net/viewtopic.php?p=76519#p76519
v1.0 http://forums.rptools.net/viewtopic.php?p=73887#p73887
Last edited by PyroMancer2k on Wed Jun 02, 2010 11:11 pm, edited 32 times in total.

User avatar
PyroMancer2k
Dragon
Posts: 925
Joined: Thu Sep 11, 2008 2:04 pm

Post by PyroMancer2k »

CODING EXAMPLES

I figured some people might want to look at different aspects of my Token outside of all the clutter so they know what all is involved.

Power Tracking System
http://www.savefile.com/files/2079850
or
http://rapidshare.com/files/222281437/P ... king.cmpgn

Inventory System
http://www.savefile.com/files/2079843
or
http://rapidshare.com/files/222280756/I ... tems.cmpgn

StrProp Editor
http://www.savefile.com/files/2076312
or
http://rapidshare.com/files/220971544/S ... itor.cmpgn

Json Editor
http://www.savefile.com/files/1996067

Works in progress
Over Christmas holiday I started work on my own power creator macro tool but once New Years hit it got put on hold so never I never finished it. But if you wanna take a look at what I had so far including coding, formating, and etc feel free to.

Incomplete Power Creator Tool
http://rapidshare.com/files/222299438/P ... v0_8.cmpgn


HTML FORMATING EXAMPLES
At-Will

Code: Select all

<table border='0' cellpadding='0' cellspacing='0'><tr bgcolor='#5A8E63'><td WIDTH="50%"><span style='color:white'><b>POWERNAME</b></span></td><td WIDTH="50%"><p align="right"><span style='color:white'><b>CLASS TYPE LEVEL</b></span></p></td></tr>
<tr bgcolor='#D6D7C6'><td COLSPAN=2> <i>FLUFF</i></td></tr>
<tr><td COLSPAN=2><b> At-Will &#149;  KEYWORDS, ITEM TYPE</b></tr>
<tr><td><b>ACTION TYPE</b></td><td><b>RANGE</b> <br></td></tr>
<tr><td COLSPAN=2><b>Target:</b> TARGETS <br><b>Attack:</b> ATTACK vs. DEFENSE</td></tr>
<tr bgcolor='#D6D7C6'><td COLSPAN=2><b>Hit:</b> DAMAGE + 1STMODIFIER + 2NDMODIFER DAMAGETYPE. HITEFFECT</td></tr>
<tr><td COLSPAN=2><b>Miss:</b> MISSEFFECT.<br></td></tr>
<tr><td COLSPAN=2 bgcolor='#D6D7C6'><b>Effect:</b> POWEREFFECT.<br></td></tr>
<tr ><td COLSPAN=2><b>SUSTAINACTION:</b> SUSTAINEFFECT.<br></td></tr>
</table>
Encounter

Code: Select all

<table border='0' cellpadding='0' cellspacing='0'><tr bgcolor='#7B1429'><td WIDTH="50%"><span style='color:white'><b>POWERNAME</b></span></td><td WIDTH="50%"><p align="right"><span style='color:white'><b>CLASS TYPE LEVEL</b></span></p></td></tr>
<tr bgcolor='#D6D7C6'><td COLSPAN=2> <i>FLUFF</i></td></tr>
<tr><td COLSPAN=2><b> Encounter &#149;  KEYWORDS, ITEM TYPE</b></tr>
<tr><td><b>ACTION TYPE</b></td><td><b>RANGE</b> <br></td></tr>
<tr><td COLSPAN=2><b>Target:</b> TARGETS <br><b>Attack:</b> ATTACK vs. DEFENSE</td></tr>
<tr bgcolor='#D6D7C6'><td COLSPAN=2><b>Hit:</b> DAMAGE + 1STMODIFIER + 2NDMODIFER DAMAGETYPE. HITEFFECT</td></tr>
<tr><td COLSPAN=2><b>Miss:</b> MISSEFFECT.<br></td></tr>
<tr><td COLSPAN=2 bgcolor='#D6D7C6'><b>Effect:</b> POWEREFFECT.<br></td></tr>
<tr ><td COLSPAN=2><b>SUSTAINACTION:</b> SUSTAINEFFECT.<br></td></tr>
</table>
Daily

Code: Select all

<table border='0' cellpadding='0' cellspacing='0'><tr bgcolor='#424142'><td WIDTH="50%"><span style='color:white'><b>POWERNAME</b></span></td><td WIDTH="50%"><p align="right"><span style='color:white'><b>CLASS TYPE LEVEL</b></span></p></td></tr>
<tr bgcolor='#D6D7C6'><td COLSPAN=2> <i>FLUFF</i></td></tr>
<tr><td COLSPAN=2><b> Daily &#149;  KEYWORDS, ITEM TYPE</b></tr>
<tr><td><b>ACTION TYPE</b></td><td><b>RANGE</b> <br></td></tr>
<tr><td COLSPAN=2><b>Target:</b> TARGETS <br><b>Attack:</b> ATTACK vs. DEFENSE</td></tr>
<tr bgcolor='#D6D7C6'><td COLSPAN=2><b>Hit:</b> DAMAGE + 1STMODIFIER + 2NDMODIFER DAMAGETYPE. HITEFFECT</td></tr>
<tr><td COLSPAN=2><b>Miss:</b> MISSEFFECT.<br></td></tr>
<tr><td COLSPAN=2 bgcolor='#D6D7C6'><b>Effect:</b> POWEREFFECT.<br></td></tr>
<tr ><td COLSPAN=2><b>SUSTAINACTION:</b> SUSTAINEFFECT.<br></td></tr>
</table>
HTML COLORS
D&D COLORS
DAILY - #424142
ENCOUNTER - #7B1429
FLUFF - #D6D7C6
ATWILL - #5A8E63
MAGIC - #D6A210

Get equipped Weapon Data
This code simply let's you choose a weapon you have equipped then returns it as a StrProp to be used by Power Macro Code. I figured it would be handy for those who wanted to make their own custom powers using my token and needed a way to access to Equipped Weapon.

Code: Select all

<!-- This allows you to access the ability bonuses -->
[H:varsFromStrProp(AbilityMod)]

<!-- Creates List of Equiped Weapons -->
[H:WeaponSlots = "MainHand, OffHand"]
[H:EquipedItems = ""]
[H,C(listCount(WeaponSlots)): EquipedItems = EquipedItems +  if(getStrProp(Equipment, listGet(WeaponSlots, roll.count) + "Type") == "Weapon", getStrProp(Equipment, listGet(WeaponSlots, roll.count) + "Type") + getStrProp(Equipment, listGet(WeaponSlots, roll.count) + "Num") + "," , "")]

<!-- Checks to see if have any weapons equiped -->
[H: NoWeaponDisplay = if(listCount(EquipedItems) == 0, 'input("Blah | Equip an Weapon | This Power requires you have a weapon | LABEL")' , "1d6")]
[H:eval(NoWeaponDisplay)]
[H:abort(listCount(EquipedItems))]

<!-- Creates a list of weapon names -->
[H,while(listFind(EquipedItems, "") >= 0): EquipedItems = listDelete(EquipedItems, listFind(EquipedItems, ""))]
[H:WeaponNames = ""]
[H,C(listCount(EquipedItems)): WeaponNames = WeaponNames + getStrProp(Inventory, listGet(EquipedItems, roll.count) + "Name") + if(listCount(EquipedItems) > (roll.count+1), "," , "")]

<!-- Gets which weapon to use, Number of attacks, Ability Modifier to use, and any Temp Bonuses like Power Bonuses -->
[H:WeaponPick = 0]
[H: InputPrompt = 'input('
+ if(listCount(EquipedItems) > 1,' "WeaponPick | "+WeaponNames+" | Choose Weapon | Radio | ORIENT=H SELECT=" + getStrProp(CombatStatus, "LastWeaponPick"), ' , "")
+ '"")']
[H:fail = eval(InputPrompt)]
[H:abort(fail)] 

<!-- Saves Choices -->
[H:PropsUsedList = " WeaponPick"]
[H,C(listCount(PropsUsedList)):CombatStatus = setStrProp(CombatStatus, "Last"+listGet(PropsUsedList, roll.count), eval(listGet(PropsUsedList, roll.count)) )]

<!-- Equips Weapon Based on your Choice in Dialog Box -->
[H:WeaponPropCount = listCount(getStrProp(Inventory, 'WeaponProperty'))]
[H:WeaponPropList = getStrProp(Inventory, 'WeaponProperty')]
[H,C(listCount(EquipedItems)),CODE: {
 [H:WeaponNum = roll.count]
 [H:eval('EItem'+WeaponNum+' = "" ')]
 [H,C(WeaponPropCount): eval('EItem'+WeaponNum+'= setStrProp(EItem'+WeaponNum+', listGet(WeaponPropList, roll.count), getStrProp(Inventory, listGet(EquipedItems,WeaponNum) + listGet(WeaponPropList, roll.count)))')]
}]

<!-- You can use the newly choosen weapon info as follows -->

<!-- Access the StrProp -->
StrProp [eval("EItem"+WeaponPick)]<BR>
<BR>

<!-- Turns StrProp Values into Variables -->
[H:varsFromStrProp(eval('EItem'+WeaponPick))]
<!-- Display Those Variables -->
Name: [Name]<BR>
ProfBonus: [ProfBonus]<BR>
EnchantBonus: [EnchantBonus]<BR>
Damage: [Damage]<BR>
MaxDamage: [MaxDamage]<BR>
FeatDamageBonus: [FeatDamageBonus]<BR>
CritRange: [CritRange]<BR>
CritDamage: [CritDamage]<BR>
WpnProperties: [WpnProperties]<BR>
Property: [Property]<BR>
Powers: [Powers]<BR>
Notes: [Notes]<BR>



----------------------------------------------------------------------------
ORIGINAL POST :)

I realized something else it could use. A power tracker to keep track of if you have used a power this Encounter/Day yet. While this would mostly be tied to individual power macros people wrote I came up with a nice way to do it that will allow you to add to your existing macros.


It only requires one new variable. Two if you also do Daily Powers ;)

Code: Select all

EncounterPowersUsed:0

You simply add this code to the macros you only want to allow one use of per Enc/Day and up your current macro code in the spot indicated :). The alert box will only pop up if you have used the power already. The great thing about this is you simple set EncounterPowersUsed = 0 to reset them all.

Code: Select all

<!-- The Power ID is the exponent number (2^#) Also no two powers should have the same ID!!-->
[H:CurrentPowerID=2^0]
[H:Used=band(EncounterPowersUsed, CurrentPowerID)]
[H:UsedAlert = if(Used, 'input("Blah | Try Another Power | This Power has already been Used | LABEL")', "Used")]
[H:eval(UsedAlert)]
[H:abort(!Used)]

<!-- INSERT MACRO CODE HERE -->

[EncounterPowersUsed = bor(EncounterPowersUsed, CurrentPowerID)]
The only problem is it doesn't really handle powers with two uses like Healing Word. But that can be solved by simply Duplicating it and giving it a different ID#. Oh and the ID numbers can be any number 0 or higher. NO NEGATIVES!
Last edited by PyroMancer2k on Fri Apr 17, 2009 1:06 am, edited 7 times in total.

User avatar
palmer
Great Wyrm
Posts: 1367
Joined: Sat Sep 06, 2008 7:54 pm

Post by palmer »

Once I have my system working, I'll let you see.

I encapsulate the entire power in a props string, as well as each weapon and implement. Then you choose
A: The type of power (Melee, Ranged, Close, Area)
B: The actual power to use
C: Weapon/Implement to use and combat mods

The key thing mine does is combine all the powers into 2 macros (One for Melee/Ranged, one for Close/Area), and then only shows you the powers that you are able to use.
If you've already used your Enc/Daily, it simply does not show up on the list of powers until you rest.

User avatar
PyroMancer2k
Dragon
Posts: 925
Joined: Thu Sep 11, 2008 2:04 pm

Post by PyroMancer2k »

Sounds interesting. When do you think you'll be done? Or at least able to show some of it off.

User avatar
hennebeck
Dragon
Posts: 394
Joined: Sun Jun 01, 2008 12:06 am
Location: THe City of Roses

Post by hennebeck »

PyroMancer2k, excellent work.
So far, I've found this as an error.
Incapacitated isn't a state in 4e.
I don't know if it's supposed to be something else or if this is just a hold over from 3.5

And something else I would suggest adding to your AP/MS/IP macro would be an encounter tracker.
Meaning, if you finish an encounter you click it and it keeps the total. Instead of adding Milestones, add encounters and total the Milestones.
Does that make sense?

And another suggestion.
How about check boxes for trained skills just like the character sheet.
And then it adds that as a +5 so you just input anything else like racial +2 bonus to dungeoneering or what not.

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

Post by DeviantNull »

hennebeck wrote:And another suggestion.
How about check boxes for trained skills just like the character sheet.
And then it adds that as a +5 so you just input anything else like racial +2 bonus to dungeoneering or what not.
I thought about something like this. But the problem I ran into is not getting it to do it, it's not having it eat up the whole screen. Right now there isn't a way to put input items side by side (aside from radio buttons) so you end up with a list that is 2 times the size. Or you make it 2 separate input screens.

You'd also have to store if the skill is trained as well as the bonus so you end up with two times the stored properties lists as well. If you simply store it as a total and then try to reverse the math the input box won't be able to tell a trained skill from a bonus of 5+.

Personally, I decided that the hassle wasn't worth it and it was easier to just plug numbers in. I'd love to take a peak though if someone can pull it off.

User avatar
palmer
Great Wyrm
Posts: 1367
Joined: Sat Sep 06, 2008 7:54 pm

Post by palmer »

PyroMancer2k wrote:Sounds interesting. When do you think you'll be done? Or at least able to show some of it off.
I'm supposed to have my next session ready to run by the end of the week, so I better have it ready by then :)

I have the base attack macros done. I just need the rest macros, and then to do the ones for utility/special powers (Healing Word, Second Wind, etc).

I already have a bunch of b39 macros for healing/damage/init that I can just reuse as is, so I likely will.

It's dependent on the carefully formatted props, of course, so I'll likely just post a campaign file with it all included.

Oh yeah, the melee/ranged (single target) attack macro auto-calculates crits as well. It assumes that a 20 will normally hit, and thus counts as a crit. I don't intend to run games where there are enemies that require rolling a 21+mods to hit, ergo 20 always crits.

User avatar
hennebeck
Dragon
Posts: 394
Joined: Sun Jun 01, 2008 12:06 am
Location: THe City of Roses

Post by hennebeck »

I thought that too, palmer.
But very shortly into levels you start fighting things that are going to be a lot easier for the Fighters to hit with their +6 to strength that wizards will have a tough time hitting as a OA.
I think just a 27 AC for level 4 wizard would be impossible to hit.

User avatar
palmer
Great Wyrm
Posts: 1367
Joined: Sat Sep 06, 2008 7:54 pm

Post by palmer »

hennebeck wrote:I thought that too, palmer.
But very shortly into levels you start fighting things that are going to be a lot easier for the Fighters to hit with their +6 to strength that wizards will have a tough time hitting as a OA.
I think just a 27 AC for level 4 wizard would be impossible to hit.
You show me a wizard that is making AoOs, and I'll show you a wizard corpse. In a decently played group, a wizard should not be making melee attacks - ever.

User avatar
UntoldGlory
Great Wyrm
Posts: 1649
Joined: Sun Mar 16, 2008 8:12 pm

Post by UntoldGlory »

Some people do like to play fighter mages you know.

User avatar
PyroMancer2k
Dragon
Posts: 925
Joined: Thu Sep 11, 2008 2:04 pm

Post by PyroMancer2k »

hennebeck wrote:PyroMancer2k, excellent work.
So far, I've found this as an error.
Incapacitated isn't a state in 4e.
I don't know if it's supposed to be something else or if this is just a hold over from 3.5

Yea the Damage/HP manager code originally started out as 3 different macros all set to handle the default states in MT. So even though I changed a lot since then for 4e I left that in but your right I should take it out.
hennebeck wrote: And something else I would suggest adding to your AP/MS/IP macro would be an encounter tracker.
Meaning, if you finish an encounter you click it and it keeps the total. Instead of adding Milestones, add encounters and total the Milestones.
Does that make sense?

I don’t have my DM guide with me but I thought Milestones while it’s suggested that it be every 2 encounters wasn’t required. But I could add a counter though the thing is I want to keep the variable count low. I’ll look into it.
hennebeck wrote: And another suggestion.
How about check boxes for trained skills just like the character sheet.
And then it adds that as a +5 so you just input anything else like racial +2 bonus to dungeoneering or what not.
Actually I really wanted to do that from the start but had several problems. First was like you needed another variable to keep track of “trained” separate from the base skills which. And I wanted to keep the variable count down. Then it would require a bit of rework on the edit cause like DeviantNull the input dialog doesn’t let you put rows next to each other. But the biggest problem as a time factor I needed to get token done so my group would have them ready to add own power macros for game this weekend ;). So I stuck mainly with K.fan’s skill setup with minor changes.

Depending on what new input() functionality is added it may change. Because right now you should need 17 seperate lines in the input something like "Athletics | 0 | Athletics | CHECK" for each skill because checkboxes only handle ONE time :(. Not only would it be a pain to code but also there is the problem of the macro size limit bug. Macros that are two long won't run in b43 cause of chatbox limitations.
palmer wrote: I'm supposed to have my next session ready to run by the end of the week, so I better have it ready by then :)

It's dependent on the carefully formatted props, of course, so I'll likely just post a campaign file with it all included.

Oh yeah, the melee/ranged (single target) attack macro auto-calculates crits as well. It assumes that a 20 will normally hit, and thus counts as a crit. I don't intend to run games where there are enemies that require rolling a 21+mods to hit, ergo 20 always crits.
Yea I was under a similar constrant to get it done for our next game and give those who can macro a little time to add their powers. While I add mine and the guy who can't macro's powers to the tokens :).

Yea the whole multiple items prop steup thing is a pain. I originally posted in K.fan's thread showing how you could handle all the weapons in weapon editor in a single variable. The problem was it complecated the macro a LOT more. So doing it with a whole bunch of powers seems like a real head ache.

My example of editing all the weapons in a single variable though got me thinking about how I was going to handle consumables. I forgot to include consumable support like potions and I may do that for them to save variable space. :) A Potion/Regent/Etc Manager. I forgot about them cause before AV they weren't really worth mentioning cause the list was so small and not really worth it. Gonna take a lot of work though to make it cause I want it to be able to handle new items on the fly :).

My token also handles Crit and the weapons can actually be set to a crit range. While weapons in 4e don't have crit range there are things like feats that give them crit range at epic level :). Did you also have the crit roll the extra +Enchant bonus damage cause mine does if you need an example.

User avatar
PyroMancer2k
Dragon
Posts: 925
Joined: Thu Sep 11, 2008 2:04 pm

Post by PyroMancer2k »

I've edited the AP/MS/IP Manager to support the Encounter tracker. It's not in the current token I plan to update it when I've made more changes. But here it is if you wanna copy it in.

Variables Needed:

Code: Select all

EncounterPowersUsed:0
DailyPowersUsed:0 
The code.

Code: Select all

[H: fail = input("APSpent | 0 | You spent an AP | CHECK",
  "ItemPowerUsed | 0 | You used an Item Daily Power | CHECK",
  "Blah | ------------------------------ | ------------------------------ | LABEL",
  "ShortRest | 0 | Short Rest(Rests Enc Power Tracker) | CHECK",
  "MSReached | 0 | You reached a MileStone | CHECK",
  "Blah | ------------------------------ | ------------------------------ | LABEL",
  "ExtendRest | 0 | Extend Rest(Resets AP/MS/ItemUses) | CHECK",
  "Blah | ` | Also restores HP and HS | LABEL"
)]
[H:abort(fail)]

{if(AP > 0 && APSpent == 1, 'You spent an Action Point. <b>' + (AP-1) + '</b> Remaining!<br>' , if(APSpent==1, "You don't have any Action Points Left!"+'<br>', ""))}
[H: AP = if(AP > 0, AP - APSpent + MSReached, AP + MSReached)]

{if(DailyItemUses > 0 && ItemPowerUsed == 1, 'You used a Daily Item Power. <b>' + (DailyItemUses-1) + '</b> Remaining!<br>' , if(ItemPowerUsed==1, "You aren't allowed you use anymore Daily Item Powers!"+'<br>', ""))}
[H: DailyItemUses = if(DailyItemUses > 0, DailyItemUses - ItemPowerUsed + MSReached, DailyItemUses + MSReached)]

{if(MSReached == 1, 'You have reached a Milestone! You gain an Action Point and can use another Item Daily Power.<br>', "")}
[H: MileStone = MileStone + MSReached]

[H: AP = if(ExtendRest == 1, 1, AP)]
[H: DailyItemUses = if(ExtendRest == 1, ceiling(Level/10), DailyItemUses)]
[H: MileStone = if(ExtendRest == 1, 0, MileStone)]
{if(ExtendRest == 1, 'You take an extend rest.<br>You have <b>' + AP + '</b> Action Point.<br>You are allowed to use <b>' + DailyItemUses + '</b> Daily Item Powers.<BR>', "")}

[H: HP = if(ExtendRest == 1, MaxHP, HP)]
[H: HSRemaining = if(ExtendRest == 1, HSPerDay, HSRemaining)]
[H: TempHP = if(ExtendRest == 1, 0, TempHP)]
[H: DailyPowersUsed = if(ExtendRest, 0, DailyPowersUsed)]
{if(ExtendRest == 1, 'You heal to <B>'+HP+'</B> Hit Points.<BR>You have <B>'+HSRemaining+'</B> Healing Surges for the day.<br>', "")}
[H:bar.Health = HP/MaxHP]

[H: EncounterPowersUsed = if(ShortRest || ExtendRest, 0, EncounterPowersUsed)]
{if(ShortRest, 'You take a short rest and recover your encounter powers.<br>', "")}


I added support for daily and encounter powers. It resets the encounter power tracker when you select short rest. It rests both counters as well as the HP/HS/AP/MS/IP when you do an extended rest.

Use the code from the earlier post to track your powers. Simply changed the EncounterPowersUsed to DailyPowersUsed for powers you want to use as Daily. Also be sure to change the ID number.

User avatar
PyroMancer2k
Dragon
Posts: 925
Joined: Thu Sep 11, 2008 2:04 pm

Post by PyroMancer2k »

UPDATE!!

Token v1.1 is done!

CHANGES:
1) The New Consumable Manager allows you to edit your consumables on the fly. You can add and delete consumables from your inventory at will. The macro handles it all no need to manually edit anything!
Image

2) I've deleted reference to Incapacitated from the HP manager since it's not a condition in D&D 4e.

3) I added support for Encounter and Daily Power tracking. I even added 8 "Semi-Blank" macros. 4 Encounter and 4 Daily powers that only track if they have been run. They have a spot in them that indicates where you can insert your own code for that power macro. You can use them to get up and going fast as well as see how to add more powers for tracking.

4) Updated the AS/MS/IP Manager(Rest) so now handle rest. There is a new check box above the Milestone which is for a short rest. This will reset your encounter power tracker allowing you to use your encounter powers again. The Extended rest option remains and still resets all the other stuff it did before but now it also resets the encounter and daily power trackers thus allowing you to use all your powers once more.


The 4e Basic Token v1.1
http://gallery.rptools.net/d/30499-1/4e ... v1_1_rptok

The 4e Basic Token v1.1 Campaign Settings.
http://gallery.rptools.net/d/30502-1/4e ... gs_mtprops

For those who just want the Variable List I updated the original Post to include the 3 new variables I added with this update they are at the bottom of the list.

User avatar
Daelkyr
Giant
Posts: 165
Joined: Mon May 19, 2008 10:23 pm

Post by Daelkyr »

One thing I noticed was that your macro's don't seem to support implements.

User avatar
PyroMancer2k
Dragon
Posts: 925
Joined: Thu Sep 11, 2008 2:04 pm

Post by PyroMancer2k »

Daelkyr wrote:One thing I noticed was that your macro's don't seem to support implements.
Well that kinda depends on how you look at it ;). I was going to add it but then I realized that Imp were just a simplified version of weapons. They use the Name, Enchant, CritDamage, Property, Power, and Notes section of weapon.

I figured any caster is probably going to be using implements more then weapons anyhow and since they wield them like weapons also it make things easier for doing the equip macro if it doesn't have to do two types in the MainHand and OffHand. Then there was the fact that I wanted to keep variable count down. So I figured it use as easy to refer to weapon1 as say a Magic Wand. The main difference is it will only look at the EnchantBonus for attack and damage bonuses, then CritRange and CritDamage for any extra damage it does. Plus some classes actually use weapons as implements. So it's there it's just not named as such :).

If you think it's really important though I can add it.

Post Reply

Return to “D&D 4e Frameworks”