[store_unit_defense] not supported?

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
Choicerer
Posts: 238
Joined: April 29th, 2017, 11:37 pm

[store_unit_defense] not supported?

Post by Choicerer »

How is [store_unit_defense] not supported? I can't see any version requirements in the wiki description. Am I doing something wrong?
User avatar
James_The_Invisible
Posts: 534
Joined: October 28th, 2012, 1:58 pm
Location: Somewhere in the Northlands, fighting dark forces
Contact:

Re: [store_unit_defense] not supported?

Post by James_The_Invisible »

This tag was added in 1.13.9. Whoever added it to wiki, forgot to mention it. Fixed it.
Choicerer
Posts: 238
Joined: April 29th, 2017, 11:37 pm

Re: [store_unit_defense] not supported?

Post by Choicerer »

Okay, so just to make sure - there is no way to know a unit's defence in Stable Wesnoth other than storing the terrain type under it and then writing a long function to pick the correct defence from the list?
User avatar
James_The_Invisible
Posts: 534
Joined: October 28th, 2012, 1:58 pm
Location: Somewhere in the Northlands, fighting dark forces
Contact:

Re: [store_unit_defense] not supported?

Post by James_The_Invisible »

It is implemented in Lua: https://github.com/wesnoth/wesnoth/comm ... 664118b43c so probably you can make it work on Wesnoth 1.12 (without recompiling I mean).
Last edited by James_The_Invisible on December 28th, 2017, 4:57 pm, edited 1 time in total.
Choicerer
Posts: 238
Joined: April 29th, 2017, 11:37 pm

Re: [store_unit_defense] not supported?

Post by Choicerer »

Thanks!
Post Reply