bugBattle for Wesnoth - Bugs: bug #21208, Would like read-only access to...

Show feedback again

bug #21208: Would like read-only access to some top level tags exposed to lua

Submitted by:  Chris Beck <involution>
Submitted on:  Tue Oct 22 23:27:09 2013  
Category: Feature RequestSeverity: 1 - Wish
Priority: 5 - NormalItem Group:  None of the others
Status: FixedPrivacy: Public
Assigned to: David Mikos <coffee>Open/Closed: Closed
Release: 1.10, 1.11Operating System: Ubuntu

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

Please log in, so followups can be emailed to you.


Sat Dec 21 05:03:49 2013, comment #3:

Merged in 31e9c4ec0e86febc1035089739a2833f6faeb4b9.

David Mikos <coffee>
Project MemberIn charge of this item.
Fri Dec 6 06:06:18 2013, comment #2:

There is now a pull request regarding this: https://github.com/wesnoth/wesnoth-old/pull/87

I am attaching here a test add-on I used to test the proposed proxy table code.

(file #19422)

Chris Beck <involution>
Project Member
Sat Oct 26 04:04:06 2013, comment #1:

I noticed a bug report from Coffee from 2011 asking for similar thing...


Please, fix our bug, kill 2 birds with one stone XD.

Also if you can read mp_era it will make the new "modifications" feature of v1.11 about 100x more useful.

Chris Beck <involution>
Project Member
Tue Oct 22 23:27:09 2013, original submission:

For some UMC multiplayer scenarios, it would be nice to be able to access some of the keys of high level tags like [era] and [multiplayer]. For instance I know that save game files contain tags of multiplayer like mp_era and mp_countdown_... which will let me know what era was chosen, what the timer settings are, whether shuffle sides was enabled, things like that. If UMC authors could read these tags they could e.g. customize behavior of their scenarios when they are used with UMC eras, which would be very nice.

Anonymissimus writes that this can almost be done using lua, wesnoth.game_events.on_load, however the engine is written so that it strips out tags that should not be modified by lua. It would be nice if we could also get a read-only table passed to this function or a sister function that did contain tags like this.

This mainly a follow up on:

Chris Beck <involution>
Project Member


(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):

Attached Files
file #19422:  LUA_TEST.tar.gz added by involution (2kB - application/gzip - add-on "LUA TEST" contains test scenarios for sp, mp, mp campaign, to see the results of proxy table)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by shadowmaster (Updated the item)
  • -unavailable- added by coffee (Posted a comment)
  • -unavailable- added by involution (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Error: not logged in



    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon Jan 6 00:22:05 2014shadowmasterOpen/ClosedOpen=>Closed
    Sat Dec 21 05:03:49 2013coffeeStatusNone=>Fixed
      Assigned toNone=>coffee
    Fri Dec 6 06:06:18 2013involutionAttached File-=>Added LUA_TEST.tar.gz, #19422
    Show feedback again

    Back to the top

    Powered by Savane 3.1-cleanup