patchBattle for Wesnoth - Patches: patch #3742, Inner variable for adjacent filter...

 
 
Show feedback again

patch #3742: Inner variable for adjacent filter in abilities WML and TROW "distract" fix

Submitted by:  David Mikos <coffee>
Submitted on:  Sat 23 Feb 2013 07:53:57 AM UTC  
 
Priority: 4Status: None
Privacy: PublicAssigned to: None
Open/Closed: Open

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Wed 24 Apr 2013 03:56:53 AM UTC, comment #10:

Since a fix is already prepared, you didn't really need to create a bug report, unless you're afraid I'll forget. ;)

I brought up bug reports first to check to see if my search skills failed me. If others could also not find a bug report for that, then my secondary motivation was to point out that the bug had not been fixed because of the lack of a bug report. (If I had been aware of this bug at the time, I would have fixed it when I was messing with unit abilities a few months ago.) The original submission for this patch makes it seem like "everyone" knows how distract is allegedly broken, and assuming such things is one way to keep bugs around forever.

In any event, I'll get the fix in next month, I hope. (This weekend is not looking good for me.) As for this patch, I guess the question is whether or not it should be done, and I cannot comment on that as I have not looked closely at bug #18893.

J Tyne <jamit>
Project Member
Mon 22 Apr 2013 02:18:23 PM UTC, comment #9:

coffee: Then please work on fixing https://gna.org/bugs/?func=detailitem&item_id=18893 yourself instead of just demanding that it gets done. Without introducing new problems previously, which would only increase the fixing pressure. I for one had/have no suitable idea to do that. There's at least no easy way.

Anonymissimus <anonymissimus>
Project Member
Mon 22 Apr 2013 08:26:21 AM UTC, comment #8:

After a bit of searching I did not find any bug reported, so being the kind person that I am I made one for you -- https://gna.org/bugs/index.php?20755

Still, we need a way to get the variables properly in the abilities WML like for $teleport_unit. However, maybe this needs be fixed along with aforementioned bug https://gna.org/bugs/?func=detailitem&item_id=18893

David Mikos <coffee>
Project Member
Sun 21 Apr 2013 06:19:41 PM UTC, comment #7:

Ah, I see. And I have it (the unit being adjacent to itself) fixed locally. Since this is apparently a known bug, there naturally should be a bug report filed for it. Is there one (so I can mark it fixed whenever the repository is done host-hopping)?

Also, are you aware of any other mainline content (other than distract) that contains a workaround for this bug?

J Tyne <jamit>
Project Member
Sun 21 Apr 2013 01:59:54 AM UTC, comment #6:

As you move a unit it sees itself on the previous hex. This is a bug, for sure. However, we still really need to be able to access the unit in question by a variable in an abilities tag somehow.

David Mikos <coffee>
Project Member
Sun 21 Apr 2013 01:14:55 AM UTC, comment #5:

That is rather strange, since as far as I've known, a unit can be in only one location. How can you arrange for a unit to be in two locations, one adjacent to the other?

J Tyne <jamit>
Project Member
Sun 21 Apr 2013 01:09:11 AM UTC, comment #4:

Unfortunately it can be adjacent to itself and matches the filter. Hence, the patch. I'd like to use a similar ability in my own era that I have made as well.

David Mikos <coffee>
Project Member
Sun 21 Apr 2013 12:52:31 AM UTC, comment #3:

I'm curious about the change to the distract ability. The new filter seems to say "exclude an adjacent unit if that unit is the unit it is adjacent to", but a unit can never be adjacent to itself, can it?

What exactly is broken about the distract ability that needs to be fixed? (Is there a bug report I could look at?)

J Tyne <jamit>
Project Member
Sat 13 Apr 2013 11:21:50 PM UTC, comment #2:

I know about the other bug (I submitted it first). Let's fix it! There's no reason that $this.unit, $teleport_unit, or anything else should not work without strange work arounds.

David Mikos <coffee>
Project Member
Fri 12 Apr 2013 02:18:43 PM UTC, comment #1:

I'm strongly against adding any more such variables, since they will suffer from the same problem like $teleport_unit, namely premature variable substitution if the ability is added to the unit using an [object]. The problems are described in https://gna.org/bugs/?func=detailitem&item_id=18893

Anonymissimus <anonymissimus>
Project Member
Sat 23 Feb 2013 07:53:57 AM UTC, original submission:

This is a small patch to add support for inner variables to abilities WML so that they all look like the $teleport_unit variable.

e.g.

[skimisher]
...
[affect_adjacent]
[filter]
id=$skirmisher_unit.id
[/filter]
[/affect_adjacent]
[/skirmisher]

$skirmisher_unit would become $teleport_unit for [teleport], etc.

The patch also includes a fix for the "distract" ability in TROW campaign and allows more control over abilities with adjacent filters.

David Mikos <coffee>
Project Member

 

(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jamit (Posted a comment)
  • -unavailable- added by anonymissimus (Posted a comment)
  • -unavailable- added by coffee (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 23 Feb 2013 07:53:57 AM UTCcoffeeAttached File-=>Added abilities_inner_variable_and_distract.patch, #17322
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup