Search found 11 matches

by bejacomune
April 16th, 2023, 2:45 pm
Forum: WML Workshop
Topic: my wml questions thread
Replies: 7
Views: 734

Re: my wml questions thread

question 2 I am trying to run Gui.pyw from bfw1.17 I am using python3.2 I got this error message File "C:\Program Files\Battle for Wesnoth 1.17.5\data\tools\wmlindent", line 64, in <module> import sys, os, argparse, filecmp, re, codecs, signal ImportError: No module named argparse complete...
by bejacomune
April 15th, 2023, 6:47 pm
Forum: WML Workshop
Topic: my wml questions thread
Replies: 7
Views: 734

Re: my wml questions thread

You also need to put these formulas in quotes so the "+" will add the numbers. (In normal WML, the "+" concatenates two strings.) It should look like: value="$($turns_from_show + 2)" . In the future, you would do better to explain what you want your code to do, and wha...
by bejacomune
April 15th, 2023, 6:32 pm
Forum: WML Workshop
Topic: my wml questions thread
Replies: 7
Views: 734

Re: my wml questions thread

Ravana wrote: April 15th, 2023, 6:29 pm Your [case] does not have value, so they dont do anything.
:lol: :lol: :lol: How did I miss that :o
thank u.
but, the other parts (the wfl syntaxe ) are they good?
by bejacomune
April 15th, 2023, 4:02 pm
Forum: WML Workshop
Topic: my wml questions thread
Replies: 7
Views: 734

my wml questions thread

Since I have many questions, I think that one thread will be better that many (specially that my questions come from a newbie). question 1: do WFL work like a variable value? [event] name=side 1 turn refresh first_time_only=no [if] [variable] name=Dharkshow equals=yes [/variable] # Dharkshow is a va...
by bejacomune
April 10th, 2023, 9:51 pm
Forum: WML Workshop
Topic: counting unit_type
Replies: 2
Views: 492

counting unit_type

Hello. I have a problem with the following code. [if] [have_unit] type=Siege_2 [/have_unit] [then] [store_unit] [filter] type=Siege_2 [/filter] variable=Count_Siege_2 kill=no [/store_unit] [foreach] array=Count_Siege_2 [do] {VARIABLE_OP counting add 1} # counting is assigned to 0 in the prestart [/d...
by bejacomune
February 26th, 2023, 11:48 pm
Forum: WML Workshop
Topic: Filtering many weapons names at [have_unit] [fixed]
Replies: 5
Views: 729

Re: Filtering many weapons names at [have_unit] [fixed]

I don't know of a macro that does that. That's unfortunate :( But, thank you for helps Macro cant do anything that wml cant do. I see. The problem is that I don't know how to change or manipulate a [frame] by checking if the unit have an attack anime or by adding an elements to it such as a halo du...
by bejacomune
February 26th, 2023, 8:39 pm
Forum: WML Workshop
Topic: Filtering many weapons names at [have_unit] [fixed]
Replies: 5
Views: 729

Re: Filtering many weapons names at [have_unit]

As per https://wiki.wesnoth.org/ConditionalActionsWML#.5Bhave_unit.5D: Do not use a [filter] tag. This is unbelievable. I checked the pages carefully but I missed this. Thank you. It is fine now ps: it work with [has_attack] with multiple weapons. I didn't checked it for has_weapon but logically it...
by bejacomune
February 26th, 2023, 7:45 pm
Forum: WML Workshop
Topic: Filtering many weapons names at [have_unit] [fixed]
Replies: 5
Views: 729

Filtering many weapons names at [have_unit] [fixed]

did [has_attack] or has_attack support many weapons names as value? If no, what is the best way to filter units based on a weapon names macro? I tried both [has_attack] and has_attack, booth with and without id= but the units passed the filter as it is always true [indent] [if] [have_unit] [filter] ...
by bejacomune
February 21st, 2023, 11:03 pm
Forum: Coder’s Corner
Topic: movement cost and ai for a specific unit
Replies: 4
Views: 6634

Re: movement cost and ai for a specific unit

No, micro AIs are something different. To do what you mean one would instead add a [micro_ai] which controls all units of the side. The wiki article is quite long, but they can be straightforward. Here is an example: [event] name=start [micro_ai] # mandatory micro_ai stuff side=2 ai_type=lurkers ac...
by bejacomune
February 21st, 2023, 11:15 am
Forum: Coder’s Corner
Topic: movement cost and ai for a specific unit
Replies: 4
Views: 6634

Re: movement cost and ai for a specific unit

First,… That is impossible. You can only set movement for terrain types, not for terrain ids. However, you can tell the ai to avoid certain hexes. One way is to set parameters for the [ai] of one side – all units from that side will be affected by this. [side] … [ai] # The AI will not even move ove...
by bejacomune
February 20th, 2023, 8:52 am
Forum: Coder’s Corner
Topic: movement cost and ai for a specific unit
Replies: 4
Views: 6634

movement cost and ai for a specific unit

Hello, I wrote a code that make monsters spawns if certain conditions are met (it is inspired by many other coders) but in order to make it more adequate, I want to make the spawned units have special attributes. First, I wanted to make certain units unable to walk outside certain type of terrain (t...