taskLordsAWar! - Tasks: task #14519, standing stones

 
 

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

task #14519: standing stones

Submitter:  Ben Asselstine <benasselstine>
Submitted:  Tue 23 May 2017 08:51:43 PM UTC
   
 
Should Start On:  Tue 23 May 2017 04:00:00 AM UTC Should be Finished on:  Tue 23 May 2017 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

Thu 25 May 2017 12:55:48 PM UTC, comment #3: 

On the corner road tiles, there isn't enough space to put a standing stone on the inner curve, and I don't want to put a stunted or different-looking one there, so I just left them empty.

Other road tiles and stone motifs can do a better job with this particular case.


Ben Asselstine <benasselstine>
Group administrator
Wed 24 May 2017 01:20:33 PM UTC, comment #2: 

Okay I've enumerated the types of stones, and it's unfortunately long.
ROAD_E_AND_W refers to ROAD_CONNECTS_EAST_AND_WEST.
STONES_N_S refers to standing stones at north and south.

So there are many stone types per road type, and these can also appear on a grass tile without a road.

ROAD_E_AND_W_STONE_N = 0,
ROAD_E_AND_W_STONE_S = 1,
ROAD_E_AND_W_STONES_N_S = 2,
ROAD_N_AND_S_STONE_W = 3,
ROAD_N_AND_S_STONE_E = 4,
ROAD_N_AND_S_STONES_W_E = 5,
ROAD_ALL_DIRECTIONS_STONE_NW = 6,
ROAD_ALL_DIRECTIONS_STONE_NE = 7,
ROAD_ALL_DIRECTIONS_STONE_SW = 8,
ROAD_ALL_DIRECTIONS_STONE_SE = 9,
ROAD_ALL_DIRECTIONS_STONES_NW_NE = 10,
ROAD_ALL_DIRECTIONS_STONES_SW_SE = 11,
ROAD_ALL_DIRECTIONS_STONES_NW_SW = 12,
ROAD_ALL_DIRECTIONS_STONES_NE_SE = 13,
ROAD_ALL_DIRECTIONS_STONES_NW_SE = 14,
ROAD_ALL_DIRECTIONS_STONES_NE_SW = 15,
ROAD_ALL_DIRECTIONS_STONES_NE_SW_SE = 16,
ROAD_ALL_DIRECTIONS_STONES_NW_SW_SE = 17,
ROAD_ALL_DIRECTIONS_STONES_NW_NE_SE = 18,
ROAD_ALL_DIRECTIONS_STONES_NW_NE_SW = 19,
ROAD_ALL_DIRECTIONS_STONES_NW_NE_SW_SE = 20,
ROAD_N_AND_W_STONE_NW = 21,
ROAD_N_AND_W_STONE_SE = 22,
ROAD_N_AND_W_STONES_NW_SE = 23,
ROAD_N_AND_E_STONE_NE = 24,
ROAD_N_AND_E_STONE_SW = 25,
ROAD_N_AND_E_STONES_NE_SW = 26,
ROAD_S_AND_E_STONE_NW = 27,
ROAD_S_AND_E_STONE_SE = 28,
ROAD_S_AND_E_STONES_NW_SE = 29,
ROAD_W_AND_S_STONE_SW = 30,
ROAD_W_AND_S_STONE_NE = 31,
ROAD_W_AND_S_STONES_SW_NE = 32,
ROAD_N_AND_S_AND_E_STONE_NE = 33,
ROAD_N_AND_S_AND_E_STONE_SE = 34,
ROAD_N_AND_S_AND_E_STONE_W = 35,
ROAD_N_AND_S_AND_E_STONES_SE_W = 36,
ROAD_N_AND_S_AND_E_STONES_NE_W = 37,
ROAD_N_AND_S_AND_E_STONES_NE_SE = 38,
ROAD_N_AND_S_AND_E_STONES_NE_SE_W = 39,
ROAD_E_W_AND_N_STONE_NW = 40,
ROAD_E_W_AND_N_STONE_NE = 41,
ROAD_E_W_AND_N_STONE_S = 42,
ROAD_E_W_AND_N_STONES_NE_S = 43,
ROAD_E_W_AND_N_STONES_NW_S = 44,
ROAD_E_W_AND_N_STONES_NW_NE = 45,
ROAD_E_W_AND_N_STONES_NW_NE_S = 46,
ROAD_E_W_AND_S_STONES_SW = 47,
ROAD_E_W_AND_S_STONES_SE = 48,
ROAD_E_W_AND_S_STONE_N = 49,
ROAD_E_W_AND_S_STONES_SE_N = 50,
ROAD_E_W_AND_S_STONES_SW_N = 51,
ROAD_E_W_AND_S_STONES_SW_SE = 52,
ROAD_E_W_AND_S_STONES_SW_SE_N = 53,
ROAD_N_S_AND_W_STONE_NW = 54,
ROAD_N_S_AND_W_STONE_SW = 55,
ROAD_N_S_AND_W_STONE_E = 56,
ROAD_N_S_AND_W_STONES_SW_E = 57,
ROAD_N_S_AND_W_STONES_NW_E = 58,
ROAD_N_S_AND_W_STONES_NW_SW = 59,
ROAD_N_S_AND_W_STONES_NW_SW_E = 60,
ROAD_W_STONE_N = 61,
ROAD_W_STONE_S = 62,
ROAD_W_STONE_E = 63,
ROAD_W_STONES_S_E = 64,
ROAD_W_STONES_N_E = 65,
ROAD_W_STONES_N_S = 66,
ROAD_W_STONES_N_S_E = 67,
ROAD_N_STONE_W = 68,
ROAD_N_STONE_E = 69,
ROAD_N_STONE_S = 70,
ROAD_N_STONES_E_S = 71,
ROAD_N_STONES_W_S = 72,
ROAD_N_STONES_W_E = 73,
ROAD_N_STONES_W_E_S = 74,
ROAD_E_STONE_N = 75,
ROAD_E_STONE_S = 76,
ROAD_E_STONE_W = 77,
ROAD_E_STONES_S_W = 78,
ROAD_E_STONES_N_W = 79,
ROAD_E_STONES_N_S = 80,
ROAD_E_STONES_N_S_W = 81,
ROAD_S_STONE_W = 82 ,
ROAD_S_STONE_E = 83,
ROAD_S_STONE_N = 84,
ROAD_S_STONES_E_W = 85,
ROAD_S_STONES_N_W = 86,
ROAD_S_STONES_N_E = 87,
ROAD_S_STONES_N_E_W = 88,

The alternative to this very long enumeration is to have many stones per tile, but that breaks LocationList.

But hey, if you don't want to use stones, we can just leave the filename empty.  But if you want one stone, you have to fill them all out.  What a pain.

Whereas with roads you need all of them, with stones you really don't.  But it's even more of a hassle to add a model per tile in the stones image.

Ben Asselstine <benasselstine>
Group administrator
Wed 24 May 2017 11:25:50 AM UTC, comment #1: 

Here's the standing stone graphic I came up with.

I dug it out of the old freelords project, and tried to fix it up for lordsawar by making it a little more detailed, removing the green, and giving it a transparent shadow.

I used the same shadow angle as a signpost, but the shadow isn't as long.

I think it looks alright.


Ben Asselstine <benasselstine>
Group administrator
Tue 23 May 2017 08:51:43 PM UTC, original submission:  

One thing lordsawar lacks that WL2 has are standing stones along the roads (and also not along roads).  This task is about getting standing stones into lordsawar.

Standing stones are completely cosmetic.  They are there simply to make the roads and terrain less boring, and more realistic in a medieval setting.  Standing stones only appear on grass tiles or along roads.  They can't appear on tiles that have some other building on them.

We could already have standing stones in grass tiles (nothing prevents it), but it's problematic because when roads are blitted on top of a grass tile, the standing stone would be obscured.

So we need a list of standing stones, like we have a list of road tiles that are blitted on top of roads.

Currently we have a set of roads that is associated with the tileset.  It appears as a <d_roads> entity in side a tileset file,

(It was a quick and dirty way to add roads, and it doesn't contain any type information.  It presumes the road tiles are in a specific order in the image, and multiples of a particular road type is impossible.  It makes the editing of roads in the editor easy though.)

Here are the steps for implementing standing stones in lordsawar (in no particular order.)

Add a <d_standing_stones> entity to the tileset file that has the standing stones in specific order that relates to roads.  This allows for many different standing stone configurations for a given road tile.  e.g. the stone is on the right, or left, or both.

Change the tileset object to save/load it, and to instantiate/uninstantiate the graphics.

Actually create the graphics, or find something suitably licensed and repurpose it.  And enumerate the types.

Change the building type in the Maptile object to have a "standing stone" type in the enumeration.  The idea here is that standing stones either appear on road tiles, or standing stone tiles (e.g. grassy).  This is different than the other maptiles, where if the building type says road/temple/ruin etc, it equates to an entry in the road/temple/ruinlist.  Standing stones will be special in this regard.

This means the scenario file format has to change.  We need a <stonelist> similar to how <roadlist> works.  This means we need a standingstone object too (or maybe just plain "stone").  This object is where the standing stone enumeration goes.

Change GameScenario to load/save the stonelist.

Change the ImageCache object to load and draw standing stones on tiles.  e.g. we draw a road and then check to see if a standing stone is here or not.

The code that generates roads on random maps needs to handle this.  Maybe make them show up a static 5% of the time?  and if people want something different they can make their own darned scenario.

The road generator in the editor needs to change.  e.g. it should put down standing stones some of the time.  Maybe make the 5% configurable here.

The tileset editor needs to change.  e.g. give it a file that is the standing stone file, and it copies it into the tar file.

The editor needs to change so that there's a standing-stone toolbutton.  We can plop them down on roads that are on grass tiles, and also on grass tiles that don't have buildings.

The editor also needs a standing stone dialog so we can select which stone we want to appear on a tile.

I'm sure a lot of other code will have to be changed to accomodate stones in the editor... like move and delete, and so on.

We need an xslt that can upgrade tilesets from 0.2.1 to 0.3.2. 
We'll leave the filename empty, and try to handle that gracefully in ImageCache.

We need an xslt that can upgrade scenarios from 0.2.1 to 0.3.2.  Just make an empty <stonelist> object.

Update the system tilesets to have a <d_standing_stones> entity and file.

Update the system scenarios to have a <stonelist> entity.

What we're not doing:

Don't bother trying to import stones a WL2 map file.  yeesh.

Ben Asselstine <benasselstine>
Group administrator

 

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

Attached Files
file #40779:  mystones2.png added by benasselstine (1KiB - image/png - a stone graphic i came up with)
file #40780:  mystones3.png added by benasselstine (4KiB - image/png - a stone graphic i came up with)
file #40773:  standing-stone-wl2.jpg added by benasselstine (457KiB - image/jpeg - standing stones in WL2)

 

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 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-05-25 benasselstine Open/ClosedOpen Closed
    2017-05-24 benasselstine Attached File- Added mystones2.png, #40779
        Attached File- Added mystones3.png, #40780
    2017-05-23 benasselstine Attached File- Added standing-stone-wl2.jpg, #40773

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code