Search found 2478 matches

by Ravana
January 21st, 2021, 10:25 am
Forum: WML Workshop
Topic: Help filtering menu item based on sides unit & location
Replies: 4
Views: 300

Re: Help filtering menu item based on sides unit & location

Example https://github.com/ProditorMagnus/Ageless-for-1-14/blob/1dcabd78e1ac8ea497cf1bf0d2451af0b66bbd1b/data/EoMa_data/summon.cfg#L39-L69 [set_menu_item] [filter_location] terrain=G* [filter] side=4 [/filter] [/filter_location] [/set_menu_item]
by Ravana
January 20th, 2021, 9:41 pm
Forum: WML Workshop
Topic: Help understanding whitespace in macro symbol
Replies: 5
Views: 328

Re: Help understanding whitespace in macro symbol

#define BIG_MONEY GIVEGOLD [command] id=Wealthy side_for=$side_number [gold] amount={GIVEGOLD} # this is common use of parameter side=$side_number [/gold] [/command] #enddef [set_menu_item] id=money description= _ "Give me the money!" [command] [message] side_for=$side_number speaker=narr...
by Ravana
January 20th, 2021, 7:35 pm
Forum: WML Workshop
Topic: Help understanding whitespace in macro symbol
Replies: 5
Views: 328

Re: Help understanding whitespace in macro symbol

It is called macro parameter. https://wiki.wesnoth.org/PreprocessorRef#.23define You can call that macro like {HTTT_TRACK show_title=no} and output works like [story] [part] show_title=yes (content of HTTT_BIGMAP) show_title=no # parameter value [/part] [/story]
by Ravana
January 17th, 2021, 1:03 am
Forum: Faction & Era Development
Topic: Ageless Era - Current Version: 4.27
Replies: 1921
Views: 426207

Re: Ageless Era - Current Version: 4.27

I had reason to test it at some point, and all addons have their own preprocessing context.
by Ravana
January 8th, 2021, 6:50 pm
Forum: WML Workshop
Topic: WFL and damage special
Replies: 12
Views: 1111

Re: WFL and damage special

> In order to use a formula in these keys, you must enclose it in parentheses.
by Ravana
December 30th, 2020, 8:46 pm
Forum: WML Workshop
Topic: 3 questions: to_location; chaining events ; store_unit
Replies: 21
Views: 609

Re: 3 questions: to_location; chaining events ; store_unit

I am quite sure you can put [filter] anywhere in [event] toplevel, it is just convention to have it near top. There is no reason to use [+event]. The reason +tag is used at all is as workaround for macro limitations. For example https://github.com/ProditorMagnus/Ageless-for-1-14/blob/1dcabd78e1ac8ea...
by Ravana
December 29th, 2020, 11:42 am
Forum: WML Workshop
Topic: [SOLVED] How to modify pre-defined common abilities like "ABILITY_CURES" ?
Replies: 9
Views: 343

Re: How to modify pre-defined common abilities like "ABILITY_CURES" ?

Undef only affects WML which is loaded after that line. Core is loaded before addons.
by Ravana
December 11th, 2020, 4:50 pm
Forum: WML Workshop
Topic: Error when uploading an add-on
Replies: 11
Views: 1549

Re: Error when uploading an add-on

Windows sometimes hides information from you. Try to delete the mentioned file with command line.
by Ravana
December 10th, 2020, 10:09 pm
Forum: WML Workshop
Topic: Spreading Poison
Replies: 24
Views: 594

Re: Spreading Poison

If I would write this in another language I would try something like: adjacentUnits = [] foreach unit in AllUnits if unit.isPoisoned adjacentUnits.add(unit) foreach unit in adjacentUnits unit.setPoisoned = true If you are familiar with that kind of languages, it might be suitable to implement some ...
by Ravana
December 10th, 2020, 10:07 pm
Forum: WML Workshop
Topic: Build your own faction - How to proceed?
Replies: 8
Views: 237

Re: Build your own faction - How to proceed?

3.1.1 How do I create an Era?
My answer: Just create a ERANAME.cfg top level and use the [era] tags
It is good idea to use separate files, but WML works though _main.cfg. If _main.cfg does not include [era] (directly or through preprocessor) then having ERANAME.cfg does not do anything.
by Ravana
December 5th, 2020, 1:44 pm
Forum: Multiplayer Development
Topic: Mod : Advance Wesnoth Wars
Replies: 41
Views: 11793

Re: Mod : Advanced Wesnoth Wars

Store all dying units, and unstore them to recall list at start.
by Ravana
December 2nd, 2020, 10:25 pm
Forum: WML Workshop
Topic: ghype's Problems:
Replies: 108
Views: 16898

Re: ghype's Problems: {DROP_GOLD_ON_KILL}

I suspect number-only variable names are not supported.

name=$second_unit.level
by Ravana
December 2nd, 2020, 4:05 pm
Forum: Ideas
Topic: #ifdef NORMAL, HARD
Replies: 19
Views: 590

Re: #ifdef NORMAL, HARD

Difference for these examples is that NORMAL has Ringcaster in one form but not other.
by Ravana
November 30th, 2020, 10:24 pm
Forum: Ideas
Topic: #ifdef NORMAL, HARD
Replies: 19
Views: 590

Re: #ifdef NORMAL, HARD

Thanks. I guess I just don't see why WML needs to involve preprocessors or symbols. Why didn't the developers make the code like this? Preprocessor works even with invalid WML, it is general purpose text inclusion, it does not know anything about WML. Preprocessor is comfort feature mostly. All WML...
by Ravana
November 30th, 2020, 5:37 pm
Forum: Ideas
Topic: #ifdef NORMAL, HARD
Replies: 19
Views: 590

Re: #ifdef NORMAL, HARD

#ifdef NORMAL
#define NORMAL_OR_HARD
#enddef
#endif
#ifdef HARD
#define NORMAL_OR_HARD
#enddef
#endif

And then can use #ifdef NORMAL_OR_HARD