Search found 1688 matches

by Celtic_Minstrel
October 24th, 2020, 2:14 am
Forum: WML Workshop
Topic: How to specify a unit in debug
Replies: 5
Views: 109

Re: How to specify a unit in debug

As far as I know, these commands apply not to the selected unit but to the unit that's currently under the mouse. These are different things - the selected unit is the one you've clicked on, but you can still then move the mouse over a different unit and set its hitpoints, I believe.
by Celtic_Minstrel
October 21st, 2020, 11:44 pm
Forum: WML Workshop
Topic: Gaining XP whenever a unit is killed by plague
Replies: 24
Views: 367

Re: Gaining XP whenever a unit is killed by plague

Ah, I think get why the weird code with "fungal plague(FungalZombie)" works. It's because the ID of the special wasn't what I expected from all the prior examples, but is instead this weird value with the parentheses. I would recommend using special (for 1.14) or special_id (for 1.15) rather than a ...
by Celtic_Minstrel
October 21st, 2020, 12:58 pm
Forum: WML Workshop
Topic: Gaining XP whenever a unit is killed by plague
Replies: 24
Views: 367

Re: Gaining XP whenever a unit is killed by plague

It seems like filter_second acts like a mirror and reverses primary and secondary units. This is quite some misinterpretation… but I guess you've gotten it figured out by now, right? [filter_second_attack] special="fungal plague(FungalZombie)" [/filter_second_attack] Third attempt. This one worked ...
by Celtic_Minstrel
October 20th, 2020, 12:59 pm
Forum: Writers’ Forum
Topic: Using game-related terms in dialogue: okay? not okay?
Replies: 3
Views: 175

Re: Using game-related terms in dialogue: okay? not okay?

In my scenario-in-progress, the player has to capture a particular village deep in enemy territory and hold it for three turns. At some point, if the player has not yet captured the village, there won't be enough time to complete the objective before time runs out. In your opinion, is it acceptable...
by Celtic_Minstrel
October 20th, 2020, 12:51 pm
Forum: WML Workshop
Topic: How to add custom terrains
Replies: 4
Views: 134

Re: How to add custom terrains

(I'm not sure whether that's only required for the host, or whether it's required for everyone playing, Just to clear this up: terrain needs to be accessible to everyone playing the game. Otherwise how would the remote computers know how to draw those custom terrains, or what gameplay properties th...
by Celtic_Minstrel
October 20th, 2020, 12:48 pm
Forum: Lua Labs
Topic: Issue with distribution of Lua code in a multiplayer scenario
Replies: 9
Views: 426

Re: Issue with distribution of Lua code in a multiplayer scenario

There is no way for the game to automatically build a table of contents of every file that the scenario requires. It's because WML doesn't know what Lua is - to the WML parser, your Lua code tags are nothing but a blob of text. Even the << >> tags have nothing to do with Lua - they just tell the WML...
by Celtic_Minstrel
October 19th, 2020, 6:02 pm
Forum: WML Workshop
Topic: A hex that kills a unit who passes through it
Replies: 8
Views: 178

Re: A hex that kills a unit who passes through it

Given that no unit will ever want to walk through it The AI will know that walking on the hex will kill an AI unit? I was thinking the AI would be oblivious. That changes everything. The AI would be oblivious. I think octalot meant from a world-building standpoint – since the pool is deadly, no-one...
by Celtic_Minstrel
October 19th, 2020, 5:45 pm
Forum: WML Workshop
Topic: A healer who can only heal 20 hit points, total
Replies: 7
Views: 212

Re: A healer who can only heal 20 hit points, total

I guess your other option would be to add a dummy ability instead of a heal ability and manually apply the healing in a turn refresh event (using the [heal_unit] ActionWML tag). That would allow you to get the exact behaviour you want but would be more work on your part.
by Celtic_Minstrel
October 17th, 2020, 8:33 pm
Forum: WML Workshop
Topic: A healer who can only heal 20 hit points, total
Replies: 7
Views: 212

Re: A healer who can only heal 20 hit points, total

[filter_self] formula = self.variables.potions > 0 [/filter_self] Formulas operate on a completely different view of the unit. It's similar to the WML view of a unit but not quite the same, and this is one of the places where it differs. In a formula, units have two types of variables — formula var...
by Celtic_Minstrel
October 16th, 2020, 2:15 am
Forum: WML Workshop
Topic: Adding moves to a unit after it has attacked
Replies: 24
Views: 483

Re: Adding moves to a unit after it has attacked

I forgot about that! Yeah, that sounds helpful. The field resting= ("yes" or "no") is stored in my sample save file, so it should be accessible under that name. Specifically, you should be able to write $unit.resting| , but a resting= field doesn't seem to be part of the standard unit filter, so yo...
by Celtic_Minstrel
October 15th, 2020, 12:22 pm
Forum: WML Workshop
Topic: Adding moves to a unit after it has attacked
Replies: 24
Views: 483

Re: Adding moves to a unit after it has attacked

There is a variable that determines whether the unit has moved, since the game needs to track this for rest healing. Since that's what it's used for, the variable is called unit.resting in Lua. Chances are it's named the same in a WML stored unit, but I'm not certain of that.
by Celtic_Minstrel
October 15th, 2020, 1:00 am
Forum: WML Workshop
Topic: Methods of skipping huge sections of code while debugging
Replies: 4
Views: 111

Re: Methods of skipping huge sections of code while debugging

Wow, #ifdef works great. Thanks. I didn't know some text editors can easily add and subtract remarks/comments. Thanks for the tip. I use TextWrangler for Mac. I'll see if it has that feature... It does, but it only places semi-colons, not #. Evidently there is no way to change it to # in the prefer...
by Celtic_Minstrel
October 15th, 2020, 12:53 am
Forum: WML Workshop
Topic: Adding moves to a unit after it has attacked
Replies: 24
Views: 483

Re: Adding moves to a unit after it has attacked

Parts of the code I don't understand, so this is probably a ridiculous question. Do you think maybe an if/then tag could examine the variable unit.movement_used to see if the unit moved? The difficulty seems to be learning whether or not the unit moved, not modifying the movement. + + + Okay, I add...
by Celtic_Minstrel
October 15th, 2020, 12:48 am
Forum: WML Workshop
Topic: Tooltip text or extra buttons in WML UI for [message]
Replies: 5
Views: 153

Re: Tooltip text or extra buttons in WML UI for [message]

I just discovered the test_scenario.cfg actually has some interesting lua and how to implement it! With a small change to the test_scenario example, you can also implement the dialog's layout in WML like I mentioned in my previous post. Basically you just need to replace the giant Lua definition of...
by Celtic_Minstrel
October 14th, 2020, 1:29 am
Forum: WML Workshop
Topic: Adding moves to a unit after it has attacked
Replies: 24
Views: 483

Re: Adding moves to a unit after it has attacked

I just realized that this proposed solution would probably let the frog attack twice if it was managed just right. If that's a problem, then either you're going to need a more complicated way to let it move again after attacking, or else you're going to need a complicated way to restrict its attack...