Unit Creation Question

[size=150]I have a couple of questions.[/size]

  1. So if say you want to create 60 4-4 infantry units each with its unique EQID. Each piece also has a reversed ‘damaged’ side. What is the best way to go about this?
    A) Use unit definitions, and then create the game piece palette.
    B) Just create a PNG of each unit and then create the game piece palette.
    C) Something else.

  2. Which method would use the least memory space?

  3. Which method seems easiest to you?

[size=150]Thanks Kevin[/size]

Question 2 first:

No difference, this is not an issue. Use whichever method is easiest, quickest, achieves the look you want.

Again, depends on the final look you want, and what source art you want.

Using the Game Piece Definition functionality to generate the images for you is great if you want to blast out something quickly that does the job and you’re not fussed about it looking fantastic. The results will be functional, but plain. This option is especially good where you are prototyping and want to change images quickly without having to create new artwork.

If you want to craft really nice looking counters with nice borders etc, then creating your own artwork is probably the go. YYou might do this as the last stage after you have finished prototyping, or if you already have existing artwork.

Whatever method you choose, you want to isolate graphic elements that are the same between units and share them between unit definitions. If all 60 of your 4-4 counters have exactly the same image except for the ID that is different between units, then I would create the one image that is the same and share it between all counters via a Protoype. I would then create the ID as a Text Label that displays a Marker (fixed property) value and put that in the prototype also. Each individual unit then gets a Marker trait where you set the individual EQID, plus the prototype that displays the base image plus the EQID as a text label.

If the '‘damaged’ side is the same for all counters, then you can do that same with it.

Regards,
Brent.

Great Thanks Brent for the help.

I am still having a bit of trouble. I made the base infantry unit (4-4, XX etc).
In [size=150]’Game Piece Palette’[/size] I created a piece “Red 1a1” ( Basic piece [no picture], Prototype – Base Red, Marker – Unit ID = 2

In[size=150] ‘Game Piece Prototype Definitions’ [/size]I created ‘Base Red’ (Prototype – Red Combat units, Prototype – unit, Layer [to get Image base image][always active, just the 1 image for now), Text Label – Unit Id [this is where I cant figure out how to call the marker value].

I’m sure its something simple I am missing.
Attached is a screen shot.

Thanks again Kevin

[size=150]Again THANKS Brent.[/size]

with your description I went back and read the VASSAL design guide, and did everything step by step.
Everything is working!!!

You just saved me day of my life, editing units!

Kevin

So I now know how to change large number of units EQID’s.

to make mass unit creation even faster I created 6 infantry units. Then I opened the buildFile with Eclipse, and used the cut-&-paste to rapidly create new (identical units). In Eclipse I edited the Unit Name and the marker Unit ID. everything seemed to work fine
I went and opened the module in VASSAL everything (calls, step change) works.

I noticed in the buildFile each piece had an unique gpid="___" entry.
The gpid’s were also unique outside just the 4-4 infantry units, so it seems that every unit has it own 'hidden" (1- XXXX) identifier.
I went back and changed them also. It didnt seem to make a difference in the modules operation.

[size=150]What is ‘gpid’ used for in VASSAL?[/size]
I am still trying to teach myself JAVA so this may be some Common JAVA thing I haven’t got to yet.

Thanks Kevin

The gpid is an internal unique id number that identifies the Pieceslot a unit is created from. It is used when you refresh a module to identify which pieceslot in the module to use to rebuild each unit in the current game in case the unit name changes. gpid’s are checked for uniqueness when you edit a module, if the are not unique, they are renumbered to force them to be unique.

So when you are cut & pasting during initial development, you don’t really have to worry about them, Vassal will sort it out. Once a module is stable and being used, you do NOT want to change these, so you need to be a bit more careful if you start cut/pasted on the buildfile later in a module’s life.

OK thanks Much.

Kevin