How to resync in wml for [set_menu_item]

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
User avatar
LordAwsomeness
Posts: 203
Joined: August 12th, 2013, 2:20 pm
Location: U.S.A.

How to resync in wml for [set_menu_item]

Post by LordAwsomeness »

So i am attempting to use the synced=no function for a [set_menu_item] in order to create faster hero creation for my rpg era. I am not yet fluent enough in lua to make menus, however i came across the synced function in the wml reference and was wondering if there is a way to resync the clients back together with changes made using the unsynced menu. Is this possible using wml? I believe i can do it using lua but i just havent gotten that far on my lua studies yet.

EDIT: i have also seen the [sync_variable] syntax and am wondering if i could potentially use this as a part of the process. perhaps the unsynced menus wouldn't allow for players to necessarily change their heroes (unit) through the menu, but it would be able to select the hero creation process and then the changes would apply once it is their turn using this.
- Been playing Wesnoth since 2004 and the 1.0.x versions.
- Creator of Undead Invasion MP Scenario Pack.
- Creator of Valeria MP Adventure
- Creator of LA_RPG ERA
User avatar
Ravana
Forum Moderator
Posts: 2464
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: How to resync in wml for [set_menu_item]

Post by Ravana »

I know [set_global_variable] way to sync changes. (https://github.com/ProditorMagnus/Royal ... s/menu.lua)
gfgtdf
General Code Maintainer
Posts: 1344
Joined: February 10th, 2013, 2:25 pm

Re: How to resync in wml for [set_menu_item]

Post by gfgtdf »

LordAwsomeness wrote: September 11th, 2020, 5:51 pm EDIT: i have also seen the [sync_variable] syntax and am wondering if i could potentially use this as a part of the process. perhaps the unsynced menus wouldn't allow for players to necessarily change their heroes (unit) through the menu, but it would be able to select the hero creation process and then the changes would apply once it is their turn using this.


This sounds like a good way to do it.
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.
Post Reply