[messages] [Module Design] Some initial answers for your questions

viewofheaven viewport2heaven at yahoo.com
Fri Nov 4 06:04:49 MST 2011

"JustaBill" wrote:
> One thing that vexes me, though, is that Vassal appears to maintain
> some kind of __ownership model__ that is not exposed to the developer.
>  It seems that cards and pieces become owned when they are masked, and
> presumably when added to a player hand or private window, but I can't
> seem to set, query, or reset that attribute.  So I've struck out on my
> own:

I'll check this ownership code for you. What I'll need from you is your
game module (.vmod). If we're working on the same .vmod, it'll make it
terribly fast for me to replicate any bugs you're seeing.

I do suggest you don't workaround these things too much. Spend
reasonable effort working around limitations, but let me know to create
proper tools if the limitations are too much.

"JustaBill" wrote:
> Ctrl-Alt-O performs Owner = $playerSide$ on demand

Use NamedKeyStroke(s) which is in the v3.2 branch. Either download the
latest builds from here[1], or tell me to document a HowTo in setting
your own development platform. With your own "programmer's platform",
you can apply any patch I send you right away, and immediately see your
issues fixed.

We're supposed to write that HowTo at some point anyway.

NamedKeyStroke work inside any KeyStroke fields. Just type any printable
characters (say 'a') twice, and the field will interpret your input as a
NamedKeyStroke. Think of a NamedKeyStroke as a "function name" of sorts.

"JustaBill" wrote:
> I plan to implement 'Give' traits later.

Implement a new Trait called 'Give'?

"JustaBill" wrote:
> Then I modified my original Disown key to set Owner = $Color$,
> believing that when a piece had no Color marker defined, this would
> fall back to the GP I had already defined called Color, with a value
> of Nobody.  Instead, my neutral pieces end up with their Owner DP set
> to the _string literal_ 'Color' - and I definitely did _not_ forget
> the dollar signs.

There are some inconsistent behaviors in "evaluating expressions" (the
dollar sign thingy). I fixed one such error myself in v3.2 just a few
days ago here[2].

"JustaBill" wrote:
> Any insight on whether I could have actually tapped into some official
> ownership model, or streamlined this approach to somehow avoid the
> issues I'm seeing?  Or am I just making a dumb mistake somewhere?

Offhand, I am pretty sure you simply cannot have access to ownership
using "coding" (Traits engine). There simply isn't a Trait like

"JustaBill" wrote:
> FYI, I am building __Cosmic Encounter__ - perhaps one of the most
> ambitious titles I could have chosen for my first module, due to the
> fact that virtually every piece behavior and piece-to-piece
> relationship you could hope to shortcut is a candidate for being
> overridden by some game effect that may or may not be in the current
> game.  It's quite a challenge.

And that was what caught my eye, brave Jedi. I'm a decent engineer. Lend
me your force powers? :)

[1] http://www.vassalengine.org/~uckelman/builds/
[2] http://www.vassalengine.org/tracker/show_bug.cgi?id=1926

Read this topic online here:

More information about the messages mailing list