While I am at it are there any Macro Addition Requests?

Thoughts, Help, Feature Requests, Bug Reports, Developing code for...

Moderators: dorpond, trevor, Azhrei

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. :)
User avatar
Orchard
Great Wyrm
Posts: 1852
Joined: Fri May 09, 2008 10:45 am
Location: Doylestown PA
Contact:

Post by Orchard »

Well if you've got Lindharin scared, I'm SO OUT....not that I was IN, but I'm SO out now, that it's like I'm the ANTI-IN. Or something.

ACK!
0+0=1, for very unstable CPUs.

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

Post by PyroMancer2k »

BigO wrote:Seems like with the new control structures included in b46/47 you should be able to do a bubble sort, though my initial attempts have been unsuccessful. I should try it again when I've had more sleep.
Actually that's what my macro earlier in the thread does. It bubble sorts the list of numbers and it was for b45.

http://forums.rptools.net/viewtopic.php?p=69497#69497

B46/47 makes it a lot easier though and portable. For example here is the new updated version of it using the loop which means it can handle any size list and not hard coded into macro.

Code: Select all

[SortList = "4, 2, 6, 9, 5, 6, 9, 8, 7, 6, 10"]<BR>
[H,C(listCount(SortList)), CODE: {
[H,C(listCount(SortList)-1):SortList = if(eval(listGet(SortList, roll.count)) < eval(listGet(SortList, roll.count+1)),
listInsert(listDelete(SortList, (roll.count+1)), roll.count, listGet(SortList, (roll.count+1)) ),
SortList)]
}]
{SortList}

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

Post by BigO »

PyroMancer2k wrote:
BigO wrote:Seems like with the new control structures included in b46/47 you should be able to do a bubble sort, though my initial attempts have been unsuccessful. I should try it again when I've had more sleep.
Actually that's what my macro earlier in the thread does. It bubble sorts the list of numbers and it was for b45.

http://forums.rptools.net/viewtopic.php?p=69497#69497

B46/47 makes it a lot easier though and portable. For example here is the new updated version of it using the loop which means it can handle any size list and not hard coded into macro.

Code: Select all

[SortList = "4, 2, 6, 9, 5, 6, 9, 8, 7, 6, 10"]<BR>
[H,C(listCount(SortList)), CODE: {
[H,C(listCount(SortList)-1):SortList = if(eval(listGet(SortList, roll.count)) < eval(listGet(SortList, roll.count+1)),
listInsert(listDelete(SortList, (roll.count+1)), roll.count, listGet(SortList, (roll.count+1)) ),
SortList)]
}]
{SortList}
Yeah, that's what I meant, that b47 makes it way less code. Your example is exactly what I was trying to do but I wasn't getting the syntax right. As Orchard likes to say "I can't brain today".
--O

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

User avatar
Nadare
Cave Troll
Posts: 72
Joined: Fri Aug 11, 2006 3:00 pm

Post by Nadare »

Craig,

How is it going on this? I ask only because I should have lots of free time over the holiday weekend to mess with MT, and I would love, love, love to have all of the macro improvements on the first page of this thread. Any chance it could get into a build before turkey day?

User avatar
Nadare
Cave Troll
Posts: 72
Joined: Fri Aug 11, 2006 3:00 pm

Post by Nadare »

Also, would it be possible to add a function to set the Property Set type for a macro (i.e. what shows up in the "Properties" dropdown on the Config tab)?

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

Post by Craig »

Nadare wrote:Also, would it be possible to add a function to set the Property Set type for a macro (i.e. what shows up in the "Properties" dropdown on the Config tab)?
Done and sent to Trevor. Anything else I am working on for the patch will more than likely be for the build afterwards.

As for an update, I still haven't got a solution to the "interesting" problem, but I have sent an email to Trevor telling him that the patch can be applied without a solution to that and I can keep looking at it. As bugs go its harmless it just means one small bit of functionality wont be available until it is sorted out. I have incorporated most of the other requests in this thread, the big ones I haven't done are the macros to select tokens, the main reason being as I was testing them I found out how easy it is to royally screw up when using them and I can't at this moment think of a way of protecting people writing macros from doing that. You will be able to access the speech fields of a token via get/setSpeech() but you can not make the token blurt out its speech yet for technical reasons :). Also getVisibleTokens() has been renamed to getExposedTokens() so its more clear about what it is getting for you, still trying to figure out a way to get the tokens that are visible when light is taken into account.

There is some other stuff in the patch that I haven't detailed in the thread, but hey everyone likes surprises right? :)

As for before Turkey day? No idea. There is a lot for Trevor to review in there, and his hardware woes wont make it any easier for him :(

User avatar
Nadare
Cave Troll
Posts: 72
Joined: Fri Aug 11, 2006 3:00 pm

Post by Nadare »

Thank you!! :)
Craig wrote:There is some other stuff in the patch that I haven't detailed in the thread, but hey everyone likes surprises right? :)
...as long as they're good ones :)

User avatar
mmbutter
Cave Troll
Posts: 36
Joined: Tue Nov 25, 2008 4:29 pm
Location: Huntersville, NC
Contact:

Re: While I am at it are there any Macro Addition Requests?

Post by mmbutter »

Craig wrote:Token Functions:
getPropertyNames(), getAllPropertyNames() (not just those for a specific token), getPropertyType(), hasProperty(), isNPC(), isPC(), setPC(), getLayer(), setLayer(), getSize(), setSize(), getOwners(), isOwnedByAll(), getPortrait(), getHandOut(), getNotes(), getGMNotes(), setNotes(), setGMNotes(), hasImpersonated()
I'm running b47, and I'm getting "undefined function" for all of [get,set][Notes,GMNotes](). Has this code not been included yet?

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

Re: While I am at it are there any Macro Addition Requests?

Post by Craig »

mmbutter wrote:
Craig wrote:Token Functions:
getPropertyNames(), getAllPropertyNames() (not just those for a specific token), getPropertyType(), hasProperty(), isNPC(), isPC(), setPC(), getLayer(), setLayer(), getSize(), setSize(), getOwners(), isOwnedByAll(), getPortrait(), getHandOut(), getNotes(), getGMNotes(), setNotes(), setGMNotes(), hasImpersonated()
I'm running b47, and I'm getting "undefined function" for all of [get,set][Notes,GMNotes](). Has this code not been included yet?
These were not added for b47, hopefully they will be in b48 when it comes out.

User avatar
PinkRose
Dragon
Posts: 732
Joined: Sat Nov 15, 2008 2:28 pm
Location: The City of Roses, Oregon

Post by PinkRose »

One last vote for changaeble portraits.
Now with the Druid's Beast form, I think it is a requirement to be able to change your token pic with a macro.
I know it's been brought up, just wanted to bring it up again.

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

Post by Craig »

PinkRose wrote:One last vote for changaeble portraits.
Now with the Druid's Beast form, I think it is a requirement to be able to change your token pic with a macro.
I know it's been brought up, just wanted to bring it up again.
Its already included in the patch I sent to Trevor as well as a way to plonk pictures down on a map and refer to them easily (hopefully, think similar to the Lib: tokens) so you should be able to switch pictures easily.

User avatar
RPMiller
Demigod
Posts: 2555
Joined: Sun Jul 01, 2007 1:23 am

Post by RPMiller »

Craig wrote:
PinkRose wrote:One last vote for changaeble portraits.
Now with the Druid's Beast form, I think it is a requirement to be able to change your token pic with a macro.
I know it's been brought up, just wanted to bring it up again.
Its already included in the patch I sent to Trevor as well as a way to plonk pictures down on a map and refer to them easily (hopefully, think similar to the Lib: tokens) so you should be able to switch pictures easily.
OMG!!OMG!!OMG!!

Are you serious!?!?!?!?! :shock: :) :D 8)

Dude!!! You don't know how long I've waited for that, plus animated GIF support!!! This means that my superhero characters will now be able to look like they have force fields activated and.... and.... OMG! SWEEEEEEEEEEET!
You're just jealous 'cause the voices only talk to me.

ImageImage

User avatar
PinkRose
Dragon
Posts: 732
Joined: Sat Nov 15, 2008 2:28 pm
Location: The City of Roses, Oregon

Post by PinkRose »

Oh wow.
That's impressive.

Post Reply

Return to “MapTool”