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 22 Oct 2013 11:27:09 PM UTC  
 
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 21 Dec 2013 05:03:49 AM UTC, comment #3:

Merged in 31e9c4ec0e86febc1035089739a2833f6faeb4b9.

David Mikos <coffee>
Project MemberIn charge of this item.
Fri 06 Dec 2013 06:06:18 AM UTC, 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 26 Oct 2013 04:04:06 AM UTC, comment #1:

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

https://gna.org/bugs/?18954

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 22 Oct 2013 11:27:09 PM UTC, 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:
http://forums.wesnoth.org/viewtopic.php?f=21&t=39468#p561342

Chris Beck <involution>
Project Member

 

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

Attach File(s):
   
   
Comment:
   

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.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

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

    Back to the top


    Powered by Savane 3.1-cleanup