Follow-up Comment #3, bug #23490 (project wesnoth):

I personally think storing these variables in the leaders variables isn't very
save since it will break if the leader dies or for sides with no leaders.

I recently tried to wrtie a similar thing, and since my addon is a
modification i cannot rely on leaders surviving.

referencing the save_id is a good idea but the problem is that the save_id
might not be usable for a variablename since it might contain spaces or other
characters so writing "$addonname_sides.$side.save_id|.upgrade_level" might
fail.

Another advantage of having side specific variables is that they would
automatically be removed from the savefile when the side is removed (if it has
persistnet=no attribute).

If this will be implementing i suggest lua functions
wesnoth.get_side_variable(side_num, variable_name) and
wesnoth.set_side_variable(side_num, variable_name, value) as the lua part of
the api.

Since most of my addons use a lot of lua i don't really care about the wml
interface, so it's better if someone who actually used wml a lot would decive
about the wml interface then.


    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?23490>

_______________________________________________
  Nachricht gesendet von/durch Gna!
  http://gna.org/


_______________________________________________
Wesnoth-bugs mailing list
Wesnoth-bugs@gna.org
https://mail.gna.org/listinfo/wesnoth-bugs

Reply via email to