- The t_string type is now a schema built-in type and no longer attempts a regex match.
- You can also specify that non-t_string types may be optionally-translatable; this case supports a regex match on the string (but note that the translation mark is not part of the match).
- Error messages involving keys with very large values ( > 128 characters) will now truncate the value.
- To account for occasional cases where the schema is intentionally violated, the --validate command-line option now automatically defines the SCHEMA_VALIDATION preprocessor define.
A key validates as type t_string if one of the following is true:
- The key is not present
- The key has at least one segment with a translation mark
- The key is blank (an empty string)
Any type other than t_string is not allowed to be translatable by default, unless you specify allow_translatable=yes in the [type] tag.
An optionally-translatable string could also be defined as a union of t_string and some other type.
* move UtBS mace nagas to core
* adding mace naga portraits from LordBob
* move naga hunter portrait to UtBS from core
* de-bow-ify the ophidian nagas and add Deflect weapon special
* revisions to mace nagas base sprites
* revisions to naga guards, including new weapon special Absorb
* compatibility Nagas for UtBS
Refactor special notes for abilities, attack types, movetypes and weapon specials
An easier way of setting special notes in the most common use-cases. Text given
in the following attributes will be collected and added to the special notes
for units and unit types (some of these were added in the previous commit):
* [ability tag name]special_note=
* [language]special_note_damage_type_TYPE=
* [movetype][special_note]note=
* [attack][specials][special tag name]special_note=
It's no longer necessary to put these notes in each unit_type's .cfg file, and
the macros for doing so are now deprecated.
C++ changes
-----
Simplify both unit_type::special_notes and unit::unit_special_notes. Add
utils::stable_unique, similar to std::unique but accepts non-ordered input and
preserves the order in the output.
Remove unit_type::has_special_notes() - callers can instead call
special_notes() and then check if the returned vector is empty, which removes
the need for duplicating code in unit_type.
Trade-off: the new [language]special_note_damage_type_TYPE is likely deprecated in 1.19.
-----
Adding [language]special_note_damage_type_TYPE= uses the same existing design
as [language]type_TYPE=, however both are hacks that don't fit the general
style of WML. It could be better to define a new [damage_type] tag that
supercedes both and also provides a place for specifying the damage icon;
however that won't be done in time for the API freeze for 1.16.
Doing it in the way that this commit does it is a hack, but it's one where
replacing it with the better solution in 1.18 will affect very few UMCs (only
those that define additional damage types). Even in the UMCs that would be
affected, it would likely only be a few changes in a single central file.
Trade-off: NOTE_DEFENSE_CAP is not auto-added
-----
It might be better to auto-add NOTE_DEFENSE_CAP when movetype.cpp detects that
the type has capped values. However as NOTE_SPIRIT already requires
[movetype][special_note], it's simple to use the same mechanism. If we decide
to change it to being auto-added, the current commit greatly reduces the number
of places that would need to change again, as it's now in the [movetype]
instead of the many [unit_type]s using that movetype.
When an [about] section has a title but no [entry] tags, it's automatically
hidden in the credits. The entry with name="" was causing the title to show
up with a blank section under it.
[ci skip]
57 of 57 files optimized, 678061 bytes reduced to 586300 bytes; -91761 bytes, -13.53%
This was running with the -t0 option, so that it considers any reduction good, even
if it's less than 10% on the big portrait images.
The files that had bad iCC profiles were the following subset. I ran woptipng
on the files that were checked in at the same time too.
* data/core/images/portraits/monsters/woodland_boar.png
* data/core/images/portraits/undead/zombie-boar.png
* data/core/images/terrain/castle/troll/tile.png
* data/core/images/units/human-loyalists/heavyinfantry-attack-8.png
* data/core/images/units/human-outlaws/bandit-idle-1.png
* data/core/images/units/human-outlaws/bandit-idle-2.png
* data/core/images/units/human-outlaws/bandit-idle-3.png
* data/core/images/units/human-outlaws/bandit-idle-4.png
* data/core/images/units/human-outlaws/bandit-idle-5.png
* data/core/images/units/human-outlaws/bandit-idle-6.png
* data/core/images/units/human-outlaws/trapper-bow-attack1.png
* data/core/images/units/human-outlaws/trapper-bow-attack2.png
* data/core/images/units/human-outlaws/trapper-bow-attack3.png
* data/core/images/units/human-outlaws/trapper-bow-attack4.png
* data/core/images/units/human-outlaws/trapper-bow-attack5.png
* data/core/images/units/human-outlaws/trapper-bow-attack6.png
* data/core/images/units/human-outlaws/trapper-bow-attack7.png
* data/core/images/units/human-outlaws/trapper-bow-defend.png
* data/core/images/units/human-outlaws/trapper-bow.png
* data/core/images/units/human-outlaws/trapper.png