Wesnoth 1.13.6
Moderator: Forum Moderators
Re: Wesnoth 1.13.6
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:
EDIT:
FOREACH uses [for], but it looks like that problem with [for] doesn't affect the behaviour of FOREACH, right?Pentarctagon wrote:FOREACH has been deprecated, though at the moment the [for] tag doesn't seem to quite work either.
Re: Wesnoth 1.13.6
There some quite some changes as notes in the 1.13.x release threads: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?
- 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([i]underlying_id[/i])
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, callingwesnoth.put_unit
without a unit (i.e., with just a location) is deprecated in favor of a newwesnoth.erase_unit
function. [side] share_view=yes/no
,share_maps=yes/no
were replaced withshare_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, usemap_generation=lua
withcreate_map = << return wesnoth.require("lua/cave_map_generator.lua").generate_map(...) >>
. - The AI functions that return aspects (eg,
get_aggression()
) are now deprecated. Use theai.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 asget_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.
Re: Wesnoth 1.13.6
Thanks zookeeper and gfgtdf! That is very helpful thank you for the explanations!
EDIT: also the ABILITY_LEADERSHIP_LEVEL_X definition has been deprecated as of 1.13.2 in favor of {ABILITY_LEADERSHIP}
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.
Creator of: The Reign of The Lords Era,The Gnats Franken Dungeon.
Re: Wesnoth 1.13.6
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
Thank you
Creator of: The Reign of The Lords Era,The Gnats Franken Dungeon.
- beetlenaut
- Developer
- Posts: 2825
- Joined: December 8th, 2007, 3:21 am
- Location: Washington State
- Contact:
Re: Wesnoth 1.13.6
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.)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).
Campaigns: Dead Water,
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide
- Pentarctagon
- Project Manager
- Posts: 5564
- Joined: March 22nd, 2009, 10:50 pm
- Location: Earth (occasionally)
Re: Wesnoth 1.13.6
Correct.zookeeper wrote:FOREACH uses [for], but it looks like that problem with [for] doesn't affect the behaviour of FOREACH, right?Pentarctagon wrote:FOREACH has been deprecated, though at the moment the [for] tag doesn't seem to quite work either.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
take one down, patch it around
-2,147,483,648 little bugs in the code
Re: Wesnoth 1.13.6
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.beetlenaut wrote: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.)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).
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!
Creator of: The Reign of The Lords Era,The Gnats Franken Dungeon.
- Celtic_Minstrel
- Developer
- Posts: 2216
- Joined: August 3rd, 2012, 11:26 pm
- Location: Canada
- Contact:
Re: Wesnoth 1.13.6
Assuming you don't setPentarctagon 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.
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?
- Pentarctagon
- Project Manager
- Posts: 5564
- Joined: March 22nd, 2009, 10:50 pm
- Location: Earth (occasionally)
Re: Wesnoth 1.13.6
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].Celtic_Minstrel wrote:Assuming you don't setPentarctagon 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.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?
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
take one down, patch it around
-2,147,483,648 little bugs in the code
- beetlenaut
- Developer
- Posts: 2825
- Joined: December 8th, 2007, 3:21 am
- Location: Washington State
- Contact:
Re: Wesnoth 1.13.6
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.The_Gnat wrote:Why are the elves so much more expensive?
Campaigns: Dead Water,
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide
Re: Wesnoth 1.13.6
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!beetlenaut wrote: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.The_Gnat wrote:Why are the elves so much more expensive?
Creator of: The Reign of The Lords Era,The Gnats Franken Dungeon.
Re: Wesnoth 1.13.6
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)
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!
(portraits with transparency like the wings of the shyde the glow of the mage and the glow of the mystic are blurry)
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!
Creator of: The Reign of The Lords Era,The Gnats Franken Dungeon.
Re: Wesnoth 1.13.6
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.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)
Re: Wesnoth 1.13.6
Thank you zookeeper!
Creator of: The Reign of The Lords Era,The Gnats Franken Dungeon.
Re: Wesnoth 1.13.6
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.
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)
Thank you!
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)
Thank you!
Creator of: The Reign of The Lords Era,The Gnats Franken Dungeon.