Reading labels and chat messages from WML

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
ReNoM
Posts: 50
Joined: November 23rd, 2008, 1:22 pm

Reading labels and chat messages from WML

Post by ReNoM »

I've got two questions:
1. Is there a way to read a label text from WML or Lua?
2. Is there a way to read chat messages from WML or Lua?
User avatar
Celtic_Minstrel
Developer
Posts: 2166
Joined: August 3rd, 2012, 11:26 pm
Location: Canada
Contact:

Re: Reading labels and chat messages from WML

Post by Celtic_Minstrel »

The answer is no.

In 1.15 I was working on a way to read label text from Lua, but that's not ready yet. It might be in 1.15.11 if you're lucky.

Chat messages, on the other hand… I don't have any plans to make them readable, and I'm not convinced it would even be a good idea. What do you want this for?
Author of The Black Cross of Aleron campaign and Default++ era.
Former maintainer of Steelhive.
ReNoM
Posts: 50
Joined: November 23rd, 2008, 1:22 pm

Re: Reading labels and chat messages from WML

Post by ReNoM »

Celtic_Minstrel wrote: February 28th, 2021, 7:56 pm In 1.15 I was working on a way to read label text from Lua, but that's not ready yet. It might be in 1.15.11 if you're lucky.
That's great news.
Celtic_Minstrel wrote: February 28th, 2021, 7:56 pm Chat messages, on the other hand… I don't have any plans to make them readable, and I'm not convinced it would even be a good idea. What do you want this for?
I was thinking of having chat commands that affect gameplay.
User avatar
Celtic_Minstrel
Developer
Posts: 2166
Joined: August 3rd, 2012, 11:26 pm
Location: Canada
Contact:

Re: Reading labels and chat messages from WML

Post by Celtic_Minstrel »

I think it might be better to use custom menu commands instead of chat commands. Adding custom commands to the :command console might be a valid request, but even then, I don't think it's a good idea to use them for gameplay - they should be reserved for debug functions in my opinion.
Author of The Black Cross of Aleron campaign and Default++ era.
Former maintainer of Steelhive.
Post Reply