-
Notifications
You must be signed in to change notification settings - Fork 228
Animation overlays
Chris Oelmueller edited this page Jun 15, 2013
·
6 revisions
Add small graphics to buildings depending on their inventory. Imagine lumberjack having a pile of boards around.
FIFE supports this now: fifengine/fifengine#201
- FIFE git
- UH branch
overlays
- Check [
InventoryOverlayComponent
] (https://github.com/unknown-horizons/unknown-horizons/blob/overlays/horizons/component/inventoryoverlaycomponent.py) and [the images] (http://git.io/GByH2w)
Animation overlays are unique per action set (as_...
) and per action (idle
).
Currently only adding overlays to idle
.
The component depends on StorageComponent
for listening to messages whenever inventory updates happen.
- Fallback mechanism: For
new_amount = 3
and defined overlays0: None, 2: 'boards_2', 5: 'boards_12'
we use'boards_2'
as overlay. - Use
null
in yaml for "no overlay at all" (translates toNone
in python)
Example for lumberjack in tier Pioneers:
- InventoryOverlayComponent:
overlays:
as_lumberjack_barrack0:
#idle: <-- does not exist yet but will be necessary later
RES.BOARDS:
- [0, null]
- [1, planks_01] # ...
- [8, planks_08]
- [9, planks_10]
- [10, planks_12]
RES.TREES:
- [0, null]
- [1, logs_01]
- [3, logs_02] # ...
- [9, logs_05]
- Fields show their status using
idle_full
actions instead (last animation step), so they do not need overlays - Other buildings do not store physical resources, or uninteresting ones. Do not show overlays for those. What about the farm with the huge amount of possible resources there? Generic like with storages?
- Unit producers (which can store large amounts of multiple resources) should combine some of the levels to reduce visual clutter.
E.g. boat builder (12 tons of four resources) shows
nothing
/1-4
/5-8
/9-12
or even1-6
/7-12
- Storage buildings could display generic boxes, barrels, etc. to indicate collector utilization
Buildings to test this feature with (by priority, most useful first)
Implemented | Building | Resource |
---|---|---|
yes (both) | lumberjack | boards and logs, [only logs in Sailors] (https://github.com/unknown-horizons/unknown-horizons/blob/master/content/gfx/buildings/sailors/lumberjack/as_lumberjack0/idle/135/0.png) |
| brickyard | bricks (needs new work animation then)
| smeltery | iron and [other stuff on the left] (https://github.com/unknown-horizons/ | unknown-horizons/blob/master/content/gfx/buildings/settlers/smeltery/as_smeltery0/idle/315/0.png)
| boat builder | boards, with extra code (ship progress as resource in BB inventory) also ship
| salt ponds | salt barrels (needs new work animation without the barrels then)
| tobacconist | tobaccos
| butchery | meat
| tower | cannons
More ideas: brewery, bakery, clay pit, windmill, ...
Home > Developers >
Who is who?
Tests
FIFE: epydoc, doxygen
What to do: Segfaults
Usability
Translations