babaissarkar / frost-mage

Source of my Battle for Wesnoth Campaign, Journey of a Frost Mage
Other
1 stars 1 forks source link

Spectre Lord oddities #4

Open soliton- opened 2 weeks ago

soliton- commented 2 weeks ago

https://github.com/babaissarkar/frost-mage/blob/633c304ac253a5d8accd41b4551caf0c3f6891e6/units/undead-spirit/Spectre_Lord.cfg#L19

It says Sceptre twice there but presumably Spectre is meant. Also in living world should probably be in the living world.

Another odd thing is that this unit has the absorb special but with an amount of more than 1. Is that intentional? https://github.com/babaissarkar/frost-mage/blob/633c304ac253a5d8accd41b4551caf0c3f6891e6/units/undead-spirit/Spectre_Lord.cfg#L71

If intentional that sounds like something that should be mentioned in the description.

babaissarkar commented 2 weeks ago

It says Sceptre twice there but presumably Spectre is meant. Also in living world should probably be in the living world.

Most probably I mistyped. Will fix.

If intentional that sounds like something that should be mentioned in the description.

Sure, was intentional.

soliton- commented 2 weeks ago

Sure, was intentional.

To be clear that means the weapon special pretty much works opposite to what the weapon special description says. Instead of absorbing damage the unit takes more damage.

babaissarkar commented 2 weeks ago

Sure, was intentional.

To be clear that means the weapon special pretty much works opposite to what the weapon special description says. Instead of absorbing damage the unit takes more damage.

I misunderstood something about that special I guess. It was supposed to absorb 4hp from the other unit on each successful hit. Need to read the docs.

babaissarkar commented 2 weeks ago

Should be fixed by https://github.com/babaissarkar/frost-mage/commit/900cc487d249228eab882704916db4eb7d062402.

soliton- commented 2 weeks ago

You probably meant to use value = {VALUE} in the JOAFM_WEAPON_SPECIAL_ABSORB macro. Putting preprocessor stuff into translatable strings doesn't really work though.

The mainline consensus seems to be to not define specials in that way. Better would be to fix it to a value of 4 for absorb and if you do want other values then use a different name for the other values (like minor absorb for value = 2 or so). This way the issue with translatable strings does not come up as well.

babaissarkar commented 2 weeks ago

Changed to fixed value: https://github.com/babaissarkar/frost-mage/commit/22c7a342993951b312afffed83f1f569e74cfeae

Putting preprocessor stuff into translatable strings doesn't really work though.

Wasn't aware of that. I wonder if that can be considered a bug. In contrast to C++, I can't do "absorbs $x health" here, at least in WML.

soliton- commented 2 weeks ago

If you write _"foo {BAR}" then that is literally your translatable string. Expecting some magic to produce strings with {BAR} replaced with the actual values from all macro calls is not particularly reasonable though there is a PR open for that. IMO the proper solution would indeed be to provide automatic variables that expand to the actual values of certain attributes.

babaissarkar commented 2 weeks ago

IMO the proper solution would indeed be to provide automatic variables that expand to the actual values of certain attributes.

So the {VALUE} would get automatically stored into something like $value?

Also, does _"foo " + {BAR} not work? Though I assume the translators would find it hard to understand what's going on.

soliton- commented 2 weeks ago

IMO the proper solution would indeed be to provide automatic variables that expand to the actual values of certain attributes.

So the {VALUE} would get automatically stored into something like $value?

{VALUE} is just some preprocessor symbol but value = {VALUE} would assign whatever to the value attribute and you should then be able to use $value in name/description/etc to refer to the actual value. (And specifically for value based weapon specials you should probably also be able to access composite_value or so to refer to the effective value considering add/sub/multiply/divide.)

Also, does _"foo " + {BAR} not work? Though I assume the translators would find it hard to understand what's going on.

Of course that works but it may or may not allow a sensible translation to different languages.