RPTools.net

Discussion and Support

It is currently Thu Dec 12, 2013 12:34 am

Forum rules

PLEASE don't post images of your entire desktop, attach entire campaign files when only a single file is needed, or generally act in some other anti-social behavior.

 Page 22 of 23 [ 332 posts ] Go to page Previous  1 ... 19, 20, 21, 22, 23  Next
Author Message
 brad   Great Wyrm Joined: Fri Apr 27, 2007 9:27 pmPosts: 1253Location: NY
 Post subject: Re: MapTool video tutorials(with audio)Posted: Mon Aug 02, 2010 7:25 am
Here is the script for Macros Part1, Functions. Any thoughts or suggestions?

Quote:

<Title screen, show bullet points>

Welcome to the Macros tutorial, part 1. Functions. In this tutorial we are going to introduce you to functions and show you some basic, but widely used, functions in action. Functions are how you will bring your macros to life, so to speak.

<Show clicking on the link to the Wiki, then clicking on List of Functions>

The best resource for functions is the Wiki. Here on its homepage click on the “List of Fuctions” link. At the top is a list of links to categories of functions. At the bottom is a list of individual functions that don't fall into a large category.

Before I jump into any demonstrations of what functions do, I know that some of you are asking “But what is a function?” or saying “I tried to look them up and functions scare me!”

Well don't worry. Most functions are fairly basic and easy to use. A function is just a short cut. It preforms a chore without you having to write all the code to have that chore done.

Here on the “List of Functions” page let's look at the “Mathematical Functions” category. These are functions that help you out with numbers. Each function is just a word followed by parenthesis, typed in as code.

When you click a functions link in the Wiki it gives you a quick description and example of it in use. Also the names often make sense. max() gives you the maximum value and then there is min() which gives you the minimum. So, you can often glance through the list of functions and guess at what they might do, even before you click on the description. Here are a couple examples of use.

<Show map with example token>

Here in this macro we have a system that gives a +1 for every 5 points of Dexterity. But, you need a full 5 points. A 14 Dexterity only gives you a +2. The floor() function rounds down whatever is in the parenthesis, so you just have the token property Dexterity divided by 5 in the parenthesis.

<Click on the macro a couple times and then show functions page again>

Related functions are ceil(), which does the opposite of floor(), always rounding up. And round() which round up at .5 and down at below that.

<Show map with example token>

Here is a Damage Taken macro. At the start you see a new function, getName(). This is a great little macro that prints out the name of the token. This allows a macro to be personalized no matter what token in is being run on.

Next you have an undefined variable, Damage, which represents the damage delivered. So, a box will pop up asking for it. Then you have a token property, Armor, being subtracted from Damage. The result of this is then assigned to Damage_Taken. Damage_Taken is then subtracted from the token's token property, Life.

There is a problem here though. If Armor is larger then Damage, the Damage_Taken will be a negative number. So you would then be subtracting a negative number from Life, which would actually increase Life. This is easily taken care of by the max() function.

Here is the fixed macro. In the parenthesis of max() you put as many values or equations as you like, separated by commas, and max() returns the one that is the largest. So, in this instance we put in Damage-Armor and 0. Now if Damage-Armor ends up being a negative number max() will choose 0 instead, as 0 is larger. So, you never get a negative number.

<Credits Page>

As you can see functions are crucial in making your macros preform many tasks and many are quite simple to use. In this tutorial I hope we broke ice about what functions are and their ease of use. Future tutorials in this macro series will focus on a handful of functions and macro concepts that are often used but not necessarily as easily picked up on as functions like ceil() or max().

_________________
View MapTool video tutorials at RPToolsTutorials.net

 CoveredInFish   Demigod Joined: Mon Jun 29, 2009 9:37 amPosts: 2972Location: Germany
 Post subject: Re: MapTool video tutorials(with audio)Posted: Mon Aug 02, 2010 8:05 am
Sounds good to me.

Quote:
This is a great little macro that prints out the name of the token.

Shouldnt this be

"This is a great little function that prints out the name of the token."

_________________
"Cif's html works" (confirmed by independent studies)

most complete list of my maptool stuff

 brad   Great Wyrm Joined: Fri Apr 27, 2007 9:27 pmPosts: 1253Location: NY
 Post subject: Re: MapTool video tutorials(with audio)Posted: Mon Aug 02, 2010 9:25 am
CoveredInFish wrote:
Sounds good to me.

Quote:
This is a great little macro that prints out the name of the token.

Shouldnt this be

"This is a great little function that prints out the name of the token."

True. Thanks!

_________________
View MapTool video tutorials at RPToolsTutorials.net

 thecyberwolfe   Dragon Joined: Thu Jun 26, 2008 2:57 pmPosts: 319Location: The Great Wet North
 Post subject: Re: MapTool video tutorials(with audio)Posted: Mon Aug 02, 2010 7:01 pm
I know you'll be reading this script in, but if you ever want to include a transcript, you may want to correct "PREforms" to "PERforms" in the 4th paragraph.

_________________
The Cyberwolfe
----------------
Them: "Name one thing a PC can do that a Mac can't!"
Me: "Right-click."

 brad   Great Wyrm Joined: Fri Apr 27, 2007 9:27 pmPosts: 1253Location: NY
 Post subject: Re: MapTool video tutorials(with audio)Posted: Mon Aug 02, 2010 7:39 pm
thecyberwolfe wrote:
I know you'll be reading this script in, but if you ever want to include a transcript, you may want to correct "PREforms" to "PERforms" in the 4th paragraph.

Actually now that all tutorials have closed captioning that I just copy and paste in, correct spelling is important. So, thanks.

_________________
View MapTool video tutorials at RPToolsTutorials.net

 brad   Great Wyrm Joined: Fri Apr 27, 2007 9:27 pmPosts: 1253Location: NY
 Post subject: Re: MapTool video tutorials(with audio)Posted: Wed Aug 04, 2010 9:17 pm
Script of Macros Part 2, input(). This one only had room for me to introduce some of what input() can do and then hope that the user would be familiar enough with the function that using the Wiki to figure out everything else would be easy. So, any feedback on different approaches or different options to cover, that you think might work better to break the ice, is much appreciated.

I know that parts might be a little hard to follow without seeing what is on the screen, but most of it should make sense for experienced users of input(I hope).

Quote:

<Show title screen>

Welcome to the Macros Tutorial, Part2, input(). Input() is one of the most important and most used functions in MapTool. It allows for easy interaction and input of information from users. This tutorial will show input() in use and cover some of its options. This should get you familiar enough with the function to feel comfortable learning the rest from the Wiki.

<Show map with sample token>
<Show sample macro>

First, a couple best practices when using input().

Use the “h” format to hide the extra output that you don't want to clutter the chat window.

When you use input() you will often have multiple lines. So, give yourself some room to organize, by putting that second parenthesis down a couple lines.

Always have a variable assigned to the input() and then follow the input() section of code with the abort() function, with that variable in the abort() parenthesis. What this does is if someone hits Cancel instead of ok, it will stop the macro. Without the abort() function in there, hitting Cancel will usually throw some sort of error, as there ends up being a bunch of variables with no values.

<Show sample macro>

Each line in the input() function is surrounded by quotes and ends in a comma. The last line does not end in a comma and you will get an error if you put one there.

Each section of a line is separated by a vertical line. The first section is the Variable. Whatever value is entered for the line will be assigned to that variable.

The second section is the Value. This is the default value that is initially listed and can be changed by the user.

The third section is the Prompt. This is the description, people know what they are inputting.

The fourth section is the Input Type. You can have text fields, dropdown lists, and some others.

The last section is Options. Some of the Input Types have options that you can use or not use.

I do not have time in this tutorial to cover all of the possible combinations of Input Types and Options. I am just going to cover a couple examples that should get you familiar enough with the input() function to visit the Wiki to figure out the rest.

<Show sample macro>

This macro is just a quick and easy way to program your character's characteristics into the token. The variable at the start of each line is a token property and so will be programmed into the token. The Input Type for each one is text. So, running the macro you get this list of text fields that you can just use the tab key to jump between and quickly type in the values.

Do you see the problem here though? The Value is 0. So, if you want to adjust just one characteristic you have to end up filling them all out or they will be assigned 0. Let's fix this.

<Show sample macro>

In this version of the macro I inserted a variable into quotes using the plus sign just like I showed you in earlier tutorials. So, we can just fill the Value section with the token property that we are looking to fill and in the input box it will give us the current value. Now if we know we want to increase Strength by 1, we can see the current value, increase it by one, and all the other characteristics will keep their current values.

<Show sample macro>

Now let's take a look at an Initiative Macro. We will say initiative is d10+Dexterity+mods. The input() box is only asking for any modifications to the roll. I have set it up to set the mod through a drop down list, to cover -10 to +10 mods, and to remember the mod you last chose.

When you use the List Input Type, you make a list separated by commas in the Value section. It defaults to the first in the list. By default the value returned is a 0 for the first in the list, a 1 for the second, a 2 for the third and so on.

To make it remember what I chose, I use the “select” option. You set the “select” option equal to whatever value you want the list to start at. A number or a variable. I then have it equal to the token property “init_mod”, which would have been set the last time you used this macro as that is the name I used for the Variable.

To make the initiative modification equal to the number chosen from the list of values, I then have this line. It simply takes “init_mod”, subtracts 10, and then assigns that to a variable named actual_mod. That way if someone choses -10, which is first in the list and so returning the value of 0, it will actually be -10.

I then set a variable named “initiative” to 1d10+Dexterity+actual_mod.

These last three lines then use some initiative functions to add the token to the initiative window, set the tokens initiative value, and then sort the initiative window, so all of the tokens are in there correct places.

Here is the macro in action. Notice it remembering the initiative modifier.

<Show sample macro>

Now let's look at a characteristic roll. In this macro you start out with a radio list of your characteristics. I then use the “value” option and set it to “string”. This option can be used for the drop down list as well. This makes the Value set to the “char” variable to be whatever actually appears in the list and not a number like in the previous example.

The second line is just asking for any modifications.

I am saying the roll is 1d20, plus the characteristic divided by 5 rounded down, plus any modifiers.

Notice the eval() function surrounding the “char” variable. Here is the reason for that. Let's say you are doing an Intelligence roll. Because I used the “value” option of “string”, the Value of “char” is the text “Intelligence”. You cannot divide some text by 5. The eval() function allows the Value of “char” to be evaluated as a variable. “Intelligence” is a token property, so its value would be pulled from the token.

Here is the macro in action.

One last note is the Input Type of “label” and “tab”. These are just ways of organizing your fields.

<Show sample macro>

Here is a macro using “label”. And in use you can see how it inserts a label.

<Show sample macro>

Here is a macro using “tab”. And in use you can see how the fields are divided into clickable tabs.

<Show credits>

Like I said at the beginning, not all of the options of the input() function were covered. I do hope though, that I did familiarize you with enough of what the input() function does and how it does it, that you can easily garner how to use the other options from the Wiki. There are also more possibilities with things like preprogramming extensive information for weapons, powers, skills, and so on, that can be done once the concept of storing “string properties” is introduced. But, that is for a future tutorial.

_________________
View MapTool video tutorials at RPToolsTutorials.net

 thecyberwolfe   Dragon Joined: Thu Jun 26, 2008 2:57 pmPosts: 319Location: The Great Wet North
 Post subject: Re: MapTool video tutorials(with audio)Posted: Wed Aug 04, 2010 11:58 pm
Hmm.. possible improvement in tone:

Change "I do not have time in this tutorial to cover all of the possible combinations of Input Types and Options. I am just going to cover..."

to "There are far too many combinations of Input Types and Options to cover in one tutorial, so I am just going to cover..."

_________________
The Cyberwolfe
----------------
Them: "Name one thing a PC can do that a Mac can't!"
Me: "Right-click."

 brad   Great Wyrm Joined: Fri Apr 27, 2007 9:27 pmPosts: 1253Location: NY
 Post subject: Re: MapTool video tutorials(with audio)Posted: Thu Aug 05, 2010 5:33 am
thecyberwolfe wrote:
Hmm.. possible improvement in tone:

Change "I do not have time in this tutorial to cover all of the possible combinations of Input Types and Options. I am just going to cover..."

to "There are far too many combinations of Input Types and Options to cover in one tutorial, so I am just going to cover..."

Yeah. That does sound better doesn't it? Alright, changed.

_________________
View MapTool video tutorials at RPToolsTutorials.net

 brad   Great Wyrm Joined: Fri Apr 27, 2007 9:27 pmPosts: 1253Location: NY
 Post subject: Re: MapTool video tutorials(with audio)Posted: Sun Aug 15, 2010 10:49 am
New tutorial: Macros Part 1, Functions. Functions are how you will get the most out of your macros. This tutorial introduces how functions are used and shows some basic, but very useful functions in action.

_________________
View MapTool video tutorials at RPToolsTutorials.net

 brad   Great Wyrm Joined: Fri Apr 27, 2007 9:27 pmPosts: 1253Location: NY
 Post subject: Re: MapTool video tutorials(with audio)Posted: Fri Sep 03, 2010 6:49 am

The content covered is basically the same. Here are the changes.

-Refined script. 2 minutes shorter.
-Larger screen size.
-Closed captioning.
-Match up newer version and website setup.
-Added a vision and framework demo in the background while talking about troubleshooting. Before there was just an unmoving screen while I droned on, at certain points.

I think the demo is fun, but I could see how someone might think it was distracting. What are your thoughts?

_________________
View MapTool video tutorials at RPToolsTutorials.net

 wolph42   Deity Joined: Fri Mar 20, 2009 4:40 amPosts: 6577Location: Netherlands
 Post subject: Re: MapTool video tutorials(with audio)Posted: Sun Sep 05, 2010 6:17 am
Very nice (and that's an undertament), also nice to see my handle pop-up in the forum part

The only thing that was a bit confusing is from 3.46 when you show a framework and how it works, while talking about memory and java. I don't think its a bad thing, it compresses time and will require the watcher to have another look at the tutorial.

In all good job!

By the way, who's framework is this (and isn't (s)he pissed that 'other frameworks are prettier? )

_________________

 brad   Great Wyrm Joined: Fri Apr 27, 2007 9:27 pmPosts: 1253Location: NY
 Post subject: Re: MapTool video tutorials(with audio)Posted: Sun Sep 05, 2010 6:31 am
wolph42 wrote:
The only thing that was a bit confusing is from 3.46 when you show a framework and how it works, while talking about memory and java. I don't think its a bad thing, it compresses time and will require the watcher to have another look at the tutorial.

I thought it might be a little confusing, but I really had nothing to show in the background. It was very boring to show just a stationary screen as I covered a couple troubleshooting topics for over a minute. I also had the thought that you probably had a large chunk of people who didn't care about what I was talking about there, because they have had no problems. So, I threw in the vision and framework demo for some fun. I was hoping it was more fun then confusing.

wolph42 wrote:
In all good job!

By the way, who's framework is this (and isn't (s)he pissed that 'other frameworks are prettier? )

It's my Hero System 5th edition framework. I focused on ease of use and have never went back to dress it up with pretty colors and whatnot. So, I am not pissed at myself for saying so, as I know it to be true.

_________________
View MapTool video tutorials at RPToolsTutorials.net

 wolph42   Deity Joined: Fri Mar 20, 2009 4:40 amPosts: 6577Location: Netherlands
 Post subject: Re: MapTool video tutorials(with audio)Posted: Sun Sep 05, 2010 7:21 am
Good to hear you can handle your critics

_________________

 Azhrei   Site Admin Joined: Mon Jun 12, 2006 12:20 pmPosts: 11977Location: Tampa, FL
 Post subject: Re: MapTool video tutorials(with audio)Posted: Sun Sep 05, 2010 10:13 am
What? Brad has critics? To the gallows with them, I say!!

_________________
Interested in Time Magazine's Best Invention of 2008 Unix-powered laptop? No crashes or lockups. In fact, that series of articles has two such machines. The other is a Dell netbook.

 Henchman99942   Kobold Joined: Wed Sep 25, 2013 11:49 amPosts: 3
 Post subject: Re: MapTool video tutorials(with audio)Posted: Wed Sep 25, 2013 11:59 am
No, that is a link to a web site where you brag about videos you claim to be hosting. Yet no such video seems to exist anywhere whatsooever

 Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending
 Page 22 of 23 [ 332 posts ] Go to page Previous  1 ... 19, 20, 21, 22, 23  Next

 You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum

 Search for: Jump to: Select a forum ------------------ General    Announcements    Ideas for New Applications    General Discussion    Developer Notes       Java Programming Info    User Creations       Requests for HELLLLP!       Tilesets, Token Libraries, and Complete Maps          Token Libraries          Tilesets/Graphics for Map-making          Complete Maps       Campaign Frameworks          D&D 4e Frameworks          [D&D3.5 + Pathfinder] Campaign Macros          Shadowrun 4e Frameworks          Savage Worlds Frameworks       Published Module Support       Tutorials          Graphics, Images, Tokens, Maps          Drop-In Macros and Scripts          Campaign Frameworks       Drop-In Macro Resources    Links & External Resources    Looking For Group       "Living" Campaigns       Dungeons and Dragons       Savage Worlds       WoD       Wargaming    Documentation Requests/Discussion    Session Report-Back Tools    MapTool       How To       Macros       Feature Requests          Resolved       Bug Reports          Resolved       WIP - User FAQ       Testing    TokenTool    DiceTool    InitiativeTool    CharacterTool       Support: d20 D&D       Support: D&D 4e       Support: Hero System       Support: Savage Worlds       Support: GURPS Other    RPTools Sightings    Running Campaigns       Thiera's College of Adventurers       Age of Might       Scales of War       Renwold       Dead Men Walking       Dark Sun - 4th Edition       Warhammer Fantasy Roleplay       Return of Uchly Namen       Insert Campaign Here       Antium       The Mystic Moon       World of Lagal       GangerRun       FB Scales of War       Sellswords of Eberron          Archive       Orbs of Chaos       World of Omegus       Keep on the Shadowfell - 4E       Rise of the Runelords       Aurith In The Age Of Steam       Widdershins       Nos's Pathfinder Campaign       Falcons Hollow       Verwirrte Welten       With it or on it

Who is online

In total there is 1 user online :: 1 registered, 0 hidden and 0 guests (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: Google Feedfetcher and 0 guests