Wesnoth 1.13.6

Get help with compiling or installing the game, and discuss announcements of new official releases.

Moderators: Forum Moderators, Developers

Re: Wesnoth 1.13.6

Postby zookeeper » December 16th, 2016, 9:58 am

You don't need to change your FOREACHes if you don't want to. It might be formally deprecated, but it's such a central macro that we're not going to be actually removing it anytime soon, if ever.

EDIT:
Pentarctagon wrote:FOREACH has been deprecated, though at the moment the [for] tag doesn't seem to quite work either.

FOREACH uses [for], but it looks like that problem with [for] doesn't affect the behaviour of FOREACH, right?
User avatar
zookeeper
WML Wizard
 
Posts: 9579
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: Wesnoth 1.13.6

Postby gfgtdf » December 16th, 2016, 4:03 pm

Hi, i am planning on releasing my 5 lords reign add-on for 1.13 and in testing i noticed that backstab has been deprecated and was wondering if their are any other deprecations that i should be aware of?


There some quite some changes as notes in the 1.13.x release threads:
  • The WML preprocessor now issues warnings to stderr when redefining macros without undefining them first with #undef.
  • [advance] was changed to [advancement] in modifications; as a result, AMLA definition macros (such as {AMLA_DEFAULT}) can now be used to create units that have already taken certain advancements.
  • {FOREACH} and {NEXT} now use [for] tags; this is only important for users who used one of these tags without the other, such as a custom loop macro closed by {NEXT}.
  • The interface of wesnoth.synchronize_choice for choices from multiple sides (which was introduced in wesnoth 1.13.0) has changed.
  • wesnoth.get_unit(underlying_id) was removed.
  • Changed wesnoth.put_unit so that the unit is passed as the first parameter; the original order is still supported, but is deprecated. In addition, calling wesnoth.put_unit without a unit (i.e., with just a location) is deprecated in favor of a new wesnoth.erase_unit function.
  • [side] share_view=yes/no, share_maps=yes/no were replaced with share_vision=all/shroud/none.
  • The menu item syntax (e.g. &image.png=Peasant=Easy) in campaign difficulty and in [message][option] is now deprecated
  • It's no longer possible to specify current_player= in [side], but it's still possible to query current_player from a side. To specify a side's name, use side_name=<name>
  • Wesnoth doesn't allow special characters like ,?;:'" in unit type ids anymore.
  • Changes to wesnoth.select_hex and wesnoth.highlight_hex. The former is deprecated, while the latter is no longer deprecated but has different behavior. To duplicate the behavior of select_hex, highlight_hex may be used along with the new select_unit function
  • The built-in cave map generator (used with scenario_generation=cave) is now deprecated and will be removed in 1.14 or 1.15. Scenarios that previously used it should change to the new Lua cave map generator. To do this, use map_generation=lua with create_map = << return wesnoth.require("lua/cave_map_generator.lua").generate_map(...) >>.
  • The AI functions that return aspects (eg, get_aggression()) are now deprecated. Use the ai.aspects table instead to fetch these aspects. As an exception, ai.get_attacks() is not deprecated and works the same as before. (AI get_* functions that do not return aspects, such as get_targets(), are unaffected.)
  • The metatables used by the helper.lua module are now protected from external access. If anyone used getmetatable() to alter these metatables, their code will no longer work. (You shouldn't have been doing that in the first place, though.)


The main reason why {FOREACH} was deprecated is that its a unbalanced macro for no reason, (for example {REPEAT} is not deprecated afaik.). Unbalanced macros doesnt only make it harder ot read by humans, they also make the code much harder to parse for extenal tools, for example wmlindent needs to have cloder/opener wmlindent comment attached to those macros and all other tools that need to parse those codes need to be coded to understand these comments.
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.
gfgtdf
Developer
 
Posts: 869
Joined: February 10th, 2013, 2:25 pm

Re: Wesnoth 1.13.6

Postby The_Gnat » December 16th, 2016, 8:40 pm

Thanks zookeeper and gfgtdf! That is very helpful thank you for the explanations! :D

EDIT: also the ABILITY_LEADERSHIP_LEVEL_X definition has been deprecated as of 1.13.2 in favor of {ABILITY_LEADERSHIP}
Last edited by The_Gnat on December 24th, 2016, 2:28 am, edited 1 time in total.
User avatar
The_Gnat
 
Posts: 1098
Joined: October 10th, 2016, 3:06 am

Re: Wesnoth 1.13.6

Postby The_Gnat » December 16th, 2016, 8:51 pm

Another thing i noticed is that the Banebow is still only 38 gold. I personally am confused (since the draug is 50, and the Wraith,Shadow and Chocobone lvl 2 units are 38 also). If the Banebow is that much worse than the Draug shouldn't it be improved? If it is not that much worse shouldn't its cost be increased?

Thank you
User avatar
The_Gnat
 
Posts: 1098
Joined: October 10th, 2016, 3:06 am

Re: Wesnoth 1.13.6

Postby beetlenaut » December 16th, 2016, 10:08 pm

The_Gnat wrote:Another thing i noticed is that the Banebow is still only 38 gold. I personally am confused (since the draug is 50, and the Wraith,Shadow and Chocobone lvl 2 units are 38 also).
Actually, I think it's fine. Maybe the banebow should be a little higher, but I actually think it's the draug that's overpriced. The death knight and royal guard are 45 and 43, and arguably better than the draug. I would put the draug at about 43. (The ghost line starts out at a 42% higher price than the skeleton archer, so that's not a good comparison. Nor is the chocobone--a specialty unit that can kill many full-health, level-3 units in a single attack.)
Campaigns: Dead Water
The Founding of Borstep
Secrets of the Ancients
User avatar
beetlenaut
Developer
 
Posts: 2049
Joined: December 8th, 2007, 3:21 am
Location: Oaxaca, Mexico

Re: Wesnoth 1.13.6

Postby Pentarctagon » December 16th, 2016, 10:16 pm

zookeeper wrote:
Pentarctagon wrote:FOREACH has been deprecated, though at the moment the [for] tag doesn't seem to quite work either.

FOREACH uses [for], but it looks like that problem with [for] doesn't affect the behaviour of FOREACH, right?


Correct.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
User avatar
Pentarctagon
Forum Administrator
 
Posts: 2857
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: Wesnoth 1.13.6

Postby The_Gnat » December 16th, 2016, 10:34 pm

beetlenaut wrote:
The_Gnat wrote:Another thing i noticed is that the Banebow is still only 38 gold. I personally am confused (since the draug is 50, and the Wraith,Shadow and Chocobone lvl 2 units are 38 also).
Actually, I think it's fine. Maybe the banebow should be a little higher, but I actually think it's the draug that's overpriced. The death knight and royal guard are 45 and 43, and arguably better than the draug. I would put the draug at about 43. (The ghost line starts out at a 42% higher price than the skeleton archer, so that's not a good comparison. Nor is the chocobone--a specialty unit that can kill many full-health, level-3 units in a single attack.)


Thanks for explaning! Though it is the cheapest 3rd level unit in the game currently, i believe its cost should be moved to 40 because the Orcish Slurbow who is comparable is 43 gold.

Also i have noticed that the 3rd level elves cost far more than most other units. The Champion, Marshal, Enchantress and Sharpshooter cost 55. That is a bit more than most other units. The Champion for example seems like a normal melee unit but costs 7 more than the Orcish Warlord and 12 more than the Royal Guard.

Why are the elves so much more expensive?

Thank you! :D
User avatar
The_Gnat
 
Posts: 1098
Joined: October 10th, 2016, 3:06 am

Re: Wesnoth 1.13.6

Postby Celtic_Minstrel » December 17th, 2016, 12:13 am

Pentarctagon wrote:I also haven't tried the [foreach] tag, since the wiki didn't seem overly clear to me about when/whether the array being looped over can be modified, and I didn't feel like investigating.

Assuming you don't set readonly=yes, the array being looped over can be modified, as long as you don't delete items (doing so will raise an error). I can't remember whether items added in the loop will be included by the loop. The $this_item variable (whatever you choose to name it) is effectively a copy of the current item, but it's saved back to the array at the end of each iteration. So, if you were to set $array[$i].something, the change would be overwritten with the old value. Instead you need to set $this_item.something.

Does that help?
Author of The Black Cross of Aleron campaign and Default++ era.
Maintainer of Steelhive.
User avatar
Celtic_Minstrel
Developer
 
Posts: 726
Joined: August 3rd, 2012, 11:26 pm

Re: Wesnoth 1.13.6

Postby Pentarctagon » December 17th, 2016, 1:03 am

Celtic_Minstrel wrote:
Pentarctagon wrote:I also haven't tried the [foreach] tag, since the wiki didn't seem overly clear to me about when/whether the array being looped over can be modified, and I didn't feel like investigating.

Assuming you don't set readonly=yes, the array being looped over can be modified, as long as you don't delete items (doing so will raise an error). I can't remember whether items added in the loop will be included by the loop. The $this_item variable (whatever you choose to name it) is effectively a copy of the current item, but it's saved back to the array at the end of each iteration. So, if you were to set $array[$i].something, the change would be overwritten with the old value. Instead you need to set $this_item.something.

Does that help?


It does, thanks. I'm really used to altering arrays using [$i] syntax, so it was strange reading that I can't do that with [foreach].
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
User avatar
Pentarctagon
Forum Administrator
 
Posts: 2857
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: Wesnoth 1.13.6

Postby beetlenaut » December 17th, 2016, 1:10 am

The_Gnat wrote:Why are the elves so much more expensive?
Maybe because they were some of the first units and their prices haven't changed since the beginning. I'm just guessing. The prices of high-level units are just not something that most developers worry about since they are so rarely important. I bet there are several more that should be adjusted too. If you were to make a more-consistent price list for level 3 units, there's a good chance it would be implemented.
Campaigns: Dead Water
The Founding of Borstep
Secrets of the Ancients
User avatar
beetlenaut
Developer
 
Posts: 2049
Joined: December 8th, 2007, 3:21 am
Location: Oaxaca, Mexico

Re: Wesnoth 1.13.6

Postby The_Gnat » December 17th, 2016, 1:46 am

beetlenaut wrote:
The_Gnat wrote:Why are the elves so much more expensive?
Maybe because they were some of the first units and their prices haven't changed since the beginning. I'm just guessing. The prices of high-level units are just not something that most developers worry about since they are so rarely important. I bet there are several more that should be adjusted too. If you were to make a more-consistent price list for level 3 units, there's a good chance it would be implemented.


Thank you! Yes with the 5 Lords Reign era all the units that can be bought are lvl 3 so it is easy to see the inconsistency of the units costs. I will consider their pricing and propose a list!
User avatar
The_Gnat
 
Posts: 1098
Joined: October 10th, 2016, 3:06 am

Re: Wesnoth 1.13.6

Postby The_Gnat » December 17th, 2016, 6:45 am

Recently i noticed a problem with the portraits in the in game help menu:

(portraits with transparency like the wings of the shyde the glow of the mage and the glow of the mystic are blurry)

image-transparency problems.png


I don't know if anything can be done about this, but it does unfortunately seriously distort the portrait of the Elvish Mystic (in my 5 Lords Reign era)

Thank you!
User avatar
The_Gnat
 
Posts: 1098
Joined: October 10th, 2016, 3:06 am

Re: Wesnoth 1.13.6

Postby zookeeper » December 17th, 2016, 10:07 am

The_Gnat wrote:Recently i noticed a problem with the portraits in the in game help menu:

(portraits with transparency like the wings of the shyde the glow of the mage and the glow of the mystic are blurry)

That looks like probably the wrong scaling algorithm gets used for downscaling portraits. If that's the case then it should be easy to fix.
User avatar
zookeeper
WML Wizard
 
Posts: 9579
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: Wesnoth 1.13.6

Postby The_Gnat » December 17th, 2016, 9:58 pm

Thank you zookeeper! :D
User avatar
The_Gnat
 
Posts: 1098
Joined: October 10th, 2016, 3:06 am

Re: Wesnoth 1.13.6

Postby The_Gnat » December 19th, 2016, 4:27 am

Hi i noticed that in the multiplayer menu for wesnoth 1.13.6 the villages all appear as grey squares. Is this an error? Maybe the squares could be replaced with a generic village icon.

grey squares.png
grey squares.png (155.22 KiB) Viewed 949 times


Also even when you set a player to "empty" (rather than local, network, or computer) a leader still appears. He does nothing but you can still attack him and he takes up a space. Is this on purpose? I think if you want to have guardian unit, that doesn't move, load that is fine but you shouldn't put "empty" in the description.

Thirdly i noticed the background picture in the multiplayer menu. Is there a way that when you click on my era it loads a different background image? (there probably isn't but it would be very good if it was like that)

background.png


Thank you!
User avatar
The_Gnat
 
Posts: 1098
Joined: October 10th, 2016, 3:06 am

PreviousNext

Return to Release Announcements, Compiling & Installation

Who is online

Users browsing this forum: No registered users and 3 guests