Create account / Log in

Unit Creation Question

Talk about module design ideas and techniques.

Moderators: Tim M, uckelman

Unit Creation Question

Postby Jardic » January 11th, 2019, 5:28 am

I have a couple of questions.

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?

Thanks Kevin
User avatar
Jardic
 
Posts: 22
Joined: March 29th, 2018, 6:00 pm
Location: Phoenix Az

Re: Unit Creation Question

Postby Brent Easton » January 13th, 2019, 11:26 pm

Question 2 first:
2. Which method would use the least memory space?

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

3. Which method seems easiest to you?

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.
User avatar
Brent Easton
 
Posts: 2745
Joined: December 21st, 2007, 3:06 am
Location: Berry, NSW, Australia

Re: Unit Creation Question

Postby Jardic » January 14th, 2019, 8:51 am

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 ’Game Piece Palette’ I created a piece “Red 1a1” ( Basic piece [no picture], Prototype – Base Red, Marker – Unit ID = 2

In ‘Game Piece Prototype Definitions’ 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
Attachments
Marker.png
Screen shot of prototype and label.
Marker.png (222.48 KiB) Viewed 128 times
User avatar
Jardic
 
Posts: 22
Joined: March 29th, 2018, 6:00 pm
Location: Phoenix Az

Re: Unit Creation Question

Postby Jardic » January 14th, 2019, 9:22 am

Again THANKS Brent.

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
User avatar
Jardic
 
Posts: 22
Joined: March 29th, 2018, 6:00 pm
Location: Phoenix Az

Another question

Postby Jardic » January 15th, 2019, 9:31 pm

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.

What is 'gpid' used for in VASSAL?
I am still trying to teach myself JAVA so this may be some Common JAVA thing I haven't got to yet.


Thanks Kevin
Attachments
VASSAL Q.png
VASSAL Q.png (150.34 KiB) Viewed 94 times
User avatar
Jardic
 
Posts: 22
Joined: March 29th, 2018, 6:00 pm
Location: Phoenix Az

Re: Unit Creation Question

Postby Brent Easton » January 15th, 2019, 9:41 pm

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.
User avatar
Brent Easton
 
Posts: 2745
Joined: December 21st, 2007, 3:06 am
Location: Berry, NSW, Australia

Re: Unit Creation Question

Postby Jardic » January 16th, 2019, 3:28 am

OK thanks Much.

Kevin
User avatar
Jardic
 
Posts: 22
Joined: March 29th, 2018, 6:00 pm
Location: Phoenix Az


Return to Module Design

Who is online

Users browsing this forum: No registered users and 3 guests