replacing some [while] with [repeat] or [random_placement]
Adding terrain= attribute to the variable generated by [random_placement] this mkaes it easier to use [random_placement] as a replacement for [store_locations] + [while] since [store_locations] also generates the [terrain] attribute:
The syntax is mostly the same as the old cave generator - a [scenario]
tag for general scenario data, and an [items] subtag of [chamber] for
chamber-specific data. However, the generator assumes that map locations
(from [item_location]) will be used and thus does not support
same_location_as_previous=yes in moveto events within [items].
This accomplishes two main things:
- Creates a mapgen_helper.lua module containing functions useful for Lua map generators
- Paves the way for allowing the cave generator to produce scenarios and accept user configuration
No need to deselect when it was already done.
While this is the fix for the specific complaint, it does not address the larger issue of [message] being generally slow.
Adds the keys: mirror, second_image, second_mirror. These allow a portrait to be displayed on the right and left of a message simultaneously as well as to mirror them.
This map generator is used in HttT 17 and SoF 4. which needed to be updated aswell.
With this we finally have a lua generator that is used in mainline and that
can be used an an example by wml authors who want to write other map generators.
Unfortunateley there are still umc add ons in 1.12 that use
scenario_generation=cave so i didn't remove the cpp implementation yet.
Missing role for [role] caused runtime errors. Do NOT report an error on this; using an empty string is intentional. It allows type-prioritized recalls!
"I want to recall the two highest-level bowmen and, if needed, will recruit them. They don't have a role, and won't need one later."
[repeat]
times=2
[do]
[role]
search_recall_list=only
type=Master Bowman,Longbowman,Bowman
[auto_recall][/auto_recall]
[else]
[unit]
placement=leader
side=1
type=Bowman
[/unit]
[/else]
[/role]
[/do]
[/repeat]
When specified, replace rather than merge the [unit] sub-tags. Does not effect [object], [trait], [effect] or [advancement].
For example:
[modify_unit]
[filter]
id=Deoran
[/filter]
mode=replace
[filter_recall]
[not]
id="Sir Gerrick"
[/not]
[/filter_recall]
[/modify_unit]
will replace the current contents of [filter_recall] with the given contents. Without mode=replace, the contents would be appended to the previous contents.