Health Bars in MapTool

Show off your RPG maps, campaigns, and tokens. Share your gaming experiences and stories under General Discussion and save this forum for things you've created that may help others run their own games. Use the subforums when appropriate.

Moderators: dorpond, trevor, Azhrei, Gamerdude

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

Post by Orchard »

RPMiller wrote:
Azhrei wrote:Yeah, that's an array copy, right? (Or at least, isn't that what GIMP calls it?)
In PS I created a single "tick", created an action to create 49 more and name them sequentially.
After they were created I put one at each end of the black bar and then used the Layer Distribute command to have it do all the work of distributing them evenly along the bar.
The color changes are actually just a single adjustment layer that is clipping the tick layer which I turned into a smart object. That allowed me to have a separate window open where I hid each tick layer at the same time I manually adjusted the hue setting on the adjustment layer in an even increment to get the smooth color change. (The creation of the GIF sort of screwed up the effect, but the actual images are precise.)
I probably should have scripted the adjustment and layer hiding, but I was bored and needed something to do. I still took me less than half an hour once I got the work flow down.
You see, this is why you are the graphics guy and I'm not. Actually it's why I'm the psychologist and you are the graphics guy. I'm decent with inkscape and some other tools, but this? Heh. I'm lost.
0+0=1, for very unstable CPUs.

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

Post by BigO »

RPMiller wrote:
Azhrei wrote:Yeah, that's an array copy, right? (Or at least, isn't that what GIMP calls it?)
In PS I created a single "tick", created an action to create 49 more and name them sequentially.
After they were created I put one at each end of the black bar and then used the Layer Distribute command to have it do all the work of distributing them evenly along the bar.
The color changes are actually just a single adjustment layer that is clipping the tick layer which I turned into a smart object. That allowed me to have a separate window open where I hid each tick layer at the same time I manually adjusted the hue setting on the adjustment layer in an even increment to get the smooth color change. (The creation of the GIF sort of screwed up the effect, but the actual images are precise.)
I probably should have scripted the adjustment and layer hiding, but I was bored and needed something to do. I still took me less than half an hour once I got the work flow down.
Well, however you did it, it looks great.
--O

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

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

Post by RPMiller »

BigO wrote:Well, however you did it, it looks great.
Thanks. :)
You're just jealous 'cause the voices only talk to me.

Image

User avatar
GreenMan
Cave Troll
Posts: 90
Joined: Sun May 20, 2007 9:18 pm
Location: Colorado Springs

Post by GreenMan »

RPMiller wrote:It's actually a lot easier than you would think. There are some really great things that PS can do for you. Just a matter of knowing how the tools work.
Wow... you just mentally shot me right back to the amateur stage in PS. I thought I knew what I was doing... but now I guess it's time to dig out the PS for Dummies book again.

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

Post by RPMiller »

GreenMan wrote:Wow... you just mentally shot me right back to the amateur stage in PS. I thought I knew what I was doing... but now I guess it's time to dig out the PS for Dummies book again.
You're kidding right?
You're just jealous 'cause the voices only talk to me.

Image

salmelo
Giant
Posts: 210
Joined: Fri May 23, 2008 10:23 pm

Post by salmelo »

RPMiller wrote:
Azhrei wrote:Yeah, that's an array copy, right? (Or at least, isn't that what GIMP calls it?)
In PS I created a single "tick", created an action to create 49 more and name them sequentially.
After they were created I put one at each end of the black bar and then used the Layer Distribute command to have it do all the work of distributing them evenly along the bar.
The color changes are actually just a single adjustment layer that is clipping the tick layer which I turned into a smart object. That allowed me to have a separate window open where I hid each tick layer at the same time I manually adjusted the hue setting on the adjustment layer in an even increment to get the smooth color change. (The creation of the GIF sort of screwed up the effect, but the actual images are precise.)
I probably should have scripted the adjustment and layer hiding, but I was bored and needed something to do. I still took me less than half an hour once I got the work flow down.
you know, when i looked at it, I thought of mask layers. Not really sure what all that says, I'm not exactly a graphics guy, but i do have some proficiency in the programs like ps gimp and fireworks. although, firewworks is significantly different then the others.

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

Post by RPMiller »

salmelo wrote:you know, when i looked at it, I thought of mask layers. Not really sure what all that says, I'm not exactly a graphics guy, but i do have some proficiency in the programs like ps gimp and fireworks. although, firewworks is significantly different then the others.
I actually use masks a considerable amount any sort of nondestructive modification is going to be miles ahead of damaging your other levels. In this particular instance I considered using a mask to block off the ticks, but once I thought about where I was going to go with it, it made more sense to create them as individual layers so that I could use the technique above which proved to be a lot faster then using masks this time around.

The other health bars above that I created I used masks in, but this beast was definitely a different animal.
You're just jealous 'cause the voices only talk to me.

Image

nwelte1
Giant
Posts: 151
Joined: Mon Nov 19, 2007 10:52 pm

Post by nwelte1 »

I can not seem to get the getBar() and setBar() functions to work. Can some one give me a sample macro I can see and test? Thanks.

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

Post by PyroMancer2k »

nwelte1 wrote:I can not seem to get the getBar() and setBar() functions to work. Can some one give me a sample macro I can see and test? Thanks.
I just made a macro to test it out.

Code: Select all

[bar.Health=0.25]
It sets the bar just fine. I made a guess on it since state.StateName = # was the setup for states ;). I even tried it with equation like HP/MaxHP and it also worked great at setting the bar.

EDIT:

Also just typing in [bar.Health] returns the percent of the bar that is full. It goes from 0 to 1.

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

Post by Nadare »

Don't forget to replace "Health" with the name that you called your bar in the Campaign Properties > Bars tab.

If you create a bar called "Mana", the syntax would be something like:

[bar.Mana = CurrentMana/MaxMana]

nwelte1
Giant
Posts: 151
Joined: Mon Nov 19, 2007 10:52 pm

Post by nwelte1 »

PyroMancer2k wrote:
nwelte1 wrote:I can not seem to get the getBar() and setBar() functions to work. Can some one give me a sample macro I can see and test? Thanks.
I just made a macro to test it out.

Code: Select all

[bar.Health=0.25]
It sets the bar just fine. I made a guess on it since state.StateName = # was the setup for states ;). I even tried it with equation like HP/MaxHP and it also worked great at setting the bar.

EDIT:

Also just typing in [bar.Health] returns the percent of the bar that is full. It goes from 0 to 1.
I understand the bar.Health variable, but what about the functions?

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

Post by jfrazierjr »

RPMiller wrote:Try this again...

I fooled around at lunch with a new toolbar idea that could serve both the GM and the players. It uses 51 images to go in 2% increments, but for the player view you can just choose the number of images that you want to use.

Here is a sample of it in action:

Image

Here is where you can grab all 51 images via one album.

http://gallery.rptools.net/v/contrib/RP ... ndicators/
need to bug Jay..... he only added 30 increments to the bars dialog. Not sure if there is a reason (rounding??) or if he just picked 30.
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
RPMiller
Demigod
Posts: 2561
Joined: Sun Jul 01, 2007 1:23 am

Post by RPMiller »

I was surprised that there wasn't a place to enter a number in the UI. It appears that you can single click the slider, but a number entry would sure be faster and more accurate.
You're just jealous 'cause the voices only talk to me.

Image

User avatar
jay
RPTools Team
Posts: 1767
Joined: Tue Feb 07, 2006 1:07 am
Location: Austin, Tx

Post by jay »

nwelte1 wrote:I can not seem to get the getBar() and setBar() functions to work. Can some one give me a sample macro I can see and test? Thanks.
They are token macro functions so you have to be executing them in token macros or you have to have a token in context. The macros are getBar('barName') and setBar('barName', value). The value should be between 0 & 1 inclusive.

User avatar
jay
RPTools Team
Posts: 1767
Joined: Tue Feb 07, 2006 1:07 am
Location: Austin, Tx

Post by jay »

jfrazierjr wrote:
RPMiller wrote:Try this again...

I fooled around at lunch with a new toolbar idea that could serve both the GM and the players. It uses 51 images to go in 2% increments, but for the player view you can just choose the number of images that you want to use.

Here is a sample of it in action:

Image

Here is where you can grab all 51 images via one album.

http://gallery.rptools.net/v/contrib/RP ... ndicators/
need to bug Jay..... he only added 30 increments to the bars dialog. Not sure if there is a reason (rounding??) or if he just picked 30.
He just picked 30 as it was twice the amount of patience that I would be able to muster when entering the images :). I'll bump it to 100 for the next build.

Post Reply

Return to “User Creations”