Dynamic Graphics for regions [new major feature]
Posted: Tue Feb 23, 2010 5:44 pm
Hi there,
For all AGE engine games / patches released beginning today, a new feature has been added, dealing with the conditional display of images on the map.
Basics:
It is now possible to indicate, in a script command, a reference to an image, which will be shown directly on the map. This image can change depending of the weather and can have a tooltip.
Also, the command allows a change in terrain! I'll give an example why it can be handy (and cool).
You can display several different images per region, there is no real limit but your imagination and the power of your computer.
As the images can be added or removed by event, it is you who decides when and how they appears. Reminder: the initial setup of a scenario IS an event.
Commands:
AddDynGraphic = <RgnUID>;<ImageName>;<AltWeatherImgName>;<TerrainUID>;<CooX>;<CooY>;<Tooltip>
RgnUID: The UID or alias to the UID of the region.
ImageName: the name of the file to use. The file can be anywhere in the Graphics directory and can have special properties, like an animation.
AltWeatherImgName: The alternate image which will be used if the weather of the region is harsh or worse.
TerrainUID: The new terrain of the region, if the image represents an event altering the terrain.
CooX, CooY: the coordinate of the image, 0, 0 being the top left corner of the region.
Tooltip: An optional tooltip to display when the mouse is over the image. For no tooltip, specify NULL.
RemDynGraphic = <RgnUID>;<Image>
This command will remove all images of name <Image> attached to a single region, while leaving the others untouched.
Important Note: The game don't allow exact duplicates of entries for the same region (and by exact it means everything is the same, coordinates included), so this allow recurring events to fire without problem, like an image added every winter turn to add a 'blocked pass' icon. This won't create a stack of 10+ images (in the end) at the same position. Now if you change the X coordinate even one pixel while adding an entry, this is another one for the code and it will be added, alongside the others.
Usages:
Example 1:
In Vainglory of Nation, when the Panama canal is built, the command will be used to change the graphics, adding a canal, AND the terrain, changing the region's terrain to 'canal'.
Example 2:
In Rise of Prussia, regions which having a mountain pass blocked by the snow can have 1 or 2 images. One will be an oval indicator, within the region, telling the player by tooltip the region has a blocked pass. The second will be a broken red line following the region's border which is blocked, clearly showing to the player the forbidden link. Here the important image is the AltWeather one, if the event fires when the weather is harsh.
Example 3:
For an introductory/Tutorial scenario, the designer can add a serie of orange arrows, one per region, going from the initial position of an Army to his objectives, thus clearly indicating to the new player what trajectory he must follow. The arrows can be removed at turn 2, or conditionally to the presence of the players troops (and can be dynamically added back to others regions, etc.)
Example 4:
In AACW, an image highlighting that Richmond should be taken rapidly by the Union can be added, like a pulsating circle or target, etc. A tooltip would then clearly specify the conditions to reach in order to fulfill the event.
Example 5: In WIA, Indians in winter quarter can have a little icon nearby their village. Portages points can also be shown on the banks of rivers.

For all AGE engine games / patches released beginning today, a new feature has been added, dealing with the conditional display of images on the map.
Basics:
It is now possible to indicate, in a script command, a reference to an image, which will be shown directly on the map. This image can change depending of the weather and can have a tooltip.
Also, the command allows a change in terrain! I'll give an example why it can be handy (and cool).
You can display several different images per region, there is no real limit but your imagination and the power of your computer.
As the images can be added or removed by event, it is you who decides when and how they appears. Reminder: the initial setup of a scenario IS an event.
Commands:
AddDynGraphic = <RgnUID>;<ImageName>;<AltWeatherImgName>;<TerrainUID>;<CooX>;<CooY>;<Tooltip>
RgnUID: The UID or alias to the UID of the region.
ImageName: the name of the file to use. The file can be anywhere in the Graphics directory and can have special properties, like an animation.
AltWeatherImgName: The alternate image which will be used if the weather of the region is harsh or worse.
TerrainUID: The new terrain of the region, if the image represents an event altering the terrain.
CooX, CooY: the coordinate of the image, 0, 0 being the top left corner of the region.
Tooltip: An optional tooltip to display when the mouse is over the image. For no tooltip, specify NULL.
RemDynGraphic = <RgnUID>;<Image>
This command will remove all images of name <Image> attached to a single region, while leaving the others untouched.
Important Note: The game don't allow exact duplicates of entries for the same region (and by exact it means everything is the same, coordinates included), so this allow recurring events to fire without problem, like an image added every winter turn to add a 'blocked pass' icon. This won't create a stack of 10+ images (in the end) at the same position. Now if you change the X coordinate even one pixel while adding an entry, this is another one for the code and it will be added, alongside the others.
Usages:
Example 1:
In Vainglory of Nation, when the Panama canal is built, the command will be used to change the graphics, adding a canal, AND the terrain, changing the region's terrain to 'canal'.
Example 2:
In Rise of Prussia, regions which having a mountain pass blocked by the snow can have 1 or 2 images. One will be an oval indicator, within the region, telling the player by tooltip the region has a blocked pass. The second will be a broken red line following the region's border which is blocked, clearly showing to the player the forbidden link. Here the important image is the AltWeather one, if the event fires when the weather is harsh.
Example 3:
For an introductory/Tutorial scenario, the designer can add a serie of orange arrows, one per region, going from the initial position of an Army to his objectives, thus clearly indicating to the new player what trajectory he must follow. The arrows can be removed at turn 2, or conditionally to the presence of the players troops (and can be dynamically added back to others regions, etc.)
Example 4:
In AACW, an image highlighting that Richmond should be taken rapidly by the Union can be added, like a pulsating circle or target, etc. A tooltip would then clearly specify the conditions to reach in order to fulfill the event.
Example 5: In WIA, Indians in winter quarter can have a little icon nearby their village. Portages points can also be shown on the banks of rivers.
