Thus spake "carrington_ward":
> Tim,
>
> Thanks again for your help on this. I'm once again up against
> Vassal's Clausewitzian character: "in vassal everything is simple,
> but the simplest things are difficult."
>
> I wonder if anyone has a thought about how to handle a problem I'm
> facing with Vietnam population: as I noted, I digitized it to match
> the game: 1-,1_,1+ of two different layers, the numerals and the
> +/_/- suffix: essentially an eccentric base 3 number system.
>
> Once digitized, this presents three challenges, especially if I want
> to increment the suffix "digits" by more than one --
>
> A) Floor: how to get the suffix digits to stop spinning at 0-: so
> that decrementing one step from 1- will go to 0+, but 0- decremented
> one step will stay 0-.
>
> B) Ceiling: Ditto at an arbitrary ceiling (often 15).
>
> C) Triggers for the above are not bad, but they seem to break
> repetition: I have not yet found a way to build a trigger that will
> fire my basic counting triggers repeatedly. (I'd like to be able to
> build a "decrement two" trigger that should fire two "decrement one"
> triggers in succession.) I can only use the "decrement one"
> triggers twice in succession if I get rid of the "property match"
> conditionals that make them respect floor and ceiling.
>
> I'm reluctant to move back to defining "decrement 2"
> through "decrement 6" and "increment 2 through increment 7"
> independently -- the trigger conditions look like they'd get awfully
> nasty, especially because I don't know how to define an "else"
> command when the triggers fail.
>
> I suppose my best bet would be to fall back from the double digit
> layering to (instead of 16 layers X 3 Layers, I can go to 48
> layers). But this is tedious as well...
>
> Any thoughts on this would be much appreciated.
>
> Best,
>
> Carrington
Not to denigrate your efforts, but I think that your problem is a round
hole and traits are a square peg. Writing a little bit of Java to do this
would be 1) easier, even if you had to learn how to do it first, and
2) less fragile, and 3) more maintainable. The algorithm for calculating
the population sentiment would be only two or three lines of code, plus
maybe a lookup-table. All you'd need to do is make a widget that has
a grid of labels in which to display the results, and a button for
recalculating. Doing this with traits reminds me of trying to program
a Turing machine, actually.
If you want to do it this way, I'd be willing to help. However, my copy
of Vietnam is 7000km away right now, so I can't consult it.
--
J.
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/vassalengine/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/vassalengine/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/