Custom ranges in 1.9

The place to post your WML questions and answers.

Moderator: Forum Moderators

Forum rules
  • Please use [code] BBCode tags in your posts for embedding WML snippets.
  • To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
Post Reply
Velensk
Multiplayer Contributor
Posts: 4002
Joined: January 24th, 2007, 12:56 am

Custom ranges in 1.9

Post by Velensk »

Not sure where to put this but I figured here would be about as good a place as any.

I recently noticed that in wesnoth 1.9.4 when you are using a unit with a range other than 'melee' or 'ranged' it will insert UNTLB range_ in front of the name of the custom range. This looks rather ugly/awkward. I figure that it is intended to make it easier to notice when you do something like type melle or other such things but I am really hoping that there is some way to turn it off. Does anyone know how?
"There are two kinds of old men in the world. The kind who didn't go to war and who say that they should have lived fast died young and left a handsome corpse and the old men who did go to war and who say that there is no such thing as a handsome corpse."
silene
Posts: 1109
Joined: August 28th, 2004, 10:02 pm

Re: Custom ranges in 1.9

Post by silene »

Velensk wrote:I recently noticed that in wesnoth 1.9.4 when you are using a unit with a range other than 'melee' or 'ranged' it will insert UNTLB range_ in front of the name of the custom range. This looks rather ugly/awkward. I figure that it is intended to make it easier to notice when you do something like type melle or other such things but I am really hoping that there is some way to turn it off. Does anyone know how?
"UNTLB" means "untranslatable" (which is bad). You don't have any way to turn it off.
Velensk
Multiplayer Contributor
Posts: 4002
Joined: January 24th, 2007, 12:56 am

Re: Custom ranges in 1.9

Post by Velensk »

I'd like to request that ranges become translatable before 1.10. Alternatively, offer some kind of feature to disable the notification though forcing everyone to use a translatable string instead might be advisable.

EDIT: I completely rewrote this message after doing a little bit of testing.
"There are two kinds of old men in the world. The kind who didn't go to war and who say that they should have lived fast died young and left a handsome corpse and the old men who did go to war and who say that there is no such thing as a handsome corpse."
silene
Posts: 1109
Joined: August 28th, 2004, 10:02 pm

Re: Custom ranges in 1.9

Post by silene »

Velensk wrote:I'd like to request that ranges become translatable before 1.10.
I didn't get to try it nor do I know if it is the correct way of enabling it, but theoretically it's already translatable in 1.9. You might try adding a language block to your campaign:

Code: Select all

[language] #or perhaps [+language]?
  range_whatever=_"whatever"
[/language]
Velensk
Multiplayer Contributor
Posts: 4002
Joined: January 24th, 2007, 12:56 am

Re: Custom ranges in 1.9

Post by Velensk »

I'm unfamiliar with how Wesnoth handles translations.

The problem is actually showing up for my eras. Is what you are suggesting that the following code be put into the main cfg or have I gotten something wrong about it?

Code: Select all

[language]
     secret= _ "secret"
[/language]
"There are two kinds of old men in the world. The kind who didn't go to war and who say that they should have lived fast died young and left a handsome corpse and the old men who did go to war and who say that there is no such thing as a handsome corpse."
silene
Posts: 1109
Joined: August 28th, 2004, 10:02 pm

Re: Custom ranges in 1.9

Post by silene »

Velensk wrote:have I gotten something wrong about it?
I'm sure it is "range_secret=" instead of just "secret=". What I'm not sure is whether you have to use "[language]" or "[+language]". I suggest you try both. (If both works, I suggest using "[language]".)
User avatar
Sapient
Inactive Developer
Posts: 4453
Joined: November 26th, 2005, 7:41 am
Contact:

Re: Custom ranges in 1.9

Post by Sapient »

This could present a problem for a multiplayer scenario that uses the default era and has an object to add an attack with a non-standard range.

(There is one such in my map pack. Then again, not many people play Northerner RPG these days...)
http://www.wesnoth.org/wiki/User:Sapient... "Looks like your skills saved us again. Uh, well at least, they saved Soarin's apple pie."
silene
Posts: 1109
Joined: August 28th, 2004, 10:02 pm

Re: Custom ranges in 1.9

Post by silene »

Sapient wrote:This could present a problem for a multiplayer scenario that uses the default era and has an object to add an attack with a non-standard range.
Just to make things clear, the UNTLB thing dates from around 2006, so it's nothing new. But perhaps it has been broken when the [language] block was improved for 1.9.4. (But since I didn't follow the changes, I don't know.)
Velensk
Multiplayer Contributor
Posts: 4002
Joined: January 24th, 2007, 12:56 am

Re: Custom ranges in 1.9

Post by Velensk »

Thanks for the help, [language] works.
"There are two kinds of old men in the world. The kind who didn't go to war and who say that they should have lived fast died young and left a handsome corpse and the old men who did go to war and who say that there is no such thing as a handsome corpse."
Post Reply