MapTool 1.3 Development Build 35

New build announcements plus site news and changes.

Moderators: dorpond, trevor, Azhrei, Craig

Craig
Great Wyrm
Posts: 2107
Joined: Sun Jun 22, 2008 7:53 pm
Location: Melbourne, Australia

Post by Craig »

Pyroman wrote:I know that you can save variables in macros, as in [A = B] and then A will equal B when referred to in the rest of the macro. However, my problem is this:

I create a macro, let's say

Code: Select all

[MiscSaveBonus = MiscSaveBonus] [Save = d20 + MiscSaveBonus + MiscSaveBonus]
I do this so that I do not have to enter MiscSaveBonus multiple times throughout the macro. I run the macro for the first time and it works like a charm... it pops up an inputbox asking for the value of MiscSaveBonus and then saves it to the variable and uses it for the rest of the macro.

However, I run the macro a second time and the previous value I entered is still used (i.e. it does not query me for MiscSaveBonus again).

Frustrated by this, I change the macro to this

Code: Select all

[Save = d20 + MiscSaveBonus + MiscSaveBonus]
hoping that it will again ask me for the value of MiscSaveBonus but it does not, it STILL uses the previous value entered when I first ran the macro.

Now, I do not have a token property called MiscSaveBonus, nor do I want one. I did create the property and attempt to delete the value to reset but this does not work as it now breaks the macro so that it says "could not execute the command: null".

Short of scrapping the token and creating another or changing the variable name, is there a way to delete/reset a macro/token variable so that it will, once again, ask me for the value each time the macro is run?
The problem is you assigned a value to MiscSaveBonus so it is no longer undefined, MapTools will only prompt you for undefined variables. The simple fix is to make sure that you are using a different variable name for the prompt than you are assigning to. The only way at the moment of clearing a variable is restarting maptools. So your macro could be something like

Code: Select all

[MiscSaveBonus = InputMiscSaveBonus] [Save = d20 + MiscSaveBonus + MiscSaveBonus]

User avatar
Amaril
Great Wyrm
Posts: 1058
Joined: Sun Nov 26, 2006 11:44 am
Location: Atlanta, GA
Contact:

Post by Amaril »

Not sure if this is a bug or by design, but unchecking "has vision" in the token properties doesn't stick.

Phergus
Deity
Posts: 7132
Joined: Fri May 12, 2006 8:56 pm
Location: Middle of Nowhere, NM
Contact:

Post by Phergus »

Amaril wrote:Not sure if this is a bug or by design, but unchecking "has vision" in the token properties doesn't stick.
This is only for PCs. NPCs behave correctly.

Is it that PCs always have vision? That sounds familiar.

User avatar
Amaril
Great Wyrm
Posts: 1058
Joined: Sun Nov 26, 2006 11:44 am
Location: Atlanta, GA
Contact:

Post by Amaril »

Phergus wrote:
Amaril wrote:Not sure if this is a bug or by design, but unchecking "has vision" in the token properties doesn't stick.
This is only for PCs. NPCs behave correctly.
So, is it by design or a bug?

Phergus
Deity
Posts: 7132
Joined: Fri May 12, 2006 8:56 pm
Location: Middle of Nowhere, NM
Contact:

Post by Phergus »

I believe this was intentional. There was a thread discussing this a while back when the Has Sight checkbox went in.

User avatar
simonutp
Giant
Posts: 160
Joined: Wed Jun 06, 2007 10:03 am
Location: Colmar, France

Post by simonutp »

I am trying to write a mod of Trevor "damage macro" that changes the Halo color according to our group habits :100%HP is Green, 50-99% is Yellow, 25-49% is Orange and 0-24% is Red.

I found it difficult without an IF instruction :
Tried this one just to see (work for the Red part and the blue one but not the green) :
/stp [MaxHP=MaxHP] [HP = HP - Damage] [state.Dead = max(0, min(1, HP)) *-1 + 1] [Ratio=round(HP/MaxHP,2)] [token.halo=hex(255*(1-floor(Ratio)))+hex(255*floor(Ratio))+hex(0)]

but it gives
Error Evaluating Expression: Invalid Halo Color (0xFF0x00x0)

Does anyone have a clue?

User avatar
Ryss
Dragon
Posts: 426
Joined: Sun Jun 15, 2008 1:12 pm

Post by Ryss »

I'm no expert but 0xFF0x00x0 is gibberish. Should be 0xFF0000 instead. You are concatenating it wrong because you are using hex() three times. Does it only work with numbers <= 255?

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

Post by jfrazierjr »

Ryss wrote:I'm no expert but 0xFF0x00x0 is gibberish. Should be 0xFF0000 instead. You are concatenating it wrong because you are using hex() three times. Does it only work with numbers <= 255?
right. And what it is expecting is an HTML representation of hex which does NOT include the 0x stuff, just the raw two character hex value preceeded by an octothorpe OR one of the cardinal color string values. For example, #FF0000 is red in HTML and what you would have to get to set the token color . 0xFF0000 would also work to change the color to red.
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 »

The best approach would be to change the parser so that the hex function returns 0xdd instead of a single character after the 0x and then do a replace to get rid of the 0x's.

OR add a new function for htmlHex which just returns the two character hexidecimal value. I would suggest the latter and you could then get:

[concat("#",htmlHex(255), htmlHex(255), htmlHex(255))] to return:

#FF0000 which would get translated internally to 0xFF0000 and that is a valid color choice.
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
trevor
Codeum Arcanum (RPTools Founder)
Posts: 11311
Joined: Mon Jan 09, 2006 4:16 pm
Location: Austin, Tx
Contact:

Post by trevor »

Amaril wrote:
Phergus wrote:
Amaril wrote:Not sure if this is a bug or by design, but unchecking "has vision" in the token properties doesn't stick.
This is only for PCs. NPCs behave correctly.
So, is it by design or a bug?
This is intentional, albeit a bit nonintuitive. The idea is that PCs always have vision (even though they may technically not have sight). The flag indicates to the engine that it should calculate their line of sight against the vbl.
Dreaming of a 1.3 release

User avatar
trevor
Codeum Arcanum (RPTools Founder)
Posts: 11311
Joined: Mon Jan 09, 2006 4:16 pm
Location: Austin, Tx
Contact:

Post by trevor »

Pyroman wrote: I do this so that I do not have to enter MiscSaveBonus multiple times throughout the macro. I run the macro for the first time and it works like a charm... it pops up an inputbox asking for the value of MiscSaveBonus and then saves it to the variable and uses it for the rest of the macro.
This is because the parser uses the same global scope for variables, so it doesn't have to reprompt for the value. Phergus' solution is the correct one.

That said, I've recently changed that semantic for b36, which I'll write about in a b36 thread.
Dreaming of a 1.3 release

User avatar
Amaril
Great Wyrm
Posts: 1058
Joined: Sun Nov 26, 2006 11:44 am
Location: Atlanta, GA
Contact:

Post by Amaril »

trevor wrote:This is intentional, albeit a bit nonintuitive. The idea is that PCs always have vision (even though they may technically not have sight). The flag indicates to the engine that it should calculate their line of sight against the vbl.
So what do you do if they are blinded?

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

Post by UntoldGlory »

Amaril wrote:So what do you do if they are blinded?
Give them a negative to attacks and require an Acrobatics check to not run into stuff or fall down.

User avatar
Amaril
Great Wyrm
Posts: 1058
Joined: Sun Nov 26, 2006 11:44 am
Location: Atlanta, GA
Contact:

Post by Amaril »

UntoldGlory wrote:
Amaril wrote:So what do you do if they are blinded?
Give them a negative to attacks and require an Acrobatics check to not run into stuff or fall down.
Not quite. According to 3.5 rules...
The character cannot see. He takes a -2 penalty to Armor Class, loses his Dexterity bonus to AC (if any), moves at half speed, and takes a -4 penalty on Search checks and on most Strength- and Dexterity-based skill checks. All checks and activities that rely on vision (such as reading and Spot checks) automatically fail. All opponents are considered to have total concealment (50% miss chance) to the blinded character. Characters who remain blinded for a long time grow accustomed to these drawbacks and can overcome some of them.
Essentially, the character should not have any vision at all.

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

Post by UntoldGlory »

Which would be okay if we had MBL, but we don't. And I don't play 3.5 anymore. In 4e, it does this:

Blinded
✦ You grant combat advantage.
✦ You can’t see any target (your targets have total concealment).
✦ You take a –10 penalty to Perception checks.
✦ You can’t flank an enemy.

Post Reply

Return to “Announcements”