#560069 addon unit definitions can override mainline units producing strange results

#560069#5
Date:
2009-12-08 17:43:14 UTC
From:
To:
Hi,

the campaign is using units from other campaigns (Dwarvish Runesmith)
and thus you should either depend from this campaign package but IMHO
it is more reasonable to move these general units to the general data
package.  Moreover I realised that I endet up with a

  game_error: Could not find the unit being advanced to: Dwarvish Runemaster_alt

error in the httt campaign.  I was able to fix by the following hack:

$ zdiff DT-Das_Zepter_des_Feuers_Runde_6r.gz DT-Das_Zepter_des_Feuers_Runde_6rr.gz
16262c16262
<                       advances_to="Dwarvish Runemaster_alt"
---
21665c21665
<                       advances_to="Dwarvish Runemaster_alt"
---
but even if it sounds reasonable it needs testing.

So my suggestion would be: Move the two Dwarfish units Runemaster
and Runesmith to the general data and apply the attached patch.

I can provide a savegame which shows the problem at request.

Kind regards

    Andreas.

#560069#14
Date:
2009-12-10 21:15:07 UTC
From:
To:
tags 560069 + moreinfo
thanks

* Andreas Tille <andreas@an3as.eu> [2009-12-08 18:43:14 CET]:

 Actually, upstream is unable to follow that reasoning, and I have
problems to do so, too. We aren't able to find any dwarvish runemasters
in that campaign, nor any dwarvish runesmiths? The only match for the
term "rune" in the campaign is part of the story description, nothing
more.

 The Dwarvish Runesmith is only used in Sceptre of Fire and nowhere
else:

 Here is a comment from an upstream developer:

<Ivanovic> that is: i don't understand the report completely
<Ivanovic> it is clearly not about httt
<Ivanovic> since in httt there is no runemaster at all
<Ivanovic> there are only runemasters in thot and sof
<Ivanovic> and the runesmith is *only* used in SoF

#v+
nils@rechner1 ~/wesnoth_up/data $ grep -iR "Dwarvish Runesmith" * | grep -v "text-base"
campaigns/Sceptre_of_Fire/scenarios/2t_In_the_Dwarven_City.cfg:            type=Dwarvish Runesmith
campaigns/Sceptre_of_Fire/scenarios/3t_The_Council_Regathers.cfg:            type=Dwarvish Runesmith
campaigns/Sceptre_of_Fire/scenarios/3t_The_Council_Regathers.cfg:            type=Dwarvish Runesmith
campaigns/Sceptre_of_Fire/scenarios/3t_The_Council_Regathers.cfg:            type=Dwarvish Runesmith
campaigns/Sceptre_of_Fire/scenarios/4t_The_Jeweler.cfg:            type=Dwarvish Runesmith
campaigns/Sceptre_of_Fire/scenarios/4t_The_Jeweler.cfg:            type=Dwarvish Runesmith
campaigns/Sceptre_of_Fire/units/Dwarvish_Runesmith.cfg:    id=Dwarvish Runesmith
campaigns/Sceptre_of_Fire/units/Dwarvish_Runesmith.cfg:    name= _ "Dwarvish Runesmith"
campaigns/Sceptre_of_Fire/units/Dwarvish_Runesmith.cfg:    description= _ "Dwarvish runesmiths, now practiced at their craft, carve arcane runes into their weapons and armor. These runes infuse the runesmith's blows with power and accuracy
campaigns/Sceptre_of_Fire/utils/utils.cfg:        type=Dwarvish Lord,Dwarvish Dragonguard,Dwarvish Runemaster_alt,Dwarvish Sentinel,Dwarvish Steelclad,Dwarvish Thunderguard,Dwarvish Runesmith,Dwarvish Stalwart,Gryphon Master,Gryphon Rider,
nils@rechner1 ~/wesnoth_up/data $ grep -iR "Dwarvish Runemaster" * | grep -v "text-base"
campaigns/The_Hammer_of_Thursagan/units/Dwarvish_Rune_Lord.cfg:    # This is a customized Dwarvish Runemaster with a chill tempest
campaigns/The_Hammer_of_Thursagan/units/Dwarvish_Rune_Lord.cfg:    name= _ "Dwarvish Runemaster"
campaigns/The_Hammer_of_Thursagan/units/Dwarvish_Rune_Lord.cfg:    description= _ "Except for those with almost supernatural skill, the highest rank a runecrafter can rise to is that of the Dwarvish Runemaster. Striking blows nearly as pow
campaigns/Sceptre_of_Fire/scenarios/3_Searching_for_the_Runecrafter.cfg:            type=Dwarvish Runemaster_alt
campaigns/Sceptre_of_Fire/units/Dwarvish_Runemaster.cfg:    id=Dwarvish Runemaster_alt
campaigns/Sceptre_of_Fire/units/Dwarvish_Runemaster.cfg:    name= _ "Dwarvish Runemaster"
campaigns/Sceptre_of_Fire/units/Dwarvish_Runemaster.cfg:    description= _ "Except for those with almost supernatural skill, the highest rank a runecrafter can rise to is that of the Dwarvish Runemaster. Striking blows nearly as powerful a
campaigns/Sceptre_of_Fire/units/Dwarvish_Runesmith.cfg:    advances_to=Dwarvish Runemaster_alt
campaigns/Sceptre_of_Fire/utils/utils.cfg:        type=Dwarvish Lord,Dwarvish Dragonguard,Dwarvish Runemaster_alt,Dwarvish Sentinel,Dwarvish Steelclad,Dwarvish Thunderguard,Dwarvish Runesmith,Dwarvish Stalwart,Gryphon Master,Gryphon Rider,
core/units/dwarves/Runemaster.cfg:    id=Dwarvish Runemaster
core/units/dwarves/Runemaster.cfg:    name= _ "Dwarvish Runemaster"
#v-

<Ivanovic> as you see, the runesmith is only used in SoF and specified
           in that campaign
<Ivanovic> the runemaster on the other hand (at least in the _alt_
           version) does only appear in SoF and is defined there

 Can you maybe attach your savegame for inspection?

 Thanks,
Rhonda

#560069#19
Date:
2009-12-11 00:01:20 UTC
From:
To:
The Dwarvish Fighter unit enabled the option to advance to either
Steelclad or Runesmith.  I confirm that when checking the core units I
cant see this.  But anyway - I did not hacked / patched the campaign and
realised this change in contrast what I know from the past.  I attached
the savegame which immediately leads to the problem if you fight the
enemy leader.

This is what I *expected* but my *observation* is different.

See attachment.  I admit I deleted all previous savegames.

Kind regards

     Andreas.

#560069#26
Date:
2009-12-30 21:45:20 UTC
From:
To:
Hi Andreas,

I tried the savegame and can't load it due to a missing 'Dwarvish
Runesmith'. I had a look at the savegame itself and it contains
references to Invasion from the Unknown. So it might be some data from
the Invasion from the Unknown addon got picked up in httt. That addon
also has rune smith and rune master unit.
Do you remember whether you also played that addon during while playing
httt? If so, do you maybe have any hints on how to reproduce the problem
from scratch?

#560069#31
Date:
2009-12-31 11:34:35 UTC
From:
To:
This sounds like a reasonable explanation.  Yes, I have the add-on
Invasion from the Unknown downloaded on my machine.

I did not played IftU but it is just in my ${HOME}/.wesnoth/data/add-ons
dir.  So I wonder how it might happen that units from this dir are
prefered over the units from main wesnoth which is installed in
/usr/share/games/wesnoth/data under Debian.  Sounds like a bug to me -
but I have no idea whether it is a httt bug or a general problem.

I will not find the time to replay the campaign but will ask my son
whether he might try without IftU installed.  In any case the Campaign
should work independently whether any add-ons are installed or not.

Kind regards

      Andreas.

#560069#36
Date:
2010-01-01 19:56:38 UTC
From:
To:
I can confirm that the same problem does occure also in Legend of
Wesmere and thus I assume that the problem is not connected to a
specific campaign but rather a general problem of Wesnoth which
prefers add-on unit definitions over the main Wesnoth line.

If you agree with this conclusion we should retitle the bug and
reassign it to the wesnoth package.

Kind regards

      Andreas.

#560069#41
Date:
2010-01-02 09:15:31 UTC
From:
To:
Do you have some hints on how to reproduce the problem in LoW?

It indeed looks like an upstream engine problem or a bug in the add-on
and not a packaging problem. So feel free to reassign and retitle the
bug.