Macro Use Cases

Doc requests, organization, and submissions

Moderators: dorpond, trevor, Azhrei

User avatar
Brigand
Read-only User
Posts: 1623
Joined: Thu Feb 14, 2008 8:57 am
Location: Nosy GM's can go frak themselves!

Post by Brigand »

RPTroll wrote:What RD said. Weapons damage in Savage Worlds is Strength + d'something'. The ability to have that in the property without the {} would be nice.
You can.

*Strength 1+1d8
@Strength {1+1d8}

The first one shows up as a string and the second one lets you run it as a macro I believe.

User avatar
TK
Giant
Posts: 162
Joined: Fri Jun 27, 2008 12:02 am

Post by TK »

TK wrote:I want to run a variety of macros before I attack which will allow me to add up a miscellaneous modifier property. I would like to build up this modifier using an arbitrary combination of flat modifiers (+3, -2), other properties (+strMod), and/or a die string (+2d6). If a die string is added, or if a property which contains a die string is added, it shouldn't evaluate that die roll until the miscellaneous property is used, (IE when you add +miscellaneous + miscellaneous you should (statistically) be adding two different numbers). And then once it's the end of the turn, I want to set that miscellaneous mod back to 0.
I guess to summarize into a proper use case:
One should have a way to choose whether to add arguments together as an evaluated value or as a string. Once the string is stored in a property as a string, there should be a way to both evaluate the string to return a single number, or to read it as just a string.

Additional ramblings

Ideally, there would be a way to evaluate some parts of a macro before adding the result as a string. Essentially if I wanted to do 4+5+d8, I would like some way to get it to evaluate the 4+5 part, and then turn the result into a string to add to the d8 part so I end up with "9+d8"

User avatar
Mrugnak
Dragon
Posts: 745
Joined: Mon Jul 21, 2008 7:38 pm

Post by Mrugnak »

Use Case:

A player has a spell or special attack that does a variable number of a fixed size of damage dice - for example, between 1 and 3 six sided dice, or between 3 and 12 four sided dice.

The range of damage dice that can be used depends on a property stored on the players token; this property may be a fixed integer (a core attribute, the level of an advantage taken) or may be a dice expression that can be evaluated to be a fixed integer. So the player may be allowed to pick between Zero and the level of their Magery attribute dice of damage, or they may be allowed to pick between 3 and [3d6] dice of damage, the 3d6 being rolled at the time of attack usage.

The player needs to be able to input the number they pick, with information about their constraints being presented to them at the time of picking.

For added complication, if the attack takes multiple rounds to charge up, the player may add more dice of damage for each round they charge it, until they attack with the spell (loosing all accumulated damage dice) or are no longer allowed to charge up.

User avatar
Orchard
Great Wyrm
Posts: 1852
Joined: Fri May 09, 2008 10:45 am
Location: Doylestown PA
Contact:

Post by Orchard »

Use case:

I need to be able to compare two strings to see if they are the same. I feel that the best way to accomplish this is via a scripting language.

For instance, I have var a, and I want to see if it is the same as var b. Problem is var a is a string and var b is a string also. Currently, this throws an error as far as I know.

I am trying to use this for a weapon-switching macro, although I know that there is a workaround.
0+0=1, for very unstable CPUs.

User avatar
Micco
Giant
Posts: 148
Joined: Mon Jun 16, 2008 10:21 pm

Post by Micco »

Use Case:

I would like to be able to refer to the Property itself without returning either the literal value or evaluating that value as a function. Doing this will allow tests for null and testing for existence (when/if we get targeting of other tokens.)

User avatar
Azhrei
Site Admin
Posts: 12086
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Post by Azhrei »

Code: Select all

Use case: 1

I am a psionicist with the ability to augment my psionic powers on-the-fly.  (Augmentation means expending additional points from a replenishable resource in order to increase damage, range, number of targets, and/or some other numeric aspect of a psionic power.)
Right now this is tough to do because each power has it's own augmentation rules. This may be more than can reasonably be accomplished with macros as they currently exist. (I will wait for scripting.)

Code: Select all

Use case: 2

The same psionicist can choose an energy type for some powers at the time the power is manifested (such as "cold" or "fire").  I would like to manifest a power and have the macro determine any special effects that might apply if I choose "cold" vs. "fire".
This should be possible using current techniques. For example, prompt the user for the type of energy, then use that energy name as a string to access a property that determines the effect. So I might type in "cold" when asked for an energy type and the macro would access a property named, "Energy_Ray_cold" in order to know that it should add +1 to each damage die. Other powers would use other properties, sch as "Energy_Bolt_electricity", which adds +2 to the attack roll if a target is wearing metal armor and also adds +2 to the manifester level when making a Power Resistance check.

In an ideal situation, the use case above would include the ability to automatically reset any modification made by choosing an energy type when the current turn has elapsed and the character is about to take their next turn (ie. these effects only last a single round). However, MT does not currently support the concept of "turns", so I didn't add this to the use case.

Code: Select all

Use case: 3

The same psionicist can concentrate to gain psionic focus.  Doing so adds special features/abilities to the character, such as "ability to breath underwater" or "extra +1 fire damage on melee attacks".  I want MapTool to record which special ability is currently active and factor it in when executing other macros.
Psionic focus would ideally be represented by adding a focus-defined state to the token. So the ability to breath underwater appears as a state and extra fire damage appears as another state. The list of possible special abilities would be pre-entered into the properties of the token and that list would be used to build a combobox that the macro would display (instead of prompting for a string or number).

User avatar
jfrazierjr
Deity
Posts: 5176
Joined: Tue Sep 11, 2007 7:31 pm

Post by jfrazierjr »

Well hell.. since others are throwing out things they want that will not be in 1.3 (which I kind of thought this thread was really about), I might was well throw my pipe dream out there.

Use Case: Macro writer should be able to create a variable that is tied to a delimited list. Upon execution, the delimited list will be presented to the macro user allowing for selection of a singular value from the list. This value will then be assigned to the variable for use in later functions.

Sorry for this, but I "think" I have to provide a sample implementation to solidify the example:

Code: Select all

{SomeList="Foo,Bar,Baz"}
.....
You swing your {$SomeList} and hit for some damage
When the macro is executed, Foo, Bar, and Baz are presented to the user in a combo box and the selected value is stored in the SomeList variable. SomeList is then used as a string in in the output(in whatever way a variable will be used as a string in the future, be that plain, a prepended character, an appended character,etc........) Any use that requires passing the value to the parser would need to be wrapped in eval as per normal.

Joe









[/code]
I save all my Campaign Files to DropBox. Not only can I access a campaign file from pretty much any OS that will run Maptool(Win,OSX, linux), but each file is versioned, so if something goes crazy wild, I can always roll back to a previous version of the same file.

Get your Dropbox 2GB via my referral link, and as a bonus, I get an extra 250 MB of space. Even if you don't don't use my link, I still enthusiastically recommend Dropbox..

User avatar
BigO
Dragon
Posts: 558
Joined: Mon Jul 28, 2008 12:23 pm
Location: Oshkosh, WI
Contact:

Post by BigO »

jfrazierjr wrote:Well hell.. since others are throwing out things they want that will not be in 1.3 (which I kind of thought this thread was really about), I might was well throw my pipe dream out there.
Obviously 1.3 is the focus, but I consider this a general planning session. It's best to know the end game now before more work gets done, so I say dream away.
jfrazierjr wrote:Use Case: Macro writer should be able to create a variable that is tied to a delimited list. Upon execution, the delimited list will be presented to the macro user allowing for selection of a singular value from the list. This value will then be assigned to the variable for use in later functions.
That is brilliant! I don't know why I didn't think of that already. That would be amazing. Especially if you can store the delimited list in a property. So you'd have one like WeaponList that would contain all your possible weapons, or SpellList, etc. Love it.
--O

I am a small and fragile flower.
http://maptool.rocks.andyousuck.com

User avatar
Orchard
Great Wyrm
Posts: 1852
Joined: Fri May 09, 2008 10:45 am
Location: Doylestown PA
Contact:

Post by Orchard »

BigO wrote:
jfrazierjr wrote:Well hell.. since others are throwing out things they want that will not be in 1.3 (which I kind of thought this thread was really about), I might was well throw my pipe dream out there.
Obviously 1.3 is the focus, but I consider this a general planning session. It's best to know the end game now before more work gets done, so I say dream away.
jfrazierjr wrote:Use Case: Macro writer should be able to create a variable that is tied to a delimited list. Upon execution, the delimited list will be presented to the macro user allowing for selection of a singular value from the list. This value will then be assigned to the variable for use in later functions.
That is brilliant! I don't know why I didn't think of that already. That would be amazing. Especially if you can store the delimited list in a property. So you'd have one like WeaponList that would contain all your possible weapons, or SpellList, etc. Love it.
I actually just ran into this yesterday. I was thinking about this in conjunction with switch weapons, since a user may want to switch weapons, and the best way to do this without requiring a ton of properties is to store the values of the different weapons in the macro. BUT they will definitely mistype the weapon name if you allow free input. So a list of options is the best way to go, I think.
0+0=1, for very unstable CPUs.

User avatar
jfrazierjr
Deity
Posts: 5176
Joined: Tue Sep 11, 2007 7:31 pm

Post by jfrazierjr »

BigO wrote:That is brilliant!
SHHHHH!!!! don't let my wife hear you say that.... She will start arguing and won't stop for weeks...
I save all my Campaign Files to DropBox. Not only can I access a campaign file from pretty much any OS that will run Maptool(Win,OSX, linux), but each file is versioned, so if something goes crazy wild, I can always roll back to a previous version of the same file.

Get your Dropbox 2GB via my referral link, and as a bonus, I get an extra 250 MB of space. Even if you don't don't use my link, I still enthusiastically recommend Dropbox..

User avatar
RPTroll
TheBard
Posts: 3159
Joined: Tue Mar 21, 2006 7:26 pm
Location: Austin, Tx
Contact:

Post by RPTroll »

Aria wrote:
RPTroll wrote:What RD said. Weapons damage in Savage Worlds is Strength + d'something'. The ability to have that in the property without the {} would be nice.
You can.

*Strength 1+1d8
@Strength {1+1d8}

The first one shows up as a string and the second one lets you run it as a macro I believe.
Are you talking about in the properties sheet or in macros?

User avatar
Jaybee
Cave Troll
Posts: 38
Joined: Thu Jul 31, 2008 5:50 am

Post by Jaybee »

jfrazierjr wrote:Sorry for this, but I "think" I have to provide a sample implementation to solidify the example:

Code: Select all

{SomeList="Foo,Bar,Baz"}
.....
You swing your {$SomeList} and hit for some damage
When the macro is executed, Foo, Bar, and Baz are presented to the user in a combo box and the selected value is stored in the SomeList variable. SomeList is then used as a string in in the output(in whatever way a variable will be used as a string in the future, be that plain, a prepended character, an appended character,etc........) Any use that requires passing the value to the parser would need to be wrapped in eval as per normal.[/code]
Joe, would it be easier to use current table system with a command to query user input instead of automated fetching. You swing your {tbl(SomeList),$} will call up Table Somelist with a dropdown of table values.

User avatar
Jaybee
Cave Troll
Posts: 38
Joined: Thu Jul 31, 2008 5:50 am

Post by Jaybee »

This would also call for some overhauling on the tables side.
IF tables could have more of a additional column structure eg:
WpnName|WpnDamage|WpnBonus|SpecialEffect
Then one could have multiple values in multiple rows and with your selection of lets say column A ("WpnName") have the rest computed/automated.

Shitcool idea Joe....

User avatar
jfrazierjr
Deity
Posts: 5176
Joined: Tue Sep 11, 2007 7:31 pm

Post by jfrazierjr »

Jaybee wrote:
Joe, would it be easier to use current table system with a command to query user input instead of automated fetching. You swing your {tbl(SomeList),$} will call up Table Somelist with a dropdown of table values.

I did not think of that, but it would not be a bad idea to have queryable tables and let the person pick from the table.

Hell Big O, might was well add that to the list.

Use Case: Allow table value selection from within macros which will be assigned to a designated variable or used inline. When such as call is embedded within a macro, a copy of the table will appear and the macro user will select a record from within the table. This result will then be available for the parser/chat window for output or further computations.
I save all my Campaign Files to DropBox. Not only can I access a campaign file from pretty much any OS that will run Maptool(Win,OSX, linux), but each file is versioned, so if something goes crazy wild, I can always roll back to a previous version of the same file.

Get your Dropbox 2GB via my referral link, and as a bonus, I get an extra 250 MB of space. Even if you don't don't use my link, I still enthusiastically recommend Dropbox..

User avatar
jfrazierjr
Deity
Posts: 5176
Joined: Tue Sep 11, 2007 7:31 pm

Post by jfrazierjr »

Jaybee wrote:This would also call for some overhauling on the tables side.
IF tables could have more of a additional column structure eg:
WpnName|WpnDamage|WpnBonus|SpecialEffect
Then one could have multiple values in multiple rows and with your selection of lets say column A ("WpnName") have the rest computed/automated.

Shitcool idea Joe....
Not bad... we would need sometype of dot notation of something else to make sure you don't have table names clash with marco/property variable names. But then, what if you want to embeed multiple tables? If so, thetable.selectedColumnName or something like that would not work as the next one would just overwrite.... I think the best way to handle that would be to have some type of special syntax that basically sets a table result to an named object type of thingy that has sub properties. eg:

Code: Select all

[#table1 = lookuptbl("Table1")]
[#table2 = lookuptbl(""+table1.hitLocation+"")]
John  hits the goblin in the [table1.hitLocation] for [table1.Damage].  
On a critical hit the goblin's [table2.criticalEffect].
Of course, this is simplistic, but thinking a bit about Rolemaster's charts. For example, in the above, hitLocation may be head and then you would look up the critical hit in the head table to get the output effect. Of course, this is just example syntax to show the final idea and should in no way be construed as the syntax that will be used in any way.
I save all my Campaign Files to DropBox. Not only can I access a campaign file from pretty much any OS that will run Maptool(Win,OSX, linux), but each file is versioned, so if something goes crazy wild, I can always roll back to a previous version of the same file.

Get your Dropbox 2GB via my referral link, and as a bonus, I get an extra 250 MB of space. Even if you don't don't use my link, I still enthusiastically recommend Dropbox..

Post Reply

Return to “Documentation Requests/Discussion”