1074 Commits

Author SHA1 Message Date
Severin Glöckner
40c9126a6f Mark unused macro
Haven't made up my mind yet if it should really be removed,
leaving a comment for now.

[ci skip]
2020-01-03 00:14:45 +01:00
Severin Glöckner
dd3247c62d core macros – overlay of NO_UPKEEP macro
The past change in 1.15 changed not only internal things,
but also the overlay given by the NO_UPKEEP macro.

Now it gives the same overlay as the loyal trait does.
Which is also the same which this macro gave in 1.14.
2019-12-23 01:29:44 +01:00
mattsc
5a9ac3ee15 AI: adjust names of new default candidate actions
This has no impact on functionality or use, it is simply done for consistency with other CAs and to indicate that these CAs are now part of the default AI.
2019-12-11 07:33:11 -08:00
mattsc
c93b1db30a AI: do not use village hunt CA in any AI config
The algorithm used in this CA is too simple to work reliably in a general setting, it tends to send whole groups of units toward small numbers of villages, or even individual ones. In its current version, it should not be used at all, not even in the Experimental AI. The recommended way to emphasize village hunting is to set the village_value aspect to a larger-than-default value and let the move-to-targets CA take care of it.

We are, however, leaving the CA code and the macros in place for potential future work.
2019-12-07 14:02:52 -08:00
mattsc
1e01df84ff AI: do not use new grab_villages CA for default AI
The old villages CA is quite a bit better at distributing multiple units across multiple villages. The advantage of the new grab_villages CA is that it has a variable score, sometimes grabbing villages before, and sometimes after attacks. This does not outweigh its shortcomings though.

So for now, the default AI will continue to use the previous CA, and the Experimental AI will use the new one. Thus, the two AIs are not quite identical any more (but still very similar).

I also added a todo comment that the grab_villages CA might be reinstated if it is improved.
2019-12-06 08:18:47 -08:00
mattsc
038dc2d7fe AI: remove old retreat_phase CA from AI configs
It is now superseded by the retreat_injured CA (of the former Experimental AI).
2019-12-06 08:18:47 -08:00
mattsc
a38356e61c Experimental AI: add comments that it is now same as default 2019-11-29 19:22:56 -08:00
mattsc
3bd6613dda AI: Set up macros for Experimental AI candidate actions
In the same way as they are set up for the default AI
2019-11-29 19:22:56 -08:00
mattsc
74c7c17ec8 Experimental AI: fix AI setup max_score values
The return scores were changed in commit 4999b20bd1, but the max_score values in the configurations have not been updated yet. As the relative ranking was not changed, this should not have any effect on gameplay.
2019-11-21 21:11:34 -08:00
josteph
fff2f13f7f Bump deprecation level of old early finish / carryover macros 2019-10-20 00:09:11 +00:00
josteph
b821da1cff Revert "Removed deprecated objective text macros"
This reverts commit 97acce20643ba757e11fdf0cfa35994224ccda63.
2019-10-19 23:56:57 +00:00
Charles Dang
97acce2064 Removed deprecated objective text macros
[ci skip]

These are incorporated into the objectives dialog automatically. They lack a deprecation
notice, but they should be given level 3 status on the 1.14 branch.
2019-10-19 18:12:21 +11:00
Charles Dang
871e857771 Begone, MENU_IMG_TXT!
[ci skip]

This utilized the deprecated DescriptionWML syntax.
2019-10-19 18:06:02 +11:00
Charles Dang
021339bcc5 Removed macros deprecated at level 2 and 3
[ci skip]
2019-10-19 18:01:33 +11:00
mattsc
bdf5421fd5
Merge pull request #4437 from mattsc/expai_recuit_higher_levels
Experimental AI: make AI recruit higher level units
2019-10-17 07:09:53 -07:00
Jyrki Vesterinen
d1391fee8e Move ms_after= to the right place in music macros (#4459)
I originally added it in #719. At that point ms_after= affected the *previous*
track due to a bug; however, I had assumed the behavior to be intentional and
compensated for it by adding ms_after= to the first track of a scenario instead
of the story screen music.

In April, I saw the documentation for ms_after= which said that it's supposed
to affect the track itself, not the previous one. Hence, I fixed the bug in
commit b023b818c742cee0bc75460235c9d1088c0b495d. However, I had forgotten that the changes I had made
in #719 depended on the old broken behavior of ms_after=.

This commit moves ms_after= to the right place, restoring the fade-out on
scenario start and removing the pointless pause after the first track.
2019-10-13 12:15:21 +03:00
mattsc
6dc199d4f8 ExpAI recruiting: make high_level_fraction parameter configurable
This also sets its default value to zero, in order to have consistent default behavior with versions from before this parameter was introduced.

It also provides a macro so that the ExpAI can be used with custom parameters in a scenario config, and adds high_level_fraction as an optional parameter to the Recruit Rushers Micro AI.
2019-10-08 12:45:59 -07:00
Celtic Minstrel
d090f91bce Alter the special notes syntax in EffectWML so that the note macros can be reused in that context 2019-10-04 23:49:05 -04:00
Celtic Minstrel
4dd7824353 Redo the special notes macros so that the new ones won't trigger deprecation warnings 2019-09-12 08:51:05 -04:00
Celtic Minstrel
15f431785a Add [special_note] tag in [unit_type] as a neater way of specifying special notes for the unit's description 2019-09-12 08:51:05 -04:00
Steve Cotton
1c123fb3fa Allow '1-infinity' in ranges, and tighten the schema's validation of ranges
Fixes #4253.

The schema's validation of ranges now rejects negative numbers, because the C++
code doesn't support them (both before and after this commit):
* utils::parse_range("-7") will return {0,0}, because std::stoi("") throws invalid_argument.
* src/map/location.cpp will parse it as -7, but that will never match an on-map coordinate
2019-08-29 22:28:22 +02:00
gfgtdf
ef06634485 use overlay effect over [unit] overlays= 2019-08-25 22:29:49 +02:00
gfgtdf
aa07ec7915 add new macors to replace loyal trait. 2019-08-25 20:35:28 +02:00
gfgtdf
5cb93694c6 move loyal overlays to the loyal trait
since the recent changes to overlays= in particular 1a7724e5472,
e71033374c35 and b2cd1cf6c [unit]overlays= is no longer the
recommended way to add an overlay and the use of the
apply_to=overlay effect is reccomended instead, so adding it
to the [trait] is the most natural option here.

this in particular fixes #4058 . Also people simply forgetting the
IS_LOYAL macro was a not-so-uncommon cause of bugs.

In some cases people want to give the LOYAL trait without giving the
loyal overlays for those cases i added a optional OVERLAY parameter to
the {TRAIT_LOYAL} macro, also heroes should now use {TRAIT_LOYAL_HERO}
instead which uses the hero overlay. The IS_LOYAL and IS_HERO macros are
no longer needed in combination with those traits.
2019-08-25 20:36:35 +02:00
gfgtdf
5b73c34798 overlays=".." -> {IS_LOYAL} 2019-08-24 22:19:58 +02:00
FranPrin
4819846910 Dunefolk faction rework by various people
Changelog provided by @ghype below. Additional credits at the end.
=================================================================================================

*Art*
Most of units were reworked - some more some less - but our goal was to make them fit for mainline all together.
If any changes are needed to any unit, then we gladly execute those. There have been months worth of progress
documented in the according art thread for this project.

Base Units: https://forums.wesnoth.org/viewtopic.php?f=9&t=49075
Extra Units: https://forums.wesnoth.org/viewtopic.php?f=9&t=49625

*Balance*
The main reason why this project started in the first place. Here as well we have all the progress for balancing
Dunefolk documented and all developers and users interested in this project and seemed to agree on the current
state of balance. Thats the reason why we will not enlist all the changes here. If there are any problems with
the balance, then we too are willing to provide alternatives that can be discussed either here or on forum.

Balance Thread: https://forums.wesnoth.org/viewtopic.php?f=15&t=49627

*Alignment*
The balance of this faction was based on the newly proposed liminal alignment which works as +0/+0/+25/+0/+0/+25
instead of the old -25/-25/+0/-25/-25/+0

*Weapon Portraits*
As Dunefolk features entirely new units, we found some weapon portraits that fits the attacks of certain units.
The portrait - called „blade-curved“ is a franken but a convincing one. As the current blow pipe for UtbS is a
franken as well, this new weapon portrait should good enough to be mainlined as well. If this request get’s denied,
then we are free to provide alternatives as well. It just fits very well the theme of exotic Naga weapon
craftsmanship without relying on the orcish theme. It used for the following two units:

Lv2 Naga Bladewhirler
Lv3 Naga Dervish

*Descriptions*
New unit concepts require changes and new units require entirely new descriptions. We enlisted all problems and
inconsistencies that resulted with the rework and provided either solutions for them or new descriptions. Yumi
already started doing them but for those who want to see the initial conflicts, here you can find all the problems
displayed:

Unit Descriptions: https://forums.wesnoth.org/viewtopic.php?f=32&t=49867#p642698

*Female Dunefolk Names*
With the introduction of female units to this faction, we would require female names as well. Apparently this was
already coded in mainline, but simple not used.

*Future Plans - Animations*
There are some recourses from past works that allow us to - more or less - easily animate most of Dunefolk units.
The animations range from idle to attack-only, while other units will be fully animated. Some of the units that
are harder to animate will first receive single attack/defend frames until animation concepts were agreed upon.
Our goal is to make Dunefolk as alive as possible.

*Future Plans - Theme, Sound FX*
Rather unimportant to most people but I am interested to add some new sound fx that can start with different hit/death
sounds or new weapon sounds for scimitars. Those are just example and I do not know what I will end up with. But I know
that I will compose a Dunefolk Theme at some point. Using your feedback, I am sure I can manage to create something that
fits the faction the best.

*Future Plans - Wyvern Rider*
This is the only unit is the only one that did not get touched or reworked. The wyvern on it self looks amazing an does
not need any rework but the rider does not really fit thematically anymore, not to mention the weapon is too oversized
and not the usual Wesnoth style. But I won’t touch this sprite until it actually will be needed, most likely - IF -
there is ever going to be a mainline Dunefolk campaign.

*Credits*
I don’t know how detailed you need this to be but here all contributors.
ghype, Hejnewar, Krogen, The_Gnat, Lordlewis, EarthCake, Tom_Of_Wesnoth

It is however important to mention that the amount of contributions of each varies a lot in different categories. I will
organise it a bit and you make use of this info how ever you want. The names are in order of the amount of work put in.

Art: ghype, The_Gnat, Lordlewis
Balance: Hejnewar, Krogen, ghype, The_Gnat
Descriptions: Tom_Of_Wesnoth, Hejnewar

Earthcake joined us in the end and helped us finishing this project by cleaning/finishing the codes and doing all the git
stuff together with The_Gnat. Although none of his work can be categorised in one of the three categories, he still deserves
to be credit in one way or another.

Thanks for your time and efforts.
2019-08-11 07:02:58 +11:00
Pentarctagon
95286cb49f Command line --preprocess missing some macros.
Command line --preprocess doesn't process macros in data/core/units.cfg.

Fixes #4152.
2019-07-16 19:15:29 -05:00
josteph
093fbc82fd Help: Show special notes one per line.
https://forums.wesnoth.org/viewtopic.php?f=12&t=49621
2019-03-25 22:40:00 +00:00
josteph
5502f7abe0 Fix #2677: Make SUMMER_SCHEDULE and WINTER_SCHEDULE use {MIDDAY} and {MIDNIGHT} images of the same graphic style as the images of the other times of day.
Images by @beetlenaut https://forums.wesnoth.org/viewtopic.php?p=633042#p633042
2019-03-24 15:15:26 +00:00
newfrenchy83
550c686e7b fix value={CTH_NUMBER} forget in force CTH macro 2018-12-14 08:28:12 -06:00
mattsc
afb394c4b1
Merge pull request #3723 from mattsc/rca_ai_changes
Default AI changes
2018-12-02 08:42:42 -08:00
mattsc
c0bc8c548c AI: deprecate ai_depth related macros 2018-11-16 06:47:54 -08:00
Celtic Minstrel
866420adf8 Redesign force cth macro
Closes #3707
2018-11-15 21:17:04 -05:00
mattsc
8c8cafaa70 Deprecate EXPERIMENTAL_AI macro 2018-11-15 06:46:41 -08:00
Celtic Minstrel
639787e1c9 Merge pull request #2562 from wesnoth/schema 2018-11-11 13:52:19 -05:00
newfrenchy83
5d6a6c0de1
Fix grammar in cth macro
Also fix whitespace errors from edab243b9d4e5bbac8b10e28fb0237e201392071 -- GL

Closes #3694
2018-11-07 15:32:22 -06:00
newfrenchy83
edab243b9d
Fix rare bug in FORCE_CHANCE_TO_HIT
If in attack end in FORCE_CHANCE_TO_HIT macro, unit or second unit doesn't exist anymore because rare case where unit disapear before attack end event was calledthen we have an error message like "Invalid WML found: [unstore_unit]: variable 'second_unit' doesn't exist" because presence of unit not condition of execution of event.
2018-11-06 15:15:40 -06:00
josteph
801e1c6234 WML: {REMOVE_LABEL} now takes an optional EXTRA_WML argument. 2018-11-03 18:16:43 +00:00
Celtic Minstrel
420afdf88e Deprecate {AI_CONTROLLER} and related macros (addresses #3668) 2018-11-02 23:54:53 -04:00
Celtic Minstrel
bd2bf467a3 Add missing deprecation messages for deprecated macros
This also bumps ON_SIGHTING to level 2.
(cherry picked from commit f550f2d6f54778ae44560b3e1e2602064d63a9de)
2018-10-28 02:53:03 +00:00
Celtic Minstrel
fb7dce076f Use WFL instead of Lua code for {SCATTER_EMBELLISHMENTS} 2018-10-23 22:41:52 -04:00
Celtic Minstrel
ea9d483149 [effect]apply_to=new_animation does not support name
It does support id though, which is used as a sort of caching mechanism
in case the same effect is applied many times, so use that instead of name.
For good measure, also use an id on the sceptre of fire animation
2018-10-23 22:41:48 -04:00
Celtic Minstrel
0fba06c977 Remove animate=no from {GUARDIAN}
This is the default in [unit] anyway, and if the user specified
animate=yes explicitly then we should not override that.
2018-10-23 22:41:38 -04:00
Celtic Minstrel
e2bc73b27b Add omitted final [] to [modify_ai] paths in core macros and UtBS 2018-10-23 22:40:01 -04:00
Celtic Minstrel
c2c540fa15 Fix error in AI control core macros 2018-10-23 22:39:49 -04:00
Celtic Minstrel
703d0c3cf4 Fix erroneous/useless [event] in [titlescreen_music], [lobby_music], [editor_music]
The playlist macros set the music list twice, once before the
story screen and again in prestart, but the order of tracks is different.

This means that the track order at the titlescreen and in the lobby is now the same
as the track order in a scenario using the default playlist, which previously was not the case.

Similarly, the track order in the editor is now the same as the track order
in a scenario using the full playlist.

Whether that actually matters? I have no idea. I doubt it.

In any case, as of this commit, there are no schema validation errors
at the title screen, when entering the MP Create screen, or in the map editor.
2018-10-23 22:38:19 -04:00
Severin Glöckner
c48735c0fb Core Macro Reference: Fix hint
[ci skip]

(cherry-picked from commit 00e41b9857e8dfdb5f603fe7d91a1a6e0725b8c7)
2018-10-07 03:25:00 +00:00
Severin Glöckner
5ad321654b core macros: don't clear nonexistant variable
A leftover from the switch from {FOREACH} to [foreach]

[ci skip]

(cherry-picked from commit 001b444b10977051962572a991233553bd605384)
2018-10-07 03:24:59 +00:00
mattsc
800947594c Experimental AI: convert to using external CAs
(cherry-picked from commit 547478571871ffe59c5cf7ff59339a72a61c07dc)
2018-10-07 03:24:44 +00:00
Elvish_Hunter
0ccf6ae1ea Prevent wmllint from converting Dunefolk names similar to Khalifate units
(cherry-picked from commit de99a381723dad41153917696e5468b5e0a99894)
2018-10-07 03:24:04 +00:00