taskLordsAWar! - Tasks: task #15624, secondary player colours

 
 

You are not allowed to post comments on this tracker with your current authentication level.

task #15624: secondary player colours

Submitter:  Ben Asselstine <benasselstine>
Submitted:  Tue 05 May 2020 02:36:14 PM UTC
   
 
Should Start On:  Tue 05 May 2020 04:00:00 AM UTC Should be Finished on:  Tue 05 May 2020 04:00:00 AM UTC
Category:  None Priority:  5 - Normal
Status:  None Privacy:  Public
Assigned to:  None Percent Complete:  0%
Open/Closed:  Closed Effort:  0.00

Mon 15 Feb 2021 07:00:03 PM UTC, comment #3: 

All done.  It would be nice to have more images to use the multi-mask thing but I'm not an artist and limited it to the hero army unit, and it only affects the black player as it now has a secondary colour of red.

Ben Asselstine <benasselstine>
Group administrator
Mon 15 Feb 2021 05:54:59 PM UTC, comment #2: 

Sometimes we can guess how many masks an image has from its geometry, and sometimes we can't.

When we can't we have to ask the user, so we present a dialog of the image and let them pick the number of masks.  For horizontal oriented masked images we draw vertical red lines depicting where we think the masks are.  With vertically oriented masked images we do horizontal lines.

With army images the height will be a multiple of the width, and with shield images it can be any old shape.  The former we can calculate the masks, and the latter we can't.

The "_num_masks" in the xml files certainly clutters things up a lot which is unfortunate.

We're going with a maximum of three colours / three masks, mostly because three colours is enough to represent most world flags.

Ben Asselstine <benasselstine>
Group administrator
Sat 13 Feb 2021 08:28:59 PM UTC, comment #1: 

Secondary colours breaks the file upgrade system because the expected shape of the masked images is different between versions.

We need a way to tag it to say this is a 2 colour mask, or a 1 colour mask, or hey even an N colour mask.

<d_FILE_name>foo</d_FILE_name>
<d_FILE_masks>2</d_FILE_masks>

Then for our upgrade path we just plop in a bunch of new tags with 1 as the value.

Once we go with a 1 or 2 mask system it makes things a little more complicated: e.g. a shieldset supplies 2 colours but an armyset that only uses 1.

Maybe a shieldset has one side that has 1 colour, and another that has 3.

Ben Asselstine <benasselstine>
Group administrator
Tue 05 May 2020 02:36:14 PM UTC, original submission:  

Player colours originate the shield set, and every player gets one.

Images of armies, shields, selectors, flags, etc are drawn in the player's colour via "masked images".  Masked Images are where one half of the image is the army (or whatever), and the second half is the white "mask" that is overlaid on top of the main image and drawn in the player's colour.  It has an alpha channel.

This approach works well with all of the colours except for black, and black masked images tend to lack the detail of the other colours.  The idea is that the black shield could have a secondary red colour associated with it, and all black the images would look a little more detailed.

This task is about providing a second colour to the each player.
Green would have two shades of green, etc.  It will make the armysets a little more interesting when used with different shieldsets.

Sub-tasks include:

1. Add get/set/load/save methods in Player
2. Add get/set/load/save methods in Shield
3. Change the Shield Set Editor to have a colour widget
4. Change Playerlist to assign secondary colour from shield to players
5. Modify all masked images to have a 3rd "frame" to hold a white portion to be overlaid in the secondary colour
6. Change TarFileMaskedImage to apply secondary colours
7. Change TarFileMaskedImage to include and handle secondary masks

This task changes the file formats of the shieldset file, saved-game files and map files.

Ben Asselstine <benasselstine>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by benasselstine (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-02-15 benasselstine Open/ClosedOpen Closed
    2020-05-05 benasselstine SummarySecondary Player Colours secondary player colours

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code