Create account / Log in

How is VASL "Show Info" implemented?

Topics related to the main Vassal engine.

Moderators: uckelman, Tim M

How is VASL "Show Info" implemented?

Postby OGerry » December 12th, 2009, 3:08 am

A minor newb question. Since VASL appears not to be open-able via VASSAL currently, I was wondering if someone could tell me how the "Show Info" right-click option was implemented.

I like the idea of spewing some informative text (just text) about a piece with a toggling right click option. Is this just implemented as a Layer (but with plain old text instead of an image file) or is there some more elegant other way to make text toggle on and off?

I tried using Place Marker, but I couldn't figure out an efficient way to make the "Marker" text disappear again (it just sits on top of the game piece and stays in the way unless you delete it).

Thx all,
OG
OGerry
 
Posts: 4
Joined: November 24th, 2009, 8:08 pm

Postby jmalter » December 19th, 2009, 9:13 pm

Hi OGerry,

"Show Info" is from "TextInfo.class" in the VASL modfile. Presumably you could extract this classfile & drop it into another modfile, then use the Import button in the Gamepiece Editor dlog to add "Has Info" to the list of available Traits.

It's an unsophisticated thing, hardcoded to ctrl+I. Its Properties are Type (a csv textstring w/ your info) and State (leave it blank).

It has several internal translators for display of the textstring:
"," is displayed as two space characters
"^" toggles superscript mode
"r" at the beginning of a string displays the text in red until the next ","
a single-character "R" is displayed w/ a circle around the R.

This classfile probably needs to live in the Path "VASL\counters\" in your modfile. Use "VASL.counters.TextInfo" when you Import it.

During play, its display-state change is not transmitted to the opponent, nor is it written to the savegame or logfile.
Attachments
TextInfo.zip
(3.3 KiB) Downloaded 133 times
jmalter
 
Posts: 16
Joined: May 11th, 2008, 4:33 pm


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 3 guests