Create account / Log in

Property Sheets and Text Logs

Talk about module design ideas and techniques.

Moderators: uckelman, Tim M

Property Sheets and Text Logs

Postby chrono280 » April 19th, 2012, 1:15 am

1)
Properties on a Property Sheet may be referenced in Dynamic Properties (via $thing$) or in Calculated Properties (in 3.2.0-8096). Is there any way to work this in reverse-- Have a Dynamic Property SET a Property Sheet Value? Like "initial health" or something.
I can't find a way off the top of my head. Making a Dynamic Prop and calling it the same name as an item on a Prop Sheet does not affect the Prop Sheet as far as I can tell.


2)
I'm looking to make a private text-based log window. The idea being, you buy a unit and it says "X purchased in turn 5". Is there any way to send text to a Notes Window?
The only other way I can find to do it, is to make a Marker piece with a Text prop. I was having the Marker get placed, then get populated with the correct Item and Turn# data then it gets sent to a "log" area where it stacks. The problem is, you only have as much space as the window, and it is kind of cumbersome. It'd be great if Report Action could go to a Notes Window!

Thanks in advance!
chrono280
 
Posts: 62
Joined: September 9th, 2011, 12:45 am

Re: Property Sheets and Text Logs

Postby barbanera » April 19th, 2012, 10:59 am

2)
I'm looking to make a private text-based log window. The idea being, you buy a unit and it says "X purchased in turn 5". Is there any way to send text to a Notes Window?
The only other way I can find to do it, is to make a Marker piece with a Text prop. I was having the Marker get placed, then get populated with the correct Item and Turn# data then it gets sent to a "log" area where it stacks. The problem is, you only have as much space as the window, and it is kind of cumbersome. It'd be great if Report Action could go to a Notes Window!


I don't know about the first method, but the 2nd method you describe is doable because indeed that's what I am doing in my module. Specifically, I use an at-start-stack with 3 text labels, containing $log1$, $log2$, $log3$, respectively. Other pieces or cards will then take care of setting/resetting $log1$, $log2$, $log3$ as appropriate.

However, as you say, the real crucial point is the limited space and the need for older "messages" being rolled out. Therefore, I added some "rolling" feature to make sure whenever a new last line is written, everything is rolled up prior to that.

Problem is that it does not always work (timing issues resulting in text overwritten instead of rolled up and replaced.. no clue why) and that in general text labels are buggy (see the centering bug, for example).

Feature request for Vassal 4... rolling text trait?
barbanera
 
Posts: 384
Joined: January 12th, 2012, 2:27 pm

Re: Property Sheets and Text Logs

Postby chrono280 » April 19th, 2012, 11:18 am

Yeah that happened to me too, the text was stacking per the Stacking rules of the map it was on. But sometimes it wouldn't and would just appear on top of the other text. I was hoping there would be a way to send text to a Notes Window or maybe just an easier way to do option (2).

Option 1 is a completely different issue actually. I was just wondering if there is any way to alter (say, with a keystroke) properties on a Property Sheet. As I said, dynamic properties can call on them but it seems the only way to alter them it to open up the Prop Sheet and change them in game. Anybody have any insight on this? Thanks again!
chrono280
 
Posts: 62
Joined: September 9th, 2011, 12:45 am

Re: Property Sheets and Text Logs

Postby irishwulf » April 19th, 2012, 5:08 pm

Chrono280,
If anyone has found a reasonable method for changing property sheets dynamically, I'm very interested to hear about it - I spent a great deal of time trying to think of a good way to do this without lots and lots of global properties and without a custom class. Dr. Nostromo's 'To Be King' module is the best implementation that I can think of.

-Seth
irishwulf
 
Posts: 243
Joined: December 17th, 2011, 4:29 am

Re: Property Sheets and Text Logs

Postby chrono280 » April 19th, 2012, 6:24 pm

Yeah I've checked it out before-

Actually I was just trying to download it again and the link seems to be broken on his website: http://www.drnostromo.com/tbk/tbkdl.html

I might have another copy floating around one of my PCs, I'll dig around for now. It has been useful in the past, DrNostromo does some creative things with vassal.
chrono280
 
Posts: 62
Joined: September 9th, 2011, 12:45 am

Re: Property Sheets and Text Logs

Postby chrono280 » April 20th, 2012, 1:32 pm

Found and checked out To Be King. I can't find any instances in his module where he might manipulate a Property Sheet via a keystroke, such as with a Dynamic Property.

This would be immensely helpful in my new Space Empires module I am working on. Not only would it help initialise all of the piece data, so I wouldn't have to do it manually through the Game Piece Pallet, but it would enable me to make a working log of stuff purchased. I.e. I could have on a property sheet X purchased in turn Y. But there does not seem to be a way that Property Sheet Values can be manipulated by a dynamic or calculated property, even though dynamic and calculated properties can call upon Property Sheet values.

Anybody have any other ideas? Does a custom class exist somewhere for this? Is there something in the Markup I could use but have missed (http://vassalengine.svn.sourceforge.net ... iew=markup) ?

Thanks again for all the responses!
chrono280
 
Posts: 62
Joined: September 9th, 2011, 12:45 am

Re: Property Sheets and Text Logs

Postby chrono280 » April 20th, 2012, 1:50 pm

It's in as a feature request from a couple years ago it seems: RFE 2725945
chrono280
 
Posts: 62
Joined: September 9th, 2011, 12:45 am

Re: Property Sheets and Text Logs

Postby uckelman » April 20th, 2012, 1:57 pm

Thus spake chrono280:
> It's in as a feature request from a couple years ago it seems: RFE
> 2725945

That's a number from the SF bug tracker, which isn't the one we use
these days. Look for it under http://www.vassalengine.org/tracker.

--
J.
User avatar
uckelman
Site Admin
 
Posts: 8792
Joined: December 10th, 2007, 9:48 am
Location: Durham, England

Re: Property Sheets and Text Logs

Postby chrono280 » April 20th, 2012, 2:28 pm

Yup bug 1929 on bugzilla http://www.vassalengine.org/tracker/sho ... gi?id=1929

Any thoughts as to a work around? Don't know much about writing custom classes but is it possible to write a trait that could manipulate property sheet values? That is probably way above my paygrade/ ability.

Thanks again
chrono280
 
Posts: 62
Joined: September 9th, 2011, 12:45 am

Re: Property Sheets and Text Logs

Postby chrono280 » April 20th, 2012, 5:42 pm

chrono280 wrote:Yup bug 1929 on bugzilla http://www.vassalengine.org/tracker/sho ... gi?id=1929

Any thoughts as to a work around? Don't know much about writing custom classes but is it possible to write a trait that could manipulate property sheet values? That is probably way above my paygrade/ ability.

Thanks again



Also link to the markup for Prop Sheets... I'm not the best with Java.

http://vassalengine.svn.sourceforge.net ... iew=markup
chrono280
 
Posts: 62
Joined: September 9th, 2011, 12:45 am

Re: Property Sheets and Text Logs

Postby irishwulf » April 24th, 2012, 10:26 am

No, To Be King does not use Property Sheets at all that I know of. What I mean is that the module has the best implementation of a similar function - recording a large number of property values. If you need a large number of properties for each piece, well it's going to be hard, that's all. You can use Dynamic Properties, but you will also start noticing significant lag as the number of traits on each piece increases. If you only need properties for a small and finite set of objects (like for each side in a game), do what To Be King does and use Global Properties.
You could introduce a custom trait to solve this problem. However, I wouldn't try to manipulate the Property Sheet values, I'd just make my own custom property sheet. However, you will need to do some Java programming.

-Seth
irishwulf
 
Posts: 243
Joined: December 17th, 2011, 4:29 am

Re: Property Sheets and Text Logs

Postby chrono280 » April 24th, 2012, 12:38 pm

I decided to forgo propr sheets for the log function I was trying to implement. Instead I made use of the clone function. The object I used to buy units now gets cloned and sent to another board. Then it's text props get changed. Since the purchasing data is all in the cloned piece already it obviates the need for a large number of global props as well. Well see how it goes moving forward. Thanks again for your help.
chrono280
 
Posts: 62
Joined: September 9th, 2011, 12:45 am


Return to Module Design

Who is online

Users browsing this forum: Google [Bot] and 4 guests