Search found 357 matches

by Xalzar
July 21st, 2019, 10:20 am
Forum: WML Workshop
Topic: Xalzar's WML Headaches
Replies: 75
Views: 4341

Re: Xalzar's WML Headaches

:augh: Another question... is there any star-of-turn event which triggers after an ai turn event? :hmm: Since I cannot filter the controller of the side with a filter (it's disabled in networked games) I've used a side turn event to set a variable with a value and an ai turn event to set a different...
by Xalzar
July 20th, 2019, 10:40 pm
Forum: WML Workshop
Topic: Xalzar's WML Headaches
Replies: 75
Views: 4341

Re: Xalzar's WML Headaches

Quick update: AFAIK my problem was unsolvable, so I brute-forced the solution and manually wrote the unit parameters inside [modification]. It will be a long list (the units to modify are quite a number), but macros help a lot at least visually (coding-wise, maybe I have a solution for that too). I'...
by Xalzar
July 14th, 2019, 11:35 pm
Forum: WML Workshop
Topic: Xalzar's WML Headaches
Replies: 75
Views: 4341

Re: Xalzar's WML Headaches

Either I don't understand what you want to do, or there's a much simpler way to do it. I think you want a side to have several leaders, all recruited units to get a buff based on which leader recruits them, and each recruit to know who their squad leader is. That can be done like this: :augh: I don...
by Xalzar
July 14th, 2019, 6:07 pm
Forum: WML Workshop
Topic: Xalzar's WML Headaches
Replies: 75
Views: 4341

Re: Xalzar's WML Headaches

Thank you, you are doing too much! :) I put the parts together as https://github.com/ProditorMagnus/Xalzar. What is the expected behavior, and what happens instead with this code? Rats! I've realized only now that typing "[ code=in UNIT FILES ]" in the forum post does not work. I wrote where to put ...
by Xalzar
July 14th, 2019, 8:54 am
Forum: WML Workshop
Topic: Xalzar's WML Headaches
Replies: 75
Views: 4341

Re: Xalzar's WML Headaches

I understand original issue is slow performance then. Do you have code in form I could try out in game? More like "preempively avoiding slow performances in the future". I have many more events to add still, I'm testing with only few units to make sure everything works before adding more. The code ...
by Xalzar
July 13th, 2019, 10:33 pm
Forum: WML Workshop
Topic: Xalzar's WML Headaches
Replies: 75
Views: 4341

Re: Xalzar's WML Headaches

I've quite re-ordered my code for those events, but I still have a major problem. Let me explain better (my last post was quite unclear on rereading). The obstacle I face is an event included as macro inside unit files, which has variable with variables set by said macro. It's all fine and dandy whe...
by Xalzar
July 11th, 2019, 8:42 pm
Forum: WML Workshop
Topic: Xalzar's WML Headaches
Replies: 75
Views: 4341

Re: Xalzar's WML Headaches

Sometimes the best approach to a complex debugging problem is pen, paper, pizza and not sitting in front of the PC. Don't focus on where you're getting stuck, instead write an overview of the desired behaviour. Doodle a bit and avoid thinking about the current implementation, the aim is that an eas...
by Xalzar
July 11th, 2019, 10:48 am
Forum: WML Workshop
Topic: Xalzar's WML Headaches
Replies: 75
Views: 4341

Re: Xalzar's WML Headaches

If the variables you need aren't set yet, then you could perhaps use defaults in that case? If the only case you'd need to do that for would be the prestart event, then you'd only need to account for side 1 turn 1. The major problem is that I have lots of events in my code, and I wanted to remove s...
by Xalzar
July 10th, 2019, 8:33 pm
Forum: Scenario & Campaign Development
Topic: Does it matter what kind of keeps are around castles?
Replies: 1
Views: 80

Re: Does it matter what kind of keeps are around castles?

Don't worry, the differences between the various castles and keep are merely aesthetic (except some of them do give slightly different defences to particular units e.g. swamp castle gives more defence to swimmers).
You can mix and match them as you want.
by Xalzar
July 10th, 2019, 3:37 pm
Forum: WML Workshop
Topic: Xalzar's WML Headaches
Replies: 75
Views: 4341

Re: Xalzar's WML Headaches

So...the event unit_placed Leaders and units placed in side definitions (fired once for every unit right before prestart events) I needed to cram some variable into all the leaders of the various sides (every leader has different variables depending on its unit type), this I have already solved with...
by Xalzar
July 2nd, 2019, 8:28 am
Forum: WML Workshop
Topic: Xalzar's WML Headaches
Replies: 75
Views: 4341

Re: Xalzar's WML Headaches

Thought that was probably the case, many thanks Ravana!
by Xalzar
July 1st, 2019, 9:32 pm
Forum: WML Workshop
Topic: Xalzar's WML Headaches
Replies: 75
Views: 4341

Re: Xalzar's WML Headaches

So I guess it's for modding...but I've never seen anybody use these for non-adjacent attacks, why were they added? How do they work? Why there is no documentation about these? :hmm:
by Xalzar
July 1st, 2019, 8:44 pm
Forum: WML Workshop
Topic: Xalzar's WML Headaches
Replies: 75
Views: 4341

Re: Xalzar's WML Headaches

A more "conceptual" question: what is the meaning of min_range and max_range inside [attack]? I've not yet found a description of these keys in the wiki... Am I blind? :oops:
by Xalzar
June 29th, 2019, 9:02 am
Forum: WML Workshop
Topic: Xalzar's WML Headaches
Replies: 75
Views: 4341

Re: Xalzar's WML Headaches

[filter_radius]: a standard location filter; normally the radius extends outwards from matching locations one step at a time without checking any additional information-- however, if this tag is present, the radius will be restricted so that it can only expand outwards in the directions where it pa...
by Xalzar
June 28th, 2019, 11:26 pm
Forum: WML Workshop
Topic: Xalzar's WML Headaches
Replies: 75
Views: 4341

Re: Xalzar's WML Headaches

Another bump in the road: what do you experts think I should use to check if a unit is in contact to a squadron of identical units? :eng: Let me explain: I know how to check adjacencies and unit type, my question is about strange "unit formations". For example: I have a unit which needs to be adjace...