Branch views #78
Labels
c++
involves C++ code
nice new thing ☺
adds new functionality
proposal
pending discussion about something to do
For openage, a way to create arbitrary branches of views would be useful. Arbitrary branching in this context means that the view is not determined from a predefined characteristic (e.g. player civilization), but from an specific event or change during a game. The event can be defined in the API or by a script.
Branching a view can be used to create a fork of a game entity. Both the main view and the branch view will continue to exist, but both can be patched separately.
Example
A scenario script gives 5 specific swordsmen game entities a +2 attack upgrade. This upgrade triggers a fork which leads to a new branch view to be created for these 5 swordsmen. The branch view then receives the upgrades by patching the branch view, but not the main swordsman view. Thus, only the 5 swordsman benefit from the upgrade. Later on, a blacksmith upgrade gives all swordsman +1 attack. Internally, both the branch view and the main view are patched. The 5 specific swordsmen still have 2 more attack than all other swordsmen.
The text was updated successfully, but these errors were encountered: