Switching Text Labels

I’m at a loss here on how to do something that’s probably very simple.

The players have a playing token depicting their character. The character may be in a number of different conditions - normal, poisoned, losing turns, busy, etc.

If the character’s condition is normal, I don’t want any text label displayed on the token. However, if the player is in another condition, I want that condition to be displayed as a text label on the token. I would like this change to be made via a right-click menu option.

I’ve tried to create a set of text label options and nest them in a sub-menu but they all display on the piece at the same time and when I attempt to change the token’s condition, I get an entry box.

Needless to say, I’m confused. Could someone clue me in.

thanx

Hi Fritz,

Text Labels are not really designed for this job, they with a lot of effort, they can be shoehorned into this role. As you can see, the standard function of a Tex Label is to pop a dialog where a player can manually enter some text that will then be displayed.

For displaying this sort of status information, most people use Layers to display small images that show the status of the character. The images can be either small symbols (.g. a little bottle of poison to display ‘Poisoned’ status), or images of a word.

Use a different Layer and a different command key for each status you want to display so that they can all be turned on/off individually.

Regards,
Brent.

*********** REPLY SEPARATOR ***********

On 13/01/2008 at 8:29 PM Dr_Nostromo wrote:


Brent Easton
Analyst/Programmer
University of Western Sydney
Email: b.easton@uws.edu.au


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Ok. that explains my problem.

I did use layers before. I had 8 graphics - 1 normal without a label and 7 with the condition lable on them - for each race. But with player tokens for 20 different races - each with a male and female version - that’s 320 graphics and, with everything else, my mod ballooned to 60 megs.

I figured out a few more tricks using graphic overlays in some areas and I was able to cut the mod down to 32 megs. I’d hate to have to toss all those token graphics back in there as that’ll run it up another 6 megs.

Maybe I’ll just use status chits that players can place on their tokens. Have to think about that one.

Seems that a status label on pieces that could be changed by the user would be a popular item. Is there any plans for such a feature?

What do you use as image format that 320 graphics take up 6 MB ?

The images folder for my module takes up 6 MB too, but it contains over 2000 graphics…

If you don’t use very big images, I could guess you did something wrong…

If layer/graphics are an issue, you can use a Dynamic Property instead of layer and reference this in your text label also. It would mean more key commands, but it doesn’t require graphics

The player tokens are 180 x 180 PNG-8 and their size is roughly 20k each.

20k x 320 = 6400k

I tried doing that but I’m obviously having a problem figuring out how to make Dynamic Properties work as I made no progress doing it that way.

Some of the explanations for things in the manual leave me completely befuddled and I’ve figured out how to do most of what I do by trial and error.

I’m sure the manual is fine …it’s just presented with a different sense of logic than I’m used to. Sort of like when you pick up one program and you instictively know it immediately because it was built with the same sense of login you have and then you pick up another program and it’s a complete mystery. The vassal manual sort of falls in the latter for me.

Thus spake “Dr_Nostromo”:

You could probably reduce the file size of your PNGs by running them
through pngout. pngout is one of several utilities which try to pack
PNGs tighter. The resulting images are pixel-for-pixel identical with
the originals, but can often have dramatically smaller file size.


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

I’ll put together a simple demo mod for this tonight for you

----- Original Message ----
From: Dr_Nostromo messages@forums.vassalengine.org
To: messages@forums.vassalengine.org
Sent: Monday, January 14, 2008 9:37:11 AM
Subject: [Module Design]Re: Switching Text Labels

Tim M wrote:

I tried doing that but I’m obviously having a problem figuring out how to make Dynamic Properties work as I made no progress doing it that way.

Some of the explanations for things in the manual leave me completely befuddled and I’ve figured out how to do most of what I do by trial and error.

I’m sure the manual is fine …it’s just presented with a different sense of logic than I’m used to. Sort of like when you pick up one program and you instictively know it immediately because it was built with the same sense of login you have and then you pick up another program and it’s a complete mystery. The vassal manual sort of falls in the latter for me.


"Are they slow moving, Chief?"
"Yeah, they’re dead …they’re all messed up"
– Night of the Living Dead

Dr_Nostromo aka Fritz Goot aka Zett_Riff
Creator - To Be King
http://www.drnostromo.com/hacx/tbk.html


Messages mailing list
Messages@forums.vassalengine.org (Messages@forums.vassalengine.org)
http://forums.vassalengine.org/mailman/listinfo/messages_forums.vassalengine.org

Post generated using Mail2Forum (mail2forum.com)

Thanx for the software suggestion on PNGout. I’ll definately look into that.

…and thanx for the assistance, Tim. I appreciate it.

Ok, here’s the example mod (inside the zipfile) which links a Dynamic Property with a Text Label.
Right click on the counter to get to the commands as usual and yo uwill see the label change
You can find everything in the At Start Stack under the Map when you edit to see how its done.

I set up all my commands and labels, nested them in a sub-menu and set them up as a prototype for all the player tokens.

Worked perfectly! Thanx!!

Tim M, you’re the MAN!

All these little example mods you put out throughout the forum showing a particular aspect of Vassal have been a great help to my understanding of Vassal.

Perhaps you could collect all these example mods into a single file and have it downloadable somewhere as part of a Vassal tutorial section?

I was thinking the same thing. The manual instructions on Dynamic Properties didn’t make much sense to me but one look at the example Tim put together and I had the whole token labeling system intergrated into my game in 5 minutes.

I, personally, have always been much more of a “show me” person than an “explain to me” person so downloadable examples would be highly desireable.