[Wesnoth-bugs] [bug #21933] Menu items have strange effects
Follow-up Comment #4, bug #21933 (project wesnoth): As I've said, I've bisected, here's the latest commit I could find where this doesn't happen: 5530cd0fc557079f8304bc6b680f8e01130241cb ___ Reply to this item at: http://gna.org/bugs/?21933 ___ Message sent via/by Gna! http://gna.org/ ___ Wesnoth-bugs mailing list Wesnoth-bugs@gna.org https://mail.gna.org/listinfo/wesnoth-bugs
[Wesnoth-bugs] [bug #21933] Menu items have strange effects
Follow-up Comment #5, bug #21933 (project wesnoth): Okay, I apologize, this is indeed a bug within my WML. Apparently there's a new side property `fight_on_without_leader` I need to use to have sides without leader carry on their units. However, the behavior currently is inconsistent. You can avoid triggering a check_victory event by ending the scenario on turn 1, and by not using anything else that triggers check_victory(apparently using a menu action is among these). I think a call to check_victory should be forced before ending the scenario, so that the team._info.lost flag is set properly when units are carried over. ___ Reply to this item at: http://gna.org/bugs/?21933 ___ Message sent via/by Gna! http://gna.org/ ___ Wesnoth-bugs mailing list Wesnoth-bugs@gna.org https://mail.gna.org/listinfo/wesnoth-bugs
[Wesnoth-bugs] [bug #21933] Menu items have strange effects
URL: http://gna.org/bugs/?21933 Summary: Menu items have strange effects Project: Battle for Wesnoth Submitted by: cib Submitted on: Thu 17 Apr 2014 11:59:16 PM UTC Category: Bug Severity: 3 - Normal Priority: 5 - Normal Item Group: WML Status: None Privacy: Public Assigned to: None Originator Email: Open/Closed: Open Discussion Lock: Any Release: 1.13.0-dev Operating System: Arch Linux ___ Details: Steps to reproduce: 1. Download my campaign from https://github.com/CIB/wesnoth-sandbox and place into add-on directory 2. Start Sandbox campaign 3. Move onto one of the labeled towns, end scenario 4. Right-click anywhere, use the Player Overview menu item 5. Move to the very left of the map, end scenario 6. Step off the labeled town and back onto it, end scenario 7. Notice that the script to unstore recall units complains, because the recall lists have been wiped(can confirm this by looking at the save) Note that if between step 4. and step 5. you save and reload, the problem will not happen. This suggests to me that this is a bug. I've git bisected and the earliest commit with the problem I can find is d0ded837af1a6e159cb3a40fbb9106aa50813c91, there's a bunch of commits by the same developer before that but I can't get them to compile so I can't test them. ___ Reply to this item at: http://gna.org/bugs/?21933 ___ Message sent via/by Gna! http://gna.org/ ___ Wesnoth-bugs mailing list Wesnoth-bugs@gna.org https://mail.gna.org/listinfo/wesnoth-bugs
[Wesnoth-bugs] [bug #21933] Menu items have strange effects
Follow-up Comment #1, bug #21933 (project wesnoth): why do you think this is related to Menu items ? i can also reproduce this behaviour when not using the menu item. ___ Reply to this item at: http://gna.org/bugs/?21933 ___ Nachricht gesendet von/durch Gna! http://gna.org/ ___ Wesnoth-bugs mailing list Wesnoth-bugs@gna.org https://mail.gna.org/listinfo/wesnoth-bugs
[Wesnoth-bugs] [bug #21933] Menu items have strange effects
Update of bug #21933 (project wesnoth): Status:None = Need Info ___ Reply to this item at: http://gna.org/bugs/?21933 ___ Nachricht gesendet von/durch Gna! http://gna.org/ ___ Wesnoth-bugs mailing list Wesnoth-bugs@gna.org https://mail.gna.org/listinfo/wesnoth-bugs
[Wesnoth-bugs] [bug #21933] Menu items have strange effects
Follow-up Comment #2, bug #21933 (project wesnoth): Note that if between step 4. and step 5. you save and reload, the problem will not happen. This suggests to me that this is a bug This can also be the result of bad wml, especialy when you use prealod events or on_load to write/read variables. ___ Reply to this item at: http://gna.org/bugs/?21933 ___ Nachricht gesendet von/durch Gna! http://gna.org/ ___ Wesnoth-bugs mailing list Wesnoth-bugs@gna.org https://mail.gna.org/listinfo/wesnoth-bugs
[Wesnoth-bugs] [bug #21933] Menu items have strange effects
Update of bug #21933 (project wesnoth): Status: Need Info = Invalid ___ Follow-up Comment #3: I tested again and i could even reproduce this with the 1.11.8 version. So this is most likeley a bug in your wml/lua i marked this bug as invalid. if you still think this is a bug in wesnoth you should offer a simpler scenario to inspect. a general rule is, that you should never read/write wml variables/other gamestate in a preload event/on_load unless you write/read them also during a on_savevictory. Ofc there are exceptions. Note that on_load currently doesnt work in mp, so the currently best method to keep lua variables persitent if you dont want to use set_wml_var_metatable, is to read your lua variables in preload, and save them in on_save and in victory events. s/prealod/preload in the post before. ___ Reply to this item at: http://gna.org/bugs/?21933 ___ Nachricht gesendet von/durch Gna! http://gna.org/ ___ Wesnoth-bugs mailing list Wesnoth-bugs@gna.org https://mail.gna.org/listinfo/wesnoth-bugs